all repos — honk @ c13525c93a061b24597ceebdc928bd78702f8b97

my fork of honk

limit all honk queries to 250
Ted Unangst tedu@tedunangst.com
Sun, 28 Apr 2019 18:52:50 -0400
commit

c13525c93a061b24597ceebdc928bd78702f8b97

parent

15d6fd92771656efcc2b09feb9e1cba2b3333fd4

1 files changed, 8 insertions(+), 8 deletions(-)

jump to
M honk.gohonk.go

@@ -1282,15 +1282,15 @@ stmtHasHonker = preparetodie(db, "select honkerid from honkers where xid = ? and userid = ?")

stmtDubbers = preparetodie(db, "select honkerid, userid, name, xid, flavor from honkers where userid = ? and flavor = 'dub'") selecthonks := "select honkid, honks.userid, username, what, honker, honks.xid, rid, dt, url, audience, noise, convoy from honks join users on honks.userid = users.userid " - limit := " order by honkid desc limit " + limit := " order by honkid desc limit 250" stmtOneXonk = preparetodie(db, selecthonks+"where xid = ?") - stmtPublicHonks = preparetodie(db, selecthonks+"where honker = ''"+limit+"50") - stmtUserHonks = preparetodie(db, selecthonks+"where honker = '' and username = ?"+limit+"50") - stmtHonksForUser = preparetodie(db, selecthonks+"where honks.userid = ? and dt > ? and convoy not in (select name from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 100)"+limit+"250") - stmtHonksForMe = preparetodie(db, selecthonks+"where honks.userid = ? and dt > ? and whofore = 1 and convoy not in (select name from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 100)"+limit+"150") - stmtHonksByHonker = preparetodie(db, selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.name = ?"+limit+"50") - stmtHonksByCombo = preparetodie(db, selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.combos like ?"+limit+"50") - stmtHonksByConvoy = preparetodie(db, selecthonks+"where (honks.userid = ? or honker = '') and convoy = ?"+limit+"50") + stmtPublicHonks = preparetodie(db, selecthonks+"where honker = ''"+limit) + stmtUserHonks = preparetodie(db, selecthonks+"where honker = '' and username = ?"+limit) + stmtHonksForUser = preparetodie(db, selecthonks+"where honks.userid = ? and dt > ? and convoy not in (select name from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 100)"+limit) + stmtHonksForMe = preparetodie(db, selecthonks+"where honks.userid = ? and dt > ? and whofore = 1 and convoy not in (select name from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 100)"+limit) + stmtHonksByHonker = preparetodie(db, selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.name = ?"+limit) + stmtHonksByCombo = preparetodie(db, selecthonks+"join honkers on honkers.xid = honks.honker where honks.userid = ? and honkers.combos like ?"+limit) + stmtHonksByConvoy = preparetodie(db, selecthonks+"where (honks.userid = ? or honker = '') and convoy = ?"+limit) stmtSaveHonk = preparetodie(db, "insert into honks (userid, what, honker, xid, rid, dt, url, audience, noise, convoy, whofore) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") stmtFileData = preparetodie(db, "select media, content from files where xid = ?")