1
0
Fork 0

397 Commits (master)

Author SHA1 Message Date
Zac Medico 285c8d4be6 Use sqlite3.SQLiteDriver directly, fix issue #73 9 years ago
Philip O Toole 300d58cfd3 'go fmt' fixes 9 years ago
Zac Medico 9f348a6171 Use SQLiteRows.DeclTypes() to fix issue #52 9 years ago
Zac Medico f62787624c
Bypass sql.DB for queries (for direct SQLiteRows access)
It's necessary to bypass sql.DB in order to gain access to SQLiteRows
instances, which is the first step toward inclusion of result column
type declarations in query results for issue #52.
9 years ago
Philip O'Toole 3f1a3b3777 Fix Raft snapshots of in-memory databases
The snapshot code assumed all databases were disk-based.
9 years ago
Philip O Toole f1963221ca Small fixes and formatting 9 years ago
Philip O Toole 3ffed779f8 Move to POST for bulk queries
Backup endpoint also added, but not fully-functional.
9 years ago
Philip O Toole 524e6170bf Final tests of backup 9 years ago
Philip O Toole 8b3c4202cc Work for database backup
Tests are failing.
9 years ago
Philip O Toole fac68c3cdd Return time in seconds 9 years ago
Philip O Toole 170a916dd5 fmt and lint fixes 9 years ago
Philip O Toole 4ff67c2c90 Support in-memory databases 9 years ago
Philip O Toole 2ba973d7b7 Allow control of time display from db layer
This is not a great solution, and somewhat of a hack to make
unit-testing easier. However, it will allow control over "time"
in the response in the future.
9 years ago
Philip O Toole f33ffc2936 Measure time per statement 9 years ago
Philip O Toole 1b41f789b8 Remove debug panic() 9 years ago
Philip O Toole 297479bc4e Make multi-SELECT work 9 years ago
Philip O Toole ee4ffe1d15 Comment cleanups 9 years ago
Philip O Toole a6cb950ff4 Allow DSN config at command line
It might still need to be richer, so end-users could specify an
in-memory SQLite database. Specifying a DSN would require the user
to supply the full path to the SQLite database. This is OK. However,
the code then needs to be able to parse out the path to the database
so it can remove it before start up.
9 years ago
Philip O Toole 2ebec9b973 Start adding support for snapshots
This shows that passing the database into the Raft module is probably
not going to work, since the database could be opened in two ways -
 directly at startup, and be completely restored from the log, or with
a combination of restoring from a snapshot, followed by the remaining
log entries. In both cases the database must be opened using the
requested DSN settings.

A detailed config object for controlling SQLite behaviour, is probably
best, and it should be passed to the Raft store on start up.

Finally, file-level copying of the SQLite file can only take place if
no transaction is in effect. This might be handled by the use of a
RWLock. The write-lock is taken during Execute() and Snapshot, but
the Read lock is taken during Query(). Unfortunately this may reduce
the concurrency of inserts and updates. Perhaps the Backup call on
the Go SQLite library might be better, but it might be slow.
9 years ago
Philip O'Toole 1bbff9d53a Lowest-layer database tests completed 9 years ago
Philip O'Toole e047d9e9d9 Test_SimpleFailingStatements ported 9 years ago
Philip O'Toole 3c88305a77 Unit test failing statement 9 years ago
Philip O'Toole 57b4dddd26 Add unit test of db package 9 years ago
Philip O'Toole 1855f2d541 Fix up use of interface{} and *interface{} 9 years ago
Philip O'Toole e8490b842e Query in db package almost there
It's the handling of the types, and ensuring they can be cast correctly,
which is what is next.
9 years ago
Philip O'Toole 63c74cabea Fully build with new db package 9 years ago
Philip O'Toole f6984f4134 Small wrapper around sqlite3 9 years ago
Philip O'Toole 08c310400a No need for db package 9 years ago
Philip O'Toole b95c84d16e Add database interface to Store
CREATE TABLE now works.
9 years ago
Philip O'Toole e17cceed91 Better name for test helper 9 years ago
Philip O'Toole 40b156fd47 Test_TransactionsHardFail now passes 9 years ago
Philip O'Toole 226938c0d1 Test_TransactionsConstraintViolation now passing 9 years ago
Philip O'Toole 801158fa83 Test_SimpleTransactions now passing 9 years ago
Philip O'Toole 62137fc798 Test_FailingSimpleStatements now passing 9 years ago
Philip O'Toole ac3b5f2050 Unit-test simple database insertion cases 9 years ago
Philip O'Toole 67e7fa3c8e Continue moving db tests to standard framework 9 years ago
Philip O'Toole 05fca403ab Start removal of nonstandard test framework 9 years ago
Philip O'Toole e43b0bc421 Initialize SQLite store 9 years ago
Philip O'Toole 12aef34625 Start integrating actual SQLite support
Builds without error.
9 years ago
Fernando Álvarez 022b536ade Revert "Revert "Merge pull request #25 from oscillatingworks/deprecate-log4go""
This reverts commit fe415e6452.
10 years ago
Philip O'Toole fe415e6452 Revert "Merge pull request #25 from oscillatingworks/deprecate-log4go"
This reverts commit f2de6cc26e, reversing
changes made to cdc6021ae7.

The change causes a panic when the server is started like so:

$GOPATH/bin/rqlite ~/node.1
10 years ago
Fernando Álvarez 48f9b8bfd4 gometalinter: rqlite/db
db/db.go:14:1⚠️ dbName is unused
db/db.go:30:11⚠️ error return value not checked (os.Remove(dbPath))
db/db.go:63:18⚠️ error return value not checked (defer rows.Close())
db/db.go:15:⚠️ unused global variable dbName
10 years ago
Fernando Álvarez eba40187a9 Deprecate code.google.com/p/log4go
- Add new internal `rqlite/log` package
- Replace `log4go` with `rqlite/log`
- Adapt log formatting in existing logs

Fixes #21
10 years ago
Philip O'Toole b91f275d1b Enhance logging 10 years ago
Philip O'Toole 4758106e53 Log a warning if a query might change the database 10 years ago
Philip O'Toole 1629c63987 Construct some log strings more idiomatically 10 years ago
Philip O'Toole e69218ef4a Layout source in a more conventional style 10 years ago