You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Postgres assertions can only validate exact queries.
So, for example, you can validate that a query like INSERT INTO users(email) VALUES ([email protected]).
The downside of this is that you need to specify the exact query that was made on the database.
But usually, you don't really want to validate the entire query syntax, you just want to validate that some fields were added to the table, but you don't care about the others.
This feature should allow writing an assertion like
expectTrace(traceloop).toQueryPostgresSQL().withPartialQuery(`INSERT INTO users(email) VALUES ([email protected])`
And it will succeed even if the actual query was INSERT INTO users(name, request_id, email) VALUES (bla, 5934345, [email protected])
🎤 Why is this feature needed ?
Our goal with this project is to make end-to-end tests easier. Being able to write simple assertions Is core to this.
✌️ How do you aim to achieve this?
We will need to use some Typescript SQL parser to parse and compare the asserted and actual SQL queries.
🔄️ Additional Information
No response
👀 Have you spent some time to check if this feature request has been raised before?
I checked and didn't find similar issue
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered:
🔖 Feature description
Our Postgres assertions can only validate exact queries.
So, for example, you can validate that a query like
INSERT INTO users(email) VALUES ([email protected])
.The downside of this is that you need to specify the exact query that was made on the database.
But usually, you don't really want to validate the entire query syntax, you just want to validate that some fields were added to the table, but you don't care about the others.
This feature should allow writing an assertion like
And it will succeed even if the actual query was
INSERT INTO users(name, request_id, email) VALUES (bla, 5934345, [email protected])
🎤 Why is this feature needed ?
Our goal with this project is to make end-to-end tests easier. Being able to write simple assertions Is core to this.
✌️ How do you aim to achieve this?
We will need to use some Typescript SQL parser to parse and compare the asserted and actual SQL queries.
🔄️ Additional Information
No response
👀 Have you spent some time to check if this feature request has been raised before?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: