Exemplo n.º 1
0
 /// <summary>
 /// Generates a unique name for an identifier, to use as a named parameter.
 /// </summary>
 /// <param name="columnIdentifier">The identifier definition.</param>
 /// <returns>A string containing the generated name.</returns>
 public string GetParameterName(SqlIdentifier columnIdentifier, int parameterNameSuffix)
 {
     if (parameterNameSuffix == 0)
     {
         return("param_" + columnIdentifier.Definition.Trim().Replace('.', '_').Replace(' ', '_'));
     }
     else
     {
         return("param_" + columnIdentifier.Definition.Trim().Replace('.', '_').Replace(' ', '_') + "_" + parameterNameSuffix.ToString());
     }
 }
Exemplo n.º 2
0
 public Delete(SqlIdentifier singleTable, Where whereClause)
     : this(new SqlIdentifierCollection() { singleTable }, whereClause)
 {
 }
Exemplo n.º 3
0
 public Delete(SqlIdentifier singleTable)
     : this(new SqlIdentifierCollection() { singleTable })
 {
 }
Exemplo n.º 4
0
 public Query(SqlIdentifier singleTable)
     : this(new SqlIdentifierCollection() { singleTable })
 {
 }
Exemplo n.º 5
0
 public Statement(SqlIdentifier singleTable)
     : this(new SqlIdentifierCollection() { singleTable })
 {
 }
Exemplo n.º 6
0
 public string SqlText(SqlIdentifier identifier)
 {
     return(this.QuoteIdentifier(identifier.Prefix, identifier.Name, identifier.Alias));
 }
Exemplo n.º 7
0
 public Insert(SqlIdentifier singleTable)
     : this(new SqlIdentifierCollection() { singleTable })
 {
 }
Exemplo n.º 8
0
 public Select(SqlIdentifier singleTable, bool forUpdate)
     : this(new SqlIdentifierCollection() { singleTable })
 {
     this.ForUpdate = forUpdate;
 }
Exemplo n.º 9
0
 public Join(SqlIdentifier table, string on)
 {
     this.Table = table;
     this.On    = on;
 }