Search in sources :

Example 1 with BaseSqlQuery

use of com.infiniteautomation.mango.db.query.BaseSqlQuery in project ma-core-public by infiniteautomation.

the class AbstractBasicDao method createQuery.

/**
 * @param root
 * @param applyLimitToSelectSql
 * @return
 */
public BaseSqlQuery<T> createQuery(ASTNode root, boolean applyLimitToSelectSql) {
    SQLStatement statement = new SQLStatement(SELECT_ALL_BASE, COUNT_BASE, joins, getTableName(), TABLE_PREFIX, applyLimitToSelectSql, Common.envProps.getBoolean("db.forceUseIndex", false), this.indexes, this.databaseType);
    if (root != null)
        root.accept(new RQLToSQLSelect<T>(this), statement);
    statement.build();
    return new BaseSqlQuery<T>(this, statement);
}
Also used : BaseSqlQuery(com.infiniteautomation.mango.db.query.BaseSqlQuery) SQLStatement(com.infiniteautomation.mango.db.query.SQLStatement) RQLToSQLSelect(com.infiniteautomation.mango.db.query.RQLToSQLSelect)

Aggregations

BaseSqlQuery (com.infiniteautomation.mango.db.query.BaseSqlQuery)1 RQLToSQLSelect (com.infiniteautomation.mango.db.query.RQLToSQLSelect)1 SQLStatement (com.infiniteautomation.mango.db.query.SQLStatement)1