Tabnine Logo
org.postgresql.util
Code IndexAdd Tabnine to your IDE (free)

How to use org.postgresql.util

Best Java code snippets using org.postgresql.util (Showing top 20 results out of 387)

origin: org.postgresql/postgresql

private static PSQLException cannotCastException(final String fromType, final String toType,
  final Exception cause) {
 return new PSQLException(
   GT.tr("Cannot convert an instance of {0} to type {1}", fromType, toType),
   PSQLState.INVALID_PARAMETER_TYPE, cause);
}
origin: org.postgresql/postgresql

public String getSavepointName() throws SQLException {
 if (!_isValid) {
  throw new PSQLException(GT.tr("Cannot reference a savepoint after it has been released."),
    PSQLState.INVALID_SAVEPOINT_SPECIFICATION);
 }
 if (!_isNamed) {
  throw new PSQLException(GT.tr("Cannot retrieve the name of an unnamed savepoint."),
    PSQLState.WRONG_OBJECT_TYPE);
 }
 return _name;
}
origin: org.postgresql/postgresql

private void checkFreed() throws SQLException {
 if (_freed) {
  throw new PSQLException(GT.tr("This SQLXML object has already been freed."),
    PSQLState.OBJECT_NOT_IN_STATE);
 }
}
origin: org.postgresql/postgresql

private void initialize() throws SQLException {
 if (_initialized) {
  throw new PSQLException(
    GT.tr(
      "This SQLXML object has already been initialized, so you cannot manipulate it further."),
    PSQLState.OBJECT_NOT_IN_STATE);
 }
 _initialized = true;
}
origin: org.postgresql/postgresql

public java.sql.ResultSet executeQuery(String p_sql) throws SQLException {
 throw new PSQLException(
   GT.tr("Can''t use query methods that take a query string on a PreparedStatement."),
   PSQLState.WRONG_OBJECT_TYPE);
}
origin: org.postgresql/postgresql

@Override
public void registerOutParameter(int index, int sqlType) throws SQLException {
 if (index < 1 || index > paramValues.length) {
  throw new PSQLException(
    GT.tr("The column index is out of range: {0}, number of columns: {1}.",
      index, paramValues.length),
    PSQLState.INVALID_PARAMETER_VALUE);
 }
 flags[index - 1] |= OUT;
}
origin: org.postgresql/postgresql

 protected void handleCopydata(byte[] data) throws PSQLException {
  throw new PSQLException(GT.tr("CopyIn copy direction can't receive data"),
    PSQLState.PROTOCOL_VIOLATION);
 }
}
origin: org.postgresql/postgresql

public int executeUpdate(String p_sql) throws SQLException {
 throw new PSQLException(
   GT.tr("Can''t use query methods that take a query string on a PreparedStatement."),
   PSQLState.WRONG_OBJECT_TYPE);
}
origin: org.postgresql/postgresql

protected void checkColumnIndex(int column) throws SQLException {
 if (column < 1 || column > fields.length) {
  throw new PSQLException(
    GT.tr("The column index is out of range: {0}, number of columns: {1}.",
      column, fields.length),
    PSQLState.INVALID_PARAMETER_VALUE);
 }
}
origin: org.postgresql/postgresql

private void checkParamIndex(int param) throws PSQLException {
 if (param < 1 || param > _oids.length) {
  throw new PSQLException(
    GT.tr("The parameter index is out of range: {0}, number of parameters: {1}.",
      param, _oids.length),
    PSQLState.INVALID_PARAMETER_VALUE);
 }
}
origin: org.postgresql/postgresql

public boolean wasNull() throws SQLException {
 if (lastIndex == 0) {
  throw new PSQLException(GT.tr("wasNull cannot be call before fetching a result."),
    PSQLState.OBJECT_NOT_IN_STATE);
 }
 // check to see if the last access threw an exception
 return (callResult[lastIndex - 1] == null);
}
origin: org.postgresql/postgresql

/**
 * Checks that this LOB hasn't been free()d already.
 *
 * @throws SQLException if LOB has been freed.
 */
protected void checkFreed() throws SQLException {
 if (subLOs == null) {
  throw new PSQLException(GT.tr("free() was called on this LOB previously"),
    PSQLState.OBJECT_NOT_IN_STATE);
 }
}
origin: org.postgresql/postgresql

public int getSavepointId() throws SQLException {
 if (!_isValid) {
  throw new PSQLException(GT.tr("Cannot reference a savepoint after it has been released."),
    PSQLState.INVALID_SAVEPOINT_SPECIFICATION);
 }
 if (_isNamed) {
  throw new PSQLException(GT.tr("Cannot retrieve the id of a named savepoint."),
    PSQLState.WRONG_OBJECT_TYPE);
 }
 return _id;
}
origin: org.postgresql/postgresql

public void setFetchDirection(int direction) throws SQLException {
 switch (direction) {
  case ResultSet.FETCH_FORWARD:
  case ResultSet.FETCH_REVERSE:
  case ResultSet.FETCH_UNKNOWN:
   fetchdirection = direction;
   break;
  default:
   throw new PSQLException(GT.tr("Invalid fetch direction constant: {0}.", direction),
     PSQLState.INVALID_PARAMETER_VALUE);
 }
}
origin: org.postgresql/postgresql

public boolean execute(String p_sql) throws SQLException {
 throw new PSQLException(
   GT.tr("Can''t use query methods that take a query string on a PreparedStatement."),
   PSQLState.WRONG_OBJECT_TYPE);
}
origin: org.postgresql/postgresql

protected void checkClosed() throws SQLException {
 if (rows == null) {
  throw new PSQLException(GT.tr("This ResultSet is closed."), PSQLState.OBJECT_NOT_IN_STATE);
 }
}
origin: postgresql/postgresql

/**
 * Checks that this LOB hasn't been free()d already.
 * @throws SQLException if LOB has been freed.
 */
protected void checkFreed() throws SQLException
{
  if (lo == null)
    throw new PSQLException(GT.tr("free() was called on this LOB previously"), PSQLState.OBJECT_NOT_IN_STATE);
}
origin: postgresql/postgresql

public int getSavepointId() throws SQLException {
  if (!_isValid)
    throw new PSQLException(GT.tr("Cannot reference a savepoint after it has been released."),
                PSQLState.INVALID_SAVEPOINT_SPECIFICATION);
  if (_isNamed)
    throw new PSQLException(GT.tr("Cannot retrieve the id of a named savepoint."),
                PSQLState.WRONG_OBJECT_TYPE);
  return _id;
}
origin: postgresql/postgresql

public String getSavepointName() throws SQLException {
  if (!_isValid)
    throw new PSQLException(GT.tr("Cannot reference a savepoint after it has been released."),
                PSQLState.INVALID_SAVEPOINT_SPECIFICATION);
  if (!_isNamed)
    throw new PSQLException(GT.tr("Cannot retrieve the name of an unnamed savepoint."),
                PSQLState.WRONG_OBJECT_TYPE);
  return _name;
}
origin: postgresql/postgresql

public boolean wasNull() throws SQLException
{
  if (lastIndex == 0)
    throw new PSQLException(GT.tr("wasNull cannot be call before fetching a result."), PSQLState.OBJECT_NOT_IN_STATE);
  // check to see if the last access threw an exception
  return (callResult[lastIndex-1] == null);
}
org.postgresql.util

Most used classes

  • PGobject
  • PGInterval
    This implements a class that handles the PostgreSQL interval type.
  • PSQLException
  • PSQLState
    This class is used for holding SQLState codes.
  • PGmoney
    This implements a class that handles the PostgreSQL money and cash types
  • Base64,
  • GT,
  • PGtokenizer,
  • HStoreConverter,
  • MD5Digest,
  • PGbytea,
  • PSQLWarning,
  • StreamWrapper,
  • UnixCrypt,
  • HostSpec,
  • SharedTimer,
  • ByteConverter,
  • CanEstimateSize,
  • ExpressionProperties
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now