removeFromSet

Description

Removes the corresponding value specified in value from the attribute associated with the SET constraint on the CUBRIDOID instance. If the corresponding value is more than one, the very value found for the first time becomes removed.

Syntax

void removeFromSet(String attrName, Object value)

Example

//create class foo(a set of int, b multiset of int )

//insert into foo values({1,11},{2,13})

 

String sql = "select foo  from foo"

Connection con = DriverManager.getConnection(url,user,passwd)

 

Statement stmt = con.createStatement()

CUBRIDResultSet rs= (CUBRIDResultSet) stmt.executeQuery(sql)

 

while (rs.next ()) {

    CUBRIDOID oid = rs.getOID(1)               // get OID

    oid.removeFromSet("a",new Integer(11)) // a: {1,11} -> {1}

    oid.removeFromSet("a",new Integer(13)) // b: {2,13} -> {2}

}