/** Binds BatchQuery parameters to the PreparedStatement. */
  @Override
  public void bindParameters(PreparedStatement statement, BatchQuery query)
      throws SQLException, Exception {

    List<DbAttribute> dbAttributes = query.getDbAttributes();
    int attributeCount = dbAttributes.size();

    // i - attribute position in the query
    // j - PreparedStatement parameter position (starts with "1")
    for (int i = 0, j = 1; i < attributeCount; i++) {
      Object value = query.getValue(i);
      DbAttribute attribute = dbAttributes.get(i);
      int type = attribute.getType();

      // TODO: (Andrus) This works as long as there is no LOBs in qualifier
      if (isUpdateableColumn(value, type)) {
        adapter.bindParameter(statement, value, j, type, attribute.getScale());

        j++;
      }
    }
  }