Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add documentation hidden property #298

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/asciidoc/sql/SQL-Alter-Property.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ ALTER PROPERTY <type-name>.<property-name> <attribute-name> <attribute-value> [C
** `mandatory <true|false>` If true, the property must be present. Default is false
** `notnull <true|false>` If true, the property, if present, cannot be null. Default is false
** `readonly <true|false>` If true, the property cannot be changed after the creation of the record. Default is false
** `hidden <true|false>` If true, the property is not added to the result set when using * in projections such as in `SELECT * FROM`; it is included when `SELECT FROM` is used or if the hidden property is part of the projection list .
** `min <number|string>` Defines the minimum value for this property.
For number types it is the minimum number as a value.
For strings, it represents the minimum number of characters.
Expand Down
16 changes: 12 additions & 4 deletions src/main/asciidoc/sql/SQL-Create-Property.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ CREATE PROPERTY
* *`&lt;embd-type&gt;`* Defines the property's embedded type (only for embedding property types `EMBEDDED`, `LIST`, `MAP`, as well as `LINK`).
* *`&lt;property-constraint&gt;`* See <<SQL-Alter-Property,`ALTER PROPERTY`>> `&lt;attribute-name&gt; * &lt;attribute-value&gt;`
** `mandatory &lt;true|false&gt;` If true, the property must be present.
Default is false
Default is *false*
** `notnull &lt;true|false&gt;` If true, the property, if present, cannot be null.
Default is false
Default is *false*
** `readonly &lt;true|false&gt;` If true, the property cannot be changed after the creation of the record.
Default is false
Default is *false*
** `hidden &lt;true|false&gt;` If true, the property is not added to the result set when using * in projections such as in `SELECT * FROM`; it is included when `SELECT FROM` is used or if the hidden property is part of the projection list .
Default is *false*
** `min &lt;number|string&gt;` Defines the minimum value for this property.
For number types it is the minimum number as a value.
For strings it represents the minimum number of characters.
Expand Down Expand Up @@ -77,12 +79,18 @@ ArcadeDB> CREATE PROPERTY Profile.friends MAP
ArcadeDB> CREATE PROPERTY Profile.address EMBEDDED
----

* Create the property `date` of type date with additional constraints:
* Create the property `createdOn` of type date with additional constraints:

----
ArcadeDB> CREATE PROPERTY Transaction.createdOn DATE (mandatory true, notnull true, readonly true, min "2010-01-01")
----

* Create the property `secret` of type string with hidden constraint:

----
ArcadeDB> CREATE PROPERTY Employee.secret STRING (hidden true, notnull true)
----

* Create the property `salary` only if it does not exist:

----
Expand Down
Loading