-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Labels
Description
Issue type:
This used to work until recently:
node --require ts-node/register ../node_modules/typeorm/cli.js query "select count(*) from users"
typeorm query
Executes given SQL query on a default connection. Specify connection name to run
query on a specific connection.
Options:
-h, --help Show help [boolean]
-c, --connection Name of the connection on which to run a query.
[default: "default"]
-f, --config Name of the file with connection configuration.
[default: "ormconfig"]
-v, --version Show version number [boolean]
Unknown argument: select count(*) from metricsNow, -- must be used to avoid this error which is problematic when trying to run this via yarn/npm scripts.
node --require ts-node/register ../node_modules/typeorm/cli.js query -- "select count(*) from users"
Running query: select count(*) from users
Query has been executed. Result:
[
{
"count": 104
}
][x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ] cordova
[ ] mongodb
[ ] mssql
[ ] mysql / mariadb
[ ] oracle
[x] postgres
[ ] cockroachdb
[ ] sqlite
[ ] sqljs
[ ] react-native
[ ] expo
TypeORM version:
[x] latest
[ ] @next
[ ] 0.x.x (or put your version here)
Steps to reproduce or a small repository showing the problem: