Skip to content

Naming policy test: SQL timestamps should end with _at. - #9518

Merged
isoos merged 4 commits into
dart-lang:masterfrom
isoos:sql-naming-test
Aug 14, 2026
Merged

Naming policy test: SQL timestamps should end with _at.#9518
isoos merged 4 commits into
dart-lang:masterfrom
isoos:sql-naming-test

Conversation

@isoos

@isoos isoos commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

@isoos
isoos requested review from jonasfj and sigurdm August 10, 2026 10:14
@sigurdm

sigurdm commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Is there a specific reason for this convention? Does it help us? Are the fields not already statically strongly typed in dart?

@isoos

isoos commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Is there a specific reason for this convention?

LLM suggestion after reviewing the column names.

Does it help us? Are the fields not already statically strongly typed in dart?

I think it does, if for nothing else, it improves consistency. It is also somewhat confusing the have both scheduled and finished and you don't know if it is a boolean (isScheduled and isFinished) or a timestamp (scheduledAt and finishedAt).

@sigurdm

sigurdm commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

I don't mind either way

Comment thread app/test/database/sql_naming_test.dart
@jonasfj

jonasfj commented Aug 14, 2026

Copy link
Copy Markdown
Member

If you want this better, consider using package:stringscanner and make dump using a SourceSpan when there is an issue. That way we won't spend so much time figuring out what is wrong when we hit it.

Comment thread app/test/database/sql_naming_test.dart
@isoos

isoos commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

If you want this better, consider using package:stringscanner and make dump using a SourceSpan when there is an issue. That way we won't spend so much time figuring out what is wrong when we hit it.

Let's consider this when we could have more rules like this one, until then the simple may be enough.

isoos and others added 4 commits August 14, 2026 15:26
Co-authored-by: Jonas Finnemann Jensen <jopsen@gmail.com>
Co-authored-by: Jonas Finnemann Jensen <jopsen@gmail.com>
@isoos
isoos merged commit 4b40bda into dart-lang:master Aug 14, 2026
65 of 66 checks passed
@isoos
isoos deleted the sql-naming-test branch August 14, 2026 14:15
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.

3 participants