Timothy Clemans
Timothy Clemans

Reputation: 1761

Getting name of field that is primary_key

Using Python I do:

r.table_create('examples', primary_key='name')

Now how do I get the name of the primary_key field which is "name"? I tried:

r.table('examples').index_list().run()

But it only returns secondary indexes.

Upvotes: 1

Views: 55

Answers (1)

mlucy
mlucy

Reputation: 5289

If you run r.table('test').info().run() part of the output is the primary key.

Upvotes: 2

Related Questions