Code Monkey home page Code Monkey logo

sqlitejdbc's People

Contributors

crawshaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sqlitejdbc's Issues

Problem with saving to the database

I have the following setup:
1 JAVA Program using your SQLite driver, this communicates with two databases.
One is the settings database(settings.sqlite) the other is the work database.
In the work database I can add rows/update/delete without problems.
When using the settings database I can do the same, but whenever I restart my application all settings are lost.

When I try to use 'autocommit' (before the execute it is set to false and afterwards it is set to true I get the following error:
java.sql.SQLException: SQL logic error or missing database

ResultSet.getDate() only handles INTEGER datatype, not dates stored as TEXT

From http://www.sqlite.org/datatype3.html#datetime:

SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL, or INTEGER values:

  • TEXT as ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS").
  • REAL as Julian day numbers, the number of days since noon in Greenwich on November 24, 4714 B.C. according to the proleptic Gregorian calendar.
  • INTEGER as Unix Time, the number of seconds since 1970-01-01 00:00:00 UTC.

Applications can chose to store dates and times in any of these formats and freely convert between formats using the built-in date and time functions.

When ResultSet.getDate() is called, sqlitejdbc appears to assume the format is the INTEGER UnixTime.

It should also handle the standard ISO8601 format if the date is stored as TEXT as an ISO8601 string. (And probably the REAL option for storing dates, though I've never heard of anyone using that.)

no BLOB support

Currently the driver doesn't seem to have any way to handle BLOB's, as both getBlob() and getBinaryStream() are unsupported

commit manually fail

I set auto commit disable using

connection.setAutoCommit(false);

then, I commit manually

connection.setAutoCommit(true);

but not get it.

java.sql.SQLException: SQL logic error or missing database
    at org.sqlite.DB.throwex(DB.java:288)
    at org.sqlite.DB.exec(DB.java:68)
    at org.sqlite.Conn.commit(Conn.java:172)
    at database.Database.insert(Database.java:93)
    at junit.DatabaseTest.main(DatabaseTest.java:32)

getTables returns TABLE_NAME as upper cased

I've noticed that DatabaseMetaData getTables method returns its TABLE_NAME as upper cased:

+ " upper(name) as TABLE_NAME,"

This isn't correct from my understanding and no other driver I know do it. Is there a reason for this behavior?

Importing .sql file

It would be nice to see support added for easily executing .sql files. For example, the Web Exploitation Framework implements the 'jdbc/sqlite3' library. We have a module that is intended to load and execute .sql files. From what I noticed, there isn't support for such. My workaround for this situation bypasses the library directly and uses shell execution to get the job done.

res = `cat #{ModDatumDb}fingerprint_schemas/#{filename} | sqlite3 #{@db}`

I'm not happy with this solution. If anyone has any suggestions about how to improve this please let me know!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.