O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Bringing N1QL Query to Your App
Frameworks in Java, .NET & Node.js
Matt Ingenthron & Simon Baslé - Couchbase
N1QL Primer
©2015 Couchbase Inc.
N1QL Primer
3
NoSQL
...
©2015 Couchbase Inc.
N1QL Primer
4
NoSQL
but why not a
query language
?
©2015 Couchbase Inc.
N1QL Primer
5
querying on
relational data
=
SQL
©2015 Couchbase Inc.
N1QL Primer
6
querying on
JSON
=
N1QL
©2015 Couchbase Inc.
N1QL Primer
7
SELECT fname, children FROM tutorial
©2015 Couchbase Inc.
N1QL Primer
8
SELECT fname, children FROM tutorial
SQL? We can do better
©2015 Couchbase Inc.
N1QL Primer
9
SELECT fname, children FROM tutorial
WHERE EVERY child IN tutorial.children
SATISFIES c...
©2015 Couchbase Inc.
N1QL Primer
10
cbq-engine
the N1QL service
©2015 Couchbase Inc.
N1QL Primer
11
cbq-engine
the N1QL service
standalone in DP4, to be integrated in couchbase server
©2015 Couchbase Inc.
N1QL Primer
12
cbq
command line client
©2015 Couchbase Inc.
N1QL Primer
13
responses are
JSON
©2015 Couchbase Inc.
N1QL Primer
14
{
"results": [
{
"children": [
{
"age": 17,
"fname": "Abama",
"gender": "m"
},
{
"age"...
©2015 Couchbase Inc.
N1QL Primer
15
responses have
MetaData
©2015 Couchbase Inc.
N1QL Primer
16
"requestID": "19bb1a64-633
"signature": {
"Greeting": "string"
},
"results": [ {"Greet...
Usage in the SDKs
©2015 Couchbase Inc.
Usage in the SDKs
18
C / C++
©2015 Couchbase Inc.
Usage in the SDKs
19
©2015 Couchbase Inc.
Usage in the SDKs
20
API at the
Bucket
level
©2015 Couchbase Inc.
Usage in the SDKs
21
Statement
in a
Query
with additional
Parameters
©2015 Couchbase Inc.
Usage in the SDKs
22
Statements can have
Placeholders
©2015 Couchbase Inc.
Usage in the SDKs
23
either
positional
$1
©2015 Couchbase Inc.
Usage in the SDKs
24
or
named
$param
©2015 Couchbase Inc.
Usage in the SDKs
25
Placeholder values
are passed in the query's parameters
©2015 Couchbase Inc.
Usage in the SDKs
26
Statements can be
Prepared
©2015 Couchbase Inc.
Usage in the SDKs
27
get a QueryPlan
hold to it
then executeit repeatedly
©2015 Couchbase Inc. ‹#›
Try it yourself?
Connect to “linksys18871”
with “couchbase123”
Head to http://192.168.1.149/ to
f...
.Net
N1QL in
Node.JS
N1QL in
Java
N1QL in
Q&A
Thank you.
Próximos SlideShares
Carregando em…5
×

Couchbase Live Europe 2015: Bringing N1QL Query to Your App Frameworks in Java, .NET & Node.js

525 visualizações

Publicada em

Int

  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Couchbase Live Europe 2015: Bringing N1QL Query to Your App Frameworks in Java, .NET & Node.js

  1. 1. Bringing N1QL Query to Your App Frameworks in Java, .NET & Node.js Matt Ingenthron & Simon Baslé - Couchbase
  2. 2. N1QL Primer
  3. 3. ©2015 Couchbase Inc. N1QL Primer 3 NoSQL ...
  4. 4. ©2015 Couchbase Inc. N1QL Primer 4 NoSQL but why not a query language ?
  5. 5. ©2015 Couchbase Inc. N1QL Primer 5 querying on relational data = SQL
  6. 6. ©2015 Couchbase Inc. N1QL Primer 6 querying on JSON = N1QL
  7. 7. ©2015 Couchbase Inc. N1QL Primer 7 SELECT fname, children FROM tutorial
  8. 8. ©2015 Couchbase Inc. N1QL Primer 8 SELECT fname, children FROM tutorial SQL? We can do better
  9. 9. ©2015 Couchbase Inc. N1QL Primer 9 SELECT fname, children FROM tutorial WHERE EVERY child IN tutorial.children SATISFIES child.age > 10 END
  10. 10. ©2015 Couchbase Inc. N1QL Primer 10 cbq-engine the N1QL service
  11. 11. ©2015 Couchbase Inc. N1QL Primer 11 cbq-engine the N1QL service standalone in DP4, to be integrated in couchbase server
  12. 12. ©2015 Couchbase Inc. N1QL Primer 12 cbq command line client
  13. 13. ©2015 Couchbase Inc. N1QL Primer 13 responses are JSON
  14. 14. ©2015 Couchbase Inc. N1QL Primer 14 { "results": [ { "children": [ { "age": 17, "fname": "Abama", "gender": "m" }, { "age": 21, "fname": "Bebama", "gender": "m" } responses are JSON
  15. 15. ©2015 Couchbase Inc. N1QL Primer 15 responses have MetaData
  16. 16. ©2015 Couchbase Inc. N1QL Primer 16 "requestID": "19bb1a64-633 "signature": { "Greeting": "string" }, "results": [ {"Greeting": "He "status": "success", "metrics": { "elapsedTime": "7.48ms" "executionTime": "6.8ms "resultCount": 1, "resultSize": 49 } } responses have MetaData
  17. 17. Usage in the SDKs
  18. 18. ©2015 Couchbase Inc. Usage in the SDKs 18 C / C++
  19. 19. ©2015 Couchbase Inc. Usage in the SDKs 19
  20. 20. ©2015 Couchbase Inc. Usage in the SDKs 20 API at the Bucket level
  21. 21. ©2015 Couchbase Inc. Usage in the SDKs 21 Statement in a Query with additional Parameters
  22. 22. ©2015 Couchbase Inc. Usage in the SDKs 22 Statements can have Placeholders
  23. 23. ©2015 Couchbase Inc. Usage in the SDKs 23 either positional $1
  24. 24. ©2015 Couchbase Inc. Usage in the SDKs 24 or named $param
  25. 25. ©2015 Couchbase Inc. Usage in the SDKs 25 Placeholder values are passed in the query's parameters
  26. 26. ©2015 Couchbase Inc. Usage in the SDKs 26 Statements can be Prepared
  27. 27. ©2015 Couchbase Inc. Usage in the SDKs 27 get a QueryPlan hold to it then executeit repeatedly
  28. 28. ©2015 Couchbase Inc. ‹#› Try it yourself? Connect to “linksys18871” with “couchbase123” Head to http://192.168.1.149/ to follow along with .NET, Node or Java
  29. 29. .Net N1QL in
  30. 30. Node.JS N1QL in
  31. 31. Java N1QL in
  32. 32. Q&A
  33. 33. Thank you.

×