mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-25 05:39:29 +00:00
feat: Using text blocks instead of String literals (#2791)
This commit is contained in:
@@ -34,13 +34,13 @@ import org.h2.jdbcx.JdbcDataSource;
|
||||
@Slf4j
|
||||
public class DatabaseUtil {
|
||||
private static final String DB_URL = "jdbc:h2:mem:metamapping";
|
||||
private static final String CREATE_SCHEMA_SQL = "DROP TABLE IF EXISTS `user_account`;"
|
||||
+ "CREATE TABLE `user_account` (\n"
|
||||
+ " `id` int(11) NOT NULL AUTO_INCREMENT,\n"
|
||||
+ " `username` varchar(255) NOT NULL,\n"
|
||||
+ " `password` varchar(255) NOT NULL,\n"
|
||||
+ " PRIMARY KEY (`id`)\n"
|
||||
+ ");";
|
||||
private static final String CREATE_SCHEMA_SQL = """
|
||||
DROP TABLE IF EXISTS `user_account`;CREATE TABLE `user_account` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`username` varchar(255) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);""";
|
||||
|
||||
/**
|
||||
* Hide constructor.
|
||||
|
||||
Reference in New Issue
Block a user