Closed
Bug 672642
Opened 14 years ago
Closed 14 years ago
make queries static strings in storage
Categories
(Cloud Services Graveyard :: Server: Sync, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: tarek, Assigned: rmiller)
Details
Attachments
(1 file)
|
7.84 KB,
patch
|
tarek
:
review+
telliott
:
review+
|
Details | Diff | Splinter Review |
all in title
| Assignee | ||
Updated•14 years ago
|
Assignee: nobody → rmiller
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•14 years ago
|
||
Attachment #547576 -
Flags: review?(telliott)
Attachment #547576 -
Flags: review?(tarek)
| Reporter | ||
Comment 2•14 years ago
|
||
Comment on attachment 547576 [details] [diff] [review]
change the static queries to use raw sql
My personal opinion is that if we're going to have static queries for clarity, I don't even see the benefit of keeping a dict.
Plain queries like:
QUERY = """\
select poof in doof
where toos = 1
"""
should be enough.
But that's just my opinion, I don't want to sound harsh here, so r+-ing
Attachment #547576 -
Flags: review?(tarek) → review+
| Assignee | ||
Comment 3•14 years ago
|
||
(In reply to comment #2)
> My personal opinion is that if we're going to have static queries for
> clarity, I don't even see the benefit of keeping a dict.
>
> Plain queries like:
>
> QUERY = """\
> select poof in doof
> where toos = 1
> """
>
> should be enough.
I didn't want to have to change any of the calling code (i.e. I wanted get_query() to continue to work exactly as before). I could have put the queries at module scope and used globals() to look them up, but one query isn't created until get_query() is called, so I would have had to either stash that in the global dict (yuck) or done two lookups (not a big deal, really, but not the choice I took).
Comment 4•14 years ago
|
||
Comment on attachment 547576 [details] [diff] [review]
change the static queries to use raw sql
Patch appears to translate correctly. I've made a note in Bug 624542 that we should really bench that COLLECTION_MODIFIED query.
Attachment #547576 -
Flags: review?(telliott) → review+
| Reporter | ||
Comment 5•14 years ago
|
||
Applied by Rob at http://hg.mozilla.org/services/server-storage/rev/e04b8f36ebae
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Cloud Services → Cloud Services Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•