当前位置: 首页>>代码示例>>C#>>正文


C# Table.GetQualifiedName方法代码示例

本文整理汇总了C#中Table.GetQualifiedName方法的典型用法代码示例。如果您正苦于以下问题:C# Table.GetQualifiedName方法的具体用法?C# Table.GetQualifiedName怎么用?C# Table.GetQualifiedName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Table的用法示例。


在下文中一共展示了Table.GetQualifiedName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: QuotedTableNameWithSqlCE

        public void QuotedTableNameWithSqlCE()
        {
            Table tbl = new Table();
            tbl.Name = "`Group`";

            Assert.AreEqual("\"Group\"", tbl.GetQualifiedName(dialect));
        }
开发者ID:hoangduc007,项目名称:nhibernate-core,代码行数:7,代码来源:SqlCEDialectFixture.cs

示例2: QuotedTableNameWithoutSchemaWithSqlCE

        public void QuotedTableNameWithoutSchemaWithSqlCE()
        {
            Table tbl = new Table();
            tbl.Name = "`name`";

            Assert.AreEqual("\"name\"", tbl.GetQualifiedName(dialect));
        }
开发者ID:hoangduc007,项目名称:nhibernate-core,代码行数:7,代码来源:SqlCEDialectFixture.cs

示例3: QuotedSchemaNameWithUnqoutedTableInSqlCE

        public void QuotedSchemaNameWithUnqoutedTableInSqlCE()
        {
            Table tbl = new Table();
            tbl.Schema = "`schema`";
            tbl.Name = "name";

            Assert.AreEqual("\"schema_name\"", tbl.GetQualifiedName(dialect));
            Assert.AreEqual("\"schema_table\"", dialect.Qualify("", "\"schema\"", "table"));
        }
开发者ID:hoangduc007,项目名称:nhibernate-core,代码行数:9,代码来源:SqlCEDialectFixture.cs

示例4: QuotedCatalogSchemaNameWithSqlCE

        public void QuotedCatalogSchemaNameWithSqlCE()
        {
            Table tbl = new Table();
            tbl.Catalog = "dbo";
            tbl.Schema = "`schema`";
            tbl.Name = "`name`";

            Assert.AreEqual("dbo.\"schema_name\"", tbl.GetQualifiedName(dialect));
            Assert.AreEqual("dbo.\"schema_table\"", dialect.Qualify("dbo", "\"schema\"", "\"table\""));
        }
开发者ID:hoangduc007,项目名称:nhibernate-core,代码行数:10,代码来源:SqlCEDialectFixture.cs

示例5: SqlCreateClusteredIndexString

    private static string SqlCreateClusteredIndexString(Dialect dialect, string name, Table table,
			IEnumerable<Column> columns, string defaultCatalog, string defaultSchema)
    {
        StringBuilder buf = new StringBuilder("CREATE CLUSTERED INDEX ")
                .Append(dialect.QualifyIndexName ? name : StringHelper.Unqualify(name))
                .Append(" ON ")
                .Append(table.GetQualifiedName(dialect, defaultCatalog, defaultSchema))
                .Append(" (")
              .Append(string.Join(", ", columns.Select(x=> x.GetQuotedName(dialect))))
              .Append(")");

            return buf.ToString();
    }
开发者ID:csokun,项目名称:WebApiNHibernate,代码行数:13,代码来源:NHibernateIndexSnippet.cs

示例6: BuildSqlDropIndexString

 internal static String BuildSqlDropIndexString(Dialect dialect, Table table, String name, String defaultCatalog, String defaultSchema)
 {
     return "drop index " + (dialect.QualifyIndexName ? StringHelper.Qualify(table.GetQualifiedName(dialect, defaultCatalog, defaultSchema), dialect.Quote(name)) : dialect.Quote(name));
 }
开发者ID:longshine,项目名称:EasyDb.NET,代码行数:4,代码来源:Mapping.cs

示例7: BuildSqlCreateIndexString

            internal static String BuildSqlCreateIndexString(Dialect dialect, String name, Table table, IEnumerable<Column> columns, Boolean unique, String defaultCatalog, String defaultSchema)
            {
                String tableQualifiedName = table.GetQualifiedName(dialect, defaultCatalog, defaultSchema);
                StringBuilder sb = StringHelper.CreateBuilder()
                    .Append("create")
                    .Append(unique ? " unique" : "")
                    .Append(" index ")
                    //.Append(dialect.QualifyIndexName ? name : StringHelper.Unqualify(name))
                    .Append(dialect.QualifyIndexName ? StringHelper.Qualify(tableQualifiedName, dialect.Quote(name)) : dialect.Quote(name))
                    .Append(" on ")
                    .Append(tableQualifiedName)
                    .Append(" (");

                StringHelper.AppendItemsWithComma(columns, delegate(Column column)
                {
                    sb.Append(column.GetQuotedName(dialect));
                }, sb);

                return sb.Append(")").ToString();
            }
开发者ID:longshine,项目名称:EasyDb.NET,代码行数:20,代码来源:Mapping.cs

示例8: SchemaNameWithSqlCE

        public void SchemaNameWithSqlCE()
        {
            Table tbl = new Table();
            tbl.Schema = "schema";
            tbl.Name = "name";

            Assert.AreEqual("schema_name", tbl.GetQualifiedName(dialect));
            Assert.AreEqual("schema_table", dialect.Qualify("", "schema", "table"));
        }
开发者ID:hoangduc007,项目名称:nhibernate-core,代码行数:9,代码来源:SqlCEDialectFixture.cs


注:本文中的Table.GetQualifiedName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。