Ejemplo n.º 1
0
func TestInsertStatement(t *testing.T) {
	relation := nodes.Relation("table")
	stmt := nodes.InsertStatement(relation)
	expected := `INSERT INTO "table" `
	if got, _ := sql.Accept(stmt); expected != got {
		t.Errorf("TestInsertStatement was expected to return %s, got %s", expected, got)
	}
}
Ejemplo n.º 2
0
func Insertion(relation *nodes.RelationNode) (insertion *InsertManager) {
	insertion = new(InsertManager)
	insertion.Tree = nodes.InsertStatement(relation)
	return
}