Skip to content

Commit 6b63364

Browse files
authored
Update product documentation to use SQL++ instead of N1QL (#383)
1 parent bf4551e commit 6b63364

25 files changed

Lines changed: 99 additions & 26 deletions

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
[![Join the chat at https://gitter.im/couchbaselabs/Linq2Couchbase](https://badges.gitter.im/couchbaselabs/Linq2Couchbase.svg)](https://gitter.im/couchbaselabs/Linq2Couchbase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44
![.NET Core](https://github.com/couchbaselabs/Linq2Couchbase/workflows/.NET%20Core/badge.svg)
55

6-
The official Language Integrated Query (LINQ) provider for querying Couchbase Server with [N1QL](https://docs.couchbase.com/server/current/n1ql/n1ql-intro/queriesandresults.html) using the Couchbase .NET SDK. The goal of Linq2Couchbase is to create a lightweight ORM/ODM for querying Couchbase Buckets using LINQ as the lingua-franca between your application and Couchbase Server using N1QL, a SQL-like query language for JSON documents. It also provides a write API for performing CRUD operations on JSON documents.
6+
The official Language Integrated Query (LINQ) provider for querying Couchbase Server with [SQL++](https://docs.couchbase.com/server/current/n1ql/n1ql-intro/queriesandresults.html) using the Couchbase .NET SDK. The goal of Linq2Couchbase is to create a lightweight ORM/ODM for querying Couchbase Buckets using LINQ as the lingua-franca between your application and Couchbase Server using SQL++, a SQL-like query language for JSON documents. It also provides a write API for performing CRUD operations on JSON documents.
77

88
While not an officially supported Couchbase project, this repo is actively maintained and monitored. If you happen to find a bug or have any questions, please either create an [issue](https://github.com/couchbaselabs/linq2couchbase/issues) or make a post on [forums.couchbase.com](https://forums.couchbase.com/c/net-sdk). Additionally, we actively accept contributions!
99

10-
> :info: This documentation is for Linq2Couchbase 2.x, compatible with Couchbase SDK 3.x. For documentation on
10+
> [INFO] This documentation is for Linq2Couchbase 2.x, compatible with Couchbase SDK 3.x. For documentation on
1111
> Linq2Couchbase 1.x compatible with Couchbase SDK 2.x, see [the release14 branch](https://github.com/couchbaselabs/Linq2Couchbase/blob/release14/README.md).
1212
13+
> [NOTE]
14+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
1315
## Getting started
1416

1517
The Linq2Couchbase project has the following dependencies:
@@ -143,7 +145,7 @@ Linq2Couchbase uses the NuGet package manager for handling dependencies. To bui
143145

144146
## Project management
145147

146-
In the [Jira project for Linq2Couchbase](http://issues.couchbase.com/browse/LINQ), you can file bugs, propose features or get an idea for the roadmap there. There is also a [list of supported and proposed N1QL features for Linq2Couchbase](https://docs.google.com/document/d/1hPNZ-qTKpVzQsFwg_1uUueltzNL1wA75L5F-hYF92Cw/edit?usp=sharing).
148+
In the [Issues for Linq2Couchbase](https://github.com/couchbaselabs/Linq2Couchbase/issues), you can file bugs, propose features or get an idea for the roadmap there. There is also a [list of supported and proposed SQL++ features for Linq2Couchbase](https://docs.google.com/document/d/1hPNZ-qTKpVzQsFwg_1uUueltzNL1wA75L5F-hYF92Cw/edit?usp=sharing).
147149

148150
## Contributors
149151

docs/any-all.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Any and All
22

3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
36
The LINQ Any and All methods are a useful way to test for a condition across a series of documents.
47

58
## Any

docs/array-filtering-projections.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Array Filtering, Projections, and Sorting
22

3-
Using array filtering and projections, you can alter the nature of an array located inside a document before it is returned by N1QL.
3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
6+
Using array filtering and projections, you can alter the nature of an array located inside a document before it is returned by SQL++.
47

58
## Filtering
69

docs/async-queries.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Asynchronous Queries
22

3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
36
For performance in high load web environments, Linq2Couchbase supports executing queries asynchronously. This helps optimize thread utilization by avoiding thread blocking during long running query operations.
47

58
> :info: **Note:** The methods below will only work for Linq2Couchbase queries. Code completion will show them as an option for other types of LINQ queries, but they will fail when executed. Other libraries, such as Entity Framework Core, have their own versions of these methods designed for use with their queries.

docs/bucket-context.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# The BucketContext
22

3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
36
The public API for Linq2Couchbase is the BucketContext; this object is similar to the DbContext in Linq2SQL and the DataContext from the EntityFramework. It's primary purpose is to provide and interface for building and submitting queries to a Couchbase server Bucket. Internally, the BucketContext uses a Cluster object and CouchbaseBucket to handle communication and to send queries and updates to the server.
47

58
## Creating a BucketContext

docs/custom-serializers.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Custom JSON Serializers
22

3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
36
The Couchbase SDK uses Newtonsoft's Json.Net as its default JSON serializer. If you are using a custom serializer, there are some special requirements which must be met to support Linq2Couchbase.
47

58
Custom serializers are used by creating a class which implements the ITypeSerializer interface, and including it in the SDK configuration. However, to support Linq2Couchbase, instead the serializer should extend IExtendedTypeSerializer. This interface provides a key additional feature.
69

7-
The GetMemberName method is used to determine how a particular member property of a POCO will be written as JSON to the document in Couchbase. This is important, because the N1QL query must reference member names in the way they appear in Couchbase, not the way they appear in your .Net POCOs.
10+
The GetMemberName method is used to determine how a particular member property of a POCO will be written as JSON to the document in Couchbase. This is important, because the SQL++ query must reference member names in the way they appear in Couchbase, not the way they appear in your .Net POCOs.
811

912
Here is [an example of how this method was implemented for Newtonsoft's Json.Net](https://github.com/couchbase/couchbase-net-client/blob/03d7957226da6f7c3e05220a21e7ebeeb0519b93/Src/Couchbase/Core/Serialization/DefaultSerializer.cs#L192).
1013

1114
## Non-standard conversions
1215

13-
Some attributes may have additional decorators applied that change how they are serialized. To support this, you should also implement a customer `ISerializationConverterProvider`. This interface can return a custom `ISerializationConverter` for a particular member, altering query generation behavior when this member is used in a N1QL query.
16+
Some attributes may have additional decorators applied that change how they are serialized. To support this, you should also implement a customer `ISerializationConverterProvider`. This interface can return a custom `ISerializationConverter` for a particular member, altering query generation behavior when this member is used in a SQL++ query.
1417

1518
```cs
1619
services.AddCouchbase(options => {

docs/date-handling.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Date Handling
22

3-
LINQ works with dates under the assumption that they are stored in the JSON documents as [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted strings. For more information about N1QL functions and date handling, see [Date functions](http://developer.couchbase.com/documentation/server/4.0/n1ql/n1ql-language-reference/datefun.html) in the N1QL language reference.
3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
6+
LINQ works with dates under the assumption that they are stored in the JSON documents as [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) formatted strings. For more information about SQL++ functions and date handling, see [Date functions](http://developer.couchbase.com/documentation/server/4.0/n1ql/n1ql-language-reference/datefun.html) in the SQL++ language reference.
47

58
Date/times stored as milliseconds since the Unix epoch are also supported. If you are using the default Newtonsoft.Json serializer, simply add the `[JsonConverter(typeof(UnixMillisecondsConverter)]` attribute to the property. For custom serializers, see [Custom JSON Serializers](./custom-serializers.md).
69

@@ -27,7 +30,7 @@ using (var cluster = new Cluster()) {
2730

2831
## Date Functions
2932

30-
A subset of N1QL date/time functions are supported for use in LINQ queries, and are provided as static methods of the N1QlFunctions class.
33+
A subset of SQL++ date/time functions are supported for use in LINQ queries, and are provided as static methods of the N1QlFunctions class.
3134

3235
```cs
3336
using (var cluster = new Cluster()) {
@@ -46,7 +49,7 @@ using (var cluster = new Cluster()) {
4649
}
4750
```
4851

49-
| Function Name | N1QL Equivalent |
52+
| Function Name | SQL++ Equivalent |
5053
| --------------------------- | --------------- |
5154
| N1QlFunctions.DateDiff | DATE_DIFF_STR |
5255
| N1QlFunctions.DateAdd | DATE_ADD_STR |

docs/document-filters.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Mapping JSON documents to POCOs with DocumentFilters
22

3-
Couchbase allows you store heterogeneous documents within a Bucket or "keyspace". When you do a select without a predicate, you are querying across the entire keyspace. For example, imagine a bucket with various document "types" and you do a N1QL query like this:
3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
6+
Couchbase allows you store heterogeneous documents within a Bucket or "keyspace". When you do a select without a predicate, you are querying across the entire keyspace. For example, imagine a bucket with various document "types" and you do a SQL++ query like this:
47

58
```sql
69
SELECT name FROM `travel-sample`
@@ -74,7 +77,7 @@ public class Airline
7477
}
7578
```
7679

77-
Now when we generate a LINQ query, the `WHERE type="airline"` clause will be automatically added to the emitted N1QL query and only documents of type "airline" will be returned.
80+
Now when we generate a LINQ query, the `WHERE type="airline"` clause will be automatically added to the emitted SQL++ query and only documents of type "airline" will be returned.
7881

7982
## Custom Document Filters
8083

docs/enum.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Working With Enumerations
22

3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
36
For the most part, enumeration properties are supported transparently. LINQ queries can filter based on enumeration values just like other properties:
47

58
```cs

docs/grouping-aggregation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Grouping and Aggregation
22

3+
> [NOTE]
4+
> The documetation has been updated to reflect that the product name for N1QL has been changed to SQL++, however, the source itself may still use the name N1QL.
5+
36
LINQ may also be used to group query results and perform aggregation of data on the groupings. This grouping and aggregation is performed on the query server for improved performance.
47

58
> :info: **Note:** LINQ group joins are not currently supported.

0 commit comments

Comments
 (0)