{"id":2421,"date":"2015-07-13T01:34:00","date_gmt":"2015-07-13T01:34:00","guid":{"rendered":"http:\/\/www.garysieling.com\/blog\/?p=2421"},"modified":"2015-07-13T01:34:00","modified_gmt":"2015-07-13T01:34:00","slug":"rethinkdb-filter-using-equality-condition-in-python","status":"publish","type":"post","link":"https:\/\/www.garysieling.com\/blog\/rethinkdb-filter-using-equality-condition-in-python\/","title":{"rendered":"RethinkDB filter using equality condition 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\">\nrows = table.filter(lambda x: x['search_query'] == value).run()\n<\/pre>\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: rows = table.filter(lambda x: x[&#8216;search_query&#8217;] == value).run() 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},"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\/2421"}],"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=2421"}],"version-history":[{"count":0,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/posts\/2421\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/media?parent=2421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/categories?post=2421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.garysieling.com\/blog\/wp-json\/wp\/v2\/tags?post=2421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}