File tree Expand file tree Collapse file tree
core/src/main/java/me/zort/sqllib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import me .zort .sqllib .api .ISQLDatabaseOptions ;
66import me .zort .sqllib .api .SQLEndpoint ;
77import me .zort .sqllib .api .cache .CacheManager ;
8- import me .zort .sqllib .internal .Constants ;
98import me .zort .sqllib .internal .exception .SQLDriverNotFoundException ;
109import me .zort .sqllib .internal .exception .SQLEndpointNotValidException ;
1110import me .zort .sqllib .internal .factory .SQLConnectionFactory ;
@@ -96,7 +95,7 @@ public SQLConnectionBuilder(@Nullable SQLEndpoint endpoint) {
9695 private @ NotNull SQLDatabaseConnection buildConnection (@ Nullable String driver , @ Nullable ISQLDatabaseOptions options ) {
9796 Objects .requireNonNull (endpoint , "Endpoint must be set!" );
9897 Objects .requireNonNull (jdbc );
99- if (driver == null ) driver = Constants .DEFAULT_DRIVER ;
98+ if (driver == null ) driver = SQLDatabaseConnectionImpl .DEFAULT_DRIVER ;
10099 SQLConnectionFactory connectionFactory = new LocalConnectionFactory (driver );
101100 return jdbc .contains ("jdbc:sqlite" )
102101 ? new SQLiteDatabaseConnectionImpl (connectionFactory , options )
Original file line number Diff line number Diff line change 2323import me .zort .sqllib .internal .factory .SQLConnectionFactory ;
2424import me .zort .sqllib .internal .fieldResolver .ConstructorParameterResolver ;
2525import me .zort .sqllib .internal .fieldResolver .LinkedOneFieldResolver ;
26- import me .zort .sqllib .naming .SymbolSeparatedNamingStrategy ;
2726import me .zort .sqllib .internal .impl .DefaultObjectMapper ;
2827import me .zort .sqllib .internal .impl .QueryResultImpl ;
2928import me .zort .sqllib .mapping .DefaultStatementMappingFactory ;
@@ -61,10 +60,11 @@ public class SQLDatabaseConnectionImpl extends PooledSQLDatabaseConnection {
6160
6261 // --***-- Default Constants --***--
6362
64- public static final boolean DEFAULT_AUTO_RECONNECT = true ;
65- public static final boolean DEFAULT_DEBUG = false ;
66- public static final boolean DEFAULT_LOG_SQL_ERRORS = true ;
67- public static final NamingStrategy DEFAULT_NAMING_STRATEGY = new SymbolSeparatedNamingStrategy ('_' );
63+ public static final String DEFAULT_DRIVER = Defaults .DEFAULT_DRIVER ;
64+ public static final boolean DEFAULT_AUTO_RECONNECT = Defaults .DEFAULT_AUTO_RECONNECT ;
65+ public static final boolean DEFAULT_DEBUG = Defaults .DEFAULT_DEBUG ;
66+ public static final boolean DEFAULT_LOG_SQL_ERRORS = Defaults .DEFAULT_LOG_SQL_ERRORS ;
67+ public static final NamingStrategy DEFAULT_NAMING_STRATEGY = Defaults .DEFAULT_NAMING_STRATEGY ;
6868 public static final Gson DEFAULT_GSON = Defaults .DEFAULT_GSON ;
6969
7070 // --***-- Options & Utilities --***--
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33import com .google .gson .Gson ;
44import com .google .gson .GsonBuilder ;
5+ import me .zort .sqllib .api .options .NamingStrategy ;
6+ import me .zort .sqllib .naming .SymbolSeparatedNamingStrategy ;
57
68public final class Defaults {
79
10+ public static final String DEFAULT_DRIVER = "com.mysql.jdbc.Driver" ;
11+ public static final boolean DEFAULT_AUTO_RECONNECT = true ;
12+ public static final boolean DEFAULT_DEBUG = false ;
13+ public static final boolean DEFAULT_LOG_SQL_ERRORS = true ;
14+ public static final NamingStrategy DEFAULT_NAMING_STRATEGY = new SymbolSeparatedNamingStrategy ('_' );
15+
816 public static final Gson DEFAULT_GSON = new GsonBuilder ()
917 .enableComplexMapKeySerialization ()
1018 .create ();
You can’t perform that action at this time.
0 commit comments