-
Notifications
You must be signed in to change notification settings - Fork 36
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
BREAKING CHANGE: Relative queries #397
BREAKING CHANGE: Relative queries #397
Conversation
🦋 Changeset detectedLatest commit: 3fe0fa9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -40,12 +39,9 @@ async function runQuery( | |||
debug = false, | |||
) { | |||
try { | |||
const { source, sourceFilePath } = await sourceManager.loadFromQuery(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bug in my previous PR I forgot to test this
12ccc58
to
caba6d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@csansoon please review this file 👇 Good stuff
936a097
to
187b29e
Compare
187b29e
to
61d36a8
Compare
61d36a8
to
cf6ab16
Compare
source, | ||
connectionParams: { fail: false }, | ||
}) | ||
source.setConnector(connector) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more setConnector
🔥
async function buildConnector(queryPath: string) { | ||
const source = await sourceManager.loadFromQuery(queryPath) | ||
|
||
if (!source['_connector']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead source['_connector']
cf6ab16
to
433ce21
Compare
9dd7b48
to
a95ceae
Compare
We want to move the responsability of fining the query in the file system from the connector to the source. After the last refactor now this is easier to todo because we have access to the source and the source manager in the connector. With this change is easier to pass the the full path of the query and look for relative paths and paths that lives outside the source of the connector. We want to do both things in the upcoming changes
a95ceae
to
3fe0fa9
Compare
Re-open here #416 |
Describe your changes
Until now we were requiring users to specify the queries in the ref function from the root of the source folder. Example:
Given that folder structure in
query.sql
Before 🚫
Now ✅
Or ✅
Or ✅
Issue ticket number and link
#369
Dependency
TODO
runQuery
🐛. I introduced the bug hereref
method the SQL