Make it all work
This commit is contained in:
parent
a7dee41bec
commit
21779ddeec
@ -1,4 +1,5 @@
|
|||||||
# DEV
|
# DEV
|
||||||
|
* Support for newline character in filenames
|
||||||
|
|
||||||
# 1.0.5
|
# 1.0.5
|
||||||
### BUGS (Minor)
|
### BUGS (Minor)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Select() {
|
|||||||
"WHERE ${where_statement[@]})" \
|
"WHERE ${where_statement[@]})" \
|
||||||
",'SQL::Select:not found'" \
|
",'SQL::Select:not found'" \
|
||||||
");" >&3
|
");" >&3
|
||||||
read -u 4 -d$'\0' results
|
read -u 4 -r -d $'\0' results
|
||||||
if ! [[ $results == "SQL::Select:not found" ]]
|
if ! [[ $results == "SQL::Select:not found" ]]
|
||||||
then
|
then
|
||||||
echo "$results"
|
echo "$results"
|
||||||
|
|||||||
@ -6,9 +6,12 @@ openDatabase() {
|
|||||||
[[ -f "$database" ]] || populate_db=1
|
[[ -f "$database" ]] || populate_db=1
|
||||||
rm -f "$tempdir"/sqlite.{in,out}
|
rm -f "$tempdir"/sqlite.{in,out}
|
||||||
mkfifo "$tempdir"/sqlite.{in,out}
|
mkfifo "$tempdir"/sqlite.{in,out}
|
||||||
sqlite3 -bail -newline $'\0' \
|
stdbuf -o0 sqlite3 -bail \
|
||||||
|
-newline $'::AtOM:SQL:EOL::\n' \
|
||||||
"$database" \
|
"$database" \
|
||||||
< "$tempdir/sqlite.in" \
|
< "$tempdir/sqlite.in" \
|
||||||
|
| stdbuf -o0 \
|
||||||
|
sed 's/::AtOM:SQL:EOL::/\x0/g;s/\(\x0\)\xA/\1/g' \
|
||||||
> "$tempdir/sqlite.out" &
|
> "$tempdir/sqlite.out" &
|
||||||
db_pid=$!
|
db_pid=$!
|
||||||
exec 3> "$tempdir"/sqlite.in
|
exec 3> "$tempdir"/sqlite.in
|
||||||
@ -25,7 +28,7 @@ openDatabase() {
|
|||||||
echo 'PRAGMA recursive_triggers = ON;' >&3
|
echo 'PRAGMA recursive_triggers = ON;' >&3
|
||||||
echo 'PRAGMA temp_store = 2;' >&3
|
echo 'PRAGMA temp_store = 2;' >&3
|
||||||
echo 'PRAGMA locking_mode = EXCLUSIVE;' >&3
|
echo 'PRAGMA locking_mode = EXCLUSIVE;' >&3
|
||||||
read -u4 -d $'\0'
|
read -u4 -r -d $'\0'
|
||||||
unset REPLY
|
unset REPLY
|
||||||
checkDatabaseVersion
|
checkDatabaseVersion
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user