File tree 3 files changed +13
-10
lines changed
src/main/java/tech/ydb/jooq/codegen
3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 52
52
53
53
<jooq .version>3.19.0</jooq .version>
54
54
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>
57
57
</properties >
58
58
59
59
<dependencies >
Original file line number Diff line number Diff line change 1
1
package tech .ydb .jooq .codegen ;
2
2
3
+ import java .math .BigDecimal ;
4
+ import java .util .ArrayList ;
5
+ import java .util .Collections ;
6
+ import java .util .List ;
7
+
3
8
import org .jooq .*;
4
9
import org .jooq .impl .DSL ;
5
10
import org .jooq .meta .*;
6
11
import org .jooq .tools .JooqLogger ;
12
+
7
13
import tech .ydb .jdbc .YdbConnection ;
8
14
import tech .ydb .jdbc .context .SchemeExecutor ;
9
15
import tech .ydb .jdbc .context .YdbContext ;
17
23
import tech .ydb .table .description .TableIndex ;
18
24
import tech .ydb .table .settings .DescribeTableSettings ;
19
25
20
- import java .math .BigDecimal ;
21
- import java .util .ArrayList ;
22
- import java .util .Collections ;
23
- import java .util .List ;
24
-
25
26
public class YdbDatabase extends AbstractDatabase implements ResultQueryDatabase {
26
27
private static final JooqLogger log = JooqLogger .getLogger (YdbDatabase .class );
27
28
@@ -39,7 +40,7 @@ private YdbContext getContext() {
39
40
}
40
41
41
42
private String getDatabaseName () {
42
- return getContext ().getDatabase ().substring (1 );
43
+ return getContext ().getPrefixPath ().substring (1 );
43
44
}
44
45
45
46
@ Override
Original file line number Diff line number Diff line change 6
6
import java .time .LocalDateTime ;
7
7
import java .util .ArrayList ;
8
8
import java .util .List ;
9
+
9
10
import org .jooq .Binding ;
10
11
import org .jooq .JSON ;
11
12
import org .jooq .JSONB ;
20
21
import org .jooq .types .UInteger ;
21
22
import org .jooq .types .ULong ;
22
23
import org .jooq .types .UShort ;
23
- import tech . ydb . jdbc . YdbConst ;
24
+
24
25
import tech .ydb .jdbc .impl .YdbTypes ;
25
26
import tech .ydb .jooq .binding .DateBinding ;
26
27
import tech .ydb .jooq .binding .DatetimeBinding ;
36
37
import tech .ydb .jooq .value .YSON ;
37
38
import tech .ydb .table .description .TableColumn ;
38
39
import tech .ydb .table .description .TableDescription ;
40
+ import tech .ydb .table .values .DecimalType ;
39
41
import tech .ydb .table .values .Type ;
40
42
41
43
public class YdbTableDefinition extends AbstractTableDefinition {
@@ -71,7 +73,7 @@ protected List<ColumnDefinition> getElements0() {
71
73
kind = type .getKind ();
72
74
}
73
75
74
- int decimalDigits = kind == Type .Kind .DECIMAL ? YdbConst . SQL_DECIMAL_DEFAULT_PRECISION : 0 ;
76
+ int decimalDigits = kind == Type .Kind .DECIMAL ? (( DecimalType ) type ). getPrecision () : 0 ;
75
77
76
78
String typeName = type .toString ();
77
79
Class <? extends Binding <?, ?>> binding = getBinding (typeName );
You can’t perform that action at this time.
0 commit comments