Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4af27ff
first pass updating for sqlite3 support
rawberg Sep 10, 2012
38d5e0d
troublehsooting test runner
rawberg Sep 10, 2012
648b36f
updated the code to make sure all existing test cases pass
rawberg Sep 10, 2012
c1c1434
Update Readme.md
rawberg Sep 10, 2012
4e4c238
Fixed selecting unknown session
Sep 11, 2012
73f4aa9
Merge pull request #1 from Nibbler999/master
rawberg Sep 12, 2012
16bfc33
- re-wrote unit tests with Mocha and Should.js
rawberg Sep 12, 2012
85c7811
added new mocha test for merge request, updated history
rawberg Sep 12, 2012
62a37e7
Update Readme.md
rawberg Sep 12, 2012
9285795
updated package.json version number
rawberg Sep 12, 2012
e2ac002
Merge branch 'master' of github.com:rawberg/connect-sqlite3
rawberg Sep 12, 2012
363ad18
updated package.json to be less restrictive about dependencies
rawberg Sep 20, 2012
ad891f8
fixed default session length to be one day in milliseconds (used to s…
rawberg Jan 6, 2013
4be9fe3
Clean out expired sessions from database regularly.
Macil Nov 22, 2013
0e49e24
Unref cleanup interval timer so that the node process won't wait on it
Macil Nov 22, 2013
1e6a468
Merge pull request #3 from AgentME/cleaning
rawberg Dec 11, 2013
516cece
options correction in readme
rawberg Apr 23, 2014
3621f0b
Add support for Express 4.x
fauxpark May 12, 2014
3fbd228
Merge pull request #5 from fauxpark/master
rawberg May 13, 2014
cfb044b
bumped version number
rawberg May 13, 2014
97d5998
Update package.json
Jun 4, 2014
32d9614
Merge pull request #7 from usandfriends/patch-1
rawberg Jan 11, 2015
86a8fcb
0.9.4
rawberg Jan 11, 2015
9a30823
added touch protocol
Mar 20, 2015
387b04f
Merge pull request #9 from JoshuaWise/master
rawberg Mar 21, 2015
53f92be
version bump for touch protocol suppport
rawberg Mar 21, 2015
b01ab34
Reference latest packaged sqlite instead of last revision
vicneanschi Nov 20, 2015
88cfe39
Merge pull request #10 from vicneanschi/master
rawberg Nov 21, 2015
604d62a
version bump
rawberg Nov 21, 2015
6f9b0ba
Merge branch 'master' of github.com:rawberg/connect-sqlite3
rawberg Nov 21, 2015
a078268
version bump
rawberg Nov 21, 2015
71d5a92
Handle shared cache stores
dougluce Jan 24, 2016
4bb0a19
Merge pull request #12 from dougluce/master
rawberg Jan 24, 2016
e840d9d
version bump
rawberg Jan 24, 2016
ce6e06c
resolve rawberg/connect-sqlite3#11: server hang due to missing callba…
drfloob Mar 13, 2016
2ef97e5
Merge pull request #13 from drfloob/master
rawberg Mar 13, 2016
56a01f5
version bump for PR #13
rawberg Mar 13, 2016
c4a0eec
docs: typos and syntax highlighting
jniles Mar 16, 2016
188b488
Merge pull request #14 from jniles/jniles-patch-docs
rawberg Mar 17, 2016
9b510dc
replaced deprecated inheritance statement
quinnhosler Dec 31, 2016
eeeb486
Merge pull request #16 from quinnhosler/master
rawberg Jan 1, 2017
c6c6a2b
version bump for PR #16
rawberg Jan 1, 2017
6e5b3ef
Use WAL mode for the database
wmertens Aug 7, 2017
92ef997
'.db' database file extension was removed
PauloASilva Aug 7, 2017
e665a1d
fix: JSDoc, extra empty spaces and identation
PauloASilva Aug 7, 2017
c801415
Merge pull request #18 from PauloASilva/remove-db-extension
rawberg Aug 8, 2017
ca2b8a8
version bump for PR #18
rawberg Aug 8, 2017
2b13b60
add concurrentDb boolean to trigger WAL
wmertens Apr 18, 2018
daf129a
package: bump sqlite3 to ^4.0.0
guilala Apr 27, 2018
22c47ea
Remove package-lock file
guilala Apr 27, 2018
259c084
Merge pull request #17 from wmertens/patch-1
rawberg Apr 27, 2018
9b800fc
Merge pull request #20 from guilala/master
rawberg Apr 27, 2018
ccf5b3e
remove legacy history file
rawberg Apr 27, 2018
c251bc3
add WAL mode option to Readme
rawberg Apr 27, 2018
19c6a0b
readme WAL mode link
rawberg Apr 27, 2018
2b924c9
Updated usage docs for express 4.x
akshayeshenoi Jul 11, 2018
5610475
Merge pull request #22 from akshayeshenoi/patch-1
rawberg Jul 26, 2018
1a569dc
updated to latest sqlite3 plugin
driverjb Aug 13, 2021
801e365
Merge pull request #26 from driverjb/master
rawberg Aug 14, 2021
3f402da
Create LICENSE
jharvey10 Nov 29, 2021
013000d
Merge pull request #27 from jdharvey-ibm/patch-1
rawberg Nov 30, 2021
c1779b3
version bump
rawberg Nov 30, 2021
f852f83
new option createDirIfNotExists
Apkovy Mar 11, 2024
263a587
readme
Apkovy Mar 11, 2024
69cad81
Merge pull request #30 from Apkovy/master
rawberg Mar 11, 2024
13ce02a
version bump for create dir option
rawberg Mar 11, 2024
095fe17
Implemented SQLiteStore.prototype.all
xavi- Apr 25, 2025
ffdd61f
Merge pull request #32 from xavi-/patch-1
rawberg Apr 27, 2025
de797ae
version bump for retrieve all
rawberg Apr 27, 2025
2707af5
pass the db connection object into the store object for more flexibilty
ewaldbenes Jun 12, 2025
343024e
Merge pull request #33 from ewaldbenes/pass-db-conn
rawberg Jun 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions History.md

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 David Feinberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
49 changes: 31 additions & 18 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,58 @@
# Connect SQLite3

# Connect SQLite
connect-sqlite3 is a SQLite3 session store modeled after the TJ's connect-redis store.

connect-sqlite is a SQLite session store, just copied connect-redis.

connect-sqlite support only connect `>= 1.4.0`.

## Installation

$ npm install connect-sqlite
```sh
$ npm install connect-sqlite3
```

## Options

- `db='sessions'` Database file & table name
- `dir='.'` Direcotry to save '<db>.db' file
- `table='sessions'` Database table name
- `db=dbConnection` SQLite database connection object
- `concurrentDB='false'` Enables [WAL](https://www.sqlite.org/wal.html) mode (defaults to false)

## Usage
> **Note:** The `options` parameter requires an already initialized database connection instead of a file name. This design allows the library to remain flexible about database connection management in your application.

var connect = require('connect')
, SQLiteStore = require('connect-sqlite')(connect);
## Usage
```js
var connect = require('connect'),
dbConnection = new sqlite3.Database(':memory:'),
SQLiteStore = require('connect-sqlite3')(connect);

connect.createServer(
connect.cookieParser(),
connect.session({ store: new SQLiteStore, secret: 'your secret' })
connect.session({ store: new SQLiteStore({ db: dbConnection }), secret: 'your secret' })
);
```
with express
```js
3.x:
var SQLiteStore = require('connect-sqlite3')(express);

with express

var SQLiteStore = require('connect-sqlite')(express);
4.x:
var session = require('express-session');
var SQLiteStore = require('connect-sqlite3')(session);

var dbConnection = new sqlite3.Database('./sessions.db')
app.configure(function() {
app.set('views', __dirname + '/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser());
app.use(express.session({
store: new SQLiteStore,
app.use(session({
store: new SQLiteStore({ db: dbConnection }),
secret: 'your secret',
cookie: { maxAge: 7 * 24 * 60 * 60 * 1000 } // 1 week
}));
app.use(app.router);
app.use(express.static(__dirname + '/public'));
});

```
## Test
```sh
$ npm test
```
173 changes: 0 additions & 173 deletions lib/connect-sqlite.js

This file was deleted.

Loading