Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add StatementFormat to handle more consistently semicolons#2025

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@PhenX
Copy link
Collaborator

In this PR I made a change to handle more consistently statement separators (semicolon here), I may add a ISeparator like you suggested, only for statements for now maybe.

I also removed code in overriden methods that acted like parent classes.

For now all the tests don't pass but I'm working on it.

Tell me what you think and if that's going in a good direction

moonpyk reacted with thumbs up emoji
Copy link
Collaborator

@jzabroskijzabroski left a comment

Choose a reason for hiding this comment

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

Need to see what unit test CI says but only have 2 main comments.

@PhenX
Copy link
CollaboratorAuthor

OK, there are actually a few tests that still don't pass on my machine, but I'll fix them.
Is the change about the semicolons that are added to all the statement ok for you? Because I was not sure that it would not be considered a massive breaking change.

@jzabroski
Copy link
Collaborator

My thought is we should put together an ADR (Architecture Decision Record) for anISeparator interface. As I mentioned, I had changes for this in my local dev environment, just hadn't pushed it up yet. I think, taking a step back, I should have started with an ADR to explain / motivate the change.

I honestly don't know if the semicolons added to all the statements is OK or not, but my definition of OK would be if it doesn't break any consumers and is functionally the same, then it is "OK". Does that make sense?

In terms of what the ADR would talk about:

  1. MySQL default is ; but supportsDELIMITER <char sequence> statement to override
  2. Postgres supports "dollar quoting" e.g.
    $function$BEGIN RETURN ($1 ~ $q$[\t\r\n\v\\]$q$);END;$function$
  3. Firebird default is ; but supportsSET TERM keyword phrase
  4. DB2 default is ; but --#SET TERMINATOR phrase
  5. Oracle SQLPlusset cmdsep phrase
  6. Hana: In SAP HANA, the default statement delimiter for executing multiple SQL statements is a semicolon (;), but you can specify a different delimiter using the -c command-line option in HDBSQL.
  7. T-SQL and SyBase: ; and GO for batches.
  8. Redshift uses ;
  9. and so on

@PhenX
Copy link
CollaboratorAuthor

PhenX commentedMar 31, 2025
edited
Loading

That makes absolutely sense. I'm not sure about the dollar quoting though. Isn't it about IQuoter?
I think my changes may not go against what you started to work on, if that is about the ISeparator.
I was curious about what EF Core did with migration scaffolding, and saw that they use a single dependency for quotes and separators, what do you think about it?

… on Oracle), happening during migration_version table creation. Solution was to move it to integration tests like others, so that it also tests on other DBMSes
@PhenX
Copy link
CollaboratorAuthor

@jzabroski All tests pass, what do you think about implementing the ISeparator in this pull request ?

@jzabroski
Copy link
Collaborator

@jzabroski All tests pass, what do you think about implementing the ISeparator in this pull request ?

I meant to reply last week but was pretty down with allergies. I will try tonight to push up to my jzabroski/FluentMigrator repo what I have so you can look at it.

@jzabroskijzabroski mentioned this pull requestApr 18, 2025
@jzabroski
Copy link
Collaborator

I'm getting back to this today. Was pretty low on energy due to seasonal allergies the last two weeks, my apologies.

@PhenX
Copy link
CollaboratorAuthor

No worries ! Take care

@jzabroski
Copy link
Collaborator

@PhenX Plan to merge this today

PhenX and moonpyk reacted with hooray emoji

@jzabroskijzabroski marked this pull request as ready for reviewMay 7, 2025 20:48
@jzabroskijzabroski merged commitd162b8b intofluentmigrator:mainMay 7, 2025
@jzabroskijzabroski added this to the7.2.0 milestoneMay 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jzabroskijzabroskijzabroski left review comments

Assignees

@PhenXPhenX

Labels

None yet

Projects

None yet

Milestone

7.2.0

Development

Successfully merging this pull request may close these issues.

2 participants

@PhenX@jzabroski

[8]ページ先頭

©2009-2025 Movatter.jp