congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
PgConnection.addDataType
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.postgresql/postgresql

@Override
public void addDataType(String type, String name) {
 try {
  addDataType(type, Class.forName(name).asSubclass(PGobject.class));
 } catch (Exception e) {
  throw new RuntimeException("Cannot register new type: " + e);
 }
}
origin: org.postgresql/postgresql

private void initObjectTypes(Properties info) throws SQLException {
 addDataType("box", org.postgresql.geometric.PGbox.class);
 addDataType("circle", org.postgresql.geometric.PGcircle.class);
 addDataType("line", org.postgresql.geometric.PGline.class);
 addDataType("lseg", org.postgresql.geometric.PGlseg.class);
 addDataType("path", org.postgresql.geometric.PGpath.class);
 addDataType("point", org.postgresql.geometric.PGpoint.class);
 addDataType("polygon", org.postgresql.geometric.PGpolygon.class);
 addDataType("money", org.postgresql.util.PGmoney.class);
 addDataType("interval", org.postgresql.util.PGInterval.class);
   addDataType(typeName, klass.asSubclass(PGobject.class));
origin: com.revolsys.open/com.revolsys.open.postgresql

@Override
public JdbcConnection getJdbcConnection(final boolean autoCommit) {
 final DataSource dataSource = getDataSource();
 final Connection connection = JdbcUtils.getConnection(dataSource);
 try {
  final PgConnection pgConnection = connection.unwrap(PgConnection.class);
  pgConnection.addDataType("geometry", PostgreSQLGeometryWrapper.class);
  pgConnection.addDataType("box2d", PostgreSQLBoundingBoxWrapper.class);
  pgConnection.addDataType("box3d", PostgreSQLBoundingBoxWrapper.class);
  pgConnection.addDataType("tid", PostgreSQLTidWrapper.class);
 } catch (final SQLException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
 }
 return new JdbcConnection(connection, dataSource, autoCommit);
}
org.postgresql.jdbcPgConnectionaddDataType

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.
  • createStatement
  • getCopyAPI
  • getEncoding
  • <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

  • Making http requests using okhttp
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • ImageIO (javax.imageio)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JButton (javax.swing)
  • JTable (javax.swing)
  • From CI to AI: The AI layer in your organization
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