Finished insert template

* Removed functions in helpers not being used
This commit is contained in:
Patrick O'brien 2016-05-02 16:34:25 +10:00
commit f059bdebf4
10 changed files with 576 additions and 98 deletions

View file

@ -40,8 +40,23 @@ func init() {
{
Name: "spiderman",
Columns: []dbdrivers.Column{
{Name: "id", Type: "int64", IsNullable: false},
},
PKey: &dbdrivers.PrimaryKey{
Name: "pkey_id",
Columns: []string{"id"},
},
},
{
Name: "spiderman_table_two",
Columns: []dbdrivers.Column{
{Name: "id", Type: "int64", IsNullable: false},
{Name: "patrick", Type: "string", IsNullable: false},
},
PKey: &dbdrivers.PrimaryKey{
Name: "pkey_id",
Columns: []string{"id"},
},
},
},
PkgName: "patrick",
@ -69,6 +84,10 @@ func TestTemplates(t *testing.T) {
t.SkipNow()
}
if err := checkPKeys(cmdData.Tables); err != nil {
t.Fatalf("%s", err)
}
// Initialize the templates
var err error
cmdData.Templates, err = loadTemplates("templates")