Skip to content

Commit

Permalink
#883 Add MariaDB db type
Browse files Browse the repository at this point in the history
  • Loading branch information
ipolevoy committed Sep 4, 2019
1 parent baf1546 commit 18a03be
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@

import org.javalite.activejdbc.CaseInsensitiveMap;
import org.javalite.activejdbc.MetaModel;
import org.javalite.activejdbc.Registry;

import org.javalite.activejdbc.associations.Many2ManyAssociation;
import org.javalite.common.Convert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Igor Polevoy
* @author Eric Nielsen
*/
public class DefaultDialect implements Dialect {

private static Logger LOGGER = LoggerFactory.getLogger(DefaultDialect.class.getSimpleName());

protected static final Pattern ORDER_BY_PATTERN = Pattern.compile("^\\s*ORDER\\s+BY",
Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
protected static final Pattern GROUP_BY_PATTERN = Pattern.compile("^\\s*GROUP\\s+BY",
Expand Down Expand Up @@ -119,6 +123,7 @@ protected void appendSelect(StringBuilder queryBuilder, String tableName, String

@Override
public String formSelect(String tableName, String[] columns, String subQuery, List<String> orderBys, long limit, long offset) {
LOGGER.error("ERROR!!!! Limit and Offset are not supported by DefaultDialect");
StringBuilder queryBuilder = new StringBuilder();
appendSelect(queryBuilder, tableName, columns, null, subQuery, orderBys);
return queryBuilder.toString();
Expand Down

0 comments on commit 18a03be

Please sign in to comment.