Heh... ya...
And just for a little more compatibility, we can even override the
toString method and have it output the string version of the query.
What do you thing about a SqlBuilder class?
Basically when doing a real complex SQL query, instead of writing
everything by hand, you would instance a new SqlBuilder passing a
database object to it. You build up queries by first selecting what type
it's based on (SELECT, DELETE, INSERT, etc...). Then you use a variety
of add functions for adding a variety of conditions, values, joins, and
options.
Then when you are finished you just run the query or doQuery, depending
on what we decide to name it. And it gives back the result.
~Daniel Friesen(Dantman) of:
-The Gaiapedia (
http://gaia.wikia.com)
-Wikia ACG on
Wikia.com (
http://wikia.com/wiki/Wikia_ACG)
-and
Wiki-Tools.com (
http://wiki-tools.com)
Brion Vibber wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
DanTMan wrote:
^_^ That's basically the same idea as the
\x07 suggestion of basically
some sort of character to signal "I handled this... Don't touch it, or
else..." cept an object would handle it nicer...
I like it...
Yay for type safety! :)
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkgjOuYACgkQwRnhpk1wk47QSQCgsoLij8hKsVoI1D7o4qgLzP9z
q50AoKOIABSMURTNgaiOd7YoSwSxRiuJ
=z0eD
-----END PGP SIGNATURE-----
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l