caiiiycuk/postgresql-to-sqlite

Usage in Node Js

fwt-parth-jariwala opened this issue · 7 comments

I have extracted zip file in my nodejs project and it has created a new directory in it. Now how can i use it to convert my postgres sql file to sqlite db conversion?

HI, as explaind in README file you need to run it with following arguments:

java -jar  pg2sqlite-1.0.3.jar -d database.dump -o sqlite.db

The way to run it is not related to Node.js. You should run it as a separate process, as an external program. In the end, it is executed on the JVM and does not know anything about Node.

I am runnig on ubuntu 20.04 and when i run command
java -jar pg2sqlite-1.0.3.jar -d database.dump -o sqlite.db
it gives me error:command not found: java

Obviously you need to install java:

sudo apt install openjdk-21-jre

I have following java versionm
image

so then you can run pg2sqlite-1.0.3.jar

Can you tell me how can i run it node js?