mirror of
https://github.com/chartdb/chartdb.git
synced 2025-11-06 06:53:34 +00:00
Updating the postgres-script so that the psql script creates an output.json with the result instead of using Mac-specific commands. (#520)
Co-authored-by: Jonathan Fishner <jonathanfishner11@gmail.com>
This commit is contained in:
@@ -275,7 +275,7 @@ FROM fk_info${databaseEdition ? '_' + databaseEdition : ''}, pk_info, cols, inde
|
||||
if (options.databaseClient === DatabaseClient.POSTGRESQL_PSQL) {
|
||||
return `${psqlPreCommand}psql -h HOST_NAME -p PORT -U USER_NAME -d DATABASE_NAME -c "
|
||||
${query.replace(/"/g, '\\"').replace(/\\\\/g, '\\\\\\').replace(/\\x/g, '\\\\x')}
|
||||
" -t -A | pbcopy; LG='\\033[0;32m'; NC='\\033[0m'; echo "You got the resultset ($(pbpaste | wc -c | xargs) characters) in Copy/Paste. \${LG}Go back & paste in ChartDB :)\${NC}";`;
|
||||
" -t -A > output.json";`;
|
||||
}
|
||||
|
||||
return query;
|
||||
|
||||
Reference in New Issue
Block a user