MCPcopy
hub / github.com/ent/ent / tableExist

Method tableExist

dialect/sql/schema/sqlite.go:80–89  ·  view source on GitHub ↗
(ctx context.Context, conn dialect.ExecQuerier, name string)

Source from the content-addressed store, hash-verified

78}
79
80func (d *SQLite) tableExist(ctx context.Context, conn dialect.ExecQuerier, name string) (bool, error) {
81 query, args := sql.Select().Count().
82 From(sql.Table("sqlite_master")).
83 Where(sql.And(
84 sql.EQ("type", "table"),
85 sql.EQ("name", name),
86 )).
87 Query()
88 return exist(ctx, conn, query, args...)
89}
90
91func (d *SQLite) atOpen(conn dialect.ExecQuerier) (migrate.Driver, error) {
92 return sqlite.Open(&db{ExecQuerier: conn})

Callers

nothing calls this directly

Calls 9

SelectFunction · 0.92
TableFunction · 0.92
AndFunction · 0.92
EQFunction · 0.92
existFunction · 0.85
QueryMethod · 0.65
WhereMethod · 0.65
FromMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected