RethinkDB LIMIT rows query in python

Connect to the database:

import rethinkdb as r
r.connect("127.0.0.1", 28015).repl()
db = r.db("search")

Filter using match:

[x for x in table.limit(10).run()]

This will return an array of rows, limited to the number of rows requested.

Note that unlike SQL, the column headers are case sensitive. It appears that the regular expression must match the entire string.

Leave a Reply

Your email address will not be published. Required fields are marked *