Skip to content

feat(revision-wdf): consolidates hana driver implementations - #1

Merged
andre-dossinger merged 2 commits into
feat/hanafrom
revision-wdf
Jun 10, 2026
Merged

feat(revision-wdf): consolidates hana driver implementations#1
andre-dossinger merged 2 commits into
feat/hanafrom
revision-wdf

Conversation

@andre-dossinger

Copy link
Copy Markdown
Collaborator

No description provided.

@@ -0,0 +1,8 @@

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep consistent formatting and remove unnecessary blank lines.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deliberately mangled the files: added unnecessary lines, multiple delimiters, partially ignored when executing a query. statements right after each other etc. This is to test the robustness of the implementation.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/golang-migrate/migrate#migrate

Database drivers don't assume things or try to correct user input. When in doubt, fail.

@@ -0,0 +1 @@
CREATE ROW TABLE ROLLBACK_TEST (id INTEGER PRIMARY KEY);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep consistent formatting

@@ -0,0 +1,6 @@
CREATE ROW TABLE SPLIT_A (id INTEGER PRIMARY KEY);--SPLIT--

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep consistent formatting

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above.

CREATE ROW TABLE MULTI_C (id INTEGER PRIMARY KEY);



@mahmud2011 mahmud2011 May 26, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing migration down script.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case the migration down script is not required. Test only tests parsing and if statements are executed as expected not if up and down works. The data will be cleaned up by the Drop function (drops everything within the schema).

--SPLIT----SPLIT----SPLIT--


CREATE ROW TABLE SPLIT_C (id INTEGER PRIMARY KEY)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing migration down script.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above.

@@ -0,0 +1,6 @@
CREATE ROW TABLE SPLIT_A (id INTEGER PRIMARY KEY);--SPLIT--

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delimiter mix is this allowed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests robustness: ; -> should be ignored by execute -> --SPLIT-- should split the statements.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/golang-migrate/migrate#migrate

Database drivers don't assume things or try to correct user input. When in doubt, fail.

Comment thread database/hana/hana.go Outdated
@andre-dossinger
andre-dossinger merged commit d54dce0 into feat/hana Jun 10, 2026
@andre-dossinger
andre-dossinger deleted the revision-wdf branch June 10, 2026 06:45
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.

2 participants