-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #313 from tigrisdata/main
Beta release
- Loading branch information
Showing
18 changed files
with
523 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: Bug report | ||
about: File a bug | ||
title: "[BUG]: <replace title>" | ||
labels: bug | ||
assignees: "" | ||
--- | ||
|
||
# Prerequisites | ||
|
||
Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.** | ||
|
||
- [ ] I am running the latest version | ||
- [ ] I checked the documentation and found no answer | ||
- [ ] I checked to make sure that this issue has not already been filed | ||
|
||
# Expected Behavior | ||
|
||
Please describe the behavior you are expecting | ||
|
||
# Current Behavior | ||
|
||
What is the current behavior? | ||
|
||
# Failure Information (for bugs) | ||
|
||
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template. | ||
|
||
## Steps to Reproduce | ||
|
||
Please provide detailed steps for reproducing the issue. | ||
|
||
1. step 1 | ||
2. step 2 | ||
3. you get it... | ||
|
||
## Context | ||
|
||
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. | ||
|
||
> You can find Tigris SDK version on your local dev project by executing `npm list | grep "tigrisdata/core"` | ||
- [Tigris SDK version](https://www.npmjs.com/package/@tigrisdata/core?activeTab=versions): | ||
- Operating System: | ||
|
||
## Failure Logs | ||
|
||
Please include any relevant log snippets or files here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,43 @@ | ||
## Describe your changes | ||
## What type of PR is this? (check all applicable) | ||
|
||
## How best to test these changes | ||
- [ ] Refactor | ||
- [ ] Feature | ||
- [ ] Bug Fix | ||
- [ ] Optimization | ||
- [ ] Documentation Update | ||
|
||
## Issue ticket number and link | ||
## Description | ||
|
||
## Related Tickets & Documents | ||
|
||
<!-- | ||
For pull requests that relate or close an issue, please include them | ||
below. We like to follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). | ||
For example having the text: "closes #1234" would connect the current pull | ||
request to issue 1234. And when we merge the pull request, Github will | ||
automatically close the issue. | ||
--> | ||
|
||
- Related Issue # | ||
- Closes # | ||
|
||
## Added/updated tests? | ||
|
||
- [ ] Yes | ||
- [ ] No, and this is why: _please replace this line with details on why tests | ||
have not been included_ | ||
- [ ] I need help with writing tests | ||
|
||
### Is this change backwards compatible? | ||
|
||
- [ ] Yes | ||
- [ ] No, and this is why: _please replace this line with details on why?_ | ||
|
||
### Does it require updates to [Tigris docs](https://docs.tigrisdata.com/)? | ||
|
||
- [ ] Yes, and here is the link: _please create an issue in [tigris-docs](https://github.com/tigrisdata/tigris-docs/issues) repo | ||
and link here as `tigrisdata/tigris-docs#123`_ | ||
- [ ] No | ||
|
||
## [optional] Are there any post deployment tasks we need to perform? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule proto
updated
from 1c4a37 to e86d66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"title": "students", | ||
"additionalProperties": false, | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "integer", | ||
"format": "int64", | ||
"autoGenerate": true | ||
}, | ||
"email": { | ||
"type": "string" | ||
}, | ||
"firstName": { | ||
"type": "string" | ||
}, | ||
"lastName": { | ||
"type": "string" | ||
}, | ||
"createdAt": { | ||
"type": "string", | ||
"format": "date-time", | ||
"createdAt": true | ||
} | ||
}, | ||
"primary_key": ["id", "email"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
import { TigrisCollection } from "../../../decorators/tigris-collection"; | ||
import { PrimaryKey } from "../../../decorators/tigris-primary-key"; | ||
import { TigrisDataTypes, TigrisSchema } from "../../../types"; | ||
import { Field } from "../../../decorators/tigris-field"; | ||
|
||
/****************************************************************************** | ||
* `Student` class demonstrates a Tigris collection schema generated using | ||
* decorators. Type of collection fields is inferred using Reflection APIs. This | ||
* particular schema example: | ||
* - infers the type of collection fields automatically using Reflection APIs | ||
* - has multiple primary keys | ||
*****************************************************************************/ | ||
export const STUDENT_COLLECTION_NAME = "students"; | ||
|
||
@TigrisCollection(STUDENT_COLLECTION_NAME) | ||
export class Student { | ||
@PrimaryKey(TigrisDataTypes.INT64, { order: 1, autoGenerate: true }) | ||
id?: string; | ||
|
||
@PrimaryKey(TigrisDataTypes.STRING, { order: 2 }) | ||
email: string; | ||
|
||
@Field() | ||
firstName!: string; | ||
|
||
@Field() | ||
lastName!: string; | ||
|
||
@Field({ timestamp: "createdAt" }) | ||
createdAt?: Date; | ||
} | ||
|
||
/********************************** END **************************************/ | ||
|
||
/****************************************************************************** | ||
* `InvalidStudent` class demonstrates a Tigris collection schema validation, | ||
* Schema is INVALID as it contains two primary keys but no order was specified | ||
* in decorator under PrimaryKeyOptions. | ||
*****************************************************************************/ | ||
export const INVALID_STUDENT_COLLECTION_NAME = "invalid_students"; | ||
|
||
@TigrisCollection(INVALID_STUDENT_COLLECTION_NAME) | ||
export class InvalidStudent { | ||
@PrimaryKey(TigrisDataTypes.INT64) | ||
id?: string; | ||
|
||
@PrimaryKey(TigrisDataTypes.STRING) | ||
email: string; | ||
|
||
@Field() | ||
firstName!: string; | ||
|
||
@Field() | ||
lastName!: string; | ||
|
||
@Field({ timestamp: "createdAt" }) | ||
createdAt?: Date; | ||
} | ||
|
||
/********************************** END **************************************/ | ||
|
||
/** | ||
* `TigrisSchema` representation of the `Student` collection class . | ||
* | ||
* NOTE: This is only an illustration; you don't have to write this definition, | ||
* it will be auto generated. | ||
*/ | ||
export const StudentSchema: TigrisSchema<Student> = { | ||
id: { | ||
type: TigrisDataTypes.INT64, | ||
primary_key: { | ||
order: 1, | ||
autoGenerate: true, | ||
}, | ||
}, | ||
email: { | ||
type: TigrisDataTypes.STRING, | ||
primary_key: { | ||
order: 2, | ||
autoGenerate: false, | ||
}, | ||
}, | ||
firstName: { | ||
type: TigrisDataTypes.STRING, | ||
}, | ||
lastName: { | ||
type: TigrisDataTypes.STRING, | ||
}, | ||
createdAt: { | ||
type: TigrisDataTypes.DATE_TIME, | ||
timestamp: "createdAt", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.