Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 813 Bytes

File metadata and controls

42 lines (31 loc) · 813 Bytes
layout language permalink command related_commands
api-command
Python
api/python/get/
get
between get_all filter
between/
get_all/
filter/

Command syntax

{% apibody %} table.get(key) → singleRowSelection {% endapibody %}

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)