예제 #1
0
 public static IList <DataJoin <A, B> > ExecuteReader <A, B>(DataSource ds, int top, DataColumn[] columns, DataColumn[] group, DataOrder[] order, string aId, string bId, DataJoinType type = DataJoinType.Inner, DataWhereQueue ps = null) where A : DbTable, new() where B : DbTable, new()
 {
     return(ds.ExecuteReader <DataJoin <A, B> >(ds.Provider.BuildSelectJoinSql(GetTableName <A>(), GetTableName <B>(), type, aId, bId, DataProvider.GetSqlString(columns, ds, true, true), DataProvider.GetSqlString(ps, ds, true, false), DataProvider.GetSqlString(order, ds, true, false), DataProvider.GetSqlString(group, ds, true, false), top), DataWhereQueue.GetParameters(ps)));
 }
예제 #2
0
 public static IList <T> ExecuteReader <T>(DataSource ds, int top, DataColumn[] columns, DataColumn[] group, DataOrder[] order, DataWhereQueue ps = null) where T : DbTable, new()
 {
     return(ds.ExecuteReader <T>(ds.Provider.BuildSelectSql(GetTableName <T>(), DataProvider.GetSqlString(columns, ds, false, true), DataProvider.GetSqlString(ps, ds, false, false), DataProvider.GetSqlString(order, ds, false, false), DataProvider.GetSqlString(group, ds, false, false), top), DataWhereQueue.GetParameters(ps)));
 }
예제 #3
0
 public static IList <T> ExecuteReader <T>(DataSource ds, int top, DataWhereQueue ps = null) where T : DbTable, new()
 {
     return(ds.ExecuteReader <T>(ds.Provider.BuildSelectSql(GetTableName <T>(), null, DataProvider.GetSqlString(ps, ds, false, false), null, null, top), DataWhereQueue.GetParameters(ps)));
 }
예제 #4
0
        public static IList <DataJoin <A, B> > ExecuteReader <A, B>(DataSource ds, DataColumn[] columns, DataColumn[] group, DataOrder[] order, long index, int size, out long count, string aId, string bId, DataJoinType type = DataJoinType.Inner, DataWhereQueue ps = null) where A : DbTable, new() where B : DbTable, new()
        {
            if (ds.Provider.SupperRowNumber)
            {
                return(ExecuteJoinReaderWithRowNumber <A, B>(ds, DataProvider.GetSqlString(columns, ds, true, true), DataProvider.GetSqlString(ps, ds, true, false), order, DataProvider.GetSqlString(group, ds, true, false), index, size, out count, aId, bId, type, DataWhereQueue.GetParameters(ps)));
            }
            IList <DataJoin <A, B> > list = ExecuteJoinReaderWithLimitOrTop <A, B>(ds, DataProvider.GetSqlString(columns, ds, true, true), DataProvider.GetSqlString(ps, ds, true, false), DataProvider.GetSqlString(order, ds, true, false), DataProvider.GetSqlString(group, ds, true, false), index, size, out count, aId, bId, type, DataWhereQueue.GetParameters(ps));

            if (ds.Provider.SupperTop)
            {
                list = SplitJoinList(list, index, size);
            }
            return(list);
        }
예제 #5
0
        public static IList <T> ExecuteReader <T>(DataSource ds, DataColumn[] columns, DataColumn[] group, DataOrder[] order, long index, int size, out long count, DataWhereQueue ps = null) where T : DbTable, new()
        {
            if (ds.Provider.SupperRowNumber)
            {
                return(ExecuteReaderWithRowNumber <T>(ds, DataProvider.GetSqlString(columns, ds, false, true), DataProvider.GetSqlString(ps, ds, false, false), DataProvider.GetSqlString(order, ds, false, false), DataProvider.GetSqlString(group, ds, false, false), index, size, out count, DataWhereQueue.GetParameters(ps)));
            }
            IList <T> list = ExecuteReaderWithLimitOrTop <T>(ds, DataProvider.GetSqlString(columns, ds, false, true), DataProvider.GetSqlString(ps, ds, false, false), DataProvider.GetSqlString(order, ds, false, false), DataProvider.GetSqlString(group, ds, false, false), index, size, out count, DataWhereQueue.GetParameters(ps));

            if (ds.Provider.SupperTop)
            {
                list = SplitList(list, index, size);
            }
            return(list);
        }
예제 #6
0
 public long ExecuteCount(DataSource ds, DataWhereQueue ps = null)
 {
     return(ExecuteCount(ds, DataProvider.GetSqlString(ps, ds, false, false), null, DataWhereQueue.GetParameters(ps)));
 }
예제 #7
0
 public static long ExecuteCount <A, B>(DataSource ds, DataColumn[] group, string aId, string bId, DataJoinType type = DataJoinType.Inner, DataWhereQueue ps = null) where A : DbTable where B : DbTable
 {
     return(ExecuteCount <A, B>(ds, DataProvider.GetSqlString(ps, ds, true, false), DataProvider.GetSqlString(group, ds, true, false), aId, bId, type, DataWhereQueue.GetParameters(ps)));
 }
예제 #8
0
 public static long ExecuteCount <T>(DataSource ds, DataColumn[] group, DataWhereQueue ps = null) where T : DbTable
 {
     return(ExecuteCount <T>(ds, DataProvider.GetSqlString(ps, ds, false, false), DataProvider.GetSqlString(group, ds, false, false), DataWhereQueue.GetParameters(ps)));
 }