public static SchemaObjectName FullTableName(Identifier databaseName, Identifier schemaName, Identifier tableName)
        {
            var fragment = new SchemaObjectName();

            fragment.Identifiers.AddRange(databaseName, schemaName, tableName);
            return(fragment);
        }
        public static SchemaObjectName TableName(string name)
        {
            var objectName = new SchemaObjectName();

            objectName.Identifiers.Add(Identifier(name));
            return(objectName);
        }
        public static NamedTableReference NamedTableReference(string identifier, SchemaObjectName namedTable, QuoteType quoteType = QuoteType.NotQuoted)
        {
            var fragment = new NamedTableReference();

            fragment.Alias        = Identifier(identifier, quoteType);
            fragment.SchemaObject = namedTable;
            return(fragment);
        }
        public static NamedTableReference NamedTableReference(Identifier alias, SchemaObjectName namedTable)
        {
            var fragment = new NamedTableReference();

            fragment.Alias        = alias;
            fragment.SchemaObject = namedTable;
            return(fragment);
        }
        public static NamedTableReference NamedTableReference(SchemaObjectName namedTable)
        {
            var fragment = new NamedTableReference();

            fragment.Alias        = null;
            fragment.SchemaObject = namedTable;
            return(fragment);
        }
示例#6
0
文件: Names.cs 项目: sbane/TSqlStrong
 public static string GetAlias(ScriptDom.SchemaObjectName schemaObject)
 {
     return(schemaObject.BaseIdentifier.Value);
 }
示例#7
0
文件: Names.cs 项目: sbane/TSqlStrong
 /// <summary>
 /// Returns a . delimited name from a schema object.
 /// </summary>
 /// <param name="schemaObject"></param>
 /// <returns></returns>
 public static string GetFullTypeName(ScriptDom.SchemaObjectName schemaObject) =>
 schemaObject.SchemaIdentifier == null
         ? schemaObject.BaseIdentifier.Value
         : $"{schemaObject.SchemaIdentifier.Value}.{schemaObject.BaseIdentifier.Value}";
示例#8
0
 public virtual void ExplicitVisit(SchemaObjectName schemaObjectName)
 {
 }