Package com.impossibl.postgres.types

Examples of com.impossibl.postgres.types.Type


    catch (SQLFeatureNotSupportedException e) {
      System.out.println("Skipping " + typeName + " - " + e.getMessage() + " (bin)");
      return;
    }

    Type type = conn.getRegistry().loadType(typeName);
    if (type == null) {
      System.out.println("Skipping " + typeName + " unknown (bin)");
      return;
    }

    if (!type.isParameterFormatSupported(Format.Binary) || !type.isResultFormatSupported(Format.Binary)) {
      return;
    }

    test(value, inOut(type, Format.Binary, value));
  }
View Full Code Here


    catch (SQLFeatureNotSupportedException e) {
      System.out.println("Skipping " + typeName + " - " + e.getMessage() + " (txt)");
      return;
    }

    Type type = conn.getRegistry().loadType(typeName);
    if (type == null) {
      System.out.println("Skipping " + typeName + " unknown (txt)");
      return;
    }

    if (!type.isParameterFormatSupported(Format.Text) || !type.isResultFormatSupported(Format.Text)) {
      return;
    }

    test(value, inOut(type, Format.Text, value));
  }
View Full Code Here

    catch (SQLFeatureNotSupportedException e) {
      System.out.println("Skipping " + typeName + " - " + e.getMessage() + " (binlen)");
      return;
    }

    Type type = conn.getRegistry().loadType(typeName);
    if (type == null) {
      System.out.println("Skipping " + typeName + " unknown (binlen)");
      return;
    }

    if (!type.isParameterFormatSupported(Format.Binary) || !type.isResultFormatSupported(Format.Binary)) {
      return;
    }

    compareLengths(coerceValue(type, Format.Binary, value), type, type.getBinaryCodec());

  }
View Full Code Here

  }

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

    Type relType = getRelType(column);
    if (relType == null)
      return "";

    return relType.getNamespace();
  }
View Full Code Here

  }

  @Override
  public int isNullable(int param) throws SQLException {

    Type paramType = getType(param);

    if (SQLTypeMetaData.isNullable(paramType) == parameterNoNulls) {
      return parameterNoNulls;
    }
View Full Code Here

  }

  @Override
  public boolean isSigned(int param) throws SQLException {

    Type type = getType(param);

    return SQLTypeMetaData.isSigned(type);
  }
View Full Code Here

  }

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

    Type paramType = getType(param);

    return SQLTypeMetaData.getPrecision(paramType, 0, 0);
  }
View Full Code Here

  }

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

    Type paramType = getType(param);

    return SQLTypeMetaData.getScale(paramType, 0, 0);
  }
View Full Code Here

  }

  @Override
  public int getParameterType(int param) throws SQLException {

    Type paramType = getType(param);

    return SQLTypeMetaData.getSQLType(paramType);
  }
View Full Code Here

  }

  @Override
  public String getParameterTypeName(int param) throws SQLException {

    Type paramType = getType(param);

    return paramType.getName();
  }
View Full Code Here

TOP

Related Classes of com.impossibl.postgres.types.Type

Copyright © 2018 www.massapicom. 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.