示例#1
0
		public IndexSchema (IndexSchema index)
			: base (index)
		{
			this.tableName = index.tableName;
			this.type = index.type;
			this.columns = index.columns;
		}
		public virtual void DropIndex (IndexSchema index)
		{
			throw new NotImplementedException ();
		}
		protected virtual IndexSchema GetTableIndex (DataRow row, TableSchema table)
		{
			IndexSchema schema = new IndexSchema (this);
			
			return schema;
		}
		protected virtual ColumnSchema GetTableIndexColumn (DataRow row, TableSchema table, IndexSchema index)
		{
			ColumnSchema schema = new ColumnSchema (this, table);
			
			return schema;
		}
		public virtual ColumnSchemaCollection GetTableIndexColumns (TableSchema table, IndexSchema index)
		{
			ColumnSchemaCollection collection = new ColumnSchemaCollection ();
			
			IPooledDbConnection conn = connectionPool.Request ();
			try {
				//restrictions: database, schema, table, ConstraintName, column
				DataTable dt = conn.GetSchema (indexColumnsCollectionString, null, table.SchemaName, table.Name, index.Name);
				for (int r = 0; r < dt.Rows.Count; r++) {
					DataRow row = dt.Rows[r];
					collection.Add (GetTableIndexColumn (row, table, index));
				}
			} catch (Exception e) {
				QueryService.RaiseException (e);
			}
			conn.Release ();
			
			return collection;
		}
		public virtual IndexSchema CreateIndexSchema (string name)
		{
			IndexSchema schema = new IndexSchema (this);
			schema.Name = name;
			return schema;
		}
示例#7
0
 //http://www.sqlite.org/lang_dropindex.html
 public override void DropIndex(IndexSchema index)
 {
     ExecuteNonQuery("DROP INDEX IF EXISTS " + index.Name);
 }
		//http://www.sqlite.org/lang_dropindex.html
		public override void DropIndex (IndexSchema index)
		{
			ExecuteNonQuery ("DROP INDEX IF EXISTS " + index.Name);
		}
 //http://dev.mysql.com/doc/refman/5.1/en/drop-index.html
 public override void DropIndex(IndexSchema index)
 {
     ExecuteNonQuery("DROP INDEX " + index.Name + " ON " + index.TableName + ";");
 }
 public virtual void CreateIndex(IndexSchema index)
 {
     throw new NotImplementedException();
 }
 public virtual void RenameIndex(IndexSchema index, string name)
 {
     throw new NotImplementedException();
 }
示例#12
0
        protected virtual IndexSchema GetTableIndex(DataRow row, TableSchema table)
        {
            IndexSchema schema = new IndexSchema(this);

            return(schema);
        }
示例#13
0
        protected virtual ColumnSchema GetTableIndexColumn(DataRow row, TableSchema table, IndexSchema index)
        {
            ColumnSchema schema = new ColumnSchema(this, table);

            return(schema);
        }
示例#14
0
        public virtual ColumnSchemaCollection GetTableIndexColumns(TableSchema table, IndexSchema index)
        {
            ColumnSchemaCollection collection = new ColumnSchemaCollection();

            IPooledDbConnection conn = connectionPool.Request();

            try {
                //restrictions: database, schema, table, ConstraintName, column
                DataTable dt = conn.GetSchema(indexColumnsCollectionString, null, table.SchemaName, table.Name, index.Name);
                for (int r = 0; r < dt.Rows.Count; r++)
                {
                    DataRow row = dt.Rows[r];
                    collection.Add(GetTableIndexColumn(row, table, index));
                }
            } catch (Exception e) {
                QueryService.RaiseException(e);
            }
            conn.Release();

            return(collection);
        }
		public virtual void RenameIndex (IndexSchema index, string name)
		{
			throw new NotImplementedException ();
		}
示例#16
0
 //http://www.sqlite.org/lang_createindex.html
 public override void CreateIndex(IndexSchema index)
 {
     throw new NotImplementedException();
 }
		//http://www.sqlite.org/lang_createindex.html
		public override void CreateIndex (IndexSchema index)
		{
			throw new NotImplementedException ();
		}