Examples of PGbox


Examples of org.postgresql.geometric.PGbox

        Array arr = rs.getArray(1);

        ResultSet arrRS = arr.getResultSet();

        assertTrue(arrRS.next());
        PGbox box1 = (PGbox)arrRS.getObject(2);
        PGpoint p1 = box1.point[0];
        assertEquals(3, p1.x, 0.001);
        assertEquals(4, p1.y, 0.001);

        assertTrue(arrRS.next());
        PGbox box2 = (PGbox)arrRS.getObject(2);
        PGpoint p2 = box2.point[1];
        assertEquals(5, p2.x, 0.001);
        assertEquals(6, p2.y, 0.001);

        assertTrue(!arrRS.next());
View Full Code Here

Examples of org.postgresql.geometric.PGbox

        assertEquals("\\", out[1][0]);
        assertEquals("\"\\'z", out[1][1]);
    }

    public void testCreateArrayWithNonStandardDelimiter() throws SQLException {
        PGbox in[] = new PGbox[2];
        in[0] = new PGbox(1, 2, 3, 4);
        in[1] = new PGbox(5, 6, 7, 8);

        PreparedStatement pstmt = _conn.prepareStatement("SELECT ?::box[]");
        pstmt.setArray(1, _conn.createArrayOf("box", in));
        ResultSet rs = pstmt.executeQuery();
        assertTrue(rs.next());
View Full Code Here

Examples of org.postgresql.geometric.PGbox

        Array arr = rs.getArray(1);

        ResultSet arrRS = arr.getResultSet();

        assertTrue(arrRS.next());
        PGbox box1 = (PGbox)arrRS.getObject(2);
        PGpoint p1 = box1.point[0];
        assertEquals(3, p1.x, 0.001);
        assertEquals(4, p1.y, 0.001);

        assertTrue(arrRS.next());
        PGbox box2 = (PGbox)arrRS.getObject(2);
        PGpoint p2 = box2.point[1];
        assertEquals(5, p2.x, 0.001);
        assertEquals(6, p2.y, 0.001);

        assertTrue(!arrRS.next());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.