コード例 #1
0
ファイル: SelectQuery.cs プロジェクト: kayone/Marr.DataMapper
 public SelectQuery(Dialect dialect, TableCollection tables, string whereClause, ISortQueryBuilder orderBy, bool useAltName)
 {
     Dialect = dialect;
     Tables = tables;
     WhereClause = whereClause;
     OrderBy = orderBy;
     UseAltName = useAltName;
 }
コード例 #2
0
ファイル: SelectQuery.cs プロジェクト: rmangaha/Radarr
 public SelectQuery(Dialect dialect, TableCollection tables, string whereClause, ISortQueryBuilder orderBy, bool useAltName)
 {
     Dialect     = dialect;
     Tables      = tables;
     WhereClause = whereClause;
     OrderBy     = orderBy;
     UseAltName  = useAltName;
 }
コード例 #3
0
        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.");
            }
        }
コード例 #4
0
ファイル: QueryFactory.cs プロジェクト: vawen/Marr.DataMapper
        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.");
            }
        }
コード例 #5
0
        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.");
            }
        }
コード例 #6
0
        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));
        }
コード例 #7
0
ファイル: QueryFactory.cs プロジェクト: Gadarr/Gadarr
        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.");
            }
        }
コード例 #8
0
 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);
 }