sasha-alias / sqltabs

Rich SQL client for Postgresql, MySQL, MS SQL, Amazon Redshift, Google Firebase (Firestore)
https://www.sqltabs.com
GNU General Public License v3.0
805 stars 65 forks source link

How to get a document by document id in google firestore? #145

Open kuamatzin opened 4 years ago

kuamatzin commented 4 years ago

Hi, I would like to know how to get a specific document in google firestore by id

sasha-alias commented 4 years ago

Hi, I don't think it's possible atm. Only collection instances can be displayed. Probably it deserves to be implemented one day.

donaldnguyen83 commented 3 years ago

@kuamatzin You can select like below:

collection('your_collection')
    .where('__name__', '==' , 'your_document_id')
    .select();
jpacareu commented 3 years ago

@kuamatzin You can select like below:

collection('your_collection')
    .where('__name__', '==' , 'your_document_id')
    .select();

Yep this one worked well for me:

collection("users").where("__name__", "==" , "USER_ID_HASH").select()