-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
ISSUE-680 # Add the DB SQL Executor to import data from CSV and execute SQL statements #686
base: master
Are you sure you want to change the base?
Conversation
@javiertuya , excellent work! Just checking:
|
Yes. The target DB is configured in
It would also be possible to run the postgres tests in the Github Actions (spin-up postgres takes around 6 seconds)
I just checked it: connecting from a desktop to a remote server in my lab (through a VPN) and it works fine. To check this, just run a postgress instance in the server, and form the desktop, change the |
@a1shadows , @omkar-shitole 👋 : |
Should we also try and create some documentation to https://github.com/authorjapps/zerocode-tdd-docs/tree/main? |
@a1shadows , But, please check if you want to add anything to it or amend it to make it more helpful, then please proceed 👍 |
I've tested against MySQL. To run the tests, it needs a few changes:
I can do the above changes in new commits in this PR or after review and merge, as you prefer. |
Add the DB SQL Executor to import data from CSV and execute SQL statements
Fixes Issue
PR Branch
https://github.com/javiertuya/zerocode/tree/680-db-sql-executor
Documentation at PR authorjapps/zerocode-tdd-docs#24
Motivation and Context
This PR provides an out of the box component that uses the Java API to execute steps that interact with a database.
The executor class
org.jsmart.zerocode.core.db.DbSqlExecutor
provides two operations:EXECUTE
: Run a SQL statement to verify the data stored in the database or insert/update in the data.LOADCSV
: Load the contents of a CSV file located in the resources folder into a table.Acceptance critera fulfillment:
Suggestions for future improvements:
Checklist:
New Unit tests were added
Integration tests were added
Test names are meaningful
Feature manually tested and outcome is successful
PR doesn't break any of the earlier features for end users
Branch build passed in CI
No 'package.*' in the imports
Relevant DOcumentation page added or updated with clear instructions and examples for the end user
Http test added to
http-testing
module(if applicable) ?Kafka test added to
kafka-testing
module(if applicable) ?