File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
src/main/java/tech/ydb/jooq/codegen Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 5252
5353 <jooq .version>3.19.0</jooq .version>
5454
55- <ydb .sdk.version>2.2.6 </ydb .sdk.version>
56- <ydb .jdbc.version>2.2.3 </ydb .jdbc.version>
55+ <ydb .sdk.version>2.3.8 </ydb .sdk.version>
56+ <ydb .jdbc.version>2.3.7 </ydb .jdbc.version>
5757 </properties >
5858
5959 <dependencies >
Original file line number Diff line number Diff line change 11package tech .ydb .jooq .codegen ;
22
3+ import java .math .BigDecimal ;
4+ import java .util .ArrayList ;
5+ import java .util .Collections ;
6+ import java .util .List ;
7+
38import org .jooq .*;
49import org .jooq .impl .DSL ;
510import org .jooq .meta .*;
611import org .jooq .tools .JooqLogger ;
12+
713import tech .ydb .jdbc .YdbConnection ;
814import tech .ydb .jdbc .context .SchemeExecutor ;
915import tech .ydb .jdbc .context .YdbContext ;
1723import tech .ydb .table .description .TableIndex ;
1824import tech .ydb .table .settings .DescribeTableSettings ;
1925
20- import java .math .BigDecimal ;
21- import java .util .ArrayList ;
22- import java .util .Collections ;
23- import java .util .List ;
24-
2526public class YdbDatabase extends AbstractDatabase implements ResultQueryDatabase {
2627 private static final JooqLogger log = JooqLogger .getLogger (YdbDatabase .class );
2728
@@ -39,7 +40,7 @@ private YdbContext getContext() {
3940 }
4041
4142 private String getDatabaseName () {
42- return getContext ().getDatabase ().substring (1 );
43+ return getContext ().getPrefixPath ().substring (1 );
4344 }
4445
4546 @ Override
Original file line number Diff line number Diff line change 66import java .time .LocalDateTime ;
77import java .util .ArrayList ;
88import java .util .List ;
9+
910import org .jooq .Binding ;
1011import org .jooq .JSON ;
1112import org .jooq .JSONB ;
2021import org .jooq .types .UInteger ;
2122import org .jooq .types .ULong ;
2223import org .jooq .types .UShort ;
23- import tech . ydb . jdbc . YdbConst ;
24+
2425import tech .ydb .jdbc .impl .YdbTypes ;
2526import tech .ydb .jooq .binding .DateBinding ;
2627import tech .ydb .jooq .binding .DatetimeBinding ;
3637import tech .ydb .jooq .value .YSON ;
3738import tech .ydb .table .description .TableColumn ;
3839import tech .ydb .table .description .TableDescription ;
40+ import tech .ydb .table .values .DecimalType ;
3941import tech .ydb .table .values .Type ;
4042
4143public class YdbTableDefinition extends AbstractTableDefinition {
@@ -71,7 +73,7 @@ protected List<ColumnDefinition> getElements0() {
7173 kind = type .getKind ();
7274 }
7375
74- int decimalDigits = kind == Type .Kind .DECIMAL ? YdbConst . SQL_DECIMAL_DEFAULT_PRECISION : 0 ;
76+ int decimalDigits = kind == Type .Kind .DECIMAL ? (( DecimalType ) type ). getPrecision () : 0 ;
7577
7678 String typeName = type .toString ();
7779 Class <? extends Binding <?, ?>> binding = getBinding (typeName );
You can’t perform that action at this time.
0 commit comments