public static void TestWkbImportOnPostgresST() { try { java.sql.Connection con = java.sql.DriverManager.GetConnection("jdbc:postgresql://tb.esri.com:5432/new_gdb", "tb", "tb"); com.epl.geometry.OperatorFactoryLocal factory = com.epl.geometry.OperatorFactoryLocal.GetInstance(); com.epl.geometry.OperatorImportFromWkb operatorImport = (com.epl.geometry.OperatorImportFromWkb)factory.GetOperator(com.epl.geometry.Operator.Type.ImportFromWkb); string stmt = "SELECT objectid,sde.st_asbinary(shape) FROM new_gdb.tb.interstates a WHERE objectid IN (2) AND (a.shape IS NULL OR sde.st_geometrytype(shape)::text IN ('ST_MULTILINESTRING','ST_LINESTRING')) LIMIT 1000"; java.sql.PreparedStatement ps = con.PrepareStatement(stmt); java.sql.ResultSet rs = ps.ExecuteQuery(); while (rs.Next()) { byte[] rsWkbGeom = rs.GetBytes(2); com.epl.geometry.Geometry geomBorg = null; if (rsWkbGeom != null) { geomBorg = operatorImport.Execute(0, com.epl.geometry.Geometry.Type.Unknown, System.IO.MemoryStream.Wrap(rsWkbGeom), null); } } ps.Close(); con.Close(); } catch (System.Exception) { } }
void org.h2.api.AggregateFunction.init(java.sql.Connection conn) { H2Connection connection = new H2Connection(conn); OnInit(connection); }
public SqlServer2005Connection(java.sql.Connection connection) : base(connection) { }
/// <summary> /// Creates new JDBCOutputAdapter with specifed database connection and table </summary> /// <param name="connection"> database connection </param> /// <param name="tableName"> table to put data into </param> public JDBCOutputAdapter(java.sql.Connection connection, string tableName) { this.connection = connection; this.tableName = tableName; }
public OracleConnection(java.sql.Connection connection) : base(connection) { }
void org.h2.api.Trigger.init(java.sql.Connection conn, String schemaName, String triggerName, String tableName, bool before, int type) { H2Connection connection = new H2Connection(conn); OnInit(connection, schemaName, triggerName, tableName, before, (TriggerTypes)type); }
void org.h2.api.Trigger.fire(java.sql.Connection conn, object[] oldRow, object[] newRow) { H2Connection connection = new H2Connection(conn); OnFire(connection, oldRow, newRow); }
public Connection(java.sql.Connection connection) { _connection = connection; }