From ecb25b38399895196307a51c7b0eace4ec38603d Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 12 Aug 2011 01:09:15 +0000 Subject: Use the new dynamic sql builder to build sqlTask's SQL and bind its parameters from a more user friendly source --- gentoobrowse/console/categorymetadata.xml | 11 +++-------- gentoobrowse/console/emailebuilds.xml | 5 +---- gentoobrowse/console/packagemetadata.xml | 17 +++++------------ gentoobrowse/request/doconfirm.xml | 5 +---- gentoobrowse/request/dosignup.xml | 9 ++------- gentoobrowse/request/track.xml | 7 ++----- gentoobrowse/request/untrack.xml | 8 ++------ 7 files changed, 16 insertions(+), 46 deletions(-) diff --git a/gentoobrowse/console/categorymetadata.xml b/gentoobrowse/console/categorymetadata.xml index c801376..564a003 100644 --- a/gentoobrowse/console/categorymetadata.xml +++ b/gentoobrowse/console/categorymetadata.xml @@ -22,15 +22,10 @@ UPDATE categories SET - summary = ?, - metadatadate = ? - WHERE categoryid = ? + summary = , + metadatadate = + WHERE categoryid = - - - - - diff --git a/gentoobrowse/console/emailebuilds.xml b/gentoobrowse/console/emailebuilds.xml index af8c83e..660e2d7 100644 --- a/gentoobrowse/console/emailebuilds.xml +++ b/gentoobrowse/console/emailebuilds.xml @@ -28,14 +28,11 @@ from ebuilds e, user_packages up, users u where e.packageid = up.packageid and u.userid = up.userid - and u.userid = ? + and u.userid = and e.firstseen > up.trackedsince) as ut left outer join user_ebuild_emails ebe on ebe.userid = ut.userid and ebe.ebuildid = ut.ebuildid where ebe.userid is null - - - diff --git a/gentoobrowse/console/packagemetadata.xml b/gentoobrowse/console/packagemetadata.xml index 9c00963..f9bbd6c 100644 --- a/gentoobrowse/console/packagemetadata.xml +++ b/gentoobrowse/console/packagemetadata.xml @@ -25,19 +25,12 @@ UPDATE packages SET - summary = ?, - maintainer = ?, - herd = ?, - metadatadate = ? - WHERE packageid = ? + summary = , + maintainer = , + herd = , + metadatadate = + WHERE packageid = - - - - - - - diff --git a/gentoobrowse/request/doconfirm.xml b/gentoobrowse/request/doconfirm.xml index 200ae31..6b8eed8 100644 --- a/gentoobrowse/request/doconfirm.xml +++ b/gentoobrowse/request/doconfirm.xml @@ -24,9 +24,6 @@ - UPDATE users SET verifyguid = NULL WHERE verifyguid = ? - - - + UPDATE users SET verifyguid = NULL WHERE verifyguid = diff --git a/gentoobrowse/request/dosignup.xml b/gentoobrowse/request/dosignup.xml index f9b8819..7b515f9 100644 --- a/gentoobrowse/request/dosignup.xml +++ b/gentoobrowse/request/dosignup.xml @@ -33,13 +33,8 @@ INSERT INTO users(username, userrealname, userpassword, useremail, verifyguid) - VALUES(?, ?, ?, ?, uuid_generate_v4()) - - - - - - + VALUES(, , + , , uuid_generate_v4()) diff --git a/gentoobrowse/request/track.xml b/gentoobrowse/request/track.xml index 2043e80..41eb328 100644 --- a/gentoobrowse/request/track.xml +++ b/gentoobrowse/request/track.xml @@ -14,11 +14,8 @@ - INSERT INTO user_packages(packageid, userid, trackedsince) VALUES(?, ?, NOW()) - - - - + INSERT INTO user_packages(packageid, userid, trackedsince) VALUES( + , , NOW()) diff --git a/gentoobrowse/request/untrack.xml b/gentoobrowse/request/untrack.xml index ceac001..69acd33 100644 --- a/gentoobrowse/request/untrack.xml +++ b/gentoobrowse/request/untrack.xml @@ -3,13 +3,9 @@ DELETE FROM user_packages - WHERE packageid = ? - AND userid = ? + WHERE packageid = + AND userid = - - - - -- cgit v1.2.3