You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
funcmain() {
client, err:=ent.Open("mysql", "root:123456@tcp(127.0.0.1:3306)/surf")
iferr!=nil {
log.Fatalf("failed opening connection to sqlite: %v", err)
}
deferclient.Close()
// Run the auto migration tool.iferr:=client.Schema.Create(
context.Background(),
migrate.WithForeignKeys(false),
); err!=nil {
log.Fatalf("failed creating schema resources: %v", err)
}
}
it can run without error, and I have run some querys also work, but when query the edge seems there has something wrong
How to make it correct?
And how to join those table and select the min time in every map?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Here is my table:
user and time is o2m, map and time is o2m too.
a time record only relate to one user and one map.
users
maps:
times:
main:
it can run without error, and I have run some querys also work, but when query the edge seems there has something wrong
How to make it correct?
And how to join those table and select the min time in every map?
Beta Was this translation helpful? Give feedback.
All reactions