コード例 #1
0
        public when_generating_a_table_for_soft_deletes()
        {
            var mapping = DocumentMapping.For<Target>();
            mapping.DeleteStyle = DeleteStyle.SoftDelete;

            var schemaObjects = new DocumentSchemaObjects(mapping);

            theTable = schemaObjects.StorageTable();
        }
コード例 #2
0
        public when_generating_a_table_for_soft_deletes()
        {
            var mapping = DocumentMapping.For <Target>();

            mapping.DeleteStyle = DeleteStyle.SoftDelete;

            var schemaObjects = new DocumentSchemaObjects(mapping);

            theTable = schemaObjects.StorageTable();
        }
コード例 #3
0
        public void can_do_substitutions()
        {
            var mapping = DocumentMapping.For <User>();

            mapping.Duplicate(x => x.FirstName);


            var users = new DocumentSchemaObjects(mapping);

            var table = users.StorageTable();

            table.BuildTemplate($"*{DdlRules.SCHEMA}*").ShouldBe($"*{table.Table.Schema}*");
            table.BuildTemplate($"*{DdlRules.TABLENAME}*").ShouldBe($"*{table.Table.Name}*");
            table.BuildTemplate($"*{DdlRules.COLUMNS}*").ShouldBe($"*id, data, mt_last_modified, mt_version, mt_dotnet_type, first_name*");
            table.BuildTemplate($"*{DdlRules.NON_ID_COLUMNS}*").ShouldBe($"*data, mt_last_modified, mt_version, mt_dotnet_type, first_name*");

            table.BuildTemplate($"*{DdlRules.METADATA_COLUMNS}*").ShouldBe("*mt_last_modified, mt_version, mt_dotnet_type*");
        }
コード例 #4
0
        public void can_do_substitutions()
        {
            var mapping = DocumentMapping.For<User>();
            mapping.Duplicate(x => x.FirstName);


            var users = new DocumentSchemaObjects(mapping);
            
            var table = users.StorageTable();

            table.BuildTemplate($"*{DdlRules.SCHEMA}*").ShouldBe($"*{table.Table.Schema}*");
            table.BuildTemplate($"*{DdlRules.TABLENAME}*").ShouldBe($"*{table.Table.Name}*");
            table.BuildTemplate($"*{DdlRules.COLUMNS}*").ShouldBe($"*id, data, mt_last_modified, mt_version, mt_dotnet_type, first_name*");
            table.BuildTemplate($"*{DdlRules.NON_ID_COLUMNS}*").ShouldBe($"*data, mt_last_modified, mt_version, mt_dotnet_type, first_name*");

            table.BuildTemplate($"*{DdlRules.METADATA_COLUMNS}*").ShouldBe("*mt_last_modified, mt_version, mt_dotnet_type*");
        }