Closed chisenberg closed 10 years ago
that's pretty sad/unexpected, sorry about that, will try to have a look ASAP
question: are you in Arch Linux?
OK, here the problem: sqlite3, starting from version 3.8.6
decided that all outputted strings will have \r\n
instead of OS specific default NEWLINE separator.
This breaks badly and there's apparently no way to have a version of dblite
as it is that works backward compatible with this kinda unexpected change from them … I've sent an email to understand if this is an sqlite3 bug or a new direction I was not aware of but until that time, if this is REALLY important for you, consider to patch your dblite
file looking for this:
// what kind of End Of Line we have here ?
EOL = require('os').EOL || (
WIN32 ? '\r\n' : '\n'
),
using this instead:
// what kind of End Of Line we have here ?
EOL = '\r\n',
Once they confirm that such (IMO nonsense) behavior is meant I'll push version 0.6
with this non backward compatible, breaking change, included.
Apologies for any inconvenient.
Heads up, it is confirmed that CSV should always return \r\n
as new line as specd by RFC4180
SQlite now follows that standard and it broke dblite logic, unable to force a different sequence at runtime.
Will publish a major version up with these changes but I'd like to have time to do this properly.
Stay tuned
please verify 0.6.0
that introduces an sqliteVersion
property and fallbacks checking SQLITE_VERSION
environment variable.
You should be able to run sqlite 3.8.6
simply doing this:
var dblite = require('dblite');
dblite.sqliteVersion = '3.8.6+';
or launch the script via
SQLITE_VERSION=3.8.6+ node file-that-uses.dblite.js
I will probably add also a simplified version to require such:
var dblite = require('dblite').withSQLite('3.8.6+')
probably more suitable / easy to update to … OK, wait 0.6.1
^_^
yup, go 0.6.1
and see how it feels
Sorry I left you alone with this ! Yes, I'm using ArchLinux and with this fixes it is working with the latest version of Sqlite ! Thank you very much !
Did you put a note for other users on the main project page ? Just remembering them to add the .withSQLite('3.8.6+')
Best regards !
Added to the read me, thanks.
Hello (:
Since I upgraded to the latest version of sqlite the query function doesn´t call the callback. I can still insert things to the database with INSERT though. All the SELECT queryes stucks the databse.
Version 3.8.5-1 works fine.
Best regards !