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) } }
// UpdateManager factory method. func Modification(relation *nodes.RelationNode) (modification *UpdateManager) { modification = new(UpdateManager) modification.Tree = nodes.UpdateStatement(relation) return }