h2/src/test/org/h2/test/db/TestSpatial.java
/**
     * Test conversion of Geometry object into Object
     */
Test conversion of Geometry object into Object
Test conversion of Geometry object into Object
private void testValueConversion() throws SQLException {
        deleteDb("spatial");
        Connection conn = getConnection(url);
        Statement stat = conn.createStatement();
        stat.execute("CREATE ALIAS OBJ_STRING FOR \"" +
                TestSpatial.class.getName() + ".getObjectString\"");
        ResultSet rs = stat.executeQuery("select OBJ_STRING('POINT( 15 25 )'::geometry)");
        assertTrue(rs.next());
        assertEquals("POINT (15 25)", rs.getString(1));
        conn.close();
        deleteDb("spatial");
    }
private void testValueConversion ( ) throws SQLException { deleteDb ( "spatial" ) ; Connection conn = getConnection ( url ) ; Statement stat = conn . createStatement ( ) ; stat . execute ( "CREATE ALIAS OBJ_STRING FOR \"" + TestSpatial . class . getName ( ) + ".getObjectString\"" ) ; ResultSet rs = stat . executeQuery ( "select OBJ_STRING('POINT( 15 25 )'::geometry)" ) ; assertTrue ( rs . next ( ) ) ; assertEquals ( "POINT (15 25)" , rs . getString ( 1 ) ) ; conn . close ( ) ; deleteDb ( "spatial" ) ; }
Test conversion of Geometry object into Object
Test conversion of Geometry object into Object