Skip to content

Commit 15c0a71

Browse files
authored
DOC-9047-C42 -- More misc fixes (xrefs etc) (#622)
https://issues.couchbase.com/browse/DOC-9047
1 parent 0b8622a commit 15c0a71

File tree

7 files changed

+65
-33
lines changed

7 files changed

+65
-33
lines changed

modules/ROOT/pages/_partials/commons/common-compatibility.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,9 @@ h|.NET
8686
// * End of Life for support occurs 30 months after release date or, if longer, 6 months after the next Major Release.
8787
// * End of Support occurs 18 months after the End of Life date. +
8888
// Beyond this point customers should have migrated all production instances to a fully supported version.
89-
https://github.com/couchbase/docs-sdk-common/blob/release/7.0/
90-
modules/shared/partials/interface-stability-pars.adoc
9189

92-
modules/shared:partial$interface-stability-pars.adoc
9390
include::sdk:shared:partial$interface-stability-pars.adoc[tag=interface-stability-section]
91+
9492
// include::6.0@sdk:shared:partial$interface-stability-pars.adoc[tag=interface-stability-section]
9593

9694
// DO NOT EDIT -- Footer Related Content Block

modules/ROOT/pages/_partials/commons/common-document.adoc

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,16 @@ include::{root-partials}_block_tabbed_code_example.adoc[]
5858
== Mutability
5959

6060
ifdef::is-c[]
61-
Couchbase Lite for C's documents can be either mutable or immutable.
62-
Immutable objects are referenced by `const` pointers; mutable ones by non-const pointers to prevent developers from accidentally calling a mutable-document function on an immutable document.
61+
Couchbase Lite for C's document objects `CBLDocument*` can be either mutable or immutable.
62+
Reference an immutable document using a `const` pointer and a mutable document using a non-const pointer to prevent developers from accidentally calling a mutable-document function on an immutable document.
63+
64+
To make an immutable document mutable, you need to use {url-api-method-mutabledocument-copy}
65+
66+
[source,{source-language}, subs="attributes+, macros+"]
67+
----
68+
CBLDocument* CBLDocument_MutableCopy(const CBLDocument* doc _cbl_nonnull)
69+
_cbl_warn_unused _cbl_returns_nonnull;
70+
----
6371

6472
endif::is-c[]
6573
ifndef::is-c[]
@@ -83,11 +91,12 @@ ifndef::is-c[]
8391
== Typed Accessors
8492

8593
=== Scalar type
86-
The `Document` class now offers a set of {url-api-class-dictionary} for various scalar types, including boolean, integers, floating-point and strings.
87-
These accessors take care of converting to/from JSON encoding, and make sure you get the type you're expecting.
94+
The `Document` class now offers a set of property accessors for various scalar types, including boolean, integers, floating-point and strings.
95+
These accessors take care of converting to/from JSON encoding, and make sure you get the type you're expecting.+
96+
See: {url-api-class-dictionary}.
8897

8998
endif::[]
90-
ifndef::-is-c[]
99+
ifndef::is-c[]
91100
=== Date accessors
92101
// DateTimeOffset c#
93102
In addition, as a convenience we offer `Date` accessors.
@@ -103,10 +112,12 @@ include::{root-partials}_block_tabbed_code_example.adoc[]
103112
endif::[]
104113

105114

115+
ifndef::is-c,is-objc[]
106116
=== Checking for properties
107117
To check whether a given property exists in the document, you should use the {url-api-method-document-contains} method.
108118

109119
If the property doesn't exist in the document it will return the default value for that getter method (0 for {url-api-method-document-getint} 0.0 for {url-api-method-document-getfloat} etc.).
120+
endif::[]
110121

111122

112123
ifeval::["{param-module}"=="swift"]

modules/c/pages/_partials/_attributes-module.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@
5757
:url-api-references-documents: {url-api-references-classes}{api-pfx}documents.html
5858
:url-api-class-documents: {url-api-references-documents}[{api-pfx}Documents]
5959
60+
:url-api-method-document-init: {url-api-references-documents}#ga226f555fffb7543558048af20b18b737[CBLDocument_Create()]
61+
:url-api-method-mutabledocument-init: {url-api-references-documents}#ga226f555fffb7543558048af20b18b737[CBLDocument_Create()]
62+
:url-api-method-mutabledocument-initid: {url-api-references-documents}#gaec41cf2eab4e3ac490f11007f665a35e[CBLDocument_CreateWithID()]
63+
:url-api-method-mutabledocument-copy: {url-api-references-documents}#ga0356b98d2f1798adc8f549510d3eef67[CBLDocument_MutableCopy()]
64+
:url-api-method-document-tomutable: {url-api-method-mutabledocument-copy}
65+
66+
:url-api-method-database-getdocument: {url-api-references-documents}#ga214b7d6c7d58bde09de10f1ed418a16b[ CBLDatabase_GetDocument()]
67+
6068
:url-api-method-database-save-doc: {url-api-references-documents}{sep}[{api-pfx}CBLDatabase_SaveDocument()]
6169
:url-api-method-database-save-concctrl: {url-api-references-documents}{sep}gae37e21b95f62419762e521f70850b9c7[{api-pfx}CBLDatabase_SaveDocumentWithConcurrencyControl()]
6270
:url-api-method-database-save-conflict: {url-api-references-documents}{sep}ga9c45bcf02e6e2977c702c493a7fe0b54[{api-pfx}CBLDatabase_SaveDocumentWithConflictHandler()]
@@ -218,6 +226,8 @@
218226
:url-api-class-replicator-status: {url-api-references-replicator-status}[{api-pfx}ReplicatorStatus]
219227
220228
:url-api-properties-replicator-status: {url-api-references-replicator-status}{url-api-references-method-sep}{api-pfx}ReplicatorStatus
229+
:url-api-property-replicator-status: url-api-properties-replicator-status
230+
221231
222232
:url-api-enum-replicator-activity: {url-api-properties-replicator-status}(py)activity[activity enum]
223233

modules/c/pages/field-level-encryption.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ The client-side encryption is compatible with the Couchbase server SDK field-lev
3535

3636
== Encryptable Type
3737

38-
The API includes a `CBLEncryptable` type, representing an encryptable value to be automatically encrypted/decryped the replicator -- see <<ex-encryptabe-type>>.
38+
The API includes a `CBLEncryptable` type, representing an encryptable value to be automatically encrypted/decrypted the replicator -- see <<ex-encryptable-type>>.
3939

40-
You declare properties requiring encryption by the replicator, as a dictionary with the structure shown in <<ex-encryptabe-type>>.
40+
You declare properties requiring encryption by the replicator, as a dictionary with the structure shown in <<ex-encryptable-type>>.
4141

42-
[#ex-encryptabe-type]
42+
[#ex-encryptable-type]
4343
.Encryptable-type Dictionary Structure
4444
====
45-
[source, {source-langauge}]
45+
[source, {source-language}]
4646
----
4747
{
4848
"@type": "encryptable",
@@ -66,7 +66,7 @@ The key for the value can be either of the following:
6666
== Replicator Decryption
6767
Pull replication detects `encryptable` values before saving them to the local database and decrypts them using the property decryption callback function -- see: <<lbl-decryption-callback>> for more on the decryption callback function.
6868

69-
On successful decryption the replicator saves the property in encryptable dictionary format (removing the `encrypted$` prefix) -- see: <<ex-encryptabe-type>>.
69+
On successful decryption the replicator saves the property in encryptable dictionary format (removing the `encrypted$` prefix) -- see: <<ex-encryptable-type>>.
7070

7171

7272
== Replicator Encryption
@@ -102,7 +102,7 @@ Pull replicator::
102102
* Transforms the dictionary by:
103103
** Removing `alg`
104104
** Replacing the `ciphertext` key with the `value`
105-
** Storing the decrypted key/value in <<ex-encryptabe-type,CBLEncryptable>> format
105+
** Storing the decrypted key/value in <<ex-encryptable-type,CBLEncryptable>> format
106106

107107

108108
.Server SDK Encrypted Field Structure
@@ -194,7 +194,7 @@ CBLEncryptable exposes a _value_ property for query purposes.
194194
If this value is encrypted the query will return _MISSING_.
195195

196196
[#ex-query]
197-
.A Simple Encryptabe Query
197+
.A Simple encryptable Query
198198
====
199199
[source, nql]
200200
----
@@ -203,8 +203,8 @@ SELECT ssn, // <.>
203203
FROM db WHERE ssn.value = "123-45-6789"
204204
----
205205
206-
<.> The returned `ssn` columm is in the form of an encryptable dictionary
207-
<.> The returned `ssn.value` columm is the actual value, unless it is still encrypted in which case it returns MISSING
206+
<.> The returned `ssn` column is in the form of an encryptable dictionary
207+
<.> The returned `ssn.value` column is the actual value, unless it is still encrypted in which case it returns MISSING
208208
====
209209

210210

modules/csharp/pages/_partials/_attributes-module.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@
105105

106106
:url-api-class-result: {url-api-classes-result-pfx}[{api-pfx}Result]
107107

108-
:url-api-method-result-toJSON: {url-api-classes-result-pfx}{url-api-references-method-sep}Couchbase_Lite_Query_Result_ToJson[{api-pfx}Result.ToJson()]
108+
:url-api-method-result-toJSON: {url-api-classes-result-pfx}{sep}Couchbase_Lite_Query_Result_ToJson[{api-pfx}Result.ToJson()]
109109

110-
:url-api-method-result-toDictionary: {url-api-classes-result-pfx}{url-api-references-method-sep}Couchbase_Lite_Query_Result_ToDictionary[{api-pfx}Result.ToDictionary()]
110+
:url-api-method-result-toDictionary: {url-api-classes-result-pfx}{sep}Couchbase_Lite_Query_Result_ToDictionary[{api-pfx}Result.ToDictionary()]
111111

112-
:url-api-method-result-toList: {url-api-classes-result-pfx}{url-api-references-method-sep}Couchbase_Lite_Query_Result_ToList[{api-pfx}Result.ToList()]
112+
:url-api-method-result-toList: {url-api-classes-result-pfx}{sep}Couchbase_Lite_Query_Result_ToList[{api-pfx}Result.ToList()]
113113

114114
// Query class and methods
115115
:url-api-references-query: {url-api-references2}Query

modules/java/pages/java-ref-api.adoc

Lines changed: 0 additions & 13 deletions
This file was deleted.

modules/objc/pages/_partials/_attributes-module.adoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,32 @@
3838
:url-api-method-database-close: {url-api-method-database}close:[{api-pfx}Database.Close()]
3939
:url-api-method-database-delete: {url-api-method-database}delete:[{api-pfx}Database.Delete()]
4040

41+
// Dictionary Class
42+
:url-api-references-dictionary: Dictionary.html
43+
:url-api-class-dictionary: {url-api-references-dictionary}[{api-pfx}Dictionary]
44+
:url-api-class-mutabledictionary: {url-api-references-dictionary}[{api-pfx}MutableDictionary]
45+
46+
:url-api-protocols-dictionary: {url-api-references-protocols}{api-pfx}Dictionary.html[{api-pfx}Dictionary]
47+
:url-api-protocols-dictionary-dateForKey: {url-api-references-protocols}{api-pfx}Dictionary.html#/c:objc(pl)CBLDictionary(im)dateForKey:[dateForKey:]
48+
49+
:url-api-method-document-getdate: {url-api-protocols-dictionary-dateForKey}
50+
51+
52+
// Docuument Class
53+
:url-api-references-document: {url-api-references-classes}{api-pfx}MutableDocument.html
54+
:url-api-references-mutabledocument: {url-api-references-classes}{api-pfx}MutableDocument.html
55+
:url-api-class-document: {url-api-references-classes}{api-pfx}Document.html[{api-pfx}Document]
56+
:url-api-class-mutabledocument: {url-api-references-classes}{api-pfx}MutableDocument.html[{api-pfx}MutableDocument]
57+
:url-api-method-mutabledocument-initid: {url-api-references-mutabledocument}{sep}c:objc(cs)CBLMutableDocument(im)initWithID:[(nonnull instancetype)initWithID:(nullable NSString *)documentID;]
58+
:url-api-method-mutabledocument-init: {url-api-references-mutabledocument}{sep}c:objc(cs)CBLMutableDocument(im)init[(nonnull instancetype)init;]
59+
60+
:url-api-method-database-getdocument: {url-api-references-database}{sep}c:objc(cs)CBLDatabase(im)documentWithID:[(nullable CBLDocument *)documentWithID:(nonnull NSString *)id;]
61+
62+
:url-api-method-document-tomutable: {url-api-references-document}c:objc(cs)CBLDocument(im)toMutable[(nonnull CBLMutableDocument *)toMutable;]
63+
64+
:url-api-method-mutabledocument-getWithID: {url-api-references-mutabledocument}{sep}c:objc(cs)CBLMutableDocument(cm)documentWithID:[(nonnull instancetype)documentWithID:(nullable NSString *)documentID;]
65+
66+
4167
// Begin -- DatabaseConfiguration
4268
:url-api-references-databasecfg: {url-api-references-classes}{api-pfx}DatabaseConfiguration.html
4369
:url-api-class-databasecfg: {url-api-references-databasecfg}[DatabaseConfiguration]

0 commit comments

Comments
 (0)