Let's talk about NoSQL Standard
Otávio Santana
@otaviojava
otaviojava@java.net
otaviojava@apache.org
NoSQL
● Database
● Doesn't use relationship
● BASE
● Five types
Key Value
● AmazonDynamo
● AmazonS3
● Redis
● Scalaris
● Voldemort
● Couchbase
valuekey
valuekey
valuekey
Document
● AmazonSimpleDb
● ApacheCouchdb
● MongoDb
● Riak
● Couchbase
Column
● Hbase
● Cassandra
● Scylla
● Clouddata
● SimpleDb
● DynamoDB
Row-key Columns...
Apollo
Aphrodi
te
Ares
Sun
Duty
{Love, happy}
Duty
War
Duty
Sword
weapon
Color
Krato
s
Dead Gods
13
Graph
● Neo4j
● InfoGrid
● Sones
● HyperGraphDB
Apollo Ares
Krat
os
was dead was dead
Is brother
killed killed
Multi-model
● OrientDB
● Couchbase
● Elasticsearch
● Cassandra
The Problem
The Problem
The Current solution
● Spring Data
● Hibernate OGM
● TopLink
The Perfect Solution
● Abstraction API
● Communication API
● No lock-in
● Split problems
Apache Diana was Born (incubator)
● API Communication layer
● Apache Project
● Document, key-value, Column, Graph
● Universal Adapter
● Standard
What Diana is not
● A new API to replace JPA
● A new API to abstraction layer
● Just one API communication to solve all kind of NoSQL
database
● Be responsible to do integrations with other technologies such
as CDI, EJB, Bean Validation, Spring, etc.
Diana Project
● Commons API
● Document API
● Graph API
● Key-value API
● Column API
● Four TCKs
Diana Project
Why Diana?
● Goddess of the hunt, nature
and moon
● Fought in Troy
● brave warrior and hunter
Road Map
● Draft and code Proposal
● Community Feedback
● Involve NoSQL Vendors
● Involve Solution Vendors
● Apache Project
● Development
● JSR
Nomenclature
● Configuration
● Factory
● Manager
● Entity
● Value
Value
Value value = Value.of("123");
Integer integerValue = value.get(Integer.class);
List<Integer> list = value.getList(Integer.class);
Set<Integer> set = value.getSet(Integer.class);
Stream<Integer> stream = value.getStream(Integer.class);
String cast = value.cast();//unsafe
Custom Value
public class MoneyWriter implements
WriterField<Money, String> {
@Override
public boolean isCompatible(Class clazz) {
return false;
}
@Override
public String write(Money object) {
return object.toString();
}
}
public class MoneyReader implements
ReaderField {
@Override
public boolean isCompatible(Class clazz) {
return Money.class.equals(clazz);
}
@Override
public <T> T read(Class<T> clazz, Object
value) {
return (T) Money.parse(value.toString());
}
}
Entities
Money money = new Money();
Value value = Value.of(money);
DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection");
entity.add(Document.of("name", "Daniel Soro"));
entity.add(Document.of("age", 26));
entity.add(Document.of("salary", money));
String name = entity.getName();
List<Document> documents = entity.getDocuments();
Optional<Document> age = entity.find("age");
Entities
Money money = new Money();
Value value = Value.of(money);
DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection");
entity.add(Document.of("name", "Daniel Soro"));
entity.add(Document.of("age", 26));
entity.add(Document.of("salary", money));
entity.add(Document.of("subdocument", Document.of("sub", Arrays.asList(1, 2, 3))));
String name = entity.getName();
List<Document> documents = entity.getDocuments();
Optional<Document> age = entity.find("age");
Entities
Money money = new Money();
Value value = Value.of(money);
ColumnFamilyEntity entity = ColumnFamilyEntity.of("family");
Column id = Column.of("id", 10L);
entity.add(id);
entity.add(Column.of("version", 0.001));
entity.add(Column.of("name", "Diana"));
entity.add(Column.of("options", Arrays.asList(1, 2, 3)));
entity.add(Column.of("pay", value));
String name = entity.getName();
List<Column> columns = entity.getColumns();
Optional<Column> notFound = entity.find("notFound");
Entities
Value value = Value.of(new Money());
KeyValue<String> keyValue = KeyValue.of("key", value);
String key = keyValue.getKey();
Value value1 = keyValue.getValue();
Entities
Value value = Value.of(new Money());
KeyValue<String> keyValue = KeyValue.of("key", value);
String key = keyValue.getKey();
Value value1 = keyValue.getValue();
Manager
DocumentCollectionEntity entitySaved = collectionManager.save(entity);
collectionManager.save(entity, TTL.ofHours(2));
collectionManager.saveAsync(entity);
collectionManager.saveAsync(entity, TTL.ofDays(3));
collectionManager.saveAsync(entity, System.out::print);
DocumentQuery query = DocumentQuery.of("collection");
Optional<Document> id = entitySaved.find("_id");
query.addCondition(DocumentCondition.eq(id.get()));
List<DocumentCollectionEntity> documentsFound = collectionManager.find(query);
DocumentCollectionEntity document = collectionManager.findOne(query);
collectionManager.delete(query);
collectionManager.deleteAsync(query);
collectionManager.deleteAsync(query, System.out::print);
Manager
columnEntityManager.save(entity);
columnEntityManager.saveAsync(entity);
columnEntityManager.saveAsync(entity, TTL.ofDays(3));
columnEntityManager.saveAsync(entity, System.out::print);
ColumnQuery query = ColumnQuery.of("family");
query.addCondition(ColumnCondition.eq(id));
List<ColumnFamilyEntity> entities = columnEntityManager.find(query);
ColumnFamilyEntity family = columnEntityManager.findOne(query);
columnEntityManager.delete(query);
columnEntityManager.deleteAsync(query);
columnEntityManager.deleteAsync(query, System.out::print);
Manager
KeyValue<String> keyValue = KeyValue.of("myKey", Value.of("value"));
bucket.put("key", "value");
bucket.put(keyValue);
bucket.put(keyValue, TTL.ofMicros(12));
Optional<Value> value = bucket.get("key");
Factory
BucketManager bucket = managerFactory.getBucketManager("bucket");
List<String> list = managerFactory.getList("bucketList", String.class);
Set<String> set = managerFactory.getSet("bucketSet", String.class);
Map<String, Integer> map = managerFactory.getMap("bucketList", String.class,
Integer.class);
Queue<String> queue = managerFactory.getQueue("queueList", String.class);
Factory
ColumnFamilyManager columnEntityManager =
columnManagerFactory.getColumnEntityManager("space");
DocumentCollectionManager collection =
documentManagerFactory.getDocumentEntityManager("collection");
Configuration
ColumnConfiguration columnConfiguration = new ColumnDriver();
DocumentConfiguration documentConfiguration = new DocumentDriver();
KeyValueConfiguration keyValueConfiguration = new KeyValueDriver();
ColumnFamilyManagerFactory columnFactory = columnConfiguration.getManagerFactory();
DocumentCollectionManagerFactory documentFactory =
documentConfiguration.getManagerFactory();
BucketManagerFactory keyFactory = keyValueConfiguration.getManagerFactory();
Native Query
columnEntityManager.nativeQueryAsync(query, System.out::println);
List<ColumnFamilyEntity> entities = columnEntityManager.nativeQuery(query);
PreparedStatement preparedStatement = columnEntityManager.nativeQueryPrepare(query);
preparedStatement.bind(1,2,3);
preparedStatement.executeQuery();
preparedStatement.executeQueryAsync(System.out::println);
Native Query
collectionManager.nativeQueryAsync(query, System.out::println);
List<DocumentCollectionEntity> entities = collectionManager.nativeQuery(query);
PreparedStatement preparedStatement = collectionManager.nativeQueryPrepare(query);
preparedStatement.bind(1,2,3);
preparedStatement.executeQuery();
preparedStatement.executeQueryAsync(System.out::println);
Diana Query Language
Select
select * from bucket;
select key1, key2 from bucket;
Insert
INSERT INTO bucket VALUES (key, value);
INSERT INTO bucket VALUES (key, value) ttl 20 (seconds, minutes, hours, days);
Delete
DELETE FROM bucket WHERE id =value;
Diana Query Language
Insert
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...) (value1,value2,value3,...);
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days);
INSERT INTO collection (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
Diana Query Language
Select
select * from collection;
select field, field2 from collection;
select field, field2 from collection where id = 2;
select field, field2 from collection where id >= 2 or field >3;
Delete
DELETE FROM collection WHERE id =value;
DELETE field, field2 FROM collection WHERE id =value;
Diana Query Language
Insert
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...);
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...) (value1,value2,value3,...);
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days);
INSERT INTO family (column1,column2,column3,...)
VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
Diana Query Language
Select
select * from family;
select field, field2 from family;
select field, field2 from family where id = 2;
select field, field2 from family where id >= 2 and index >3;
Delete
DELETE FROM family WHERE id =value;
DELETE field, field2 FROM family WHERE id =value;
Site
https://jnosql.github.io/diana-site/
Code
https://github.com/JNOSQL
Apache Proposal
https://wiki.apache.org/incubator/DianaProposal
Thank you
Otávio Santana
@otaviojava
otaviojava@java.net
otaviojava@apache.org

More Related Content

PDF
NoSQL, no Limits, lots of Fun!
PDF
greenDAO
PDF
Green dao
PPTX
GreenDao Introduction
PDF
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
PDF
Green dao
PPTX
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
PDF
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
NoSQL, no Limits, lots of Fun!
greenDAO
Green dao
GreenDao Introduction
Tutorial, Part 3: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
Green dao
TDC2017 | Florianopolis - Trilha DevOps How we figured out we had a SRE team ...
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database

What's hot (19)

PPTX
ODP
2011 Mongo FR - Indexing in MongoDB
PDF
Spray Json and MongoDB Queries: Insights and Simple Tricks.
PPTX
Jquery
PDF
Solr & Lucene @ Etsy by Gregg Donovan
PPTX
Validating JSON -- Percona Live 2021 presentation
PDF
UKOUG Tech14 - Getting Started With JSON in the Database
PPT
J query
PPTX
J query1
PPT
Fast querying indexing for performance (4)
PDF
An introduction into Spring Data
PPT
Hibernate Tutorial for beginners
PDF
09.Local Database Files and Storage on WP
PPTX
Webinar: Simplifying Persistence for Java and MongoDB
PDF
appengine java night #1
PDF
ORMLite Android
PPTX
Webinar: Index Tuning and Evaluation
PPTX
Getting started with Elasticsearch and .NET
PPTX
Indexing & Query Optimization
2011 Mongo FR - Indexing in MongoDB
Spray Json and MongoDB Queries: Insights and Simple Tricks.
Jquery
Solr & Lucene @ Etsy by Gregg Donovan
Validating JSON -- Percona Live 2021 presentation
UKOUG Tech14 - Getting Started With JSON in the Database
J query
J query1
Fast querying indexing for performance (4)
An introduction into Spring Data
Hibernate Tutorial for beginners
09.Local Database Files and Storage on WP
Webinar: Simplifying Persistence for Java and MongoDB
appengine java night #1
ORMLite Android
Webinar: Index Tuning and Evaluation
Getting started with Elasticsearch and .NET
Indexing & Query Optimization
Ad

Similar to Let's talk about NoSQL Standard (20)

PPTX
JakartaData-JCon.pptx
PDF
No sql databases blrdroid devfest 2016
KEY
Taming NoSQL with Spring Data
ODP
Introduciton to Apache Cassandra for Java Developers (JavaOne)
PDF
Spring data requery
ODP
Meetup cassandra for_java_cql
PDF
Data access 2.0? Please welcome: Spring Data!
ODP
Polyglot persistence with Spring Data
PDF
A Spring Data’s Guide to Persistence
PPTX
NoSQL Endgame - Java2Days 2020 Virtual
PDF
JPoint'15 Mom, I so wish Hibernate for my NoSQL database...
PDF
Naver_alternative_to_jpa
PDF
Hands On Spring Data
PPTX
Present realm
PPTX
EclipseCon 2021 NoSQL Endgame
PDF
Leveraging your Knowledge of ORM Towards Performance-based NoSQL Technology
ODP
Nyc summit intro_to_cassandra
PPTX
ExSchema
PDF
Cassandra drivers and libraries
PPTX
NoSQL: The first New Jakarta EE Specification (DWX 2019)
JakartaData-JCon.pptx
No sql databases blrdroid devfest 2016
Taming NoSQL with Spring Data
Introduciton to Apache Cassandra for Java Developers (JavaOne)
Spring data requery
Meetup cassandra for_java_cql
Data access 2.0? Please welcome: Spring Data!
Polyglot persistence with Spring Data
A Spring Data’s Guide to Persistence
NoSQL Endgame - Java2Days 2020 Virtual
JPoint'15 Mom, I so wish Hibernate for my NoSQL database...
Naver_alternative_to_jpa
Hands On Spring Data
Present realm
EclipseCon 2021 NoSQL Endgame
Leveraging your Knowledge of ORM Towards Performance-based NoSQL Technology
Nyc summit intro_to_cassandra
ExSchema
Cassandra drivers and libraries
NoSQL: The first New Jakarta EE Specification (DWX 2019)
Ad

Recently uploaded (20)

PPTX
future_of_ai_comprehensive_20250822032121.pptx
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
PPTX
Internet of Everything -Basic concepts details
PPTX
Module 1 Introduction to Web Programming .pptx
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
future_of_ai_comprehensive_20250822032121.pptx
Early detection and classification of bone marrow changes in lumbar vertebrae...
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Lung cancer patients survival prediction using outlier detection and optimize...
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Comparative analysis of machine learning models for fake news detection in so...
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Electrocardiogram sequences data analytics and classification using unsupervi...
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
Internet of Everything -Basic concepts details
Module 1 Introduction to Web Programming .pptx
Rapid Prototyping: A lecture on prototyping techniques for interface design
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Auditboard EB SOX Playbook 2023 edition.
Connector Corner: Transform Unstructured Documents with Agentic Automation

Let's talk about NoSQL Standard

  • 1. Let's talk about NoSQL Standard Otávio Santana @otaviojava [email protected] [email protected]
  • 2. NoSQL ● Database ● Doesn't use relationship ● BASE ● Five types
  • 3. Key Value ● AmazonDynamo ● AmazonS3 ● Redis ● Scalaris ● Voldemort ● Couchbase valuekey valuekey valuekey
  • 4. Document ● AmazonSimpleDb ● ApacheCouchdb ● MongoDb ● Riak ● Couchbase
  • 5. Column ● Hbase ● Cassandra ● Scylla ● Clouddata ● SimpleDb ● DynamoDB Row-key Columns... Apollo Aphrodi te Ares Sun Duty {Love, happy} Duty War Duty Sword weapon Color Krato s Dead Gods 13
  • 6. Graph ● Neo4j ● InfoGrid ● Sones ● HyperGraphDB Apollo Ares Krat os was dead was dead Is brother killed killed
  • 7. Multi-model ● OrientDB ● Couchbase ● Elasticsearch ● Cassandra
  • 10. The Current solution ● Spring Data ● Hibernate OGM ● TopLink
  • 11. The Perfect Solution ● Abstraction API ● Communication API ● No lock-in ● Split problems
  • 12. Apache Diana was Born (incubator) ● API Communication layer ● Apache Project ● Document, key-value, Column, Graph ● Universal Adapter ● Standard
  • 13. What Diana is not ● A new API to replace JPA ● A new API to abstraction layer ● Just one API communication to solve all kind of NoSQL database ● Be responsible to do integrations with other technologies such as CDI, EJB, Bean Validation, Spring, etc.
  • 14. Diana Project ● Commons API ● Document API ● Graph API ● Key-value API ● Column API ● Four TCKs
  • 16. Why Diana? ● Goddess of the hunt, nature and moon ● Fought in Troy ● brave warrior and hunter
  • 17. Road Map ● Draft and code Proposal ● Community Feedback ● Involve NoSQL Vendors ● Involve Solution Vendors ● Apache Project ● Development ● JSR
  • 18. Nomenclature ● Configuration ● Factory ● Manager ● Entity ● Value
  • 19. Value Value value = Value.of("123"); Integer integerValue = value.get(Integer.class); List<Integer> list = value.getList(Integer.class); Set<Integer> set = value.getSet(Integer.class); Stream<Integer> stream = value.getStream(Integer.class); String cast = value.cast();//unsafe
  • 20. Custom Value public class MoneyWriter implements WriterField<Money, String> { @Override public boolean isCompatible(Class clazz) { return false; } @Override public String write(Money object) { return object.toString(); } } public class MoneyReader implements ReaderField { @Override public boolean isCompatible(Class clazz) { return Money.class.equals(clazz); } @Override public <T> T read(Class<T> clazz, Object value) { return (T) Money.parse(value.toString()); } }
  • 21. Entities Money money = new Money(); Value value = Value.of(money); DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection"); entity.add(Document.of("name", "Daniel Soro")); entity.add(Document.of("age", 26)); entity.add(Document.of("salary", money)); String name = entity.getName(); List<Document> documents = entity.getDocuments(); Optional<Document> age = entity.find("age");
  • 22. Entities Money money = new Money(); Value value = Value.of(money); DocumentCollectionEntity entity = DocumentCollectionEntity.of("collection"); entity.add(Document.of("name", "Daniel Soro")); entity.add(Document.of("age", 26)); entity.add(Document.of("salary", money)); entity.add(Document.of("subdocument", Document.of("sub", Arrays.asList(1, 2, 3)))); String name = entity.getName(); List<Document> documents = entity.getDocuments(); Optional<Document> age = entity.find("age");
  • 23. Entities Money money = new Money(); Value value = Value.of(money); ColumnFamilyEntity entity = ColumnFamilyEntity.of("family"); Column id = Column.of("id", 10L); entity.add(id); entity.add(Column.of("version", 0.001)); entity.add(Column.of("name", "Diana")); entity.add(Column.of("options", Arrays.asList(1, 2, 3))); entity.add(Column.of("pay", value)); String name = entity.getName(); List<Column> columns = entity.getColumns(); Optional<Column> notFound = entity.find("notFound");
  • 24. Entities Value value = Value.of(new Money()); KeyValue<String> keyValue = KeyValue.of("key", value); String key = keyValue.getKey(); Value value1 = keyValue.getValue();
  • 25. Entities Value value = Value.of(new Money()); KeyValue<String> keyValue = KeyValue.of("key", value); String key = keyValue.getKey(); Value value1 = keyValue.getValue();
  • 26. Manager DocumentCollectionEntity entitySaved = collectionManager.save(entity); collectionManager.save(entity, TTL.ofHours(2)); collectionManager.saveAsync(entity); collectionManager.saveAsync(entity, TTL.ofDays(3)); collectionManager.saveAsync(entity, System.out::print); DocumentQuery query = DocumentQuery.of("collection"); Optional<Document> id = entitySaved.find("_id"); query.addCondition(DocumentCondition.eq(id.get())); List<DocumentCollectionEntity> documentsFound = collectionManager.find(query); DocumentCollectionEntity document = collectionManager.findOne(query); collectionManager.delete(query); collectionManager.deleteAsync(query); collectionManager.deleteAsync(query, System.out::print);
  • 27. Manager columnEntityManager.save(entity); columnEntityManager.saveAsync(entity); columnEntityManager.saveAsync(entity, TTL.ofDays(3)); columnEntityManager.saveAsync(entity, System.out::print); ColumnQuery query = ColumnQuery.of("family"); query.addCondition(ColumnCondition.eq(id)); List<ColumnFamilyEntity> entities = columnEntityManager.find(query); ColumnFamilyEntity family = columnEntityManager.findOne(query); columnEntityManager.delete(query); columnEntityManager.deleteAsync(query); columnEntityManager.deleteAsync(query, System.out::print);
  • 28. Manager KeyValue<String> keyValue = KeyValue.of("myKey", Value.of("value")); bucket.put("key", "value"); bucket.put(keyValue); bucket.put(keyValue, TTL.ofMicros(12)); Optional<Value> value = bucket.get("key");
  • 29. Factory BucketManager bucket = managerFactory.getBucketManager("bucket"); List<String> list = managerFactory.getList("bucketList", String.class); Set<String> set = managerFactory.getSet("bucketSet", String.class); Map<String, Integer> map = managerFactory.getMap("bucketList", String.class, Integer.class); Queue<String> queue = managerFactory.getQueue("queueList", String.class);
  • 31. Configuration ColumnConfiguration columnConfiguration = new ColumnDriver(); DocumentConfiguration documentConfiguration = new DocumentDriver(); KeyValueConfiguration keyValueConfiguration = new KeyValueDriver(); ColumnFamilyManagerFactory columnFactory = columnConfiguration.getManagerFactory(); DocumentCollectionManagerFactory documentFactory = documentConfiguration.getManagerFactory(); BucketManagerFactory keyFactory = keyValueConfiguration.getManagerFactory();
  • 32. Native Query columnEntityManager.nativeQueryAsync(query, System.out::println); List<ColumnFamilyEntity> entities = columnEntityManager.nativeQuery(query); PreparedStatement preparedStatement = columnEntityManager.nativeQueryPrepare(query); preparedStatement.bind(1,2,3); preparedStatement.executeQuery(); preparedStatement.executeQueryAsync(System.out::println);
  • 33. Native Query collectionManager.nativeQueryAsync(query, System.out::println); List<DocumentCollectionEntity> entities = collectionManager.nativeQuery(query); PreparedStatement preparedStatement = collectionManager.nativeQueryPrepare(query); preparedStatement.bind(1,2,3); preparedStatement.executeQuery(); preparedStatement.executeQueryAsync(System.out::println);
  • 34. Diana Query Language Select select * from bucket; select key1, key2 from bucket; Insert INSERT INTO bucket VALUES (key, value); INSERT INTO bucket VALUES (key, value) ttl 20 (seconds, minutes, hours, days); Delete DELETE FROM bucket WHERE id =value;
  • 35. Diana Query Language Insert INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...); INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...) (value1,value2,value3,...); INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days); INSERT INTO collection (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
  • 36. Diana Query Language Select select * from collection; select field, field2 from collection; select field, field2 from collection where id = 2; select field, field2 from collection where id >= 2 or field >3; Delete DELETE FROM collection WHERE id =value; DELETE field, field2 FROM collection WHERE id =value;
  • 37. Diana Query Language Insert INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...); INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...) (value1,value2,value3,...); INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days); INSERT INTO family (column1,column2,column3,...) VALUES (value1,value2,value3,...) ttl 20 (seconds, minutes, hours, days) async;
  • 38. Diana Query Language Select select * from family; select field, field2 from family; select field, field2 from family where id = 2; select field, field2 from family where id >= 2 and index >3; Delete DELETE FROM family WHERE id =value; DELETE field, field2 FROM family WHERE id =value;