Allow to embed surql files
Add Support for SurrealDB .surql Migration Files
Overview
This PR adds support for embedding and processing SurrealDB .surql files in Refinery.
Motivation
We would like to implement a driver for SurrealDB, but it uses SurrealQL (.surql) as its query language. Currently Refinery only supports .sql and .rsfiles.
This change enables Refinery to recognize and process .surql migration files.
Hi, thanks for your reply!
SurrealQL isn’t a superset of SQL, it’s similar, but distinct.
As you mentioned, this PR only adds support for using .surql files. For us, it’s important to support the .surql extension so that editors like VS Code
can provide syntax highlighting.
We also plan to open-source a new driver for SurrealDB databases, following the approach recommended here, in any case, If you think it's better, I can open a PR directly in this repo to add the SurrealDB driver.
Thanks for elaborating.
Nah, I'd prefer if you host and maintain the SurrealDB driver. My qualms with this PR is that surql is a custom extension that only makes sense in the context of SurrealDB. If it's just for syntax highlighting I'd skip this, but if you require this for functioning I'd rather provide a method that allows parsing custom migration file extensions, wdyt?
Hey @jxs it's not required for it to work, just to enable syntax highlighting in the migration files, so no strictly needed, in any case if in the future you provide a method for parsing custom file extensions we will use it, thank you very much!! We will open source the new driver as soon as it is ready.