This repository was archived by the owner on Feb 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQueryDialect.java
More file actions
72 lines (51 loc) · 3.01 KB
/
QueryDialect.java
File metadata and controls
72 lines (51 loc) · 3.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.upsolver.datasources.jdbc.querybuilders;
import com.upsolver.datasources.jdbc.JDBCTaskMetadata;
import com.upsolver.datasources.jdbc.metadata.TableInfo;
import com.upsolver.datasources.jdbc.utils.NamedPreparedStatment;
import com.upsolver.datasources.jdbc.utils.ThrowingBiFunction;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLType;
import java.time.Instant;
public interface QueryDialect {
long utcOffsetSeconds(Connection connection) throws SQLException;
String normalizeIdentifier(String s);
boolean isAutoIncrementColumn(ResultSet columnsResultSet) throws SQLException;
boolean isTimeType(SQLType sqlType) throws SQLException;
SQLType getSqlType(int code) throws SQLException;
SQLType getJdbcType(SQLType sqlType) throws SQLException;
String fullTableName(TableInfo tableInfo);
NamedPreparedStatment taskInfoByInc(TableInfo tableInfo,
JDBCTaskMetadata metadata,
Connection connection) throws SQLException;
NamedPreparedStatment taskInfoByTime(TableInfo tableInfo,
JDBCTaskMetadata metadata,
Instant maxTime,
Connection connection) throws SQLException;
NamedPreparedStatment taskInfoByIncAndTime(TableInfo tableInfo,
JDBCTaskMetadata metadata,
Instant maxTime,
Connection connection) throws SQLException;
NamedPreparedStatment queryByIncAndTime(TableInfo tableInfo,
JDBCTaskMetadata metadata,
int limit,
Connection connection) throws SQLException;
NamedPreparedStatment queryByTime(TableInfo tableInfo,
JDBCTaskMetadata metadata,
int limit,
Connection connection) throws SQLException;
NamedPreparedStatment queryByInc(TableInfo tableInfo,
JDBCTaskMetadata metadata,
int limit,
Connection connection) throws SQLException;
NamedPreparedStatment queryFullTable(TableInfo tableInfo,
JDBCTaskMetadata metadata,
int limit,
Connection connection) throws SQLException;
PreparedStatement getCurrentTimestamp(Connection connection) throws SQLException;
Connection getConnection(String url, java.util.Properties info) throws SQLException;
String getDriverClassName();
ThrowingBiFunction<ResultSet, Integer, String, SQLException> getStringValueGetter(int sqlType);
}