/// <summary> /// Initializes a new instance of the <see cref="MappedStatement"/> class. /// </summary> /// <param name="modelStore">The model store.</param> /// <param name="statement">The statement.</param> public MappedStatement(IModelStore modelStore, IStatement statement) { this.modelStore = modelStore; this.statement = statement; preparedCommand = new DefaultPreparedCommand(); resultStrategy = ResultStrategyFactory.Get(this.statement); }
public CommandExecuter( ILogger <CommandExecuter> logger , IPreparedCommand preparedCommand) { _logger = logger; _preparedCommand = preparedCommand; }
internal MappedStatement(ISqlMapper sqlMap, IStatement statement) { this._sqlMap = sqlMap; this._statement = statement; this._preparedCommand = PreparedCommandFactory.GetPreparedCommand(false); this._resultStrategy = ResultStrategyFactory.Get(this._statement); }
public PreparedCommand_Test() { _smartSqlOptions = new SmartSqlOptions(); _smartSqlOptions.Setup(); _sessionStore = _smartSqlOptions.DbSessionStore; _preparedCommand = new PreparedCommand(LoggerFactory.CreateLogger <PreparedCommand>(), _smartSqlOptions.SmartSqlContext); }
public CommandExecuter_Test() { _sessionStore = new DbConnectionSessionStore(LoggerFactory, DbProviderFactory); var _configLoader = new LocalFileConfigLoader(SqlMapConfigFilePath, LoggerFactory); var config = _configLoader.Load(); _smartSqlContext = new SmartSqlContext(LoggerFactory.CreateLogger <SmartSqlContext>(), config); _sqlBuilder = new SqlBuilder(LoggerFactory.CreateLogger <SqlBuilder>(), _smartSqlContext, _configLoader); _preparedCommand = new PreparedCommand(LoggerFactory.CreateLogger <PreparedCommand>(), _smartSqlContext); _commandExecuter = new CommandExecuter(LoggerFactory.CreateLogger <CommandExecuter>(), _preparedCommand); }
/// <summary> /// Get an IPreparedCommand. /// </summary> /// <returns></returns> static public IPreparedCommand GetPreparedCommand(bool isEmbedStatementParams) { IPreparedCommand preparedCommand = null; // if (isEmbedStatementParams) // { // preparedCommand = new EmbedParamsPreparedCommand(); // } // else // { preparedCommand = new DefaultPreparedCommand(); // } return(preparedCommand); }