Hi, How can I get the auto generated ID of the collection?
I created a Collection with this query:
client.query(
q.CreateCollection({ name: 'Books' })
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
It showed me this message:
{
ref: Collection("Books"),
ts: 1634797835650000,
history_days: 30,
name: 'Books'
}
I run this query to get the collection but I don’t see the autogenerated ID of the collection.
client.query(
q.Get(q.Collection('Books'))
)
.then((ret) => console.log(ret))
.catch((err) => console.error('Error: %s', err))
Response:
{
ref: Collection("Books"),
ts: 1634797835650000,
history_days: 30,
name: 'Books'
}
How can I get the auto generated ID of the collection?