Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要Entity从我的表中获取一个特定的信息,即 python GQL 查询。
Entity
SELECT * FROM table1 WHERE id='12345'
这个查询的 Java 版本是什么?
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Query query = new Query("table1"); query.addFilter("id", FilterOperator.EQUAL, "12345"); PreparedQuery pq = datastore.prepare(query); Entity customer = pq.asSingleEntity();
这对我有用