Пример #1
0
 /// <summary>
 /// Initializes a new instance of a Table.
 /// </summary>
 /// <param name="qualifier">The schema the table belongs to.</param>
 /// <param name="name">The name of the table.</param>
 public Table(Namespace qualifier, string name)
 {
     if (String.IsNullOrWhiteSpace(name))
     {
         throw new ArgumentException(Resources.BlankTableName, "name");
     }
     Qualifier = qualifier;
     Name = name;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of a Function.
 /// </summary>
 /// <param name="qualifier">The schema the function exists in.</param>
 /// <param name="name">The name of the function.</param>
 /// <param name="arguments">The arguments being passed to the function.</param>
 public Function(Namespace qualifier, string name, params IProjectionItem[] arguments)
 {
     if (String.IsNullOrWhiteSpace(name))
     {
         throw new ArgumentException(Resources.BlankFunctionName, "name");
     }
     this.qualifier = qualifier;
     Name = name;
     this.arguments = new List<IProjectionItem>(arguments);
 }
Пример #3
0
 private void visitMultipartIdentifier(Namespace item, string name)
 {
     List<string> parts = new List<string>();
     if (item != null)
     {
         parts.AddRange(item.Qualifiers);
     }
     parts.Add(name);
     string joined = String.Join(".", parts);
     writer.Write(joined);
 }
Пример #4
0
 private Namespace getNamespace(IEnumerable<string> qualifiers)
 {
     if (!qualifiers.Any())
     {
         return null;
     }
     Namespace schema = new Namespace();
     foreach (string qualifier in qualifiers)
     {
         schema.AddQualifier(qualifier);
     }
     return schema;
 }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of a Function.
 /// </summary>
 /// <param name="qualifier">The schema the function exists in.</param>
 /// <param name="name">The name of the function.</param>
 public Function(Namespace qualifier, string name)
     : this(qualifier, name, new IProjectionItem[0])
 {
 }