Java 在Android开发中将SQL查询转换为云Firestore
如何将客户WHERE NAME=“JOHN”中的SELECT USERID转换为android上的Cloud FirestoreJava 在Android开发中将SQL查询转换为云Firestore,java,android,firebase,google-cloud-firestore,Java,Android,Firebase,Google Cloud Firestore,如何将客户WHERE NAME=“JOHN”中的SELECT USERID转换为android上的Cloud Firestore 要实现这一点,请使用以下代码行: FirebaseFirestore rootRef = FirebaseFirestore.getInstance(); CollectionReference customerRef = rootRef.collection("Customer"); Query query = customerRef.whereEqualTo("n
要实现这一点,请使用以下代码行:
FirebaseFirestore rootRef = FirebaseFirestore.getInstance();
CollectionReference customerRef = rootRef.collection("Customer");
Query query = customerRef.whereEqualTo("name", "John");
有可能拿到身份证吗?像7E6ID…?如果您使用的是
get()
调用,那么应该使用:document.getId()
。很高兴听到这个消息。干杯