提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.base.db.dao.sqls; |
懒 |
2 |
|
|
3 |
import lombok.Getter; |
|
4 |
|
|
5 |
/** |
|
6 |
* 添加数据源sql |
|
7 |
* |
|
8 |
* @author fengshuonan |
|
9 |
* @date 2019-07-16-13:06 |
|
10 |
*/ |
|
11 |
@Getter |
|
12 |
public class AddDatabaseInfoSql extends AbstractSql { |
|
13 |
|
|
14 |
@Override |
|
15 |
protected String mysql() { |
|
16 |
return "INSERT INTO `database_info`(`db_id`, `db_name`, `jdbc_driver`, `user_name`, `password`, `jdbc_url`, `remarks`, `create_time`) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; |
|
17 |
} |
|
18 |
|
|
19 |
@Override |
|
20 |
protected String sqlServer() { |
|
21 |
return "INSERT INTO [database_info] ([db_id], [db_name], [jdbc_driver], [user_name], [password], [jdbc_url], [remarks], [create_time]) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"; |
|
22 |
} |
|
23 |
|
|
24 |
@Override |
|
25 |
protected String pgSql() { |
|
26 |
return "INSERT INTO database_info(db_id, db_name, jdbc_driver, user_name, password, jdbc_url, remarks, create_time) VALUES (?, ?, ?, ?, ?, ?, ?, to_timestamp(?,'YYYY-MM-DD HH24:MI:SS'))"; |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
protected String oracle() { |
|
31 |
return "INSERT INTO database_info VALUES (?, ?, ?, ?, ?, ?, ?, to_date(?, 'yyyy-mm-dd hh24:mi:ss'))"; |
|
32 |
} |
|
33 |
} |