MCPcopy
hub / github.com/ent/ent / fromIdent

Method fromIdent

dialect/sql/builder.go:3335–3340  ·  view source on GitHub ↗

fromIdent sets the builder dialect from the identifier format.

(ident string)

Source from the content-addressed store, hash-verified

3333
3334// fromIdent sets the builder dialect from the identifier format.
3335func (b *Builder) fromIdent(ident string) {
3336 if strings.Contains(ident, `"`) {
3337 b.SetDialect(dialect.Postgres)
3338 }
3339 // otherwise, use the default.
3340}
3341
3342// isIdent reports if the given string is a dialect identifier.
3343func (b *Builder) isIdent(s string) bool {

Callers 2

AsFunction · 0.95
DistinctFunction · 0.95

Calls 2

SetDialectMethod · 0.95
ContainsMethod · 0.45

Tested by

no test coverage detected