public SqlQueryGenerator(TableInfo table, BaseDbType dialect)
 {
     //  this.table.TableName = table.TableName;
     //this.Header = Header;
     this.table   = table;
     this.dialect = dialect;
 }
        public long CountRegs(string table, string RetrieveDataCondition, BaseDbType dialect)
        {
            string sql = "select count(*) from " + dialect.FormatDbObj(table) + " " + RetrieveDataCondition;

            using (IDataReader dr = this.ExecuteDataReader(sql))
                if (dr.Read())
                {
                    return(Convert.ToInt64(dr.GetValue(0)));
                }
                else
                {
                    return(0);
                }
        }
Esempio n. 3
0
 public DbConnectionInfo(string connStr, DbTypeSupported type)
 {
     this.ConnectionString = connStr;
     this.DbType           = BaseDbType.CreateInstance(type);
 }
 public DbTaskRunner(DbCon dbConnection, MessageHandler messageHandler)
 {
     this.dbConnection   = dbConnection;
     this.dbType         = dbConnection.DbConnectionInfo.DbType;
     this.messageHandler = messageHandler;
 }
Esempio n. 5
0
 public SqlQueryBuilder(BaseDbType dialect)
 {
     this.dialect = dialect;
 }