Examples of ResultField


Examples of com.impossibl.postgres.protocol.ResultField

  }

  @Override
  public String getColumnClassName(int column) throws SQLException {

    ResultField field = get(column);
    return SQLTypeUtils.mapGetType(field.typeRef.get(), typeMap, connection).getName();
  }
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

  }

  @Override
  public int getPrecision(int column) throws SQLException {

    ResultField field = get(column);
    return SQLTypeMetaData.getPrecision(field.typeRef.get(), field.typeLength, field.typeModifier);
  }
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

  }

  @Override
  public int getScale(int column) throws SQLException {

    ResultField field = get(column);
    return SQLTypeMetaData.getScale(field.typeRef.get(), field.typeLength, field.typeModifier);
  }
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

  }

  @Override
  public int getColumnDisplaySize(int column) throws SQLException {

    ResultField field = get(column);
    return SQLTypeMetaData.getDisplaySize(field.typeRef.get(), field.typeLength, field.typeModifier);
  }
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

    Registry reg = connection.getRegistry();

    ResultField[] resultFields = new ResultField[20];
    List<Object[]> results = new ArrayList<>();

    resultFields[0] =   new ResultField("PROCEDURE_CAT",      0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[1] =   new ResultField("PROCEDURE_SCHEM",    0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[2] =   new ResultField("PROCEDURE_NAME",     0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[3] =   new ResultField("COLUMN_NAME",        0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[4] =   new ResultField("COLUMN_TYPE",        0, (short)0, reg.loadType("int2"), (short)0, 0, Format.Binary);
    resultFields[5] =   new ResultField("DATA_TYPE",          0, (short)0, reg.loadType("int2"), (short)0, 0, Format.Binary);
    resultFields[6] =   new ResultField("TYPE_NAME",          0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[7] =   new ResultField("PRECISION",          0, (short)0, reg.loadType("int4"), (short)0, 0, Format.Binary);
    resultFields[8] =   new ResultField("LENGTH",             0, (short)0, reg.loadType("int4"), (short)0, 0, Format.Binary);
    resultFields[9] =   new ResultField("SCALE",              0, (short)0, reg.loadType("int2"), (short)0, 0, Format.Binary);
    resultFields[10] new ResultField("RADIX",              0, (short)0, reg.loadType("int2"), (short)0, 0, Format.Binary);
    resultFields[11] new ResultField("NULLABLE",           0, (short)0, reg.loadType("int2"), (short)0, 0, Format.Binary);
    resultFields[12] new ResultField("REMARKS",            0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[13] new ResultField("COLUMN_DEF",         0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[14] new ResultField("SQL_DATA_TYPE",      0, (short)0, reg.loadType("int4"), (short)0, 0, Format.Binary);
    resultFields[15] new ResultField("SQL_DATETIME_SUB",   0, (short)0, reg.loadType("int4"), (short)0, 0, Format.Binary);
    resultFields[16] new ResultField("CHAR_OCTECT_LENGTH", 0, (short)0, reg.loadType("int4"), (short)0, 0, Format.Binary);
    resultFields[17] new ResultField("ORDINAL_POSITION",   0, (short)0, reg.loadType("int4"), (short)0, 0, Format.Binary);
    resultFields[18] new ResultField("IS_NULLABLE",        0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    resultFields[19] new ResultField("SPECIFIC_NAME",      0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);

    StringBuilder sql = new StringBuilder();
    List<Object> params = new ArrayList<>();

    sql.append(
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

  @Override
  public ResultSet getCatalogs() throws SQLException {

    ResultField[] resultFields = new ResultField[1];
    resultFields[0] = new ResultField("TABLE_CAT", 0, (short)0, connection.getRegistry().loadType("text"), (short)0, 0, Format.Binary);

    List<Object[]> results = new ArrayList<>();
    results.add(new Object[] {connection.getCatalog()});

    return createResultSet(Arrays.asList(resultFields), results);
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

  @Override
  public ResultSet getTableTypes() throws SQLException {

    ResultField[] resultFields = new ResultField[1];
    resultFields[0] = new ResultField("TABLE_TYPE", 0, (short)0, connection.getRegistry().loadType("text"), (short)0, 0, Format.Binary);

    List<Object[]> results = new ArrayList<>();

    for (String tableType : tableTypeClauses.keySet()) {
      results.add(new Object[] {tableType});
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

    }

    //Build result set (manually)

    ResultField[] resultFields = new ResultField[24];
    resultFields[0] = new ResultField("TABLE_CAT",          0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[1] = new ResultField("TABLE_SCHEM",        0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[2] = new ResultField("TABLE_NAME",         0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[3] = new ResultField("COLUMN_NAME",        0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[4] = new ResultField("DATA_TYPE",          0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[5] = new ResultField("TYPE_NAME",          0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[6] = new ResultField("COLUMN_SIZE",        0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[7] = new ResultField("BUFFER_LENGTH",      0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[8] = new ResultField("DECIMAL_DIGITS",     0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[9] = new ResultField("NUM_PREC_RADIX",     0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[10] = new ResultField("NULLABLE",          0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[11] = new ResultField("REMARKS",           0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[12] = new ResultField("COLUMN_DEF",        0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[13] = new ResultField("SQL_DATA_TYPE",     0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[14] = new ResultField("SQL_DATETIME_SUB"0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[15] = new ResultField("CHAR_OCTET_LENGTH", 0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[16] = new ResultField("ORDINAL_POSITION"0, (short)0, registry.loadType("int4"),   (short)0, 0, Format.Binary);
    resultFields[17] = new ResultField("IS_NULLABLE",       0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[18] = new ResultField("SCOPE_CATLOG",      0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[19] = new ResultField("SCOPE_SCHEMA",      0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[20] = new ResultField("SCOPE_TABLE",       0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[21] = new ResultField("SOURCE_DATA_TYPE"0, (short)0, registry.loadType("int2"),   (short)0, 0, Format.Binary);
    resultFields[22] = new ResultField("IS_AUTOINCREMENT"0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);
    resultFields[23] = new ResultField("IS_GENERATEDCOLUMN", 0, (short)0, registry.loadType("text"),   (short)0, 0, Format.Binary);

    List<Object[]> results = new ArrayList<>();

    for (int c = 0; c < columnsData.size(); ++c) {
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

    sql.append(" ORDER BY attname");


    ResultField[] fields = new ResultField[8];
    fields[0] = new ResultField("TABLE_CAT",    0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[1] = new ResultField("TABLE_SCHEM"0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[2] = new ResultField("TABLE_NAME",   0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[3] = new ResultField("COLUMN_NAME"0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[4] = new ResultField("GRANTOR",      0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[5] = new ResultField("GRANTEE",      0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[6] = new ResultField("PRIVILEGE",    0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[7] = new ResultField("IS_GRANTABLE", 0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);

    List<Object[]> results = new ArrayList<>();

    try (ResultSet rs = execForResultSet(sql.toString(), params)) {
View Full Code Here

Examples of com.impossibl.postgres.protocol.ResultField

    sql.append(" ORDER BY nspname, relname ");


    ResultField[] fields = new ResultField[7];
    fields[0] = new ResultField("TABLE_CAT",    0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[1] = new ResultField("TABLE_SCHEM"0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[2] = new ResultField("TABLE_NAME",   0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[3] = new ResultField("GRANTOR",      0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[4] = new ResultField("GRANTEE",      0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[5] = new ResultField("PRIVILEGE",    0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);
    fields[6] = new ResultField("IS_GRANTABLE", 0, (short)0, reg.loadType("text"), (short)0, 0, Format.Binary);

    List<Object[]> results = new ArrayList<>();

    try (ResultSet rs = execForResultSet(sql.toString(), params)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.