-
Notifications
You must be signed in to change notification settings - Fork 0
/
SQLiterelated.py
478 lines (418 loc) · 31.3 KB
/
SQLiterelated.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
from PyQt5.QtCore import QByteArray
from PyQt5.QtSql import QSqlQuery
from datetime import datetime
authorpage = b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x01\x18\x00\x00\x00\x9e\x08\x06\x00\x00\x00\xe9\x10\x15\xfd\x00\x00\x00\x01sRGB\x01\xd9\xc9,\x7f\x00\x00\x00\x04gAMA\x00\x00\xb1\x8f\x0b\xfca\x05\x00\x00\x00\tpHYs\x00\x00\x0e\xc4\x00\x00\x0e\xc4\x01\x95+\x0e\x1b\x00\x00\x12\x84IDATx^\xed\xdd\t`Se\x82\x07\xf0\x7f\xce\x1e\xd0\x0bh\x01\x91\xd3\x16\xb9t\x05E\xc6T\xc7u\x14\xa1E\xe4pe\x9det\x1c\x07Z\x16\x97\xb6\n\x08:\xacx\xcc0\x8b \x9b\xea\x08RA\xee\x9d\x01\xe4\x10\xa5EYEG\xa9\xa2#8\n\xad\xb4\xf1@\x199\x8aP\xa0-m\xd2\xe4\xcdK\xfa%Mh\x9b\xa6\xc7W\x92\xf2\xff\xe9\x83\xbc\xef}\xc9\xfbr\xbc\x7f\xbe\xf7\xbe\xf7\x82FQ\x81\x88H\x02\xad\xf8\x9b\x88\xa8\xd51`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914!\x170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6\xfc\x1fn\xea\x19\x87\xc2\xf5]\xf1\xec=\x9f\xe0Jc\x15lV\x074a\x06L}\xa5/\xb6X\x1e\xc57g\x15\x86\x0b\xd1e\xac\xc9=\x98\xd7\xb7n\xc4\x1f3&c\xf5\xfcph\xb5:\xd8\x15\x8d\xfa\xb7\x1e\xe7\xca\xf5x\xe8E#\x16/\xc9\xc1\xa8\xbbF\x8b\xdaDt9kR\xc0\x98\x86\x0e\xc1+\x99\xc7a\xb0Y\xe1\xd0i\xa08t\xa8\xd6\xd9\xf0\xde^;f\xac\xa8\x10\xb5\x88\x88j\x04\xbc\x8b4\xa4\xab\x1ekf\xfc\x00\x83\xf3\xe7+\xb5j\xafE\x8d%\xad\xc3\x8a\xb7>\xd2\xe3\x83\x9fn\x13\xb5\x88\x88j\x05\x140\xb3\'v\xc2\x96\x851p8j:;v(\xea\x1d5\xa8\x0e\xd3\xe3\xb0\xf5.l\xda\xb6\xd3UND\xe4\xcd\xef.\xd2\xea\xd5\xab\x91pt6\xfat\xab\x84N\xfd\xcf\xa1v[tjmg\xc0(\xd0c\xd9\x0e\r^|\xfd\'Q\x9b\x88\xc8W\x83=\x98G\xa6=\x8c\r\xcf\xcfDL\x07\x07J\xce\xe8QZ\xa9\x87\xc1\xa8EX8\xa0\xb39p\xect\x05v\x1d\xd0\x89\xdaDDu\xf9\xed\xc1\x1c\xd8\xff7<4v\x04\xacV=b"4\xe8\xd7\xd3\x8e\x91\xc9\x9d\xf0\xb3\x01v\xac\xdaV\x86Sq\x93\xb0b\xedZQ\x9b\x88\xc8W\xab\x9chGDT\x9ff\x9fhGD\xd4\x18\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\r\x03\x86\x88\xa4a\xc0\x10\x914\x0c\x18"\x92\x86\x01CD\xd20`\x88H\x1a\x06\x0c\x11I\xc3\x80!"i\x180D$\t\xf0OWI\xb8\x82F9\x9c\x9e\x00\x00\x00\x00IEND\xaeB`\x82'
def createtable():
# create a table named 'alldata' if there is no such table inside this database
# deletedata table is used to save the deleted stuff
query = QSqlQuery()
query.exec('CREATE TABLE IF NOT EXISTS alldata(birthday INT, modtime INT, title TEXT, link TEXT, comment TEXT, tag TEXT, pixmap BLOB)')
query.exec('CREATE TABLE IF NOT EXISTS deleteddata(birthday INT, modtime INT, title TEXT, link TEXT, comment TEXT, tag TEXT, pixmap BLOB)')
query.exec('CREATE TABLE IF NOT EXISTS hierarchy(tag TEXT, children TEXT)')
# insert author data if not exist
if gettitlebybirthday(10000) != 'author of this sofware':
query.prepare("INSERT INTO alldata (birthday, modtime, title, link, comment, tag, pixmap)"
"VALUES (:birthday, :modtime, :title, :link, :comment, :tag, :pixmap)")
query.bindValue(":birthday", 10000)
query.bindValue(":modtime", 10000)
query.bindValue(":title", 'author of this sofware')
query.bindValue(":link", 'https://space.bilibili.com/11925424?from=search&seid=8254168425775436573')
query.bindValue(":comment", '')
query.bindValue(":tag", '#author')
query.bindValue(":pixmap", QByteArray(authorpage))
query.exec()
def dbsize():
query = QSqlQuery()
query.exec("SELECT max(rowid) from alldata")
query.next()
rawsize = query.value(0)
# when there is no data, rawsize is None. then replace it with 0
return rawsize if rawsize != '' else 0
def getalltags():
query = QSqlQuery()
# read all tag column
query.exec("SELECT tag FROM alldata ORDER BY link")
# save tags into a list
data = ['#like', '#deleted', '#later', '#settings', '#recent']
while query.next():
data += query.value(0).split()
# remove the repeated tags
return list(set(data))
def getallbybirthday(birthday):
query = QSqlQuery()
query.exec('SELECT modtime, title, link, comment, tag, pixmap FROM alldata WHERE birthday = {}'.format(birthday))
query.next()
if query.value(0) != None:
return query.value(0),query.value(1),query.value(2),query.value(3),query.value(4),query.value(5)
else:
query.exec('SELECT modtime, title, link, comment, tag, pixmap FROM deleteddata WHERE birthday = {}'.format(birthday))
query.next()
return query.value(0),query.value(1),query.value(2),query.value(3),query.value(4),query.value(5)
def getallexceptpixbybirthday(birthday):
query = QSqlQuery()
query.exec('SELECT title, link, tag, comment FROM alldata WHERE birthday = {}'.format(birthday))
query.next()
if query.value(0) != None:
return query.value(0),query.value(1),query.value(2),query.value(3)
else:
query.exec('SELECT title, link, tag, comment FROM deleteddata WHERE birthday = {}'.format(birthday))
query.next()
return query.value(0),query.value(1),query.value(2),query.value(3)
def operation_getbytag(tag):
# decide which database we use
dbtablename = 'deleteddata' if '#deleted' in tag else 'alldata'
# split the searched text
taglist = tag.split()
# create an operation which search all tags inputs.
operation = "SELECT birthday, title, link, comment, tag, pixmap FROM {}".format(dbtablename)
for i in range(len(taglist)):
if i == 0:
operation += " WHERE tag LIKE '%{}%'".format(taglist[i])
else:
operation += " AND tag LIKE '%{}%'".format(taglist[i])
return operation
def operation_getbytag2(tag = ''):
# decide which database we use
dbtablename = 'deleteddata' if '#deleted' in tag else 'alldata'
# create an operation which search all tags inputs.
head = "SELECT birthday, title, link, comment, tag, pixmap FROM {} WHERE (tag LIKE '%".format(dbtablename)
# remove extra space
tag = tag.replace(' #or ',"%')OR(tagLIKE'%")
tag = tag.replace(' ', '% AND tag LIKE %')
tag = tag.replace(')OR(', ') OR (')
tag = tag.replace("tagLIKE'%", "tag LIKE '%")
foot = "%')"
return head+tag+foot
def operation_getbytag3(tag = ''):
if tag == '#recent' or tag == '#Recent':
return "SELECT birthday, title, link, comment, tag, pixmap FROM alldata ORDER BY birthday DESC LIMIT 20"
else:
# decide which database we use
dbtablename = 'deleteddata' if '#deleted' in tag else 'alldata'
# create an operation which search all tags inputs.
head = "SELECT birthday, title, link, comment, tag, pixmap FROM {} WHERE (tag LIKE '%".format(dbtablename)
# remove extra space
tag = tag.replace(' or ',"%')OR(tagLIKE'%")
tag = tag.replace(' ', "%' AND tag LIKE '%")
tag = tag.replace(')OR(', ') OR (')
tag = tag.replace("tagLIKE'%", "tag LIKE '%")
foot = "%') ORDER BY birthday"
return head+tag+foot
def getlinkbybirthday(birthday):
query = QSqlQuery()
query.exec('SELECT link FROM alldata WHERE birthday = {}'.format(birthday))
query.next()
if query.value(0) != None:
return query.value(0)
else:
query.exec('SELECT link FROM deleteddata WHERE birthday = {}'.format(birthday))
query.next()
return query.value(0)
def gettitlebybirthday(birthday):
query = QSqlQuery()
query.exec('SELECT title FROM alldata WHERE birthday = {}'.format(birthday))
query.next()
if query.value(0) != None:
return query.value(0)
else:
query.exec('SELECT title FROM deleteddata WHERE birthday = {}'.format(birthday))
query.next()
return query.value(0)
def getpixmapbybirthday(birthday):
query = QSqlQuery()
query.exec('SELECT pixmap FROM alldata WHERE birthday = {}'.format(birthday))
query.next()
if query.value(0) != None:
pix = query.value(0)
return pix if pix != '' else authorpage
else:
query.exec('SELECT pixmap FROM deleteddata WHERE birthday = {}'.format(birthday))
query.next()
if query.value(0) != None:
return query.value(0)
else:
return authorpage
def getcommentbybirthday(birthday):
query = QSqlQuery()
query.exec('SELECT comment FROM alldata WHERE birthday = {}'.format(birthday))
query.next()
if query.value(0) != None:
return query.value(0)
else:
query.exec('SELECT comment FROM deleteddata WHERE birthday = {}'.format(birthday))
query.next()
return query.value(0)
def gettagbybirthday(birthday):
query = QSqlQuery()
query.exec('SELECT tag FROM alldata WHERE birthday = {}'.format(birthday))
query.next()
# print(query.value(0))
if query.value(0) != None:
return query.value(0)
else:
query.exec('SELECT tag FROM deleteddata WHERE birthday = {}'.format(birthday))
query.next()
return query.value(0)
def updatebybirthday(birthday, link = '', comment = '3.141592653', tag = '', pixmap = b'\x00', title = ''):
# decide which database
oldtag = gettagbybirthday(birthday)
dbtablename = 'deleteddata' if '#deleted' in oldtag else 'alldata'
now = str(datetime.now())
modtime = int(now.split(' ')[0].replace('-','')+now.split(' ')[1].split('.')[0].replace(':',''))
updatewhat = (link != '')*1+(comment != '3.141592653')*10+(tag != '')*100+(pixmap != b'\x00')*1000+(title != '')*10000
query = QSqlQuery()
if updatewhat == 0:
# updatewhat == 0, means link comment and tag are all emtpy
pass
elif updatewhat == 1:
# update link only
query.prepare("UPDATE {} SET link=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(link)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 10:
query.prepare("UPDATE {} SET comment=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(comment)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 11:
query.prepare("UPDATE {} SET link =?, comment=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(link)
query.addBindValue(comment)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 100:
query.prepare("UPDATE {} SET tag =?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(tag)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 101:
query.prepare("UPDATE {} SET link =?, tag=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(link)
query.addBindValue(tag)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 110:
query.prepare("UPDATE {} SET comment =?, tag=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(comment)
query.addBindValue(tag)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 111:
query.prepare("UPDATE {} SET link =?, comment =?, tag=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(link)
query.addBindValue(comment)
query.addBindValue(tag)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 1000:
query.prepare("UPDATE {} SET pixmap=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(QByteArray(pixmap))
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 10000:
query.prepare("UPDATE {} SET title=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(title)
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
elif updatewhat == 11000:
query.prepare("UPDATE {} SET title=?, pixmap=?, modtime=? WHERE birthday=?".format(dbtablename))
query.addBindValue(title)
query.addBindValue(QByteArray(pixmap))
query.addBindValue(modtime)
query.addBindValue(birthday)
query.exec()
else:
pass
def deletebybirthday(birthday):
if birthday == 10000:
pass
else:
# remove one row from alldata table to deleteddata table
modtime, title, link, comment, tag, pixmap = getallbybirthday(birthday)
newtag = tag + ' #deleted'
# do delete from alldata table
operation = 'DELETE FROM alldata WHERE birthday={}'.format(birthday)
query = QSqlQuery()
query.exec(operation)
# add it into deleteddata table4
query.prepare("INSERT INTO deleteddata (birthday, modtime, title, link, comment, tag, pixmap)"
"VALUES (:birthday, :modtime, :title, :link, :comment, :newtag, :pixmap)")
query.bindValue(":birthday", birthday)
query.bindValue(":modtime", modtime)
query.bindValue(":title", title)
query.bindValue(":link", link)
query.bindValue(":comment", comment)
query.bindValue(":newtag", newtag)
query.bindValue(":pixmap", QByteArray(pixmap))
query.exec()
def recoverbybirthday(birthday):
if birthday == 10000:
pass
else:
# remove one row from alldata table to deleteddata table
modtime, title, link, comment, tag, pixmap = getallbybirthday(birthday)
# check if it is a deleted data
newtag = tag.replace(' #deleted', '')
# recover data into alldata from deleted table
operation = 'DELETE FROM deleteddata WHERE birthday={}'.format(birthday)
query = QSqlQuery()
query.exec(operation)
# add it into alldata table
query.prepare("INSERT INTO alldata (birthday, modtime, title, link, comment, tag, pixmap)"
"VALUES (:birthday, :modtime, :title, :link, :comment, :newtag, :pixmap)")
query.bindValue(":birthday", birthday)
query.bindValue(":modtime", modtime)
query.bindValue(":title", title)
query.bindValue(":link", link)
query.bindValue(":comment", comment)
query.bindValue(":newtag", newtag)
query.bindValue(":pixmap", QByteArray(pixmap))
query.exec()
def adddata(birthday, title, link, comment, tag, pixmap):
query = QSqlQuery()
modtime = birthday
query.prepare("INSERT INTO alldata (birthday, modtime, title, link, comment, tag, pixmap)"
"VALUES (:birthday, :modtime, :title, :link, :comment, :tag, :pixmap)")
query.bindValue(":birthday", birthday)
query.bindValue(":modtime", modtime)
query.bindValue(":title", title)
query.bindValue(":link", link)
query.bindValue(":comment", comment)
query.bindValue(":tag", tag)
query.bindValue(":pixmap", QByteArray(pixmap))
query.exec()
def adddatawithoutpix(birthday, title, link, comment, tag):
query = QSqlQuery()
modtime = birthday
query.prepare("INSERT INTO alldata (birthday, modtime, title, link, comment, tag)"
"VALUES (:birthday, :modtime, :title, :link, :comment, :tag)")
query.bindValue(":birthday", birthday)
query.bindValue(":modtime", modtime)
query.bindValue(":title", title)
query.bindValue(":link", link)
query.bindValue(":comment", comment)
query.bindValue(":tag", tag)
query.exec()
def refreshalltags(currentalltags, taglist):
for item in taglist:
if item not in currentalltags:
currentalltags += [item]
return currentalltags
# below for hierarchy database
# def getallhierarchy(cursor):
# operation = "SELECT tag, children FROM hierarchy"
# cursor.execute(operation)
# data = cursor.fetchall()
# return data
def alltaginhierarchy():
query = QSqlQuery()
# read all tag column
query.exec("SELECT tag FROM hierarchy ORDER BY tag")
# save tags into a list
data = []
while query.next():
data += query.value(0).split()
# remove the repeated tags
return list(set(data))
def addhierarchy(tag,children):
query = QSqlQuery()
query.prepare("INSERT INTO hierarchy (tag, children)"
"VALUES (:tag, :children)")
query.bindValue(":tag", tag)
query.bindValue(":children", children)
query.exec()
def deletehierarchy(tag):
# first delete tag
query = QSqlQuery()
query.exec("DELETE FROM hierarchy WHERE tag='{}'".format(tag))
def removechild(tag,child):
query = QSqlQuery()
query.exec("SELECT children FROM hierarchy WHERE tag LIKE '{tag}'".format(tag=tag))
query.next()
children = query.value(0)
newchildrenlist = children.replace(child, '').split()
newchildren = ' '.join(newchildrenlist)
updatechilderen(tag, newchildren)
def addchild(tag,child):
query = QSqlQuery()
query.exec("SELECT children FROM hierarchy WHERE tag LIKE '{tag}'".format(tag=tag))
query.next()
children = query.value(0)
if child not in children.split():
newchildren = children+' '+child
updatechilderen(tag, newchildren)
def removeparent(tag,parent):
removechild(parent, tag)
def addparent(tag,parent):
query = QSqlQuery()
query.exec("SELECT children FROM hierarchy WHERE tag LIKE '{}'".format(parent))
query.next()
result = query.value(0)
if result == None:
# this parent not exists
addhierarchy(parent.lower(), tag)
else:
# this parent exist
addchild(parent.lower(), tag)
def searchchildren(tag):
query = QSqlQuery()
# first search the wanted tag
query.exec("SELECT children FROM hierarchy WHERE tag LIKE '{}'".format(tag))
query.next()
result = query.value(0)
if result != None:
return True, result
else:
addhierarchy(tag.lower(),'')
return False, ''
def searchparent(tag):
query = QSqlQuery()
query.exec("SELECT tag FROM hierarchy WHERE children LIKE '% {tag} %' OR children LIKE '{tag}' OR children LIKE '{tag} %' OR children LIKE '% {tag}'".format(tag=tag))
parent = ''
while query.next():
parent += ' {}'.format(query.value(0))
return parent[1:]
def updatechilderen(tag,children):
query = QSqlQuery()
query.exec("UPDATE hierarchy SET children='{}' WHERE tag='{}'".format(children,tag))
def expandstr(tag):
query = QSqlQuery()
# first search the wanted tag
query.exec("SELECT children FROM hierarchy WHERE tag LIKE '{}'".format(tag))
query.next()
result = query.value(0)
if result != None:
sumlist = result.split()
for item in sumlist:
tag += ' {}'.format(item)
# # this children might contain new children
# query.exec("SELECT children FROM hierarchy WHERE tag LIKE '{}'".format(item))
# query.next()
# result = query.value(0)
# if result != None:
# newlist = result.split()
# for newitem in newlist:
# if newitem not in sumlist and newitem != tag:
# sumlist.append(newitem)
return tag
if __name__ == "__main__":
from PyQt5.QtSql import QSqlDatabase, QSqlQuery
dbcon = QSqlDatabase.addDatabase("QSQLITE")
dbcon.setDatabaseName('./idearray.db')
dbcon.open()
# query = QSqlQuery()
# query.exec("SELECT tag FROM alldata ORDER BY link")
# while query.next():
# print(query.value(0))
a = getpixmapbybirthday(20210610202045)
print(a)