Ejemplo n.º 1
0
func TestUpdateStatement(t *testing.T) {
	relation := nodes.Relation("table")
	stmt := nodes.UpdateStatement(relation)
	expected := `UPDATE "table" `
	if got, _ := sql.Accept(stmt); expected != got {
		t.Errorf("TestUpdateStatement was expected to return %s, got %s", expected, got)
	}
}
Ejemplo n.º 2
0
// UpdateManager factory method.
func Modification(relation *nodes.RelationNode) (modification *UpdateManager) {
	modification = new(UpdateManager)
	modification.Tree = nodes.UpdateStatement(relation)
	return
}