Skip to content

Add FirebirdSQL data source #1136

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

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

mat02
Copy link
Contributor

@mat02 mat02 commented Aug 30, 2024

Proposed changes

This PR adds support for FirebirdSQL database (https://www.firebirdsql.org/) as a datasource.

Types of changes

What types of changes does your code introduce to Lowcoder?
Put an x in the boxes that apply.

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.
Put an x in the boxes that apply.

  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Further comments

To minimize dependencies, this uses node-firebird package (https://github.com/hgourvest/node-firebird), which doesn't require native fbclient library like some other implementations. However, there are can be some incompatibilities with certain database configurations.

This PR was tested against FB version 3.0.10 with WireCrypt disabled (as node-firebird doesn't support it yet).

Sorry, something went wrong.

Copy link

netlify bot commented Aug 30, 2024

👷 Deploy request for lowcoder-cloud pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 04bb451

@mat02 mat02 marked this pull request as draft August 31, 2024 06:30
@mat02
Copy link
Contributor Author

mat02 commented Aug 31, 2024

The SQL input field behaves differently in node-service plugins compared to API-service Java plugins. Specifically, mustache variables are inserted without any quoting, which can lead to SQL injection or unexpected behavior. To address this, I've added an option to use the driver's native named parameters in the query.
An additional JSON input control was added to Query Config structure. Instead of using moustache syntax to inject arguments directly into SQL statement, arguments should be put into that JSON object. When executed, plugin searches the query for strings starting with colon, e.g. :myparameter, replaces them with ? and passes corresponding property of that JSON object to a driver as a query parameter.

image

User can mix & match both styles, depending on his needs.

@mat02 mat02 marked this pull request as ready for review August 31, 2024 22:25
@ludomikula
Copy link
Collaborator

Can you please base the PR on dev branch?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@mat02 mat02 force-pushed the feat-datasource-firebirdsql branch from 66443f6 to 04bb451 Compare September 1, 2024 22:05
@mat02 mat02 changed the base branch from main to dev September 1, 2024 22:08
@mat02
Copy link
Contributor Author

mat02 commented Sep 1, 2024

Can you please base the PR on dev branch?

No problem.

@ludomikula ludomikula merged commit 7f2442b into lowcoder-org:dev Sep 2, 2024
2 checks passed
@mat02 mat02 deleted the feat-datasource-firebirdsql branch September 2, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants