Skip to content

Improve the code quality of the schema.column_type.ColumnType #240

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

Open
ahsimb opened this issue Dec 13, 2024 · 2 comments · May be fixed by #285
Open

Improve the code quality of the schema.column_type.ColumnType #240

ahsimb opened this issue Dec 13, 2024 · 2 comments · May be fixed by #285
Assignees
Labels
refactoring Code improvement without behavior change

Comments

@ahsimb
Copy link
Contributor

ahsimb commented Dec 13, 2024

  1. No documentation at all. Does the name include the size and precision? God knows.
  2. If the name is not the full name then the full_name property would be very helpful.
  3. Consider implementing the __eq__ method for type comparison.
@ahsimb ahsimb added the refactoring Code improvement without behavior change label Dec 13, 2024
@ckunki
Copy link
Contributor

ckunki commented Dec 16, 2024

See linked ticket in IntRef for details

@ckunki
Copy link
Contributor

ckunki commented Apr 16, 2025

  • ColumnType already has method eq, as marked with @dataclasses.dataclass(frozen=True, repr=True, eq=True), see also related tests.
  • Instead of full_name (including type parameters, such as precision or size) I propose looking at property for_create of class Column and type.rendered, instead.

@ckunki ckunki self-assigned this Apr 16, 2025
@ckunki ckunki linked a pull request Apr 17, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code improvement without behavior change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants