Tabnine Logo
PgConnection.getEncoding
Code IndexAdd Tabnine to your IDE (free)

How to use
getEncoding
method
in
org.postgresql.jdbc.PgConnection

Best Java code snippets using org.postgresql.jdbc.PgConnection.getEncoding (Showing top 3 results out of 315)

origin: debezium/debezium

private Charset determineDatabaseCharset() {
  try {
    return Charset.forName(((PgConnection) connection()).getEncoding().name());
  }
  catch (SQLException e) {
    throw new RuntimeException("Couldn't obtain encoding for database " + database(), e);
  }
}
origin: org.postgresql/postgresql

@Override
public byte[] encodeString(String str) throws SQLException {
 try {
  return getEncoding().encode(str);
 } catch (IOException ioe) {
  throw new PSQLException(GT.tr("Unable to translate data into the desired encoding."),
    PSQLState.DATA_ERROR, ioe);
 }
}
origin: io.debezium/debezium-connector-postgres

private Charset determineDatabaseCharset() {
  try {
    return Charset.forName(((PgConnection) connection()).getEncoding().name());
  }
  catch (SQLException e) {
    throw new RuntimeException("Couldn't obtain encoding for database " + database(), e);
  }
}
org.postgresql.jdbcPgConnectiongetEncoding

Popular methods of PgConnection

  • close
    Note: even though Statement is automatically closed when it is garbage collected, it is better to cl
  • getServerMajorVersion
    Get server major version.
  • addDataType
  • createStatement
  • getCopyAPI
  • <init>
  • abort
  • addWarning
    This adds a warning to the warning chain.
  • appendArray
  • borrowCallableQuery
  • borrowQuery
  • borrowReturningQuery
  • borrowQuery,
  • borrowReturningQuery,
  • checkClosed,
  • commit,
  • createQuery,
  • createTypeInfo,
  • encodeString,
  • escapeString,
  • execSQLQuery

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Best plugins for Eclipse
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