コード例 #1
0
ファイル: PSqlConnection.java プロジェクト: lzpfmh/jphp
  @Signature
  public Memory getSchemas(Environment env) throws SQLException {
    ResultSet schemas = metaData.getSchemas();
    ArrayMemory r = new ArrayMemory();

    while (schemas.next()) {
      r.add(new PSqlResult(env, schemas).toArray(env));
    }

    return r.toConstant();
  }
コード例 #2
0
ファイル: PSqlConnection.java プロジェクト: lzpfmh/jphp
  @Signature
  public Memory getMetaData() throws SQLException {
    ArrayMemory r = new ArrayMemory();
    r.refOfIndex("userName").assign(metaData.getUserName());

    r.refOfIndex("driverName").assign(metaData.getDriverName());
    r.refOfIndex("driverVersion").assign(metaData.getDriverVersion());
    r.refOfIndex("databaseName").assign(metaData.getDatabaseProductName());
    r.refOfIndex("databaseVersion").assign(metaData.getDatabaseProductVersion());

    r.refOfIndex("catalogSeparator").assign(metaData.getCatalogSeparator());
    r.refOfIndex("catalogTerm").assign(metaData.getCatalogTerm());
    r.refOfIndex("schemaTerm").assign(metaData.getSchemaTerm());
    r.refOfIndex("procedureTerm").assign(metaData.getProcedureTerm());
    r.refOfIndex("searchStringEscape").assign(metaData.getSearchStringEscape());

    r.refOfIndex("numericFunctions").assign(metaData.getNumericFunctions());
    r.refOfIndex("stringFunctions").assign(metaData.getStringFunctions());
    r.refOfIndex("timeDateFunctions").assign(metaData.getTimeDateFunctions());
    r.refOfIndex("systemFunctions").assign(metaData.getSystemFunctions());

    r.refOfIndex("defaultTransactionIsolation").assign(metaData.getDefaultTransactionIsolation());
    r.refOfIndex("identifierQuoteString").assign(metaData.getIdentifierQuoteString());

    r.refOfIndex("maxBinaryLiteralLength").assign(metaData.getMaxBinaryLiteralLength());
    r.refOfIndex("maxCatalogNameLength").assign(metaData.getMaxCatalogNameLength());
    r.refOfIndex("maxCharLiteralLength").assign(metaData.getMaxCharLiteralLength());
    r.refOfIndex("maxConnections").assign(metaData.getMaxConnections());

    r.refOfIndex("maxColumnNameLength").assign(metaData.getMaxColumnNameLength());
    r.refOfIndex("maxColumnsInGroupBy").assign(metaData.getMaxColumnsInGroupBy());
    r.refOfIndex("maxColumnsInIndex").assign(metaData.getMaxColumnsInIndex());
    r.refOfIndex("maxColumnsInOrderBy").assign(metaData.getMaxColumnsInOrderBy());
    r.refOfIndex("maxColumnsInSelect").assign(metaData.getMaxColumnsInSelect());
    r.refOfIndex("maxColumnsInTable").assign(metaData.getMaxColumnsInTable());

    r.refOfIndex("maxCursorNameLength").assign(metaData.getMaxCursorNameLength());
    r.refOfIndex("maxIndexLength").assign(metaData.getMaxIndexLength());
    r.refOfIndex("maxProcedureNameLength").assign(metaData.getMaxProcedureNameLength());
    r.refOfIndex("maxRowSize").assign(metaData.getMaxRowSize());
    r.refOfIndex("maxSchemaNameLength").assign(metaData.getMaxSchemaNameLength());
    r.refOfIndex("maxStatementLength").assign(metaData.getMaxStatementLength());

    r.refOfIndex("maxTableNameLength").assign(metaData.getMaxTableNameLength());
    r.refOfIndex("maxTablesInSelect").assign(metaData.getMaxTablesInSelect());

    return r.toConstant();
  }