internal string GetDbIdType(DaoDbType type) { switch (type) { case DaoDbType.Invalid: break; case DaoDbType.Odbc: break; case DaoDbType.OleDb: break; case DaoDbType.MSSql: return("bigint"); case DaoDbType.Firebird: return("INTEGER"); case DaoDbType.SQLite: return("INTEGER"); default: break; } return(""); }
public DaoContextProviderFactory(DaoDbType type, string connectionString, bool initEmbedded) : this(type) { Expect.IsNotNullOrEmpty(connectionString, "Connection string cannot be empty"); this.ConnectionString = connectionString; if ((type == DaoDbType.Firebird || type == DaoDbType.SQLite) && initEmbedded) { this.InitEmbeddedDb(); } }
public static void SetContextDatabaseType(string contextName, DaoDbType type) { lock (lockContextTypes) { if (contextDatabaseTypes.ContainsKey(contextName)) { if (contextDatabaseTypes[contextName] == type) { return; } ExceptionHelper.Throw <InvalidOperationException>( "Cannot set database provider type on DaoContext '{0}' to '{1}' because it has already been set to '{2}'", contextName, type.ToString(), contextDatabaseTypes[contextName]); } else { contextDatabaseTypes.Add(contextName, type); } } }
private DatabaseAgent GetAgent(DaoDbType type) { return(DatabaseAgent.GetAgent(LogEventData.ContextName, type)); }
public void Initialize(DaoDbType type) { this.DatabaseAgent = GetAgent(type); }
public UnableToDetermineConnectionStringException(string contextName, DaoDbType type) : base("Unable to determine connection string from default configuration for contextName '" + contextName + "' DaoDbType '" + type.ToString() + "'") { }
public DaoContextProviderFactory(DaoDbType type) { this.type = type; }
public DaoContextProviderFactory(DaoDbType type, string connectionString) : this(type, connectionString, true) { }
public DatabaseEventStore(DaoDbType type) : this() { this.DaoDbType = type; }
private DatabaseAgent GetAgent(DaoDbType type) { return DatabaseAgent.GetAgent(LogEventData.ContextName, type); }