Sqlite is flexible in typing. You can create user defined types just by declaring them in your SQL which creates tables. Thereafter the API will return the declared type and the actual type so that you can process it appropriately.

Jerome CORRENOZ wrote:
Hi,

I'm starting with SQLite and I would like to know if it is possible to create user-defined data-types through the following SQL command: create type MyType ... ?

In fact, I need it to map a database with an object-oriented model, so that I could manage the objects in a ResultSet like it follows:
   Statement stmt = conn.createStatement();
   ResultSet rset = stmt.executeQuery(
   "SELECT * FROM EMP");
   while (rset.next()) {
       Dept dept = (Dept)rset.getObject("DEPT");
       System.out.println("Lieu du dept : "
       + dept.getLieu());
   }

Is there a way to do it with SQLite ?

Regards,
Jerome




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to