Esempio n. 1
0
        public void Precision_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).Precision = 18;
            Assert.Equal(18, row["Precision"]);
        }
Esempio n. 2
0
        public void TableName_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["TableName"] = "table";
            Assert.Equal("table", ((TableDetailsRow)row).TableName);
        }
Esempio n. 3
0
        public void MaximumLength_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["MaximumLength"] = 42;
            Assert.Equal(42, ((TableDetailsRow)row).MaximumLength);
        }
Esempio n. 4
0
        public void MaximumLength_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).MaximumLength = 42;
            Assert.Equal(42, row["MaximumLength"]);
        }
Esempio n. 5
0
        public void DataType_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["DataType"] = "myType";
            Assert.Equal("myType", ((TableDetailsRow)row).DataType);
        }
Esempio n. 6
0
        public void DataType_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).DataType = "myType";
            Assert.Equal("myType", row["DataType"]);
        }
Esempio n. 7
0
        public void CatalogName_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["CatalogName"] = "catalog";
            Assert.Equal("catalog", ((TableDetailsRow)row).Catalog);
        }
Esempio n. 8
0
        public void IsNullable_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).IsNullable = true;
            Assert.True((bool)row["IsNullable"]);
        }
Esempio n. 9
0
        public void IsNullable_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["IsNullable"] = true;
            Assert.True(((TableDetailsRow)row).IsNullable);
        }
Esempio n. 10
0
        public void CatalogName_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).Catalog = "catalog";
            Assert.Equal("catalog", row["CatalogName"]);
        }
Esempio n. 11
0
        public void Precision_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["Precision"] = 18;
            Assert.Equal(18, ((TableDetailsRow)row).Precision);
        }
Esempio n. 12
0
        public void SchemaName_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).Schema = "schema";
            Assert.Equal("schema", row["SchemaName"]);
        }
Esempio n. 13
0
        public void Scale_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["Scale"] = 3;
            Assert.Equal(3, ((TableDetailsRow)row).Scale);
        }
Esempio n. 14
0
        public void IsPrimaryKey_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).IsPrimaryKey = true;
            Assert.Equal(true, row["IsPrimaryKey"]);
        }
Esempio n. 15
0
        public void SchemaName_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["SchemaName"] = "schema";
            Assert.Equal("schema", ((TableDetailsRow)row).Schema);
        }
Esempio n. 16
0
        public void IsServerGenerated_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).IsServerGenerated = true;
            Assert.Equal(true, row["IsServerGenerated"]);
        }
Esempio n. 17
0
        public void IsPrimaryKey_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["IsPrimaryKey"] = true;
            Assert.Equal(true, ((TableDetailsRow)row).IsPrimaryKey);
        }
Esempio n. 18
0
        public void IsServerGenerated_getter_returns_value_set_with_indexer()
        {
            var row = new TableDetailsCollection().NewRow();

            row["IsServerGenerated"] = true;
            Assert.Equal(true, ((TableDetailsRow)row).IsServerGenerated);
        }
Esempio n. 19
0
        public void Scale_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).Scale = 3;
            Assert.Equal(3, row["Scale"]);
        }
Esempio n. 20
0
        public void ColumnName_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).ColumnName = "column";
            Assert.Equal("column", row["ColumnName"]);
        }
Esempio n. 21
0
        public void TableName_setter_sets_value_in_uderlying_row()
        {
            var row = new TableDetailsCollection().NewRow();

            ((TableDetailsRow)row).TableName = "table";
            Assert.Equal("table", row["TableName"]);
        }
        internal virtual IEnumerable <TableDetailsRow> LoadViewDetails(IEnumerable <EntityStoreSchemaFilterEntry> filters)
        {
            var views = new TableDetailsCollection();

            return(LoadDataTable <TableDetailsRow>(
                       ViewDetailSql,
                       rows =>
                       rows
                       .OrderBy(r => r.Field <string>("SchemaName"))
                       .ThenBy(r => r.Field <string>("TableName"))
                       .ThenBy(r => r.Field <int>("Ordinal")),
                       views,
                       EntityStoreSchemaFilterObjectTypes.View,
                       filters,
                       ViewDetailAlias));
        }
        internal virtual IEnumerable <TableDetailsRow> LoadFunctionReturnTableDetails(IEnumerable <EntityStoreSchemaFilterEntry> filters)
        {
            Debug.Assert(
                _storeSchemaModelVersion >= EntityFrameworkVersion.Version3,
                "_storeSchemaModelVersion >= EntityFrameworkVersions.Version3");

            var table = new TableDetailsCollection();

            return(LoadDataTable <TableDetailsRow>(
                       FunctionReturnTableDetailSql,
                       rows =>
                       rows
                       .OrderBy(r => r.Field <string>("SchemaName"))
                       .ThenBy(r => r.Field <string>("TableName"))
                       .ThenBy(r => r.Field <int>("Ordinal")),
                       table,
                       EntityStoreSchemaFilterObjectTypes.Function,
                       filters,
                       FunctionReturnTableDetailAlias));
        }
Esempio n. 24
0
        public void Verify_TableDetailsCollection_columns()
        {
            var tableDetailsCollection = new TableDetailsCollection();

            Assert.Equal(14, tableDetailsCollection.Columns.Count);
            VerifyColumn(tableDetailsCollection.CatalogColumn, "CatalogName", typeof(string));
            VerifyColumn(tableDetailsCollection.SchemaColumn, "SchemaName", typeof(string));
            VerifyColumn(tableDetailsCollection.TableNameColumn, "TableName", typeof(string));
            VerifyColumn(tableDetailsCollection.ColumnNameColumn, "ColumnName", typeof(string));
            VerifyColumn(tableDetailsCollection.IsNullableColumn, "IsNullable", typeof(bool));
            VerifyColumn(tableDetailsCollection.DataTypeColumn, "DataType", typeof(string));
            VerifyColumn(tableDetailsCollection.MaximumLengthColumn, "MaximumLength", typeof(int));
            VerifyColumn(tableDetailsCollection.PrecisionColumn, "Precision", typeof(int));
            VerifyColumn(tableDetailsCollection.DateTimePrecisionColumn, "DateTimePrecision", typeof(int));
            VerifyColumn(tableDetailsCollection.ScaleColumn, "Scale", typeof(int));
            VerifyColumn(tableDetailsCollection.IsIdentityColumn, "IsIdentity", typeof(bool));
            VerifyColumn(tableDetailsCollection.IsServerGeneratedColumn, "IsServerGenerated", typeof(bool));
            VerifyColumn(tableDetailsCollection.IsPrimaryKeyColumn, "IsPrimaryKey", typeof(bool));
            VerifyColumn(
                tableDetailsCollection.Columns.OfType <DataColumn>().Single(c => c.ColumnName == "Ordinal"),
                "Ordinal",
                typeof(int));
        }
Esempio n. 25
0
        public void Table_returns_owning_table()
        {
            var tableDetailsCollection = new TableDetailsCollection();

            Assert.Same(tableDetailsCollection, tableDetailsCollection.NewRow().Table);
        }
Esempio n. 26
0
 internal TableDetailsRow(DataRowBuilder rb)
     : base(rb)
 {
     _tableTableDetails = ((TableDetailsCollection)(base.Table));
 }