-
Notifications
You must be signed in to change notification settings - Fork 8
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
1 parent
e940f1d
commit 0d73497
Showing
10 changed files
with
56 additions
and
20 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
28 changes: 28 additions & 0 deletions
28
liquibase-dialect/src/main/java/tech/ydb/liquibase/type/UuidTypeYdb.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,28 @@ | ||
package tech.ydb.liquibase.type; | ||
|
||
import liquibase.change.core.LoadDataChange; | ||
import liquibase.datatype.DataTypeInfo; | ||
import liquibase.datatype.LiquibaseDataType; | ||
|
||
/** | ||
* @author Kirill Kurdyukov | ||
*/ | ||
@DataTypeInfo( | ||
name = "UUID", | ||
aliases = {"uniqueidentifier", "java.util.UUID"}, | ||
minParameters = 0, | ||
maxParameters = 0, | ||
priority = LiquibaseDataType.PRIORITY_DATABASE | ||
) | ||
public class UuidTypeYdb extends BaseTypeYdb { | ||
|
||
@Override | ||
public LoadDataChange.LOAD_DATA_TYPE getLoadTypeName() { | ||
return LoadDataChange.LOAD_DATA_TYPE.UUID; | ||
} | ||
|
||
@Override | ||
protected String objectToSql(Object value) { | ||
return "Uuid('" + value + "')"; | ||
} | ||
} |
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
8 changes: 4 additions & 4 deletions
8
liquibase-dialect/src/test/resources/changelogs/csv/test-insert.csv
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,4 +1,4 @@ | ||
id,bool_column,bigint_column,smallint_column,tinyint_column,float_column,double_column,decimal_column,uint8_column,uint16_column,uint32_column,uint64_column,text_column,binary_column,json_column,jsondocument_column,date_column,datetime_column,timestamp_column,interval_column | ||
2,true,123123,13000,112,1.123,1.123123,1.123123,12,13,14,15,Кирилл Курдюков Алексеевич,binary,{"asd": "asd"},{"asd": "asd"},2014-04-06,2023-09-16T12:30,2023-07-31T17:00:00.000000Z,PT10S | ||
3,true,123123,13000,112,1.123,1.123123,1.123123,12,13,14,15,Кирилл Курдюков Алексеевич,binary,{"asd": "asd"},{"asd": "asd"},2014-04-06,2023-09-16T12:30,2023-07-31T17:00:00.000000Z,PT10S | ||
6,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null | ||
id,bool_column,bigint_column,smallint_column,tinyint_column,float_column,double_column,decimal_column,uint8_column,uint16_column,uint32_column,uint64_column,text_column,binary_column,json_column,jsondocument_column,date_column,datetime_column,timestamp_column,interval_column,uuid_column | ||
2,true,123123,13000,112,1.123,1.123123,1.123123,12,13,14,15,Кирилл Курдюков Алексеевич,binary,{"asd": "asd"},{"asd": "asd"},2014-04-06,2023-09-16T12:30,2023-07-31T17:00:00.000000Z,PT10S,689fd2b6-5764-4c43-8803-519da8f5f305 | ||
3,true,123123,13000,112,1.123,1.123123,1.123123,12,13,14,15,Кирилл Курдюков Алексеевич,binary,{"asd": "asd"},{"asd": "asd"},2014-04-06,2023-09-16T12:30,2023-07-31T17:00:00.000000Z,PT10S,689fd2b6-5764-4c43-8803-519da8f5f305 | ||
6,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null |
6 changes: 3 additions & 3 deletions
6
liquibase-dialect/src/test/resources/changelogs/csv/test-upsert.csv
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,3 +1,3 @@ | ||
id,bool_column,bigint_column,smallint_column,tinyint_column,float_column,double_column,decimal_column,uint8_column,uint16_column,uint32_column,uint64_column,text_column,binary_column,json_column,jsondocument_column,date_column,datetime_column,timestamp_column,interval_column | ||
1,true,123123,13000,113,1.123,1.123123,1.123123,12,13,14,15,Кирилл Курдюков Алексеевич,binary,{"asd": "asd"},{"asd": "asd"},2014-04-06,2023-09-16T12:30,2023-07-31T17:00:00.000000Z,PT10S | ||
5,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null | ||
id,bool_column,bigint_column,smallint_column,tinyint_column,float_column,double_column,decimal_column,uint8_column,uint16_column,uint32_column,uint64_column,text_column,binary_column,json_column,jsondocument_column,date_column,datetime_column,timestamp_column,interval_column,uuid_column | ||
1,true,123123,13000,113,1.123,1.123123,1.123123,12,13,14,15,Кирилл Курдюков Алексеевич,binary,{"asd": "asd"},{"asd": "asd"},2014-04-06,2023-09-16T12:30,2023-07-31T17:00:00.000000Z,PT10S,689fd2b6-5764-4c43-8803-519da8f5f305 | ||
5,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null |
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