public static ISqlRunner Create(string connectionString, IMapCache mapCache = null, IMapCompilerSource compilerSource = null, Action <IContextBuilder> build = null) { var connectionFactory = new SqliteDbConnectionFactory(connectionString); mapCache = mapCache ?? new MapCache(); compilerSource = compilerSource ?? new MapCompilerSource(); return(new SqlRunner(_core, connectionFactory, build, compilerSource, mapCache)); }
public ExecutionContext(IDbConnectionFactory factory, IProviderConfiguration provider, IDbCommandStringifier stringifier, IMapCompiler compiler, IMapCache mapCache) { MapCompiler = compiler; Stringifier = stringifier; Provider = provider; MapCache = mapCache; _completed = 0; _opened = 0; Connection = factory.Create(); }
public SqlRunner(SqlRunnerCore core, IDbConnectionFactory connectionFactory, Action <IContextBuilder> defaultBuilder, IMapCompilerSource compilerBuilder, IMapCache mapCache) { Argument.NotNull(core, nameof(core)); Argument.NotNull(connectionFactory, nameof(connectionFactory)); Argument.NotNull(compilerBuilder, nameof(compilerBuilder)); Argument.NotNull(mapCache, nameof(mapCache)); _core = core; _connectionFactory = connectionFactory; _defaultBuilder = defaultBuilder; _compilerBuilder = compilerBuilder; _mapCache = mapCache; }