{"id":2432,"date":"2015-07-13T01:50:26","date_gmt":"2015-07-13T01:50:26","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2432"},"modified":"2015-07-13T01:50:26","modified_gmt":"2015-07-13T01:50:26","slug":"rethinkdb-limit-rows","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/rethinkdb-limit-rows\/","title":{"rendered":"RethinkDB LIMIT rows query in python"},"content":{"rendered":"<p>Connect to the database:<\/p>\n<pre lang=\"python\">\nimport rethinkdb as r\nr.connect(\"127.0.0.1\", 28015).repl()\ndb = r.db(\"search\")\n<\/pre>\n<p>Filter using match:<\/p>\n<pre lang=\"python\">\n[x for x in table.limit(10).run()]\n<\/pre>\n<p>This will return an array of rows, limited to the number of rows requested.<\/p>\n<p>Note that unlike SQL, the column headers are case sensitive. It appears that the regular expression must match the entire string.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connect to the database: import rethinkdb as r r.connect(&#8220;127.0.0.1&#8221;, 28015).repl() db = r.db(&#8220;search&#8221;) 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 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.garysieling.com\/blog\/rethinkdb-limit-rows\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;RethinkDB LIMIT rows query in python&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[157,160,447,462,466],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2432"}],"collection":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/comments?post=2432"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2432\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}