yangys
2024-05-18 040976de6f9934b99f30268a28e2ecf42260e217
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
package com.qianwen.core.sequence.range.db.provider;
 
import com.baomidou.mybatisplus.annotation.DbType;
 
 
public interface SqlProvider {
    String getCreateTableSql();
 
    Boolean support(DbType dbType);
 
    default String getExistTableSql() {
        return null;
    }
 
    default String getInsertRangeSql() {
        return "INSERT INTO #tableName (id,name,value,create_time,update_time) VALUES(?,?,?,?,?)";
    }
 
    default String getUpdateRangeSql() {
        return "UPDATE #tableName SET value=?,update_time=? WHERE name=? AND value=?";
    }
 
    default String getSelectRangeSql() {
        return "SELECT value FROM #tableName WHERE name=?";
    }
}