Esempio n. 1
0
func TestDeleteStatement(t *testing.T) {
	relation := nodes.Relation("table")
	stmt := nodes.DeleteStatement(relation)
	expected := `DELETE FROM "table" `
	if got, _ := sql.Accept(stmt); expected != got {
		t.Errorf("TestDeleteStatement was expected to return %s, got %s", expected, got)
	}
}
Esempio n. 2
0
// DeleteManager factory methods.
func Deletion(relation *nodes.RelationNode) (deletion *DeleteManager) {
	deletion = new(DeleteManager)
	deletion.Tree = nodes.DeleteStatement(relation)
	return
}