Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
bad9339d
Commit
bad9339d
authored
Aug 03, 2019
by
Daniel Cohen Gindi
Committed by
Kewde
Aug 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow custom magic to be specified through --sqlite_magic (#1144)
parent
ae93b501
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletions
+24
-1
README.md
README.md
+11
-0
sqlite3.gyp
deps/sqlite3.gyp
+13
-1
No files found.
README.md
View file @
bad9339d
...
...
@@ -99,6 +99,17 @@ This uses the npm_config_python config, so values in .npmrc will be honoured:
python=/usr/bin/python2
## Custom file header (magic)
The default sqlite file header is "SQLite format 3".
You can specify a different magic, though this will make standard tools and libraries unable to work with your files.
npm install --build-from-source --sqlite_magic="MyCustomMagic15"
Note that the magic
*must*
be exactly 15 characters long (16 bytes including null terminator).
## Building for node-webkit
Because of ABI differences,
`sqlite3`
must be built in a custom to be used with
[
node-webkit
](
https://github.com/rogerwang/node-webkit
)
.
...
...
deps/sqlite3.gyp
View file @
bad9339d
{
'includes': [ 'common-sqlite.gypi' ],
'variables': {
'sqlite_magic%': '',
},
'target_defaults': {
'default_configuration': 'Release',
'cflags':[
...
...
@@ -101,7 +106,14 @@
],
'export_dependent_settings': [
'action_before_build',
]
],
'conditions': [
["sqlite_magic != ''", {
'defines': [
'SQLITE_FILE_HEADER="<(sqlite_magic)"'
]
}]
],
}
]
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment