ステートメント初期化。

@param sqlContext SQLコンテキスト
@return PreparedStatement
@throws SQLException SQL例外
352153
public PreparedStatement getPreparedStatement(final SqlContext sqlContext) throws SQLException {
		Optional<LocalTransactionContext> txContext = currentTxContext();
		if (txContext.isPresent()) {
			return txContext.get().getPreparedStatement(sqlContext);
		} else {
			if (!this.unmanagedTransaction.isPresent()) {
				this.unmanagedTransaction = Optional
						.of(new LocalTransactionContext(this.connectionSupplier, this.sqlFilterManager));
			}
			return this.unmanagedTransaction.get().getPreparedStatement(sqlContext);
		}
	}
344497
public PreparedStatement prepareStatement(final String _string,
                                              final int _returnGeneratedKeys)
        throws SQLException
    {

        return getConnection().prepareStatement(_string, _returnGeneratedKeys);
    }
686312
public function prepare(string $sql, array $params = []): Statement
    {
        if (!$stmt = $this->connection->prepare($sql)) {
            $error = [
                'error' => $this->connection->error,
                'errno' => $this->connection->errno,
                'sqlstate' => $this->connection->sqlstate
            ];

            throw new SqlException('Failed to prepare statement', [$error], $sql, $params);
        }

        if (!empty($params)) {
            if (!$stmt->bind_param(self::getMysqlParamTypes($params), ...$params)) {
                throw new SqlException('Failed to bind params', $stmt->error_list, $sql, $params);
            }
        }

        return new Statement($stmt, $this->usedPrepare, $sql, $params);
    }
393974
public PrepareResult executeBatch() throws SQLException {
    int paramCount = getParamCount();
    if (binaryProtocol) {
      if (readPrepareStmtResult) {
        parameterTypeHeader = new ColumnType[paramCount];
        if (prepareResult == null
            && protocol.getOptions().cachePrepStmts
            && protocol.getOptions().useServerPrepStmts) {
          String key = protocol.getDatabase() + "-" + sql;
          prepareResult = protocol.prepareStatementCache().get(key);
          if (prepareResult != null && !((ServerPrepareResult) prepareResult)
              .incrementShareCounter()) {
            //in cache but been de-allocated
            prepareResult = null;
          }
        }
        statementId =
            (prepareResult == null) ? -1 : ((ServerPrepareResult) prepareResult).getStatementId();
      } else if (prepareResult != null) {
        statementId = ((ServerPrepareResult) prepareResult).getStatementId();
      }
    }
    return executeBatchStandard(paramCount);
  }
456923
public static PreparedStatement createWayMemberTable(Connection connection, String wayMemberTable) throws SQLException {
        try (Statement stmt = connection.createStatement()) {
            StringBuilder sb = new StringBuilder("CREATE TABLE ");
            sb.append(wayMemberTable);
            sb.append("(ID_RELATION BIGINT, ID_WAY BIGINT, ROLE VARCHAR, WAY_ORDER INT);");
            stmt.execute(sb.toString());
        }
        return connection.prepareStatement("INSERT INTO " + wayMemberTable + " VALUES ( ?,?,?,?);");
    }
284413
@Override
    public PoolablePreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
        return prepareStatement(sql, -1, resultSetType, resultSetConcurrency, -1);
    }
11139
protected String getPreparedStatementText(ControlBeanContext context, Method m, Object[] args) {
        // this reflection fragment may resolve to a JdbcControl.ComplexSqlFragment
        // if so it changes the behavior a bit.
        Object val = getParameterValue(context, m, args);
        if (val instanceof JdbcControl.ComplexSqlFragment) {
            return ((JdbcControl.ComplexSqlFragment)val).getSQL();
        } else {
            return PREPARED_STATEMENT_SUB_MARK;
        }
    }
691573
@Nullable
    public T query() throws SQLException {
        try (ResultSet r = executeQuery()) {
            if (r.next()) {
                return resultMapper.map(r);
            }
            return null;
        }
    }
561940
public ServerSidePreparedStatement serverPrepareStatement(final String sql)
      throws SQLException {
    return new ServerSidePreparedStatement(this,
        sql,
        ResultSet.TYPE_FORWARD_ONLY,
        ResultSet.CONCUR_READ_ONLY,
        Statement.RETURN_GENERATED_KEYS);
  }
970381
public boolean execute(Sql sql) throws SQLException {
		
		long start =  System.currentTimeMillis();
		
		if (sql.validate() == false) {
			return false;
		}
		
		boolean result = false;
		
		PreparedStatement stmt = null;
		try {
			stmt = this.createStatment(conn, sql);
			stmt.execute();
			
			result = true;
		} catch (SQLException e) {
			throw e;
		} finally {
			try {
				if (stmt != null && stmt.isClosed() == false) {
					stmt.close();
				}
			} catch (SQLException e) {
				logger.error(e.getMessage(), e);
			}
		}
		
		logger.debug(String.format("Execute %s used %d ms", sql.getSql(), System.currentTimeMillis() - start));

		return result;
	}
437605
protected PreparedStatement statement(Connection connection, String query)
            throws SQLException {
        return connection.prepareStatement(query);
    }
857478
@Override
    public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
137146
public PreparedStatement prepareStatement(final String sql, 
                                              final int resultSetType, 
                                              final int resultSetConcurrency, 
                                              final int resultSetHoldability)
        throws SQLException {

        if (resultSetHoldability != ResultSet.CLOSE_CURSORS_AT_COMMIT) {
            throw new SQLFeatureNotSupportedException("Unsupported result set holdability");
        } // end of if

        return prepareStatement(sql, resultSetType, resultSetConcurrency);
    }
284288
public PreparedStatement prepareStatement(final String sql, 
                                              final int autoGeneratedKeys) 
        throws SQLException {

        checkClosed();

        return new acolyte.jdbc.
            PreparedStatement(this, sql, autoGeneratedKeys, null, null,
                              this.handler.getStatementHandler());

    }
1149531
@Override
    public PoolablePreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
        return prepareStatement(sql, autoGeneratedKeys, -1, -1, -1);
    }
249851
static ResultSet executeStatement(SQL sql) throws SQLException {
    try (SqlSession session = sqlSessionFactory.openSession(true)) {
      try (Connection conn = session.getConnection()) {
        try (Statement stmt = conn.createStatement()) {
          return stmt.executeQuery(sql.toString());
        }
      }
    }
  }
802986
@Override
	public ResultSet doQuery(final SqlContext sqlContext, final PreparedStatement preparedStatement,
			final ResultSet resultSet) throws SQLException {
		return resultSet;
	}