Skip to content

Commit b0ac231

Browse files
authored
DOC-8132-C2-GS -- C Lang Get Started (couchbase#490)
https://issues.couchbase.com/browse/DOC-8132 DOC-8132-C2-G2 -- C Lange get started bits -- initial https://issues.couchbase.com/browse/DOC-8132 DOC-8132-C2-GS -- C Lang inerim 210809-1816 https://issues.couchbase.com/browse/DOC-8132 DOC-8132-C2-GS -- C Lang inerim 210810-0845 https://issues.couchbase.com/browse/DOC-8132
1 parent d15735c commit b0ac231

20 files changed

+563
-223
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ modules/android/examples/docsnippets/**
104104
modules/android/examples/jsonsnippets/**
105105
temp-bin/**
106106

107-
tempbin/**
107+
tempbin/**

antora.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ nav:
1212
- modules/swift/nav-swift.adoc
1313
- modules/ROOT/nav-javascript.adoc
1414
- modules/ROOT/nav-sync-gateway.adoc
15+
:prerelease: BETA

modules/ROOT/pages/_partials/_block-caveats.adoc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
2+
// BEGIN ANDROID-CONSTRAINTS
3+
14
// tag::android-constraints[]
5+
26
.Android enablers
37
[CAUTION]
8+
49
--
510
Allow Unencrypted Network Traffic::
611
// tag::android-manifest-cleartext[]
@@ -12,11 +17,16 @@ Use Background Threads::
1217
// tag::android-threads[]
1318
As with any network or file I/O activity, CouchbaseLite activities should not be performed on the UI thread.
1419
*Always* use a *background* thread.
20+
1521
// end::android-threads[]
1622

1723
--
1824

1925
// end::android-constraints[]
26+
// END ANDROID-CONSTRAINTS
27+
28+
29+
// BEGIN IOS-CONSTRAINTS
2030

2131
// tag::ios-constraints[]
2232
.iOS Restrictions
@@ -28,14 +38,22 @@ You can customize the message presented to the user by editing the description f
2838
--
2939

3040
// end::ios-constraints[]
41+
// END IOS-CONSTRAINTS
42+
43+
// BEGIN -- BETA DISCLAIMER
44+
// tag::not-beta[]
45+
CAUTION: Not available in BETA release
46+
47+
// end::not-beta[]
48+
// END -- BETA DISCLAIMER
3149

3250

3351
// tag::code-disclaimer[]
3452

3553
.Code Snippets
3654
[NOTE]
37-
The code examples are indicative only.
38-
They demonstrate basic concepts and approaches to using a feature.
55+
All code examples are indicative only.
56+
They demonstrate the basic concepts and approaches to using a feature.
3957
Use them as inspiration and adapt these examples to best practice when developing applications for your platform.
4058

4159
// end::code-disclaimer[]
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// BEGIN -- inclusion -- _gs-topic-group.adoc
2+
// Purpose: Show the topic group, allowing easy cycle-through
3+
// Do not show current page as a click-through though
4+
// Parameter: The current page name
5+
// Container: /modules/ROOT/pages/_partials/_gs-topic-group.adoc
6+
7+
// Begin -Local Attributes
8+
:this-page: {param-page}
9+
10+
// ifeval::["{this-page}"=="{introduction--page}"]
11+
// :is-intro: Introduction
12+
// endif::[]
13+
14+
// ifeval::["{this-page}"=="{gs-prereqs--page}"]
15+
// :is-prereqs: Prepare
16+
// endif::[]
17+
18+
ifeval::["{this-page}"=="{gs-install--page}"]
19+
:is-install: Install
20+
endif::[]
21+
22+
ifeval::["{this-page}"=="{gs-build--page}"]
23+
:is-build: Build
24+
endif::[]
25+
// End -Local Attributes
26+
27+
// Begin -- Output Block
28+
Steps in Getting Started::
29+
// ifdef::is-intro[*{is-intro}*]
30+
// ifndef::is-intro[{introduction--xref}]
31+
// |
32+
// ifdef::is-prereqs[*{is-prereqs}*]
33+
// ifndef::is-prereqs[{gs-prereqs--xref}]
34+
// |
35+
ifdef::is-install[*{is-install}*]
36+
ifndef::is-install[{gs-install--xref}]
37+
|
38+
ifdef::is-build[*{is-build}*]
39+
ifndef::is-build[{gs-build--xref}]
40+
// End -- Output Block
41+
42+
43+
// Begin -- Tidy-up
44+
:is-intro!:
45+
:is-prereqs!:
46+
:is-install!:
47+
:is-build!:
48+
:this-page!:
49+
:param-page!:
50+
// End -- Tidy-up
51+
52+
// END -- inclusion -- _gs-topic-group.adoc

modules/ROOT/pages/_partials/_related-content.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ Blog Entries
147147
// end::references-prod[]
148148
// prod related
149149
// tag::how-query[]
150-
* {querybuilder--xref}
150+
ifndef::is-clang[* {querybuilder--xref}]
151+
* {querybuilder-n1ql--xref}
151152
* {query-live--xref}
152-
* {querybuilder--xref--predictive-query}
153153
* {fts--xref}
154154

155155
// end::how-query[]

modules/ROOT/pages/_partials/authentication.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This is the recommended way of using basic authentication.
2929
.Basic Authentication
3030
[#ex-base-auth]
3131
:param-tags: basic-authentication
32-
include::{root-partials}_block_show_snippet.adoc[]
32+
include::{root-partials}_block_tabbed_code_example.adoc[]
3333
:param-tags!:
3434

3535

@@ -44,5 +44,5 @@ The HTTP response contains a session ID which can then be used to authenticate a
4444
.Session Authentication
4545
[#ex-session-auth]
4646
:param-tags: session-authentication
47-
include::{root-partials}_block_show_snippet.adoc[]
47+
include::{root-partials}_block_tabbed_code_example.adoc[]
4848
:param-tags!:

modules/ROOT/pages/_partials/commons/common-querybuilder-n1ql.adoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
:menuitem-delimiter: {nbsp}{nbsp}|{nbsp}{nbsp}
1616
:count-result-text: The result set representing a count is a key-value pair. The key being the count name, as defined using `SelectResult.as`
1717

18-
18+
include::_block-caveats.adoc[tags="code-disclaimer"]
1919

2020
// END::Local page attributes
2121

@@ -63,7 +63,7 @@ TIP: We recommend working through the {url-n1ql-tutorial} as a good way to build
6363
Use the N1QLQuery class to define the N1QL query string on the database to be queried.
6464
Then run the query using the`.execute()` method -- see
6565

66-
The result set produced by N1QL and {querybuilder--xref)} queries is the same -- see {query-resultsets--xref}.
66+
The result set produced by N1QL and {querybuilder--xref} queries is the same -- see {query-resultsets--xref}.
6767

6868

6969
.Running a N1QL Query
@@ -155,8 +155,9 @@ FROM dataSource <.>
155155

156156
=== Arguments
157157

158-
<.> `dataSource` -- this is the database name against which the query is to run.
159-
Use `AS` to give the database an alias you can use within the query.
158+
<.> Here `dataSource` is the database name against which the query is to run.
159+
Use `AS` to give the database an alias you can use within the query. +
160+
To use the current database, without specifying a name, use `_` as the datasource.
160161

161162
<.> `JOIN joinclause` -- use this optional argument to link datasources -- see <<lbl-join>>
162163

@@ -169,6 +170,9 @@ Use `AS` to give the database an alias you can use within the query.
169170
SELECT name FROM db
170171
SELECT store.name FROM db AS store
171172
SELECT store.name FROM db store
173+
SELECT name FROM _
174+
SELECT store.name FROM _ AS store
175+
SELECT store.name FROM _ store
172176
----
173177
174178
====
@@ -543,6 +547,7 @@ SELECT firstName, lastName FROM db WHERE middleName IS NULL
543547

544548
===== Purpose
545549
The MISSING literal represents a missing name-value pair in a document.
550+
546551
===== Syntax
547552

548553
[source,sql]
@@ -572,9 +577,9 @@ arrayLiteral = '[' _ (expression ( _ ',' _ e2:expression )* )? ']'
572577
===== Example
573578
[source,sql]
574579
----
575-
SELECT [“a”, “b”, “c”] FROM db
576-
SELECT [ property1, property2, property3] FROM db
577-
SELECT * FROM db WHERE name IN [“James”, “John”, “Jack”
580+
SELECT [“a”, “b”, “c”] FROM _
581+
SELECT [ property1, property2, property3] FROM _
582+
SELECT * FROM _ WHERE name IN [“James”, “John”, “Jack”]
578583
----
579584

580585
[#lbl-lit-dict]
@@ -631,7 +636,7 @@ TIP: To use other characters in the identifier, surround the identifier with the
631636
632637
[source, sql]
633638
----
634-
SELECT * FROM db
639+
SELECT * FROM _
635640
636641
SELECT * FROM `db-1` <.>
637642
@@ -714,7 +719,7 @@ Evaluates expressions over items in an array object.
714719
----
715720
arrayExpression = <.>
716721
anyEvery _ variableName <.>
717-
_ IN <.> _ expression <.>
722+
_ IN _ expression <.>
718723
_ SATISFIES _ expression <.>
719724
END <.>
720725
@@ -958,22 +963,22 @@ WHERE v1 <> v2
958963
a|String wildcard pattern matching ^2^ comparison.
959964
Two wildcards are supported:
960965

961-
`%` Matches zero or more characters. +
962-
`_` Matches a single character.
966+
* `%` Matches zero or more characters. +
967+
* `_` Matches a single character.
963968

964969

965970
|WHERE name LIKE ‘a%’ +
966971
WHERE name LIKE ‘%a’ +
967972
WHERE name LIKE ‘%or% +
968973
WHERE name LIKE ‘a%o%’ +
969-
WHERE name LIKE ‘%_r%’ +
974+
WHERE name LIKE ‘%\_r%’ +
970975
WHERE name LIKE ‘%a_%’ +
971976
WHERE name LIKE ‘%a__%’ +
972977
WHERE name LIKE ‘aldo’
973978

974979

975980
|MATCH
976-
|String matching using FTS see <<lbl-ops-match>>
981+
|String matching using FTS see <<lbl-func-fts>>
977982
|WHERE v1-index MATCH "value"
978983

979984
|BETWEEN
@@ -1007,7 +1012,7 @@ WHERE name LIKE ‘aldo’
10071012

10081013
|===
10091014

1010-
^2^ Matching is case-insensitive for ASCII characters, case-sensitive for non-ASCII (default).
1015+
^2^ Matching is case-insensitive for ASCII characters, case-sensitive for non-ASCII.
10111016

10121017

10131018
^3^ Use of `IS` and `IS NOT` is limited to comparing `NULL` and `MISSING` values (this encompasses `VALUED`).
@@ -1627,7 +1632,7 @@ Returns `NULL` if either or both expressions are `NULL`.+
16271632
|Returns the arctangent in radians.
16281633

16291634
|ATAN2(expr1,expr2)
1630-
|Returns the arctangent of expr2/expr1.
1635+
|Returns the arctangent of expr1/expr2.
16311636

16321637
|CEIL(expr)
16331638
|Returns the smallest integer not less than the number.
@@ -1640,11 +1645,6 @@ Returns `NULL` if either or both expressions are `NULL`.+
16401645
Both expr1 and expr2 are cast to a double number before division. +
16411646
The returned result is always a double.
16421647

1643-
|IDIV(expr1, expr2)
1644-
|Returns integer division of expr1 and expr2. +
1645-
Both expr1 and expr2 are cast to an integer number before division. +
1646-
The returned result is always an integer.
1647-
16481648
|DEGREES(expr)
16491649
|Converts radians to degrees.
16501650

modules/ROOT/pages/_partials/database-encryption.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Provide this encryption key every time the database is opened -- see <<ex-sdb-en
1111
.Database Encryption
1212
[#ex-sdb-encrypt]
1313
:param-tags: database-encryption
14-
include::{root-partials}_block_show_snippet.adoc[]
14+
include::{root-partials}_block_tabbed_code_example.adoc[]
1515
:param-tags!:
1616

1717

modules/ROOT/pages/_partials/nav-skeleton-start-clang.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.xref:couchbase-lite:clang:quickstart.adoc[{param-title}]
22
// tag::get-started[]
33
* xref:{cbl-pg-prereqs}[Start Here!]
4+
.Start Here!
45
// tag::start[]
56
** {gs-install--xref}
67
// end::start[]

modules/ROOT/pages/_partials/nav-skeleton.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ include::{root-partials}nav-skeleton-start-{param-module}.adoc[]
1616
// end::data-model[]
1717
// tag::query[]
1818
* Queries
19-
** {querybuilder--xref}
19+
ifndef::is-clang[** {querybuilder--xref}]
2020
** {querybuilder-n1ql--xref}
2121
** {query-resultsets--xref}
2222
** {query-live--xref}

0 commit comments

Comments
 (0)