MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / Constructor

Function Constructor

design_sql_2408/solution.go:18–32  ·  view source on GitHub ↗
(names []string, columns []int)

Source from the content-addressed store, hash-verified

16}
17
18func Constructor(names []string, columns []int) SQL {
19 sql := SQL{
20 tables: make(map[string]*table),
21 }
22 for i, name := range names {
23 colCount := columns[i]
24 sql.tables[name] = &table{
25 idInc: 0,
26 colCount: colCount,
27 rows: make(map[int][]string),
28 }
29 }
30
31 return sql
32}
33
34func (q *SQL) Ins(name string, row []string) bool {
35 table, ok := q.tables[name]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected