feat: upgrade from community to pro / remove unused edges in storage policy

This commit is contained in:
Aaron Liu
2025-04-24 15:25:40 +08:00
parent 9226d0c8ec
commit cc69178310
18 changed files with 24 additions and 499 deletions

View File

@@ -36,7 +36,6 @@ type UserQuery struct {
withPasskey *PasskeyQuery
withTasks *TaskQuery
withEntities *EntityQuery
withFKs bool
// intermediate query (i.e. traversal path).
sql *sql.Selector
path func(context.Context) (*sql.Selector, error)
@@ -586,7 +585,6 @@ func (uq *UserQuery) prepareQuery(ctx context.Context) error {
func (uq *UserQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*User, error) {
var (
nodes = []*User{}
withFKs = uq.withFKs
_spec = uq.querySpec()
loadedTypes = [7]bool{
uq.withGroup != nil,
@@ -598,9 +596,6 @@ func (uq *UserQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*User, e
uq.withEntities != nil,
}
)
if withFKs {
_spec.Node.Columns = append(_spec.Node.Columns, user.ForeignKeys...)
}
_spec.ScanValues = func(columns []string) ([]any, error) {
return (*User).scanValues(nil, columns)
}