-
Notifications
You must be signed in to change notification settings - Fork 39
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
[Feature] Simple search functionality #9
base: master
Are you sure you want to change the base?
Conversation
Do you want to do |
We can also sanatize query param |
I believe TypeORM escapes $1 for you |
Yeah that's there, so it will be done already. Also are we deleting stories after 24 hours or storing it forever |
I was thinking if we were deleting stories after 24 hours then we don't need pagination as there will be atmost 10 stories available so we can return the stories for that user immediately |
My b, didn't think about case insensitivity. Yeah, imo we should also allow "similar" and not only case sensitive exact matches. |
Yh, we would save memory and computation time - also, having an auto deletion with an interval of 1 day seems to be pretty reasonable for stories. |
for now I'm keeping all the stories until I wipe the db, but that's a separate concern |
Yes I just asked to be sure as in code logic like this was not there |
u.flair | ||
from text_story ts | ||
inner join "user" u on u.id = ts."creatorId" | ||
where u.username ILIKE %$1% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I tried making a request but the %$1%
doesn't work for me. I think it's because of the missing apostrophes. Did you try it? @FluentCoding
The backend PR for this PR: ide-stories/vscode-stories#42