Registers the parameter named parameterName to be of JDBC type sqlType.
345197
@Override
    public void registerOutParameter(String parameterName, int sqlType, int scale) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
1197294
public void setObject(int parameterIndex, Object x) throws SQLException {
    checkClosed();
    if (x == null) {
      setNull(parameterIndex, Types.OTHER);
    } else if (x instanceof UUID && connection.haveMinimumServerVersion(ServerVersion.v8_3)) {
      setUuid(parameterIndex, (UUID) x);
    } else if (x instanceof SQLXML) {
      setSQLXML(parameterIndex, (SQLXML) x);
    } else if (x instanceof String) {
      setString(parameterIndex, (String) x);
    } else if (x instanceof BigDecimal) {
      setBigDecimal(parameterIndex, (BigDecimal) x);
    } else if (x instanceof Short) {
      setShort(parameterIndex, (Short) x);
    } else if (x instanceof Integer) {
      setInt(parameterIndex, (Integer) x);
    } else if (x instanceof Long) {
      setLong(parameterIndex, (Long) x);
    } else if (x instanceof Float) {
      setFloat(parameterIndex, (Float) x);
    } else if (x instanceof Double) {
      setDouble(parameterIndex, (Double) x);
    } else if (x instanceof byte[]) {
      setBytes(parameterIndex, (byte[]) x);
    } else if (x instanceof java.sql.Date) {
      setDate(parameterIndex, (java.sql.Date) x);
    } else if (x instanceof Time) {
      setTime(parameterIndex, (Time) x);
    } else if (x instanceof Timestamp) {
      setTimestamp(parameterIndex, (Timestamp) x);
    } else if (x instanceof Boolean) {
      setBoolean(parameterIndex, (Boolean) x);
    } else if (x instanceof Byte) {
      setByte(parameterIndex, (Byte) x);
    } else if (x instanceof Blob) {
      setBlob(parameterIndex, (Blob) x);
    } else if (x instanceof Clob) {
      setClob(parameterIndex, (Clob) x);
    } else if (x instanceof Array) {
      setArray(parameterIndex, (Array) x);
    } else if (x instanceof PGobject) {
      setPGobject(parameterIndex, (PGobject) x);
    } else if (x instanceof Character) {
      setString(parameterIndex, ((Character) x).toString());
      //#if mvn.project.property.postgresql.jdbc.spec >= "JDBC4.2"
    } else if (x instanceof LocalDate) {
      setDate(parameterIndex, (LocalDate) x);
    } else if (x instanceof LocalTime) {
      setTime(parameterIndex, (LocalTime) x);
    } else if (x instanceof LocalDateTime) {
      setTimestamp(parameterIndex, (LocalDateTime) x);
    } else if (x instanceof OffsetDateTime) {
      setTimestamp(parameterIndex, (OffsetDateTime) x);
      //#endif
    } else if (x instanceof Map) {
      setMap(parameterIndex, (Map<?, ?>) x);
    } else if (x instanceof Number) {
      setNumber(parameterIndex, (Number) x);
    } else if (PrimitiveArraySupport.isSupportedPrimitiveArray(x)) {
      setPrimitiveArray(parameterIndex, x);
    } else {
      // Can't infer a type.
      throw new PSQLException(GT.tr(
          "Can''t infer the SQL type to use for an instance of {0}. Use setObject() with an explicit Types value to specify the type to use.",
          x.getClass().getName()), PSQLState.INVALID_PARAMETER_TYPE);
    }
  }
141807
private int nameToOutputIndex(String parameterName) throws SQLException {
    parameterMetadata.readMetadataFromDbIfRequired();
    for (int i = 0; i < parameterMetadata.getParameterCount(); i++) {
      String name = parameterMetadata.getName(i + 1);
      if (name != null && name.equalsIgnoreCase(parameterName)) {
        if (outputParameterMapper[i] == -1) {
          //this is not an outputParameter
          throw new SQLException("Parameter '" + parameterName
              + "' is not declared as output parameter with method registerOutParameter");
        }
        return outputParameterMapper[i];
      }
    }
    throw new SQLException("there is no parameter with the name " + parameterName);
  }
153960
protected void checkIndex(int parameterIndex, int type, String getName) throws SQLException {
    checkIndex(parameterIndex);
    if (type != this.testReturn[parameterIndex - 1]) {
      throw new PSQLException(
          GT.tr("Parameter of type {0} was registered, but call to get{1} (sqltype={2}) was made.",
              "java.sql.Types=" + testReturn[parameterIndex - 1], getName,
                  "java.sql.Types=" + type),
          PSQLState.MOST_SPECIFIC_TYPE_DOES_NOT_MATCH);
    }
  }
93179
public static ParameterDef Default(final int sqlType) {
        return new ParameterDef(jdbcTypeMappings.get(sqlType),
                                parameterModeIn,
                                sqlType,
                                jdbcTypeNames.get(sqlType),
                                jdbcTypePrecisions.get(sqlType),
                                jdbcTypeScales.get(sqlType),
                                parameterNullableUnknown,
                                jdbcTypeSigns.get(sqlType));
    }
48912
public void setNull(String parameterName, int sqlType) {
        recordByName(parameterName, getDeclaredMethod(CallableStatement.class, "setNull", String.class, int.class), parameterName, sqlType);
    }
640187
private void init_jdbcTypes() throws SQLException
    {
        ReportQuery q = (ReportQuery) getQueryObject().getQuery();
        m_jdbcTypes = new int[m_attributeCount];
        
        // try to get jdbcTypes from Query
        if (q.getJdbcTypes() != null)
        {
            m_jdbcTypes = q.getJdbcTypes();
        }
        else
        {
            ResultSetMetaData rsMetaData = getRsAndStmt().m_rs.getMetaData();
            for (int i = 0; i < m_attributeCount; i++)
            {
                m_jdbcTypes[i] = rsMetaData.getColumnType(i + 1);
            }
            
        }
    }
826440
@SuppressWarnings("unchecked")
	@Override
	public T outParam(final String paramName, final int sqlType) {
		context().outParam(paramName, sqlType);
		return (T) this;
	}
1150648
public void register(final String statementId, final String sql, final int parametersCount, final List<PostgreSQLBinaryStatementParameterType> binaryStatementParameterTypes) {
        binaryStatements.put(statementId, new PostgreSQLBinaryStatement(sql, parametersCount, binaryStatementParameterTypes));
    }
252098
public static void setJdbcType(String typeName, int typeIndex, JdbcType type)
    {
        setJdbcTypeByName(typeName, type);
        setJdbcTypeByTypesIndex(typeIndex, type);
    }
1333609
protected SqlSource buildSqlSourceFromStrings(String[] strings,
			Class<?> parameterTypeClass) {
		final StringBuilder sql = new StringBuilder();
		for (String fragment : strings) {
			sql.append(fragment);
			sql.append(" ");
		}
		LanguageDriver languageDriver = getLanguageDriver();
		return languageDriver.createSqlSource(configuration, sql.toString().trim(),
				parameterTypeClass);
	}
666153
private void validAllParameters() throws SQLException {

    setInputOutputParameterMap();
    //Set value for OUT parameters
    for (int index = 0; index < params.size(); index++) {
      if (!params.get(index).isInput()) {
        super.setParameter(index + 1, new NullParameter());
      }
    }
    validParameters();
  }
928780
public static void generateParamParser(BindTypeContext context, String methodName, TypeName parameterTypeName, PersistType persistType) {
		methodName = SQLiteDaoDefinition.PARAM_PARSER_PREFIX + methodName;

		MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder(methodName).addJavadoc("for param $L parsing\n", methodName).returns(parameterTypeName);
		methodBuilder.addModifiers(context.modifiers);

		switch (persistType) {
		case STRING:
			methodBuilder.addParameter(ParameterSpec.builder(className(String.class), "input").build());
			break;
		case BYTE:
			methodBuilder.addParameter(ParameterSpec.builder(TypeUtility.arrayTypeName(Byte.TYPE), "input").build());
			break;
		}

		methodBuilder.beginControlFlow("if (input==null)");
		methodBuilder.addStatement("return null");
		methodBuilder.endControlFlow();

		methodBuilder.addStatement("$T context=$T.jsonBind()", KriptonJsonContext.class, KriptonBinder.class);

		methodBuilder.beginControlFlow("try ($T wrapper=context.createParser(input))", JacksonWrapperParser.class);
		methodBuilder.addStatement("$T jacksonParser=wrapper.jacksonParser", JsonParser.class);

		methodBuilder.addCode("// START_OBJECT\n");
		methodBuilder.addStatement("jacksonParser.nextToken()");

		methodBuilder.addCode("// value of \"element\"\n");
		methodBuilder.addStatement("jacksonParser.nextValue()");

		String parserName = "jacksonParser";
		BindTransform bindTransform = BindTransformer.lookup(parameterTypeName);

		methodBuilder.addStatement("$T result=null", parameterTypeName);

		BindProperty property = BindProperty.builder(parameterTypeName).inCollection(false).elementName(DEFAULT_FIELD_NAME).build();
		bindTransform.generateParseOnJackson(context, methodBuilder, parserName, null, "result", property);

		methodBuilder.addStatement("return result");

		methodBuilder.nextControlFlow("catch($T e)", Exception.class);
		methodBuilder.addStatement("throw(new $T(e.getMessage()))", KriptonRuntimeException.class);
		methodBuilder.endControlFlow();

		// typeBuilder.
		context.builder.addMethod(methodBuilder.build());

	}
962915
static void initializeDatabaseDriver(String databaseType) {
    String driverClass = System.getProperty(JDBC_DRIVER_CLASS_KEY_PREFIX + databaseType);
    if (driverClass != null) {
      Log.debug("Loading " + driverClass + " to initialize database of type " + databaseType);
      try {
        Class.forName(driverClass);
      } catch (ClassNotFoundException e) {
        throw new RuntimeException("Connection to '" + databaseType + "' database is not possible due to missing JDBC driver. " +
                "User specified driver class: " + driverClass, e);
      }
      return;
    }
    // use built-in defaults
    switch (databaseType) {
      case HIVE_DB_TYPE:
        try {
          Class.forName(HIVE_JDBC_DRIVER_CLASS);
        } catch (ClassNotFoundException e) {
          throw new RuntimeException("Connection to HIVE database is not possible due to missing JDBC driver.", e);
        }
        break;
      case NETEZZA_DB_TYPE:
        try {
          Class.forName(NETEZZA_JDBC_DRIVER_CLASS);
        } catch (ClassNotFoundException e) {
          throw new RuntimeException("Connection to Netezza database is not possible due to missing JDBC driver.", e);
        }
        break;
      default:
        //nothing to do
    }
  }
231062
@Override
	public SqlContext paramIfAbsent(final String parameterName, final Object value) {
		if (!hasParam(parameterName)) {
			param(parameterName, value);
		}
		return this;
	}
1045366
public JDBCAppendTableSinkBuilder setParameterTypes(TypeInformation<?>... types) {
		int[] ty = new int[types.length];
		for (int i = 0; i < types.length; ++i) {
			ty[i] = JDBCTypeUtil.typeInformationToSqlType(types[i]);
		}
		this.parameterTypes = ty;
		return this;
	}
1000614
private function bindTypedParameters()
    {
        $streams = $values = [];
        $types   = $this->types;

        foreach ($this->_bindedValues as $parameter => $value) {
            if (! isset($types[$parameter - 1])) {
                $types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING];
            }

            if ($types[$parameter - 1] === static::$_paramTypeMap[ParameterType::LARGE_OBJECT]) {
                if (is_resource($value)) {
                    if (get_resource_type($value) !== 'stream') {
                        throw new InvalidArgumentException('Resources passed with the LARGE_OBJECT parameter type must be stream resources.');
                    }
                    $streams[$parameter] = $value;
                    $values[$parameter]  = null;
                    continue;
                }

                $types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING];
            }

            $values[$parameter] = $value;
        }

        if (! $this->_stmt->bind_param($types, ...$values)) {
            throw new MysqliException($this->_stmt->error, $this->_stmt->sqlstate, $this->_stmt->errno);
        }

        $this->sendLongData($streams);
    }