public SelectQuery(Dialect dialect, TableCollection tables, string whereClause, ISortQueryBuilder orderBy, bool useAltName) { Dialect = dialect; Tables = tables; WhereClause = whereClause; OrderBy = orderBy; UseAltName = useAltName; }
public static IQuery CreatePagingSelectQuery(TableCollection tables, IDataMapper dataMapper, string where, ISortQueryBuilder orderBy, bool useAltName, int skip, int take) { SelectQuery innerQuery = (SelectQuery)CreateSelectQuery(tables, dataMapper, where, orderBy, useAltName); string providerString = dataMapper.ProviderFactory.ToString(); switch (providerString) { case DB_SqlClient: return new PagingQueryDecorator(innerQuery, skip, take); case DB_SqlCeClient: return new PagingQueryDecorator(innerQuery, skip, take); case DB_SQLiteClient: return new SqlitePagingQueryDecorator(innerQuery, skip, take); default: throw new NotImplementedException("Paging has not yet been implemented for this provider."); } }
public static IQuery CreateRowCountSelectQuery(TableCollection tables, IDataMapper dataMapper, string where, ISortQueryBuilder orderBy, bool useAltName) { SelectQuery innerQuery = (SelectQuery)CreateSelectQuery(tables, dataMapper, where, orderBy, useAltName); string providerString = dataMapper.ProviderFactory.ToString(); switch (providerString) { case DB_SqlClient: return new RowCountQueryDecorator(innerQuery); case DB_SqlCeClient: return new RowCountQueryDecorator(innerQuery); case DB_SQLiteClient: return new SqliteRowCountQueryDecorator(innerQuery); default: throw new NotSupportedException("Row count is not currently supported for this provider."); } }
public static IQuery CreatePagingSelectQuery(TableCollection tables, IDataMapper dataMapper, string where, ISortQueryBuilder orderBy, bool useAltName, int skip, int take) { SelectQuery innerQuery = (SelectQuery)CreateSelectQuery(tables, dataMapper, where, orderBy, useAltName); string providerString = dataMapper.ProviderFactory.ToString(); switch (providerString) { case DB_SqlClient: return(new PagingQueryDecorator(innerQuery, skip, take)); case DB_SqlCeClient: return(new PagingQueryDecorator(innerQuery, skip, take)); case DB_SQLiteClient: return(new SqlitePagingQueryDecorator(innerQuery, skip, take)); default: throw new NotSupportedException("Paging is not currently supported for this provider."); } }
public static IQuery CreateSelectQuery(TableCollection tables, IDataMapper dataMapper, string where, ISortQueryBuilder orderBy, bool useAltName) { Dialect dialect = CreateDialect(dataMapper); return(new SelectQuery(dialect, tables, where, orderBy, useAltName)); }
public static IQuery CreateRowCountSelectQuery(TableCollection tables, IDataMapper dataMapper, string where, ISortQueryBuilder orderBy, bool useAltName) { SelectQuery innerQuery = (SelectQuery)CreateSelectQuery(tables, dataMapper, where, orderBy, useAltName); string providerString = dataMapper.ProviderFactory.ToString(); switch (providerString) { case DB_SqlClient: return(new RowCountQueryDecorator(innerQuery)); case DB_SqlCeClient: return(new RowCountQueryDecorator(innerQuery)); case DB_SQLiteClient: return(new SqliteRowCountQueryDecorator(innerQuery)); default: throw new NotImplementedException("Row count has not yet been implemented for this provider."); } }
public static IQuery CreateSelectQuery(TableCollection tables, IDataMapper dataMapper, string where, ISortQueryBuilder orderBy, bool useAltName) { Dialect dialect = CreateDialect(dataMapper); return new SelectQuery(dialect, tables, where, orderBy, useAltName); }