Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
85bd35d
RDoc-1703_TimeSeries
reebhub Apr 23, 2020
89cfa7e
RDoc-1703_TimeSeries
reebhub Apr 30, 2020
a3fc85b
RDoc-1703_TimeSeries
reebhub May 4, 2020
395f2e7
RDoc-1703_TimeSeries
reebhub May 5, 2020
b92ece0
RDoc-1703_TimeSeries
reebhub May 5, 2020
56105e6
RDoc-1703_TimeSeries
reebhub May 5, 2020
dd447d3
RDoc-1703_TimeSeries
reebhub May 6, 2020
ac41fa1
RDoc-1703_TimeSeries
reebhub May 6, 2020
79180bd
RDoc-1703_TimeSeries
reebhub May 7, 2020
8323ca5
RDoc-1703 rollup/retention page WIP
May 11, 2020
ee4518a
restructure, API documentation improvements
reebhub May 11, 2020
896a680
design changes
reebhub May 12, 2020
7062b32
RDoc-1703_TimeSeries Rollup & Retention Policy documentation FINAL
May 12, 2020
4d97fb8
new API structure
reebhub May 12, 2020
3009cad
RDoc-1703_TimeSeries
reebhub May 13, 2020
bccf568
restructured API operations section
reebhub May 14, 2020
f4c3ee4
RDoc-1703_TimeSeries
reebhub May 14, 2020
6be3789
RDoc-1703_TimeSeries
reebhub May 14, 2020
401fe14
RDoc-1703_TimeSeries: Studio page
May 17, 2020
1a61f6e
RDoc-1703_TimeSeries: Studio page fixed links and other small changes
May 21, 2020
0c5d2ea
mainly overview changes
reebhub May 24, 2020
4b9e7c8
RDoc-1703_TimeSeries
May 25, 2020
5a1bf3f
RDoc-1703_TimeSeries Indexing ***WIP***
Jun 2, 2020
9e9bba9
RDoc-1703_TimeSeries
reebhub Jun 3, 2020
4bac733
Merge branch 'RDoc-1703_TimeSeries' of https://github.com/reebhub/doc…
reebhub Jun 3, 2020
01ccaa4
RDoc-1703_TimeSeries
reebhub Jun 4, 2020
26e7410
RDoc-1703_TimeSeries indexes WIP
Jun 8, 2020
a8cb215
RDoc-1703_TimeSeries
reebhub Jun 8, 2020
39aa5bb
tiny sample improvement
reebhub Jun 9, 2020
4cb08e0
RDoc-1703_TimeSeries indexes WIP
Jun 10, 2020
ca7157b
RDoc-1703_TimeSeries
reebhub Jun 11, 2020
e54a40e
Merge branch 'RDoc-1703_TimeSeries' of https://github.com/reebhub/doc…
Jun 11, 2020
7c65275
RDoc-1703_TimeSeries indexes, WIP code samples and documentation
Jun 11, 2020
c6ac998
RDoc-1703_TimeSeries indexes WIP 14/6/20
Jun 14, 2020
68ede74
RDoc-1703_TimeSeries
reebhub Jun 15, 2020
69522ee
Merge branch 'RDoc-1703_TimeSeries' of https://github.com/reebhub/doc…
reebhub Jun 15, 2020
1111475
RDoc-1703_TimeSeries
reebhub Jun 15, 2020
7607ea0
RDoc-1703_TimeSeries
Jun 15, 2020
9faa9d5
RDoc-1703_TimeSeries indexing 16/6/20
Jun 15, 2020
8a05500
RDoc-1703_TimeSeries Indexing *final*
Jun 16, 2020
4018846
RDoc-1703_TimeSeries
Jun 15, 2020
bba031e
recommitting Mor's indexing update
reebhub Jun 16, 2020
04df679
RDoc-1703_TimeSeries
reebhub Jun 21, 2020
8037e38
RDoc-1703_TimeSeries Indexes adding small comment that raven does not…
Jun 21, 2020
e237f7f
RDoc-1703_TimeSeries
reebhub Jun 22, 2020
c0e9789
RDoc-1703_TimeSeries time-series and other features page
Jun 22, 2020
c7e30e3
RDoc-1703_TimeSeries review comments for rollup-and-retention.markdown
Jun 22, 2020
70a3b2f
RDoc-1703_TimeSeries
reebhub Jun 22, 2020
2c5a744
RDoc-1703_TimeSeries design.markdown review comments applied
Jun 23, 2020
2b95458
RDoc-1703_TimeSeries
reebhub Jun 23, 2020
8b4d68a
RDoc-1703_TimeSeries
reebhub Jun 24, 2020
ad5a309
- TimeSeriesBatchOperation changes (the code has changed)
reebhub Jun 24, 2020
b13756b
de-hyphening (time-series -> time series)
reebhub Jun 24, 2020
659ba23
RDoc-1703_TimeSeries applied more review comments
Jun 24, 2020
3b94141
Merge branch 'RDoc-1703_TimeSeries' of https://github.com/reebhub/doc…
Jun 24, 2020
686267e
RDoc-1703_TimeSeries cosmetics
Jun 24, 2020
2a6d5b9
fix to compilation error
reebhub Jun 24, 2020
41993ae
RDoc-1703_TimeSeries fixed dead links
Jun 24, 2020
a0fc084
RDoc-1703_TimeSeries
reebhub Jun 25, 2020
217bfb6
added a PatchByQueryOperation sample that uses JS get
reebhub Jun 25, 2020
7c0a477
RDoc-1703_TimeSeries
reebhub Jul 1, 2020
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
5 changes: 5 additions & 0 deletions Documentation/5.0/Raven.Documentation.Pages/.docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
"Name": "Users Issues",
"Mappings": []
},
{
"Path": "/document-extensions",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this name?
And I assume it isn't going to be a first level item in the end, right?

Copy link
Copy Markdown
Contributor Author

@reebhub reebhub May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it's an accurate description, though a bit
ah
maybe cumbersome is the word.
we do intend to keep it at the root level (not including the Studio article/s), and move counters, revisions and attachments there too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, make sense

"Name": "Document Extensions",
"Mappings": []
},
{
"Path": "/cloud",
"Name": "Cloud",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"Path": "/timeseries",
"Name": "Time Series",
"Mappings": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"Path": "overview.markdown",
"Name": "Overview",
"DiscussionId": "2bc22ef1-450e-4ae9-aa6f-56b0b47977d9",
"Mappings": []
},
{
"Path": "/client-api",
"Name": "Client API",
"Mappings": []
},
{
"Path": "/querying",
"Name": "Querying",
"Mappings": []
},
{
"Path": "indexing.markdown",
"Name": "Indexing Time Series",
"DiscussionId": "f23052eb-3c53-4984-a2cd-03a0ff9835d3",
"Mappings": []
},
{
"Path": "rollup-and-retention.markdown",
"Name": "Rollup and Retention",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
},
{
"Path": "time-series-and-other-features.markdown",
"Name": "Time Series and Other Features",
"DiscussionId": "902e7192-9e86-4b98-9f8a-0df0b6c731f9",
"Mappings": []
},
{
"Path": "design.markdown",
"Name": "Design",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{
"Path": "overview.markdown",
"Name": "Overview",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
},
{
"Path": "/session",
"Name": "Session",
"Mappings": []
},
{
"Path": "/operations",
"Name": "Operations",
"Mappings": []
},
{
"Path": "javascript-support.markdown",
"Name": "JavaScript Support",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
},
{
"Path": "strongly-typed-api.markdown",
"Name": "Strongly Typed API",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
}
]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Time Series: JavaScript Support

{NOTE: }

With the introduction of time series, RavenDB's support for the execution
of [JavaScript-based operations](../../../server/kb/JavaScript-engine)
over [single](../../../client-api/operations/patching/single-document#patching-how-to-perform-single-document-patch-operations)
and [multiple](../../../client-api/operations/patching/set-based)
documents has been extended to allow manipulations involving time series.

* Methods that gain time series functionality this way are:
* [session.Advanced.Defer](../../../document-extensions/timeseries/client-api/session/patch) -
`session` patching method
* [PatchOperation](../../../document-extensions/timeseries/client-api/operations/patch#patchoperation) -
`store` patching operation
* [PatchByQueryOperation](../../../document-extensions/timeseries/client-api/operations/patch#patchbyqueryoperation) -
`store` patch-by-query operation

* In this page:
* [JavaScript API methods](../../../document-extensions/timeseries/client-api/javascript-support#javascript-api-methods)
* [timeseries - Choose a Time Series](../../../document-extensions/timeseries/client-api/javascript-support#section)
* [timeseries.append - Append Untagged Entry](../../../document-extensions/timeseries/client-api/javascript-support#section-1)
* [timeseries.append - Append Tagged Entry](../../../document-extensions/timeseries/client-api/javascript-support#section-2)
* [timeseries.remove - Remove Entries Range](../../../document-extensions/timeseries/client-api/javascript-support#section-3)
* [timeseries.get - Get Entries Range](../../../document-extensions/timeseries/client-api/javascript-support#section-4)
* [Usage Samples](../../../document-extensions/timeseries/client-api/javascript-support#usage-samples)

{NOTE/}

---

{PANEL: JavaScript API methods}

The JavaScript time series API includes these methods:

---

#### `timeseries (doc, name)`

Choose a time series by the ID of its owner document and by the series name.

| Parameter | Type | Explanation
|:---:|:---:|:---:|
| doc | `string` | Document ID
| name | `string` | Time Series Name

---

#### `timeseries.append (timestamp, values)`

Use this method to append time series entries to a document.

| Parameter | Type | Explanation
|:---:|:---:|:---:|
| timestamp | `DateTime` | Timestamp
| values | `double[]` | Values

---

#### `timeseries.append (timestamp, values, tag)`

Use this method to append to a document time series entries with tags.

| Parameter | Type | Explanation
|:---:|:---:|:---:|
| timestamp | `DateTime` | Timestamp
| values | `double[]` | Values
| tag | `string` | Tag

---

#### `timeseries.remove (from, to)`

Use this method to remove a range of entries from a document.

| Parameter | Type | Explanation
|:---:|:---:|:---:|
| from | `DateTime` | Range Start
| to | `DateTime` | Range End

---

#### `timeseries.get (from, to)`

Use this method to retrieve a range of time series entries.

| Parameter | Type | Explanation
|:---:|:---:|:---:|
| from | `DateTime` | Range Start
| to | `DateTime` | Range End

{PANEL/}

{PANEL: Usage Samples}

* In this sample, we pass [session.Advanced.Defer](../../../document-extensions/timeseries/client-api/session/patch)
a script that appends a document 100 time series entries.
{CODE TS_region-Session_Patch-Append-100-TS-Entries@DocumentExtensions\TimeSeries\TimeSeriesTests.cs /}


* In this sample, we pass [PatchByQueryOperation](../../../document-extensions/timeseries/client-api/operations/patch#patchbyqueryoperation)
a script that runs a document query and removes the HeartRate time series from
matching documents.
{CODE TS_region-PatchByQueryOperation-Remove-From-Multiple-Docs@DocumentExtensions\TimeSeries\TimeSeriesTests.cs /}

{PANEL/}

## Related articles

**Time Series Overview**
[Time Series Overview](../../../document-extensions/timeseries/overview)

**Studio Articles**
[Studio Time Series Management](../../../studio/database/document-extensions/time-series)

**Patching Time Series**
[Patching in a Session](../../../document-extensions/timeseries/client-api/session/patch)
[Patching Operation](../../../document-extensions/timeseries/client-api/operations/patch#patchoperation)
[Patch By Query Operation](../../../document-extensions/timeseries/client-api/operations/patch#patchbyqueryoperation)

**Querying and Indexing**
[Time Series Querying](../../../document-extensions/timeseries/querying/overview-and-syntax)
[Time Series Indexing](../../../document-extensions/timeseries/indexing)

**Policies**
[Time Series Rollup and Retention](../../../document-extensions/timeseries/rollup-and-retention)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"Path": "append-and-remove.markdown",
"Name": "Append & Remove",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
},
{
"Path": "get.markdown",
"Name": "Get",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
},
{
"Path": "patch.markdown",
"Name": "Patch",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
},
{
"Path": "/bulk-insert",
"Name": "Bulk Insert",
"DiscussionId": "b399492f-c034-4406-810c-58ecd8c59115",
"Mappings": []
}
]
Loading