PreparedStatement(PreparedStatementManager manager, string sql, bool isExplicit) { _manager = manager; Sql = sql; IsExplicit = isExplicit; State = PreparedState.NotPrepared; }
internal static PreparedStatement CreateExplicit( PreparedStatementManager manager, string sql, string name, List <NpgsqlParameter> parameters, [CanBeNull] PreparedStatement statementBeingReplaced) { var pStatement = new PreparedStatement(manager, sql, true) { Name = name, StatementBeingReplaced = statementBeingReplaced }; pStatement.SetParamTypes(parameters); return(pStatement); }
internal static PreparedStatement CreateAutoPrepareCandidate(PreparedStatementManager manager, string sql) => new PreparedStatement(manager, sql, false);