コード例 #1
0
ファイル: IndexSchema.cs プロジェクト: Kalnor/monodevelop
		public IndexSchema (IndexSchema index)
			: base (index)
		{
			this.tableName = index.tableName;
			this.type = index.type;
			this.columns = index.columns;
		}
コード例 #2
0
		public virtual void DropIndex (IndexSchema index)
		{
			throw new NotImplementedException ();
		}
コード例 #3
0
		protected virtual IndexSchema GetTableIndex (DataRow row, TableSchema table)
		{
			IndexSchema schema = new IndexSchema (this);
			
			return schema;
		}
コード例 #4
0
		protected virtual ColumnSchema GetTableIndexColumn (DataRow row, TableSchema table, IndexSchema index)
		{
			ColumnSchema schema = new ColumnSchema (this, table);
			
			return schema;
		}
コード例 #5
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;
		}
コード例 #6
0
		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);
 }
コード例 #8
0
		//http://www.sqlite.org/lang_dropindex.html
		public override void DropIndex (IndexSchema index)
		{
			ExecuteNonQuery ("DROP INDEX IF EXISTS " + index.Name);
		}
コード例 #9
0
 //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 + ";");
 }
コード例 #10
0
 public virtual void CreateIndex(IndexSchema index)
 {
     throw new NotImplementedException();
 }
コード例 #11
0
 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);
        }
コード例 #15
0
		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();
 }
コード例 #17
0
		//http://www.sqlite.org/lang_createindex.html
		public override void CreateIndex (IndexSchema index)
		{
			throw new NotImplementedException ();
		}