internal all_columnsClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; object_id = record["object_id"].Convert<int?>(); name = record["name"].Convert<string>(); column_id = record["column_id"].Convert<int?>(); system_type_id = record["system_type_id"].Convert<Byte?>(); user_type_id = record["user_type_id"].Convert<int?>(); max_length = record["max_length"].Convert<Int16?>(); precision = record["precision"].Convert<Byte?>(); scale = record["scale"].Convert<Byte?>(); collation_name = record["collation_name"].Convert<string>(); is_nullable = record["is_nullable"].Convert<Boolean?>(); is_ansi_padded = record["is_ansi_padded"].Convert<Boolean?>(); is_rowguidcol = record["is_rowguidcol"].Convert<Boolean?>(); is_identity = record["is_identity"].Convert<Boolean?>(); is_computed = record["is_computed"].Convert<Boolean?>(); is_filestream = record["is_filestream"].Convert<Boolean?>(); is_replicated = record["is_replicated"].Convert<Boolean?>(); is_non_sql_subscribed = record["is_non_sql_subscribed"].Convert<Boolean?>(); is_merge_published = record["is_merge_published"].Convert<Boolean?>(); is_dts_replicated = record["is_dts_replicated"].Convert<Boolean?>(); is_xml_document = record["is_xml_document"].Convert<Boolean?>(); xml_collection_id = record["xml_collection_id"].Convert<int?>(); default_object_id = record["default_object_id"].Convert<int?>(); rule_object_id = record["rule_object_id"].Convert<int?>(); is_sparse = record["is_sparse"].Convert<Boolean?>(); is_column_set = record["is_column_set"].Convert<Boolean?>(); }
public ReferenceItem(DataBase parent, SQLSysViews.foreign_keysClass constraint, Func<SQLSysViews.all_objectsClass, TypeItem> getType) : base(parent, constraint.name) { var columns = constraint.Columns.OrderBy(c => c.constraint_column_id).ToArray(); Columns = columns.Select(c => c.ParentColumn.name).ToArray(); TargetColumns = columns.Select(c => c.ReferenceColumn.name).ToArray(); _targetTypeCache = new ValueCache<TypeItem>(() => getType(constraint.Reference)); }
public CacheClass(IDataProvider provider, SQLSysViews parent) { all_columns = new ValueCache<IEnumerable<all_columnsClass>>(() => provider.Select<all_columnsClass>("sys", "all_columns", r => new all_columnsClass(r, parent))); all_objects = new ValueCache<IEnumerable<all_objectsClass>>(() => provider.Select<all_objectsClass>("sys", "all_objects", r => new all_objectsClass(r, parent))); key_constraints = new ValueCache<IEnumerable<key_constraintsClass>>(() => provider.Select<key_constraintsClass>("sys", "key_constraints", r => new key_constraintsClass(r, parent))); foreign_keys = new ValueCache<IEnumerable<foreign_keysClass>>(() => provider.Select<foreign_keysClass>("sys", "foreign_keys", r => new foreign_keysClass(r, parent))); foreign_key_columns = new ValueCache<IEnumerable<foreign_key_columnsClass>>(() => provider.Select<foreign_key_columnsClass>("sys", "foreign_key_columns", r => new foreign_key_columnsClass(r, parent))); indexes = new ValueCache<IEnumerable<indexesClass>>(() => provider.Select<indexesClass>("sys", "indexes", r => new indexesClass(r, parent))); index_columns = new ValueCache<IEnumerable<index_columnsClass>>(() => provider.Select<index_columnsClass>("sys", "index_columns", r => new index_columnsClass(r, parent))); schemas = new ValueCache<IEnumerable<schemasClass>>(() => provider.Select<schemasClass>("sys", "schemas", r => new schemasClass(r, parent))); types = new ValueCache<IEnumerable<typesClass>>(() => provider.Select<typesClass>("sys", "types", r => new typesClass(r, parent))); }
public CompountType(SQLSysViews.all_objectsClass @object) { Object = @object; _membersCache = new ValueCache<Member[]>(()=>Object.Members); _uniquesCache = new ValueCache<int[][]>(GetUniques); }
public Information(IDataProvider provider) { _sqlSysViews = Profiler.Measure(() => new SQLSysViews(provider)); _compountTypeCache = new FunctionCache<string, CompountType>(GetCompountType); }
internal typesClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; name = record["name"].Convert<string>(); system_type_id = record["system_type_id"].Convert<Byte?>(); user_type_id = record["user_type_id"].Convert<int?>(); schema_id = record["schema_id"].Convert<int?>(); principal_id = record["principal_id"].Convert<int?>(); max_length = record["max_length"].Convert<Int16?>(); precision = record["precision"].Convert<Byte?>(); scale = record["scale"].Convert<Byte?>(); collation_name = record["collation_name"].Convert<string>(); is_nullable = record["is_nullable"].Convert<Boolean?>(); is_user_defined = record["is_user_defined"].Convert<Boolean?>(); is_assembly_type = record["is_assembly_type"].Convert<Boolean?>(); default_object_id = record["default_object_id"].Convert<int?>(); rule_object_id = record["rule_object_id"].Convert<int?>(); is_table_type = record["is_table_type"].Convert<Boolean?>(); }
internal schemasClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; name = record["name"].Convert<string>(); schema_id = record["schema_id"].Convert<int?>(); principal_id = record["principal_id"].Convert<int?>(); }
internal index_columnsClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; object_id = record["object_id"].Convert<int?>(); index_id = record["index_id"].Convert<int?>(); index_column_id = record["index_column_id"].Convert<int?>(); column_id = record["column_id"].Convert<int?>(); key_ordinal = record["key_ordinal"].Convert<Byte?>(); partition_ordinal = record["partition_ordinal"].Convert<Byte?>(); is_descending_key = record["is_descending_key"].Convert<Boolean?>(); is_included_column = record["is_included_column"].Convert<Boolean?>(); }
internal indexesClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; object_id = record["object_id"].Convert<int?>(); name = record["name"].Convert<string>(); index_id = record["index_id"].Convert<int?>(); type = record["type"].Convert<Byte?>(); type_desc = record["type_desc"].Convert<string>(); is_unique = record["is_unique"].Convert<Boolean?>(); data_space_id = record["data_space_id"].Convert<int?>(); ignore_dup_key = record["ignore_dup_key"].Convert<Boolean?>(); is_primary_key = record["is_primary_key"].Convert<Boolean?>(); is_unique_constraint = record["is_unique_constraint"].Convert<Boolean?>(); fill_factor = record["fill_factor"].Convert<Byte?>(); is_padded = record["is_padded"].Convert<Boolean?>(); is_disabled = record["is_disabled"].Convert<Boolean?>(); is_hypothetical = record["is_hypothetical"].Convert<Boolean?>(); allow_row_locks = record["allow_row_locks"].Convert<Boolean?>(); allow_page_locks = record["allow_page_locks"].Convert<Boolean?>(); has_filter = record["has_filter"].Convert<Boolean?>(); filter_definition = record["filter_definition"].Convert<string>(); }
internal foreign_key_columnsClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; constraint_object_id = record["constraint_object_id"].Convert<int?>(); constraint_column_id = record["constraint_column_id"].Convert<int?>(); parent_object_id = record["parent_object_id"].Convert<int?>(); parent_column_id = record["parent_column_id"].Convert<int?>(); referenced_object_id = record["referenced_object_id"].Convert<int?>(); referenced_column_id = record["referenced_column_id"].Convert<int?>(); }
internal foreign_keysClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; name = record["name"].Convert<string>(); object_id = record["object_id"].Convert<int?>(); principal_id = record["principal_id"].Convert<int?>(); schema_id = record["schema_id"].Convert<int?>(); parent_object_id = record["parent_object_id"].Convert<int?>(); type = record["type"].Convert<string>(); type_desc = record["type_desc"].Convert<string>(); create_date = record["create_date"].Convert<DateTime?>(); modify_date = record["modify_date"].Convert<DateTime?>(); is_ms_shipped = record["is_ms_shipped"].Convert<Boolean?>(); is_published = record["is_published"].Convert<Boolean?>(); is_schema_published = record["is_schema_published"].Convert<Boolean?>(); referenced_object_id = record["referenced_object_id"].Convert<int?>(); key_index_id = record["key_index_id"].Convert<int?>(); is_disabled = record["is_disabled"].Convert<Boolean?>(); is_not_for_replication = record["is_not_for_replication"].Convert<Boolean?>(); is_not_trusted = record["is_not_trusted"].Convert<Boolean?>(); delete_referential_action = record["delete_referential_action"].Convert<Byte?>(); delete_referential_action_desc = record["delete_referential_action_desc"].Convert<string>(); update_referential_action = record["update_referential_action"].Convert<Byte?>(); update_referential_action_desc = record["update_referential_action_desc"].Convert<string>(); is_system_named = record["is_system_named"].Convert<Boolean?>(); }
internal key_constraintsClass(DbDataRecord record, SQLSysViews parent) { _parent = parent; name = record["name"].Convert<string>(); object_id = record["object_id"].Convert<int?>(); principal_id = record["principal_id"].Convert<int?>(); schema_id = record["schema_id"].Convert<int?>(); parent_object_id = record["parent_object_id"].Convert<int?>(); type = record["type"].Convert<string>(); type_desc = record["type_desc"].Convert<string>(); create_date = record["create_date"].Convert<DateTime?>(); modify_date = record["modify_date"].Convert<DateTime?>(); is_ms_shipped = record["is_ms_shipped"].Convert<Boolean?>(); is_published = record["is_published"].Convert<Boolean?>(); is_schema_published = record["is_schema_published"].Convert<Boolean?>(); unique_index_id = record["unique_index_id"].Convert<int?>(); is_system_named = record["is_system_named"].Convert<Boolean?>(); }