} //method protected virtual void LoadSequences() { if (!Settings.Driver.Supports(DbFeatures.Sequences)) { return; } var data = GetSequences(); foreach (InfoRow row in data.Rows) { var schema = row.GetAsString("SEQUENCE_SCHEMA"); var name = row.GetAsString("SEQUENCE_NAME"); var dataTypeName = row.GetAsString("DATA_TYPE"); var startValue = row.GetAsLong("START_VALUE"); var incr = row.GetAsInt("INCREMENT"); // add sequence var seq = new DbSequenceInfo(this.Model, name, schema, dataTypeName, startValue, incr); Model.AddSequence(seq); } }
} //method protected virtual void LoadSequences() { if (!Settings.Driver.Supports(DbFeatures.Sequences)) { return; } var data = GetSequences(); foreach (DbRow row in data.Rows) { var schema = row.GetAsString("SEQUENCE_SCHEMA"); var name = row.GetAsString("SEQUENCE_NAME"); var dataType = row.GetAsString("DATA_TYPE"); var startValue = row.GetAsLong("START_VALUE"); var incr = row.GetAsInt("INCREMENT"); //find type def var typeDef = Driver.TypeRegistry.FindVendorDbTypeInfo(dataType); var typeSpec = typeDef.FormatTypeSpec(0, 0, 0); var typeInfo = new DbTypeInfo(typeDef, dataType, false, 0, 0, 0, typeDef.DefaultColumnInit); // add sequence var seq = new DbSequenceInfo(this.Model, name, schema, typeInfo, startValue, incr); Model.AddSequence(seq); } }