Giter Site home page Giter Site logo

Comments (31)

Newbie012 avatar Newbie012 commented on June 10, 2024 1

Oh, I see. It seems like libpg-query-node is a bit behind schedule. I'll raise an issue there. Thanks for reporting that.

Edit - launchql/libpg-query-node#39

from safeql.

karlhorky avatar karlhorky commented on June 10, 2024 1

@xegulon correct, I think a new release of libpg-query-node will resolve this

from safeql.

Newbie012 avatar Newbie012 commented on June 10, 2024

from safeql.

developer-vtnetzwelt avatar developer-vtnetzwelt commented on June 10, 2024

@Newbie012 thanks for replying,
I have added the package and ran npm run lint but I still don't see any output, the console freezes. I have updated the repo, could you please try to run it at your end once?
Also I don't see any errors in my visual studio code, I have ESLINT(dbaeumer.vscode-eslint) plugin installed and disabled all other extensions but still no luck

Screenshot from 2023-12-22 16-10-44

from safeql.

Newbie012 avatar Newbie012 commented on June 10, 2024

That's odd. It seems to work on my end when I pull your changes.

It looks like ESLint is unable to retrieve the generated results from SafeQL's generator. Could you please:

  1. yarn add @ts-safeql/generate postgres
  2. create test.ts file:
import { createGenerator } from '@ts-safeql/generate'
import { parseQuerySync } from 'libpg-query'
import postgres from 'postgres'

async function run (query: string): Promise<void> {
  const sql = postgres({ user: 'postgres', password: 'postgres', database: 'safeql_prisma_demo' })

  const generator = createGenerator()
  console.log('✅ generator created')

  const parsed = parseQuerySync(query)
  console.log('✅ query parsed')

  const result = await generator.generate({
    cacheKey: 'test',
    fieldTransform: undefined,
    pgParsed: parsed,
    query,
    sql,
    cacheMetadata: false,
    nullAsOptional: false,
    nullAsUndefined: false,
    overrides: undefined
  })
  console.log('✅ query generated')

  console.log(JSON.stringify(result, null, 2))

  await sql.end()
}

void run('SELECT * FROM "Post"')
  1. run yarn tsx test.ts
  2. Paste here the output.

from safeql.

developer-vtnetzwelt avatar developer-vtnetzwelt commented on June 10, 2024

@Newbie012 this is the output I'm getting

warning package.json: No license field
$ /home/netzwelt/Desktop/prisma/node_modules/.bin/tsx test.ts
✅ generator created
✅ query parsed
✅ query generated
{
"_tag": "Right",
"right": {
"result": [
[
"id",
"number"
],
[
"createdAt",
"Date"
],
[
"updatedAt",
"Date"
],
[
"published",
"boolean"
],
[
"title",
"string"
],
[
"content",
"string | null"
],
[
"authorId",
"number"
]
],
"stmt": {
"string": "SELECT * FROM "Post"",
"types": [],
"name": "9nkik6wshgj5",
"columns": [
{
"name": "id",
"table": 26329,
"number": 1,
"type": 23
},
{
"name": "createdAt",
"table": 26329,
"number": 2,
"type": 1114
},
{
"name": "updatedAt",
"table": 26329,
"number": 3,
"type": 1114
},
{
"name": "published",
"table": 26329,
"number": 4,
"type": 16
},
{
"name": "title",
"table": 26329,
"number": 5,
"type": 25
},
{
"name": "content",
"table": 26329,
"number": 6,
"type": 25
},
{
"name": "authorId",
"table": 26329,
"number": 7,
"type": 23
}
]
},
"query": "SELECT * FROM "Post""
}
}
Done in 0.26s.

from safeql.

Newbie012 avatar Newbie012 commented on June 10, 2024

Okay, so it seems like the generator is working okay. It's probably the worker that bridges them. Since ESLint doesn't allow "async" rules, SafeQL uses synckit to perform async work synchronously.

Behind the scenes, it does two things:

  • if migrationsDir is specified, it runs the necessary migrations in a shadow database.
  • runs the generator.

I want to check if the issue is somewhat related to migrationsDir. In order to do that, could you try to:

+ "databaseUrl": "postgresql://postgres:postgres@localhost:5432/safeql_prisma_demo"
- "migrationsDir": "./prisma/migrations",

and then re-run eslint?

from safeql.

developer-vtnetzwelt avatar developer-vtnetzwelt commented on June 10, 2024

@Newbie012 After doing the above mentioned change , I get these results:

  • If I have a error in my SQL
    Screenshot from 2023-12-26 10-17-16
  • If I don't have a error in my SQL
    Screenshot from 2023-12-26 10-19-30

Also I'm not getting any lint errors in my VSC, it's only when I run the command then I can see the errors

from safeql.

Newbie012 avatar Newbie012 commented on June 10, 2024
  1. This looks ok. Restart ESLint in your IDE to take effect.
  2. This looks like a bug due to the usage of Array<X> rather than X[]. Could you please verify that? It should be fixed in 3.0.0.

The reason why creating the shadow database (migrationsDir) gets stuck, is still unknown to me since I couldn't reproduce it. I'll keep this issue open for now.

from safeql.

developer-vtnetzwelt avatar developer-vtnetzwelt commented on June 10, 2024

@Newbie012 I'm getting this error in the VS code output tab
Screenshot from 2023-12-26 14-23-51
due to this issue eslint is not working in VSC

from safeql.

Newbie012 avatar Newbie012 commented on June 10, 2024

Your OS has issues running the compiled queryparser from libpg-query which SafeQL requires in order to parse and analyze the query. Try to sudo apt update re-install node_modules.

from safeql.

developer-vtnetzwelt avatar developer-vtnetzwelt commented on June 10, 2024

@Newbie012 I had already tried that but still getting the error, The error says "GLIBC 2.34 not found" but my system has "(Ubuntu GLIBC 2.35-0ubuntu3.5) 2.35"

from safeql.

developer-vtnetzwelt avatar developer-vtnetzwelt commented on June 10, 2024

@Newbie012 thanks for the help, Could please put the link of the opened issue in the chat

from safeql.

developer-vtnetzwelt avatar developer-vtnetzwelt commented on June 10, 2024

@Newbie012 It seems there is no activity on the linked issue, can you try some other workaround for this?

from safeql.

karlhorky avatar karlhorky commented on June 10, 2024

I think the glibc problem has been fixed in libpg_query upstream:

Wonder if the precompiled binaries for Node.js 20.x for linux/amd64, linux/arm64, darwin/arm64 work around this for now:

from safeql.

xegulon avatar xegulon commented on June 10, 2024

@karlhorky we're waiting for libpg-query-node for this issue to be solved then?

from safeql.

xegulon avatar xegulon commented on June 10, 2024

@karlhorky thanks for your answer!

Is there something blocking for the binary to be built? Can't wait to use SafeQL on my current project 😄

from safeql.

wale avatar wale commented on June 10, 2024

@karlhorky we're waiting for libpg-query-node for this issue to be solved then?

Submitted a PR to fix the issue (at least on Linux, tested on Fedora Linux 39) : launchql/libpg-query-node#40

from safeql.

karlhorky avatar karlhorky commented on June 10, 2024

Seems like @wale's PR was merged and published, so this should be resolved now with [email protected]

(note: the latest tag in npm is actually currently [email protected], which I'm not sure fixes the glibc problems - so if you need the newer version, install it specifically with the 16.0.1 version number)

Copying the comment here for completeness:

I installed [email protected] just now on Ubuntu 22.04.4 LTS, seems to compile ok (and linting succeeded too with SafeQL - which depends on libpg-query):

$ pnpm add --save-dev [email protected]
...
.../node_modules/libpg-query install$ node-pre-gyp install --fallback-to-build
.../node_modules/libpg-query install: node-pre-gyp info it worked if it ends with ok
.../node_modules/libpg-query install: node-pre-gyp info using [email protected]
.../node_modules/libpg-query install: node-pre-gyp info using [email protected] | linux | x64
.../node_modules/libpg-query install: node-pre-gyp info check checked for "/home/runner/work/next-js-example-winter-2024-atvie/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/libpg-query/build/Release/queryparser.node" (not found)
.../node_modules/libpg-query install: node-pre-gyp http GET https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v16.0.1-node-v115-linux-x64.tar.gz
.../node_modules/libpg-query install: node-pre-gyp ERR! install response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v16.0.1-node-v115-linux-x64.tar.gz 
.../node_modules/libpg-query install: node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v115 ABI, glibc) (falling back to source compile with node-gyp) 
.../node_modules/libpg-query install: node-pre-gyp WARN Hit error response status 404 Not Found on https://supabase-public-artifacts-bucket.s3.amazonaws.com/libpg-query-node/queryparser-v16.0.1-node-v115-linux-x64.tar.gz 
.../node_modules/libpg-query install: gyp info it worked if it ends with ok
.../node_modules/libpg-query install: gyp info using [email protected]
.../node_modules/libpg-query install: gyp info using [email protected] | linux | x64
.../node_modules/libpg-query install: gyp info ok 
.../node_modules/libpg-query install: gyp info it worked if it ends with ok
.../node_modules/libpg-query install: gyp info using [email protected]
.../node_modules/libpg-query install: gyp info using [email protected] | linux | x64
.../node_modules/libpg-query install: gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
.../node_modules/libpg-query install: gyp http GET https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
.../node_modules/libpg-query install: gyp http 200 https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz
.../node_modules/libpg-query install: gyp http GET https://nodejs.org/download/release/v20.11.1/SHASUMS256.txt
.../node_modules/libpg-query install: gyp http 200 https://nodejs.org/download/release/v20.11.1/SHASUMS256.txt
.../node_modules/libpg-query install: gyp info spawn /usr/bin/python3
.../node_modules/libpg-query install: gyp info spawn args [
.../node_modules/libpg-query install: gyp info spawn args   '/home/runner/setup-pnpm/node_modules/.pnpm/[email protected]/node_modules/pnpm/dist/node_modules/node-gyp/gyp/gyp_main.py',
.../node_modules/libpg-query install: gyp info spawn args   'binding.gyp',
.../node_modules/libpg-query install: gyp info spawn args   '-f',
.../node_modules/libpg-query install: gyp info spawn args   'make',
.../node_modules/libpg-query install: gyp info spawn args   '-I',
.../node_modules/libpg-query install: gyp info spawn args   '/home/runner/work/next-js-example-winter-2024-atvie/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/libpg-query/build/config.gypi',
.../node_modules/libpg-query install: gyp info spawn args   '-I',
.../node_modules/libpg-query install: gyp info spawn args   '/home/runner/setup-pnpm/node_modules/.pnpm/[email protected]/node_modules/pnpm/dist/node_modules/node-gyp/addon.gypi',
.../node_modules/libpg-query install: gyp info spawn args   '-I',
.../node_modules/libpg-query install: gyp info spawn args   '/home/runner/.cache/node-gyp/20.11.1/include/node/common.gypi',
.../node_modules/libpg-query install: gyp info spawn args   '-Dlibrary=shared_library',
.../node_modules/libpg-query install: gyp info spawn args   '-Dvisibility=default',
.../node_modules/libpg-query install: gyp info spawn args   '-Dnode_root_dir=/home/runner/.cache/node-gyp/20.11.1',
.../node_modules/libpg-query install: gyp info spawn args   '-Dnode_gyp_dir=/home/runner/setup-pnpm/node_modules/.pnpm/[email protected]/node_modules/pnpm/dist/node_modules/node-gyp',
.../node_modules/libpg-query install: gyp info spawn args   '-Dnode_lib_file=/home/runner/.cache/node-gyp/20.11.1/<(target_arch)/node.lib',
.../node_modules/libpg-query install: gyp info spawn args   '-Dmodule_root_dir=/home/runner/work/next-js-example-winter-2024-atvie/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/libpg-query',
.../node_modules/libpg-query install: gyp info spawn args   '-Dnode_engine=v8',
.../node_modules/libpg-query install: gyp info spawn args   '--depth=.',
.../node_modules/libpg-query install: gyp info spawn args   '--no-parallel',
.../node_modules/libpg-query install: gyp info spawn args   '--generator-output',
.../node_modules/libpg-query install: gyp info spawn args   'build',
.../node_modules/libpg-query install: gyp info spawn args   '-Goutput_dir=.'
.../node_modules/libpg-query install: gyp info spawn args ]
.../node_modules/libpg-query install: gyp info ok 
.../node_modules/libpg-query install: gyp info it worked if it ends with ok
.../node_modules/libpg-query install: gyp info using [email protected]
.../node_modules/libpg-query install: gyp info using [email protected] | linux | x64
.../node_modules/libpg-query install: gyp info spawn make
.../node_modules/libpg-query install: gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
.../node_modules/libpg-query install: make: Entering directory '/home/runner/work/next-js-example-winter-2024-atvie/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/libpg-query/build'
.../node_modules/libpg-query install:   CC(target) Release/obj.target/nothing/../../../[email protected]/node_modules/node-addon-api/src/nothing.o
.../node_modules/libpg-query install: rm -f Release/obj.target/../../../[email protected]/node_modules/node-addon-api/src/nothing.a Release/obj.target/../../../[email protected]/node_modules/node-addon-api/src/nothing.a.ar-file-list; mkdir -p `dirname Release/obj.target/../../../[email protected]/node_modules/node-addon-api/src/nothing.a`
.../node_modules/libpg-query install: ar crs Release/obj.target/../../../[email protected]/node_modules/node-addon-api/src/nothing.a @Release/obj.target/../../../[email protected]/node_modules/node-addon-api/src/nothing.a.ar-file-list
.../node_modules/libpg-query install:   COPY Release/nothing.a
.../node_modules/libpg-query install:   ACTION binding_gyp_queryparser_target_prebuild_dependencies libpg_query/include/pg_query.h
.../node_modules/libpg-query install: Cloning into 'libpg_query'...
.../node_modules/libpg-query install: Note: switching to '1ec38940e5c6f09a4c1d17a46d839a881c4f2db7'.
.../node_modules/libpg-query install: You are in 'detached HEAD' state. You can look around, make experimental
.../node_modules/libpg-query install: changes and commit them, and you can discard any commits you make in this
.../node_modules/libpg-query install: state without impacting any branches by switching back to a branch.
.../node_modules/libpg-query install: If you want to create a new branch to retain commits you create, you may
.../node_modules/libpg-query install: do so (now or later) by using -c with the switch command. Example:
.../node_modules/libpg-query install:   git switch -c <new-branch-name>
.../node_modules/libpg-query install: Or undo this operation with:
.../node_modules/libpg-query install:   git switch -
.../node_modules/libpg-query install: Turn off this advice by setting config variable advice.detachedHead to false
.../node_modules/libpg-query install: HEAD is now at 1ec3894 Release 16-5.1.0
.../node_modules/libpg-query install: make[1]: Entering directory '/tmp/tmp.Gel2bVDeOp/libpg_query'
.../node_modules/libpg-query install: compiling src/pg_query.c
.../node_modules/libpg-query install: compiling src/pg_query_deparse.c
.../node_modules/libpg-query install: compiling src/pg_query_fingerprint.c
.../node_modules/libpg-query install: compiling src/pg_query_json_plpgsql.c
.../node_modules/libpg-query install: compiling src/pg_query_normalize.c
.../node_modules/libpg-query install: compiling src/pg_query_outfuncs_json.c
.../node_modules/libpg-query install: compiling src/pg_query_outfuncs_protobuf.c
.../node_modules/libpg-query install: compiling src/pg_query_parse.c
.../node_modules/libpg-query install: compiling src/pg_query_parse_plpgsql.c
.../node_modules/libpg-query install: compiling src/pg_query_readfuncs_protobuf.c
.../node_modules/libpg-query install: Warning: protoc-gen-c not found, skipping protocol buffer regeneration
.../node_modules/libpg-query install: compiling src/pg_query_scan.c
.../node_modules/libpg-query install: compiling src/pg_query_split.c
.../node_modules/libpg-query install: compiling src/postgres_deparse.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_catalog_namespace.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_catalog_pg_proc.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_commands_define.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_bitmapset.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_copyfuncs.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_equalfuncs.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_extensible.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_list.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_makefuncs.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_nodeFuncs.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_nodes.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_nodes_value.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_parser_gram.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_parser_parser.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_parser_scan.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_parser_scansup.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_storage_ipc_ipc.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_tcop_postgres.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_activity_pgstat_database.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_adt_datum.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_adt_expandeddatum.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_adt_format_type.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_adt_numutils.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_adt_ruleutils.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_error_assert.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_error_elog.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_fmgr_fmgr.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_init_globals.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_mb_mbutils.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_misc_guc_tables.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_mmgr_alignedalloc.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_mmgr_aset.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_mmgr_generation.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_mmgr_mcxt.c
.../node_modules/libpg-query install: compiling src/postgres/src_backend_utils_mmgr_slab.c
.../node_modules/libpg-query install: compiling src/postgres/src_common_encnames.c
.../node_modules/libpg-query install: compiling src/postgres/src_common_hashfn.c
.../node_modules/libpg-query install: compiling src/postgres/src_common_keywords.c
.../node_modules/libpg-query install: compiling src/postgres/src_common_kwlookup.c
.../node_modules/libpg-query install: compiling src/postgres/src_common_psprintf.c
.../node_modules/libpg-query install: compiling src/postgres/src_common_stringinfo.c
.../node_modules/libpg-query install: compiling src/postgres/src_common_wchar.c
.../node_modules/libpg-query install: compiling src/postgres/src_pl_plpgsql_src_pl_comp.c
.../node_modules/libpg-query install: compiling src/postgres/src_pl_plpgsql_src_pl_funcs.c
.../node_modules/libpg-query install: compiling src/postgres/src_pl_plpgsql_src_pl_gram.c
.../node_modules/libpg-query install: compiling src/postgres/src_pl_plpgsql_src_pl_handler.c
.../node_modules/libpg-query install: compiling src/postgres/src_pl_plpgsql_src_pl_scanner.c
.../node_modules/libpg-query install: compiling src/postgres/src_port_pg_bitutils.c
.../node_modules/libpg-query install: compiling src/postgres/src_port_pgstrcasecmp.c
.../node_modules/libpg-query install: compiling src/postgres/src_port_qsort.c
.../node_modules/libpg-query install: compiling src/postgres/src_port_snprintf.c
.../node_modules/libpg-query install: compiling src/postgres/src_port_strerror.c
.../node_modules/libpg-query install: compiling src/postgres/src_port_strlcpy.c
.../node_modules/libpg-query install: compiling vendor/protobuf-c/protobuf-c.c
.../node_modules/libpg-query install: compiling vendor/xxhash/xxhash.c
.../node_modules/libpg-query install: Warning: protoc-gen-c not found, skipping protocol buffer regeneration
.../node_modules/libpg-query install: compiling protobuf/pg_query.pb-c.c
.../node_modules/libpg-query install: ar: creating libpg_query.a
.../node_modules/libpg-query install: make[1]: Leaving directory '/tmp/tmp.Gel2bVDeOp/libpg_query'
.../node_modules/libpg-query install:   CXX(target) Release/obj.target/queryparser/src/addon.o
.../node_modules/libpg-query install:   CXX(target) Release/obj.target/queryparser/src/helpers.o
.../node_modules/libpg-query install:   CXX(target) Release/obj.target/queryparser/src/sync.o
.../node_modules/libpg-query install:   CXX(target) Release/obj.target/queryparser/src/async.o
.../node_modules/libpg-query install:   SOLINK_MODULE(target) Release/obj.target/queryparser.node
.../node_modules/libpg-query install:   COPY Release/queryparser.node
.../node_modules/libpg-query install: make: Leaving directory '/home/runner/work/next-js-example-winter-2024-atvie/next-js-example-winter-2024-atvie/node_modules/.pnpm/[email protected]/node_modules/libpg-query/build'
.../node_modules/libpg-query install: gyp info ok 
.../node_modules/libpg-query install: node-pre-gyp info ok 
.../node_modules/libpg-query install: Done
...
devDependencies:
...
+ libpg-query 16.0.1

from safeql.

saurabh-vt avatar saurabh-vt commented on June 10, 2024

@Newbie012 I'm still getting the same error

Failed to load plugin '@ts-safeql/eslint-plugin' declared in '.eslintrc.json': /snap/core20/current/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found

I have added "libpg-query": "16.0.1"

@wale @xegulon @karlhorky Is the issue resolved for you guys??

from safeql.

wale avatar wale commented on June 10, 2024

I can confirm that it has been tested and resolved. This might be due to LD_LIBRARY_PATHS in your (seemingly) Ubuntu system, as that is linking to a snap package?

from safeql.

saurabh-vt avatar saurabh-vt commented on June 10, 2024

@wale can you run this example https://github.com/developer-vtnetzwelt/safeql-prisma-demo and check if everything is working fine.

I have glibc_2.35 installed, I want to run the safeql against the prisma migration file and not with database url

from safeql.

xegulon avatar xegulon commented on June 10, 2024

The install works well with the latest version, which is good. I setup the instructions according to prisma docs with eslint, and I modified some of my queries to add errors, but I do not see warnings yet. I'll inspect later!

from safeql.

wale avatar wale commented on June 10, 2024

@wale can you run this example https://github.com/developer-vtnetzwelt/safeql-prisma-demo and check if everything is working fine.

I have glibc_2.35 installed, I want to run the safeql against the prisma migration file and not with database url

You need to explicitly install [email protected]

from safeql.

saurabh-vt avatar saurabh-vt commented on June 10, 2024

@wale I have installed it already but still not working

from safeql.

wale avatar wale commented on June 10, 2024

Due to how the versions in the libpg-query NPM package are set up, you must explicitly install [email protected], like npm install [email protected].

This statement in your package.json will not work.

https://github.com/developer-vtnetzwelt/safeql-prisma-demo/blob/3b048042f2959ab88ce436601691426e8220ebfc/package.json#L23

from safeql.

saurabh-vt avatar saurabh-vt commented on June 10, 2024

@wale git code was not updated, i have updated it now , please check now

from safeql.

wale avatar wale commented on June 10, 2024

You need a database URL so SafeQL can infer metadata and understand the database structure, otherwise the URL falls back to a default value, see the relevant documentation.

You can see it's asking for a postgres user here:
image

That's because it falls back to the connection URL of postgres://postgres:postgres@localhost:5432/postgres.

from safeql.

karlhorky avatar karlhorky commented on June 10, 2024

@developer-vtnetzwelt @Newbie012 now that this issue has been confirmed to be resolved, can this issue be closed?

from safeql.

Newbie012 avatar Newbie012 commented on June 10, 2024

I believe so. @developer-vtnetzwelt can you test it with the latest version of libpg-query?

from safeql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.