Codota Logo
org.postgresql.core
Code IndexAdd Codota to your IDE (free)

How to use org.postgresql.core

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: org.postgresql/postgresql

private void initSqlType(Field field) throws SQLException {
 if (field.isTypeInitialized()) {
  return;
 }
 TypeInfo typeInfo = connection.getTypeInfo();
 int oid = field.getOID();
 String pgType = typeInfo.getPGType(oid);
 int sqlType = typeInfo.getSQLType(pgType);
 field.setSQLType(sqlType);
 field.setPGType(pgType);
}
origin: org.postgresql/postgresql

@Override
public boolean equals(Object obj) {
 if (obj instanceof Version) {
  return this.getVersionNum() == ((Version) obj).getVersionNum();
 }
 return false;
}
origin: org.postgresql/postgresql

 @Override
 public PGReplicationStream start(LogicalReplicationOptions options) throws SQLException {
  ReplicationProtocol protocol = baseConnection.getReplicationProtocol();
  return protocol.startLogical(options);
 }
});
origin: org.postgresql/postgresql

/**
 * Receives a null-terminated string from the backend. If we don't see a null, then we assume
 * something has gone wrong.
 *
 * @return string from back end
 * @throws IOException if an I/O error occurs, or end of file
 */
public String receiveString() throws IOException {
 int len = pg_input.scanCStringLength();
 String res = encoding.decode(pg_input.getBuffer(), pg_input.getIndex(), len - 1);
 pg_input.skip(len);
 return res;
}
origin: org.postgresql/postgresql

public int getScale(int column) throws SQLException {
 Field field = getField(column);
 return connection.getTypeInfo().getScale(field.getOID(), field.getMod());
}
origin: postgresql/postgresql

private void sendSync() throws IOException {
  if (logger.logDebug())
    logger.debug(" FE=> Sync");
  pgStream.SendChar('S');     // Sync
  pgStream.SendInteger4(4); // Length
  pgStream.flush();
}
origin: postgresql/postgresql

protected int getSQLType( int column ) throws SQLException
{
  return connection.getTypeInfo().getSQLType(fields[column - 1].getOID());
}
origin: postgresql/postgresql

private String receiveCommandStatus() throws IOException {
  //TODO: better handle the msg len
  int l_len = pgStream.ReceiveInteger4();
  //read l_len -5 bytes (-4 for l_len and -1 for trailing \0)
  String status = pgStream.ReceiveString(l_len - 5);
  //now read and discard the trailing \0
  pgStream.Receive(1);
  if (logger.logDebug())
    logger.debug(" <=BE CommandStatus(" + status + ")");
  return status;
}
origin: postgresql/postgresql

protected String getPGType( int column ) throws SQLException
{
  return connection.getTypeInfo().getPGType(fields[column - 1].getOID());
}
origin: org.postgresql/postgresql

public void setNull(int parameterIndex, int t, String typeName) throws SQLException {
 if (typeName == null) {
  setNull(parameterIndex, t);
  return;
 }
 checkClosed();
 TypeInfo typeInfo = connection.getTypeInfo();
 int oid = typeInfo.getPGType(typeName);
 preparedParameters.setNull(parameterIndex, oid);
}
origin: org.postgresql/postgresql

 private boolean isMaster(QueryExecutor queryExecutor) throws SQLException, IOException {
  byte[][] results = SetupQueryRunner.run(queryExecutor, "show transaction_read_only", true);
  String value = queryExecutor.getEncoding().decode(results[0]);
  return value.equalsIgnoreCase("off");
 }
}
origin: debezium/debezium

/**
 *
 * @return the default scale of the type
 */
public int getDefaultScale() {
  if (typeInfo == null) {
    return TypeRegistry.UNKNOWN_LENGTH;
  }
  return typeInfo.getScale(oid, TypeRegistry.NO_TYPE_MODIFIER);
}
origin: org.postgresql/postgresql

@Override
public void handleResultRows(Query fromQuery, Field[] fields, List<byte[][]> tuples,
  ResultCursor cursor) {
 if (delegate != null) {
  delegate.handleResultRows(fromQuery, fields, tuples, cursor);
 }
}
origin: org.postgresql/postgresql

@Override
public void handleWarning(SQLWarning warning) {
 if (delegate != null) {
  delegate.handleWarning(warning);
 }
}
origin: org.postgresql/postgresql

@Override
public void handleError(SQLException error) {
 if (delegate != null) {
  delegate.handleError(error);
 }
}
origin: org.postgresql/postgresql

 @Override
 public PGReplicationStream start(PhysicalReplicationOptions options) throws SQLException {
  ReplicationProtocol protocol = baseConnection.getReplicationProtocol();
  return protocol.startPhysical(options);
 }
});
origin: org.postgresql/postgresql

 @Override
 public SQLWarning getWarning() {
  if (delegate != null) {
   return delegate.getWarning();
  }
  return null;
 }
}
origin: org.postgresql/postgresql

@Override
public CachedQuery createQuery(String sql, boolean escapeProcessing, boolean isParameterized,
  String... columnNames)
  throws SQLException {
 return queryExecutor.createQuery(sql, escapeProcessing, isParameterized, columnNames);
}
origin: org.postgresql/postgresql

@Override
public void secureProgress() {
 if (delegate != null) {
  delegate.secureProgress();
 }
}
origin: postgresql/postgresql

public int getScale(int column) throws SQLException
{
  Field field = getField(column);
  return connection.getTypeInfo().getScale(field.getOID(), field.getMod());
}
org.postgresql.core

Most used classes

  • BaseConnection
  • TypeInfo
  • Encoding
  • UTF8Encoding
  • Utils
    Collection of utilities used by the protocol-level code.
  • BaseStatement,
  • ConnectionFactory,
  • Field,
  • Notification,
  • PGBindException,
  • PGStream,
  • ParameterList,
  • Parser,
  • Query,
  • QueryExecutor,
  • ResultCursor,
  • ResultHandler,
  • VisibleBufferedInputStream,
  • CompositeParameterList
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now