Delete swaths of unused code

This commit is contained in:
Aaron L 2016-08-14 00:20:34 -07:00
parent 5f86014847
commit b0cd6828b2
4 changed files with 0 additions and 43 deletions

View file

@ -24,16 +24,6 @@ func ColumnNames(cols []Column) []string {
return names
}
// ColumnTypes of the columns.
func ColumnTypes(cols []Column) []string {
types := make([]string, len(cols))
for i, c := range cols {
types[i] = c.Type
}
return types
}
// ColumnDBTypes of the columns.
func ColumnDBTypes(cols []Column) map[string]string {
types := map[string]string{}

View file

@ -78,14 +78,3 @@ func SQLColDefinitions(cols []Column, names []string) SQLColumnDefs {
return ret
}
// SQLColDefStrings turns SQLColumnDefs into strings.
func SQLColDefStrings(defs []SQLColumnDef) []string {
strs := make([]string, len(defs))
for i, d := range defs {
strs[i] = d.String()
}
return strs
}

View file

@ -30,23 +30,3 @@ func TestSQLColDefinitions(t *testing.T) {
t.Error("wrong def:", got)
}
}
func TestSQLDefStrings(t *testing.T) {
t.Parallel()
cols := []Column{
{Name: "one", Type: "int64"},
{Name: "two", Type: "string"},
{Name: "three", Type: "string"},
}
defs := SQLColDefinitions(cols, []string{"one", "three"})
strs := SQLColDefStrings(defs)
if got := strs[0]; got != "one int64" {
t.Error("wrong str:", got)
}
if got := strs[1]; got != "three string" {
t.Error("wrong str:", got)
}
}

View file

@ -171,8 +171,6 @@ var templateFunctions = template.FuncMap{
// dbdrivers ops
"filterColumnsByDefault": bdb.FilterColumnsByDefault,
"sqlColDefinitions": bdb.SQLColDefinitions,
"sqlColDefStrings": bdb.SQLColDefStrings,
"columnNames": bdb.ColumnNames,
"columnTypes": bdb.ColumnTypes,
"columnDBTypes": bdb.ColumnDBTypes,
}