Skip to content
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

Can be support table and column comment? #1718

Open
wittyneko opened this issue Apr 2, 2023 · 1 comment
Open

Can be support table and column comment? #1718

wittyneko opened this issue Apr 2, 2023 · 1 comment

Comments

@wittyneko
Copy link

In MySQL use comment to add comments.

CREATE TABLE Users(
  id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT 'user id'
) COMMENT='user info'

Can you support it like this.

object Users : Table() {
    val id = long("id")
        .autoIncrement()
        .comment("user id")
    override val primaryKey = PrimaryKey(id)
    override val tableComment = "user info"
}
@AlexeySoshin
Copy link
Contributor

It's an interesting requirement, but I think it may require more discussion about the correct design, because MySQL is a bit of an exception on how it approaches comments.

For example, PosgreSQL uses COMMENT statement that is separate from the table definition:

https://www.postgresql.org/docs/current/sql-comment.html

And Oracle uses similar approach to PostgreSQL, but with less options:
https://docs.oracle.com/cd/B12037_01/server.101/b10759/statements_4009.htm

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

No branches or pull requests

2 participants