28
loading...
This website collects cookies to deliver better user experience
INSERT INTO upsert_table (
folder,
filename,
count
)
VALUES (
'2021-01',
'abc.json',
1
)
ON CONFLICT (
filename
)
DO UPDATE SET count = count + 1 WHERE filename = 'abc.json';
Error: near "ON CONFLICT": syntax error
ON CONFLICT
is supported on versions > 3.23.0Once you have identified the need of specific release
you can go ahead and download from sqlite releases
scroll to your version and click on hash-id named as check-in
You will be re-directed to page that contains details of that specific release
Instead of downloading by clicking on it we will copy the link of the tar.gz and download using wget, and same command can be used in server as well.
wget https://www.sqlite.org/src/tarball/884b4b7e/SQLite-884b4b7e.tar.gz
cd ;# Takes you to Home directory
tar xzf SQLite-884b4b7e.tar.gz ;# Unpack the source tree into "sqlite"
mkdir bld ;# Build will occur in a sibling directory
cd bld ;# Change to the build directory
../SQLite-884b4b7e/configure ;# Run the configure script
make ;# Run the makefile.
make sqlite3.c ;# Build the "amalgamation" source file
make test ;# Run some tests (requires Tcl)
export PATH=$HOME/bld:$PATH
exec: tclsh: not found
sudo apt-get install --reinstall tcl
sqlite3
binary directly. It always uses a module which is linked against the sqlite3
shared library. import sqlite3
sqlite3.sqlite_version #sqlite_version - sqlite version
sqlite3.version # version - pysqlite version
libsqlite3.so.0.8.6
in lib folder.libsqlite3.so.0.8.6
to /usr/lib/x86_64-linux-gnu/
cd $HOME/bld/.libs
sudo mv libsqlite3.so.0.8.6 /usr/lib/x86_64-linux-gnu/