Hi, me again, you please just say when I’m getting...
# talk-keto
m
Hi, me again, you please just say when I’m getting on your nerves 🙂 I’m trying to delete (all) relations from the database with the grpc client, similar to how it’s done [here](https://github.com/ory/keto/blob/master/cmd/relationtuple/delete_all.go). Trying to understand better the role of the
RelationQuery
for delete requests. Presumably leaving either nils for the values in the struct, or pointers to empty strings, makes a query that is a “select *” equivalent, therefore deleting all tuples? This doesn’t get me very far, sadly, my tuples persist in the database. This is my code:
Copy code
query := rts.RelationQuery{
					Namespace: getStringPtr("User"),
					Object:    getStringPtr(""),
					Relation:  getStringPtr(""),
					Subject:   nil,
				}
				_, err := wcl.DeleteRelationTuples(context.Background(), &rts.DeleteRelationTuplesRequest{
					RelationQuery: &query,
				})
				if err != nil {
					panic("Encountered error: " + err.Error())
				}
wcl is a
WriteServiceClient
that works for inserts
delete all works with this query:
Copy code
query := rts.RelationQuery{
				Namespace: nil,
				Object:    nil,
				Relation:  nil,
				Subject:   nil,
			}
still a bit confused by the logic, the documentation seems to leave some room for interpretation on how that works