コード例 #1
0
ファイル: DBObject.cs プロジェクト: aquilax1/DBLint
 public static bool SchemaEquals(SchemaID sid, SchemaID sid2)
 {
     if (sid == null || sid2 == null || SchemaID.GetSchemaHashCode(sid) != SchemaID.GetSchemaHashCode(sid2))
     {
         return(false);
     }
     return(sid2.SchemaName.Equals(sid.SchemaName) && sid2.DatabaseEquals(sid));
 }
コード例 #2
0
ファイル: DBObject.cs プロジェクト: aquilax1/DBLint
        public static int GetSchemaHashCode(SchemaID sid)
        {
            if (!sid._hashCode.HasValue)
            {
                sid._hashCode = sid._schemaName.GetHashCode();
            }

            return(DatabaseID.GetDatabaseHashCode(sid) * 17 + sid._hashCode.Value);
        }
コード例 #3
0
 private static void BrowseTables(Table table, DatabaseDictionary <TableID, Table> seenTables, DatabaseDictionary <TableID, Table> notSeen, List <Table> cluster)
 {
     cluster.Add(table);
     notSeen.Remove(table);
     seenTables.Add(table, table);
     foreach (var reference in table.References.Concat(table.ReferencedBy))
     {
         if (seenTables.ContainsKey(reference) || !SchemaID.SchemaEquals(reference.Schema, table.Schema))
         {
             continue;
         }
         else
         {
             BrowseTables(reference, seenTables, notSeen, cluster);
         }
     }
 }
コード例 #4
0
 public SchemaContext(SchemaID schema, IEnumerable <TableID> tables) : this(schema)
 {
     this.Tables = tables.Select(t => new TableID(t));
 }
コード例 #5
0
 public SchemaContext(SchemaID schema)
 {
     this.Location = ContextLocation.Schema;
     this.Schema   = schema;
 }
コード例 #6
0
ファイル: DBObject.cs プロジェクト: aquilax1/DBLint
 public SchemaID(SchemaID schemaID)
     : base(schemaID.DatabaseName)
 {
     this.SchemaName = schemaID.SchemaName;
 }