-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatic usage / Use without squid? #43
Comments
@JamesRamm Do you found a solution for your use case? |
This is basically all you need to duplicate: Lines 66 to 77 in e9f6ed3
As there's no import { loadSourceFile, parseSourceFile } from "./parser" will become import { loadSourceFile, parseSourceFile } from "postguard/dist/parser" You can view the package contents here: https://unpkg.com/browse/postguard@0.2.0/ The package doesn't ship any types either, so you'll have to redefine them in your app: https://github.com/andywer/postguard/blob/e9f6ed36a76c9a706f18b997a9044426831706e5/src/types.ts I pinged the owner on twitter about updating things to avoid those steps, we'll see if they respond. |
Hi,
Looks like a great tool 👍
Is it possible to use programmatically and without squid?
We have a large codebase which uses knex. Changing to use squid is a significant amount of work. However we would love to use this tool to check all possible SQL variations we generate and preferably do it programmatically within our unit tests.
Since knex can generate the plain SQL strings, is there a way to simply pass a SQL string for validation?
The text was updated successfully, but these errors were encountered: