get
ReQL command: get
Command syntax
table.get(key) → singleRowSelection
Description
Get a document by primary key.
If no document exists with that primary key, get
will return None
.
Example: Find a document by UUID.
r.table('posts').get('a9849eef-7176-4411-935b-79a6e3c56a74').run(conn)
Example: Find a document and merge another document with it.
r.table('heroes').get(3).merge( { 'powers': ['invisibility', 'speed'] } ).run(conn)
_Example: Subscribe to a document’s changefeed.
changes = r.table('heroes').get(3).changes().run(conn)
Related commands
Get more help
Couldn't find what you were looking for?
- Ask a question on Stack Overflow
- Chat with us and our community on Slack
- Talk to the team on IRC on #rethinkdb@freenode.net — via Webchat
- Ping @rethinkdb on Twitter
- Post an issue on the documentation issue tracker on GitHub
© RethinkDB contributors
Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
https://rethinkdb.com/api/python/get/