-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Lavrukov
committed
Feb 15, 2024
1 parent
51c3007
commit e1530ae
Showing
21 changed files
with
306 additions
and
187 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
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
98 changes: 98 additions & 0 deletions
98
databind/src/main/java/tech/ydb/yoj/databind/schema/YdbType.java
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,98 @@ | ||
package tech.ydb.yoj.databind.schema; | ||
|
||
/** | ||
* Database column types supported by YDB. | ||
*/ | ||
public enum YdbType { | ||
DEFAULT(""), | ||
/** | ||
* Boolean value. | ||
*/ | ||
BOOL("BOOL"), | ||
|
||
/** | ||
* Byte value. | ||
*/ | ||
UINT8("UINT8"), | ||
|
||
/** | ||
* Integer value. | ||
*/ | ||
INT32("INT32"), | ||
|
||
/** | ||
* Integer value stored in the db as Uint32. | ||
*/ | ||
UINT32("UINT32"), | ||
|
||
/** | ||
* Long value. | ||
*/ | ||
INT64("INT64"), | ||
|
||
/** | ||
* Long value stored in the db as Uint64. | ||
*/ | ||
UINT64("UINT64"), | ||
|
||
/** | ||
* Float value. | ||
*/ | ||
FLOAT("FLOAT"), | ||
|
||
/** | ||
* Double value. | ||
*/ | ||
DOUBLE("DOUBLE"), | ||
|
||
/** | ||
* Date value, accurate to the day. | ||
*/ | ||
DATE("DATE"), | ||
|
||
/** | ||
* Timestamp value, accurate to second. | ||
*/ | ||
DATETIME("DATETIME"), | ||
|
||
/** | ||
* Timestamp value, accurate to microsecond. | ||
*/ | ||
TIMESTAMP("TIMESTAMP"), | ||
|
||
/** | ||
* Interval value, accurate to microsecond. | ||
*/ | ||
INTERVAL("INTERVAL"), | ||
|
||
/** | ||
* Binary data. | ||
*/ | ||
LEGACY_BYTES("STRING"), | ||
|
||
/** | ||
* UTF-8 encoded string. | ||
*/ | ||
UTF8("UTF8"), | ||
|
||
/** | ||
* JSON value, stored as a UTF-8 encoded string. | ||
*/ | ||
JSON("JSON"), | ||
|
||
/** | ||
* JSON value, stored in an indexed representation permitting efficient query operations of the values inside the | ||
* JSON value itself. | ||
*/ | ||
JSON_DOCUMENT("JSON_DOCUMENT"); | ||
|
||
private final String dbType; | ||
|
||
YdbType(String dbType) { | ||
this.dbType = dbType; | ||
} | ||
|
||
public String getDbType() { | ||
return dbType; | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.