Details
-
Technical task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
DOC-2022-S24, DOC-2022-S25, DOC-2023-S1, DOC-2023-S2, DOC-2023-S3, DOC-2023-S4, DOC-2023-S5, DOC-2023-S6
-
1
Description
N1QL in inline text:
modules/concept-docs/pages/analytics-for-sdk-users.adoc::description: Parallel data management for complex queries over many records, using a familiar N1QL-like syntax. |
modules/concept-docs/pages/data-model.adoc:These data structures are stored as JSON documents in Couchbase, and can therefore be accessed using N1QL, Full Text Search, and normal key-value operations.
|
modules/concept-docs/pages/documents.adoc:or xref:{version-server}@server:n1ql:n1ql-language-reference/update.adoc[N1QL UPDATE] to update documents based on specific query criteria: |
modules/concept-docs/pages/n1ql-query.adoc:For N1QL, the default consistency is `not_bounded`. |
modules/devguide/examples/python/cloud.py:# Create a N1QL Primary Index (but ignore if it exists) |
modules/devguide/examples/python/cloud.py:# Perform a N1QL Query
|
modules/devguide/examples/python/n1ql-update-delete.py:from couchbase.n1ql import N1QLQuery |
modules/devguide/examples/python/n1ql-update-delete.py: N1QLQuery('DELETE from default WHERE type=$1', 'product') |
modules/devguide/examples/python/n1ql-update-delete.py:query = N1QLQuery(
|
modules/devguide/examples/python/n1ql-update-delete.py:query = N1QLQuery(
|
modules/devguide/examples/python/query-atplus.py:from couchbase.n1ql import N1QLQuery, MutationState |
modules/devguide/examples/python/query-atplus.py:query = N1QLQuery('SELECT * from default WHERE timestamp=$1', TIMESTAMP) |
modules/devguide/examples/python/query-consistency.py:from couchbase.n1ql import N1QLQuery, CONSISTENCY_REQUEST |
modules/devguide/examples/python/query-consistency.py:query = N1QLQuery(
|
modules/devguide/examples/python/query-criteria.py:from couchbase.n1ql import N1QLQuery |
modules/devguide/examples/python/query-criteria.py:query = N1QLQuery('SELECT airportname, city, country FROM `travel-sample` ' |
modules/devguide/examples/python/query-placeholders.py:from couchbase.n1ql import N1QLQuery |
modules/devguide/examples/python/query-placeholders.py: query = N1QLQuery('SELECT airportname FROM `travel-sample` ' |
modules/hello-world/examples/cloud.py:# needed for options -- cluster, timeout, SQL++ (N1QL) query, etc. |
modules/hello-world/examples/hello_world_t.py:# needed for options -- cluster, timeout, SQL++ (N1QL) query, etc. |
modules/hello-world/pages/sample-application.adoc:The https://github.com/couchbaselabs/{travel-sample-git-project}/blob/HEAD/{travel-sample-entrypoint}[{travel-sample-entrypoint}] file also contains the functions for handling users, registration, and N1QL queries. |
modules/hello-world/pages/start-using-sdk.adoc:* How to xref:sql-lookup[lookup documents] with the {sqlpp_url}[{sqlpp} (formerly N1QL)] query language.
|
modules/howtos/examples/acouchbase_operations.py:# used to support SQL++ (N1QL) query
|
modules/howtos/examples/error_handling.py: # We have a N1QL error context, we can print out some useful information:
|
modules/howtos/examples/transactions_example.py: performing N1QL queries, etc.
|
modules/howtos/examples/transactions_example.py: # N1QL query
|
modules/howtos/examples/transactions_example.py: bulk_load_statement = "" # a bulk-loading N1QL statement not provided here |
modules/howtos/examples/txcouchbase_operations.py:# used to support SQL++ (N1QL) query
|
modules/howtos/pages/analytics-using-sdk.adoc::description: Parallel data management for complex queries over many records, using a familiar N1QL-like syntax. |
modules/howtos/pages/concurrent-async-apis.adoc:=== Asyncio N1QL Operations
|
modules/howtos/pages/concurrent-async-apis.adoc:The API for issuing N1QL queries is almost identical to the synchronous API. |
modules/howtos/pages/concurrent-async-apis.adoc:.N1QL Query
|
modules/howtos/pages/concurrent-async-apis.adoc:=== Twisted N1QL Operations
|
modules/howtos/pages/concurrent-async-apis.adoc:The API for issuing N1QL queries is almost identical to the synchronous API. |
modules/howtos/pages/concurrent-async-apis.adoc:.N1QL Query
|
modules/howtos/pages/distributed-acid-transactions-from-the-sdk.adoc:If you already use https://www.couchbase.com/products/n1ql[{sqlpp} (formerly N1QL)], then its use in transactions is very similar. |
modules/howtos/pages/encrypting-using-sdk.adoc:Alternatively, you can https://forums.couchbase.com/t/replacing-field-name-prefix/28786[rename the existing fields using a N1QL statement]. |
modules/howtos/pages/encrypting-using-sdk.adoc:If you decide to rename the existing fields, make sure to do so _before_ writing any encrypted fields below the top level, otherwise it may be difficult to rename the nested fields using a generic N1QL statement. |
modules/howtos/pages/error-handling.adoc:A N1QL query either returns results or will throw an error with a `QueryErrorContext`, like so: |
modules/howtos/pages/kv-operations.adoc:Our xref:n1ql-queries-with-sdk.adoc[Query Engine] enables retrieval of information using the SQL-like syntax of N1QL.
|
modules/howtos/pages/n1ql-queries-with-sdk.adoc::description: You can query for documents in Couchbase using the N1QL query language, a language based on SQL, but designed for structured and flexible JSON documents. |
modules/howtos/pages/n1ql-queries-with-sdk.adoc:Our query service uses N1QL, which will be fairly familiar to anyone who's used any dialect of SQL.
|
modules/howtos/pages/n1ql-queries-with-sdk.adoc:xref:#additional-resources[Further resources] for learning about N1QL are listed at the bottom of the page. |
modules/howtos/pages/n1ql-queries-with-sdk.adoc:xref:{version-server}@server:n1ql:n1ql-language-reference/index.adoc[N1QL intro page], or just dive in with a query against our "travel-sample" data set. |
modules/howtos/pages/n1ql-queries-with-sdk.adoc:After familiarizing yourself with the basics on how the N1QL query language works and how to query it from the UI you can use it from the Python SDK. Here's a complete example of doing a query and handling the results:
|
modules/howtos/pages/n1ql-queries-with-sdk.adoc:NOTE: When using a Couchbase version < 6.5 you must create a valid Bucket connection using `cluster.bucket(name)` before you can use N1QL. |
modules/howtos/pages/n1ql-queries-with-sdk.adoc:NOTE: N1QL is not the only query option in Couchbase.
|
modules/howtos/pages/n1ql-queries-with-sdk.adoc:* For a deeper dive into N1QL from the SDK, refer to our xref:concept-docs:n1ql-query.adoc[N1QL SDK concept doc].
|
modules/howtos/pages/n1ql-queries-with-sdk.adoc:* The xref:{version-server}@server:n1ql:n1ql-language-reference/index.adoc[Server doc N1QL intro] introduces a complete guide to the N1QL language, including all of the latest additions. |
modules/howtos/pages/n1ql-queries-with-sdk.adoc:* The http://query.pub.couchbase.com/tutorial/#1[N1QL interactive tutorial] is a good introduction to the basics of N1QL use. |
modules/howtos/pages/n1ql-queries-with-sdk.adoc:* N1QL is for operational queries; for analytical workloads, read more on xref:concept-docs:http-services.adoc#Long-Running-Queries-&-Big-Data[when to choose Analytics Service], our implementation of SQL++. |
modules/howtos/pages/subdocument-operations.adoc:IMPORTANT: The Sub-Document operations described on this page are for _Key-Value_ requests only: they are not related to Sub-Document N1QL queries. |
modules/howtos/pages/subdocument-operations.adoc:(Sub-Document N1QL queries are explained in the section xref:n1ql-queries-with-sdk.adoc[Querying with N1QL].)
|
modules/howtos/pages/subdocument-operations.adoc:The _path_ follows <<path-syntax,N1QL syntax>>.
|
modules/howtos/pages/subdocument-operations.adoc:Path syntax largely follows N1QL conventions: A path is divided into components, with each component referencing a specific _level_ in a document hierarchy.
|
modules/howtos/pages/subdocument-operations.adoc:a dot or brackets) it may be escaped using N1QL escapes.
|
modules/howtos/pages/transcoders-nonjson.adoc:NOTE: It's important to note that the Couchbase Data Platform includes multiple components other than the Key-Value store -- including N1QL (Query) and its indexes, FTS (Search), analytics, and eventing -- and these are optimized for JSON and will either ignore or provide limited functionality with non-JSON documents. |
modules/project-docs/pages/3.0-pre-release-notes.adoc:Refactored for FTS/N1QL/durability LCB changes. |
modules/project-docs/pages/3.0-pre-release-notes.adoc:Example N1QL statements do seem to work in "Hello Couchbase" example. |
modules/project-docs/pages/3.0-pre-release-notes.adoc:N1QL Query Index Management |
modules/project-docs/pages/compatibility.adoc:| Scope-Level N1QL Queries & all Collections features
|
modules/project-docs/pages/migrating-sdk-code-to-3.n.adoc:Compare this to a N1QL query: |
modules/project-docs/pages/migrating-sdk-code-to-3.n.adoc:// Here is an example of the error context if a N1QL query is performed with an invalid syntax (i.e. `select 1= from`): |
modules/project-docs/pages/migrating-sdk-code-to-3.n.adoc:N1QL querying is now available at the `Cluster` level instead of the bucket level, because you can also write N1QL queries that span multiple buckets. Compare a simple N1QL query from SDK 2 with its SDK 3 equivalent: |
modules/project-docs/pages/migrating-sdk-code-to-3.n.adoc:// |`N1QLRequest.metrics` | `QueryResult.metrics` |
modules/project-docs/pages/migrating-sdk-code-to-3.n.adoc:// |`N1QLRequest.profile` | `QueryResult.profile` |
modules/project-docs/pages/migrating-sdk-code-to-3.n.adoc:Analytics querying, like N1QL, is also moved to the `Cluster` level: it is now accessible through the `Cluster.analytics_query` method. |
modules/project-docs/pages/migrating-sdk-code-to-3.n.adoc:Also, creating a N1QL index now lives in the `QueryIndexManager`, which is accessible through the `Cluster`. |
modules/project-docs/pages/sdk-release-notes.adoc:Fixed N1QL Query options `scan_wait/scan_cap` misspelling.
|
modules/ref/pages/client-settings.adoc:Mutation tokens allow enhanced durability requirements as well as advanced N1QL querying capabilities.
|
modules/ref/pages/client-settings.adoc:The Query timeout is used on all N1QL query operations if not overridden by a custom timeout. |
modules/hello-world/examples/cloud.py:# needed for options -- cluster, timeout, SQL++ (N1QL) query, etc. |
modules/hello-world/examples/hello_world_t.py:# needed for options -- cluster, timeout, SQL++ (N1QL) query, etc. |
modules/hello-world/pages/start-using-sdk.adoc:=== SQL++ Lookup
|
modules/howtos/examples/acouchbase_operations.py:# used to support SQL++ (N1QL) query
|
modules/howtos/examples/txcouchbase_operations.py:# used to support SQL++ (N1QL) query
|
modules/howtos/pages/n1ql-queries-with-sdk.adoc:* N1QL is for operational queries; for analytical workloads, read more on xref:concept-docs:http-services.adoc#Long-Running-Queries-&-Big-Data[when to choose Analytics Service], our implementation of SQL++. |
Use this command to update [source,n1ql] to [source,sqlpp]:
Note, this is for Mac, you may need to change the command slightly on other systems.
git grep -l "source,n1ql" | xargs sed -i '' -e 's/source,n1ql/source,sqlpp/g' |