8000 use ipv4 as table name in mysql · Issue #3534 · go-gorm/gorm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
use ipv4 as table name in mysql #3534
Closed
@kiyonlin

Description

@kiyonlin

GORM Playground Link

go-gorm/playground#155

Description

We now have such a requirement to use ipv4 as the table name, and each table stores this ipv4's information.

Use such SQL statements when querying.

select * from `ip_db`.`1.1.1.1` limit 0,1000

When quoting the table name, the current processing logic is to separat it by dots, and each substring is wrapped with a pair of ``.

1.1.1.1     => `1`.`1`.`1`.`1`
`1.1.1.1`   => ``1`.`1`.`1`.`1``

Can we improve the quote processing logic so that the table names that have been used ``are not processed again?

1.1.1.1     => `1`.`1`.`1`.`1`
`1.1.1.1`   => `1.1.1.1`

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0