May fix
This commit is contained in:
parent
2b0bee198e
commit
e9810c69f4
@ -71,7 +71,7 @@ public class H2 extends AbstractSqlDataSource {
|
|||||||
this.tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
|
this.tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
|
||||||
this.col = new Columns(settings);
|
this.col = new Columns(settings);
|
||||||
this.con = connection;
|
this.con = connection;
|
||||||
this.columnsHandler = AuthMeColumnsHandler.createForSqlite(con, settings);
|
this.columnsHandler = AuthMeColumnsHandler.createForH2(con, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -51,6 +51,19 @@ public final class AuthMeColumnsHandler {
|
|||||||
return new AuthMeColumnsHandler(sqlColHandler);
|
return new AuthMeColumnsHandler(sqlColHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AuthMeColumnsHandler createForH2(Connection connection, Settings settings) {
|
||||||
|
ColumnContext columnContext = new ColumnContext(settings, false);
|
||||||
|
String tableName = settings.getProperty(DatabaseSettings.MYSQL_TABLE);
|
||||||
|
String nameColumn = settings.getProperty(DatabaseSettings.MYSQL_COL_NAME);
|
||||||
|
|
||||||
|
SqlColumnsHandler<ColumnContext, String> sqlColHandler = new SqlColumnsHandler<>(
|
||||||
|
forSingleConnection(connection, tableName, nameColumn, columnContext)
|
||||||
|
.setPredicateSqlGenerator(new PredicateSqlGenerator<>(columnContext, false))
|
||||||
|
);
|
||||||
|
return new AuthMeColumnsHandler(sqlColHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a column handler for MySQL.
|
* Creates a column handler for MySQL.
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user