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

Method Sel

design_sql_2408/solution.go:55–71  ·  view source on GitHub ↗
(name string, rowId int, columnId int)

Source from the content-addressed store, hash-verified

53}
54
55func (q *SQL) Sel(name string, rowId int, columnId int) string {
56 table, ok := q.tables[name]
57 if !ok {
58 return "<null>"
59 }
60
61 row, ok := table.rows[rowId]
62 if !ok {
63 return "<null>"
64 }
65
66 if columnId < 1 || columnId > len(row) {
67 return "<null>"
68 }
69
70 return row[columnId-1]
71}
72
73func (q *SQL) Exp(name string) []string {
74 table, ok := q.tables[name]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected