[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1150] specify IS NULL where appropriate
From: |
Clint Adams |
Subject: |
[Librefm-commits] [1150] specify IS NULL where appropriate |
Date: |
Sun, 03 May 2009 13:55:44 +0000 |
Revision: 1150
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1150
Author: clint
Date: 2009-05-03 13:55:44 +0000 (Sun, 03 May 2009)
Log Message:
-----------
specify IS NULL where appropriate
Modified Paths:
--------------
trunk/scripts/setstids
Modified: trunk/scripts/setstids
===================================================================
--- trunk/scripts/setstids 2009-05-03 03:38:50 UTC (rev 1149)
+++ trunk/scripts/setstids 2009-05-03 13:55:44 UTC (rev 1150)
@@ -36,7 +36,7 @@
self.cursor.MoveNext()
def lookupStid(self, artist, album, track, mbid):
- self.lucursor = self.conn.Execute('SELECT * from Scrobble_Track
WHERE lower(artist) = lower(%(artist)s) AND lower(album) = lower(%(album)s) AND
lower(name) = lower(%(track)s) AND lower(mbid) = lower(%(mbid)s)', {'artist':
artist, 'album': album, 'track': track, 'mbid': mbid});
+ self.lucursor = self.conn.Execute('SELECT * from Scrobble_Track
WHERE lower(artist) = lower(%%(artist)s) AND %s AND lower(name) =
lower(%%(track)s) AND %s' % (('lower(album) = lower(%(album)s)' if album else
'album IS NULL'), ('lower(mbid) = lower(%(mbid)s)' if mbid else 'mbid IS
NULL')), {'artist': artist, 'album': album, 'track': track, 'mbid': mbid});
if not self.lucursor.EOF:
lrow = self.lucursor.GetRowAssoc(0)
return lrow['id']
@@ -44,7 +44,7 @@
return None
def lookupTrack(self, artist, album, track, mbid):
- self.tucursor = self.conn.Execute('SELECT * from Track WHERE
lower(artist) = lower(%(artist)s) AND lower(album) = lower(%(album)s) AND
lower(name) = lower(%(track)s) AND lower(mbid) = lower(%(mbid)s)', {'artist':
artist, 'album': album, 'track': track, 'mbid': mbid});
+ self.tucursor = self.conn.Execute('SELECT * from Track WHERE
lower(artist) = lower(%%(artist)s) AND %s AND lower(name) = lower(%%(track)s)
AND %s' % (('lower(album) = lower(%(album)s)' if album else 'album IS NULL'),
('lower(mbid) = lower(%(mbid)s)' if mbid else 'mbid IS NULL')), {'artist':
artist, 'album': album, 'track': track, 'mbid': mbid});
if not self.tucursor.EOF:
trow = self.tucursor.GetRowAssoc(0)
return trow['id']
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1150] specify IS NULL where appropriate,
Clint Adams <=