SQLi2JGC Online Service

SQLi2JCG generates for a SQLite table the source code of a Java class which contains ready-for-use methods for the most common used SQL statements.

SQLi2JCG restrictions: The SQLite data types NULL, NUMERIC and BLOB are not supported by this tool.

How to Generate the Java Source Code

  1. Paste the name of your SQLite table into the first input field.
  2. Enter sqlite3 <your-DB-file> from a shell or DOS prompt.
  3. At sqlite3 prompt enter the command
    PRAGMA table_info(<your-table-name>);
    and paste the sqlite3 output into the second input field.
  4. Paste into the third input field the Java package name that the generated code will use.
  5. Click the Submit / Generate Java Code button.
  6. In case of you don't see the code: Click the Scroll to Output button.
  7. Review the generated code and click the Download button.

Example

SQLite Table Name = user_table
Output of PRAGMA table_info(user_table);
0|user_id|INTEGER|1||1
1|first_name|TEXT|0||0
2|last_name|TEXT|0||0
3|purchase_limit|REAL|0||0
4|email|TEXT|0||0

 

Generated Java Code


        
Did you found a bug or have a suggestion? Use the contact form.