This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
6256
Development blog / Re: The saga of the Add-on Manager
« on September 26th, 2011, 03:51 PM »
Heh, that said, he did make a valid point about it...
6257
Off-topic / Re: OMG MUST HAVE NEW SEO
« on September 26th, 2011, 03:50 PM »
I don't know, I don't care, but you know we'll be asked about it.
6258
Off-topic / Re: OMG MUST HAVE NEW SEO
« on September 26th, 2011, 02:14 PM »Someone need to create a new LOLCAT
6259
Off-topic / OMG MUST HAVE NEW SEO
« on September 26th, 2011, 02:05 PM »
As per: http://googlenewsblog.blogspot.com/2011/09/recognizing-publishers-standout-content.html
I'm waiting to see how quickly someone asks us to support that for every post, or new posts in each board etc. ::)
I'm waiting to see how quickly someone asks us to support that for every post, or new posts in each board etc. ::)
6260
Development blog / Re: The saga of the Add-on Manager
« on September 26th, 2011, 01:49 PM »
Don't tempt me, after all the valid debate Unknown gave on it...
6261
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 12:25 PM »
That's the thing; I don't especially want to expand the validation at point of general query, but I would do so happily at the point of data insertion.
6262
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 12:10 PM »
I'm pretty enthusiastic about validation at the best of times, but it's not often that we do selects or similar that need anything other than int, string, or an array of ints or strings. Might I suggest, then, that we do that validation in the insertion routine instead?
It's also a performance thing: I'm not enthusiastic about making the process of physically querying any slower than it needs to be, and already there's a significant overhead vs a bare mysql_query call. It isn't a killer because we rarely make beyond 15 queries per page but it is something to bear in mind.
That said, insertion generally is something that happens slightly less often, so I'm not bothered by the notion of expanding the type validation there.[1] And yes, there's no reason we can't use classes there for that.
As for the parameterising of data, I can see both sides of it. On the one hand, your method is much closer to classic query parameters, it also limits the clutter in the query itself, while putting the validation in the SQL does make it easier for me personally write the queries, because when I'm phrasing the SQL, I am conscious of getting the type of variable right.
I'm not fussed either way as a result but whatever is used, it should be consistent.
It's also a performance thing: I'm not enthusiastic about making the process of physically querying any slower than it needs to be, and already there's a significant overhead vs a bare mysql_query call. It isn't a killer because we rarely make beyond 15 queries per page but it is something to bear in mind.
That said, insertion generally is something that happens slightly less often, so I'm not bothered by the notion of expanding the type validation there.[1] And yes, there's no reason we can't use classes there for that.
As for the parameterising of data, I can see both sides of it. On the one hand, your method is much closer to classic query parameters, it also limits the clutter in the query itself, while putting the validation in the SQL does make it easier for me personally write the queries, because when I'm phrasing the SQL, I am conscious of getting the type of variable right.
I'm not fussed either way as a result but whatever is used, it should be consistent.
| 1. | Just to really fuck with your mind, though, consider how bigint would be dealt with: true bigint cannot be dealt with actually as an int, which means the times I have done it, I've done it in a string. |
6263
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 11:46 AM »
I can, for example, see my adding a couple of hook able queries into WedgeDesk for my own use later.
But as far as 'custom datatypes', what do you have in mind? Data types that have their own rules and/or validation but that ultimately fit into standard MySQL typing? (e.g. WHERE column = {email:address} and inject address in?)
But as far as 'custom datatypes', what do you have in mind? Data types that have their own rules and/or validation but that ultimately fit into standard MySQL typing? (e.g. WHERE column = {email:address} and inject address in?)
6264
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 11:18 AM »
I don't think the syntax needs to change at all (to be honest I'm not sure what else you could do with it anyway) and as for ease of use, I can't see any comparable way of making big queries extensible - it's harder to use than a bare query, until you're used to it, but it's extensible in a way that bare queries aren't.
And since I don't envisage most add-ons having to write them I doubt it'll be a problem, provided there is sufficient documentation and examples of using said setup to extend queries.
And since I don't envisage most add-ons having to write them I doubt it'll be a problem, provided there is sufficient documentation and examples of using said setup to extend queries.
6265
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 10:45 AM »
Ah, OK, then it's all good :)
6266
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 10:42 AM »
That's what I suspected. Can I suggest, then, that (at the very least), WHERE, and the JOINS should always be supplied as arrays to avoid add-ons having to test and coerce values to array just so they can add them in?
6267
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 10:21 AM »
As live asked, how would someone add multiple inner joins, or left joins or complex wheres with and/or combinations? (e.g where a=1 and (b=2 or c=3))
6268
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 09:36 AM »
I like it provided that it only executes a single query otherwise there's no benefit to using a UNION.
6270
Plugins / Re: Hooking up data loading
« on September 26th, 2011, 09:15 AM »
Oh hahaha, yes, now I remember. I think I wrote that! :lol: