public override void Run(object context)
        {
            DbController dbc = new DbController(Connection);

            try
            {
                String schemaName = DbHelper.GetRandomString(10);
                DbDefault.CreateDB(schemaName, DbCreateType.PKPartition);

                foreach (TableName tname in Enum.GetValues(typeof(TableName)))
                {
                    Command.CommandText = DbDefault.GetSelectCountStatement(schemaName, tname);
                    if (Convert.ToInt32(Command.ExecuteScalar()) < 1)
                    {
                        Fail(String.Format("Failed to create table {0}.{1}", schemaName, tname.ToString()));
                    }
                }

                DbDefault.DropDB(schemaName);
            }
            catch (Exception e)
            {
                Fail(e);
            }
            finally
            {
                base.Run(context);
            }
        }
Beispiel #2
0
 public long SelectCount()
 {
     return(Convert.ToInt64(GFXDDbi.Select(Connection, QualifyTableName(
                                               DbDefault.GetSelectCountStatement(TableName.ADDRESS)), QueryTypes.SCALAR)));
 }