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.
36 lines
960 B
36 lines
960 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data.Common;
|
|
using MySql.Data.MySqlClient;
|
|
using FLocal.Core.DB;
|
|
|
|
namespace FLocal.MySQLConnector {
|
|
public class MySQLDBTraits : IDBTraits {
|
|
|
|
public static readonly MySQLDBTraits instance = new MySQLDBTraits();
|
|
|
|
public DbConnection createConnection(string connectionString) {
|
|
return new MySqlConnection(connectionString);
|
|
}
|
|
|
|
public long LastInsertId(DbCommand command, ITableSpec table) {
|
|
return ((MySqlCommand)command).LastInsertedId;
|
|
}
|
|
|
|
public string escapeIdentifier(string identifier) {
|
|
return "`" + MySqlHelper.EscapeString(identifier) + "`";
|
|
}
|
|
|
|
public string markParam(string param) {
|
|
return "@" + param;
|
|
}
|
|
|
|
public bool supportsIsolationLevel() {
|
|
//for some reason, call to BeginTransaction with IsolationLevel set fails somewhere deep in mysql library
|
|
return false;
|
|
}
|
|
|
|
}
|
|
}
|
|
|