Skip to content
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
20 changes: 20 additions & 0 deletions examples/uni-temporal-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This project shows how to deploy a sample uni-temporal config (without lsqt configuration)

Note that (as of this version), the deployed temporal config cannot be changed except for the temporal collection option properties (refer to https://docs.marklogic.com/temporal:collection-set-options for possible values)


Once you have deployed the code, you can insert documents uni-temporally by doing the following

```javascript
'use strict';
declareUpdate();
const temporal = require("/MarkLogic/temporal.xqy");
const root =
{"tempdoc":
{"content": "content here",
systemStart: null,
systemEnd: null}
};
temporal.documentInsert("uni-temporal-collection", "doc.json", root);
```

3 changes: 3 additions & 0 deletions examples/uni-temporal-project/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id "com.marklogic.ml-gradle" version "3.0.0"
}
6 changes: 6 additions & 0 deletions examples/uni-temporal-project/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mlHost=localhost
mlAppName=uni-temporal-project
mlRestPort=8400
mlUsername=admin
mlPassword=admin

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"database-name": "%%DATABASE%%",
"schema-database": "%%SCHEMAS_DATABASE%%",
"range-element-index": [
{
"collation": "",
"invalid-values": "reject",
"localname": "systemStart",
"namespace-uri": "",
"range-value-positions": false,
"scalar-type": "dateTime"
}
,
{
"collation": "",
"invalid-values": "reject",
"localname": "systemEnd",
"namespace-uri": "",
"range-value-positions": false,
"scalar-type": "dateTime"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"database-name": "%%SCHEMAS_DATABASE%%"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"axis-name": "system",
"axis-start": {
"element-reference": {
"namespace-uri": "",
"localname": "systemStart"
}
},
"axis-end": {
"element-reference": {
"namespace-uri": "",
"localname": "systemEnd"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"collection-name": "uni-temporal-collection",
"system-axis": "system",
"option": ["updates-safe"]
}