-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EdgeDB] Add Pins Seeding #3212
Conversation
Yeah I'd have pins in its own file. Update could simply be: update User
filter .realFirstName = "Bilbo"
set {
pins += (
select Mixin::Pinnable
filter [is Mixin::Named].name = {"Sindarin", "Quenya", "South Downs"}
)
}; |
@CarsonF - Do you think there is enough benefit in keeping the json separated like this into languages, partners, and projects even though they could technically just be one big list of pinnables? with
usersJson := to_json('[
{
"user": "Bilbo",
"pinnables": {
"languages": ["Sindarin", "Quenya"],
"partners": ["Dwarvish/Elvish Alliance", "Fellowship of Halfing Languages"],
"projects": ["Emyn Muil", "Arnor Lake", "South Downs"]
},
}
]'), Basically does seeing that structure at the top introduce enough benefit to see what type of pins we are adding, over flattening that structure into a list of names and having less code overall? |
I don't see much benefit...I would just flatten |
cc4005b
to
5228d7c
Compare
@CarsonF - This seems to modifying the data correctly, but the printed output is odd to me: [
{
"Modified Users": [
"Bilbo Baggins",
"Bilbo Baggins",
"Bilbo Baggins",
"Peregrin Took",
"Peregrin Took",
"Peregrin Took",
"Aragorn Son of Arathorn",
"Aragorn Son of Arathorn",
"Aragorn Son of Arathorn"
]
}
] I would expect this: [
{
"Modified Users": [
"Bilbo Baggins",
"Peregrin Took",
"Aragorn Son of Arathorn"
]
}
] Probably something simple? |
Need a users := distinct (...) or modified := distinct (...) or modified := (select distinct users ...) all work. |
5228d7c
to
e8dba32
Compare
Monday task
Description
Add seeding for pinnable types; some test users now have populated
pins
for projects, languages, and/or partnersReady for review checklist