An alternative to UBB.threads
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
FLocal/MySQLConnector/Extensions.cs

26 lines
759 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Web.Core.DB;
using System.Data.Common;
namespace MySQLConnector {
static class Extensions {
public static string compile(this ITableSpec table, IDBTraits traits) {
return traits.escapeIdentifier(table.name);
}
public static string compile(this ColumnSpec column, IDBTraits traits) {
return column.table.compile(traits) + "." + traits.escapeIdentifier(column.name);
}
public static void AddParameter(this DbCommand command, string name, string value) {
DbParameter parameter = command.CreateParameter();
parameter.ParameterName = name;
parameter.Value = value;
command.Parameters.Add(parameter);
}
}
}