-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from pistachiostudio/files
Files
- Loading branch information
Showing
6 changed files
with
48 additions
and
129 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import sqlite3 | ||
|
||
puuid_input = input("削除するPUUIDを入力してください。") | ||
|
||
conn = sqlite3.connect("data/takohachi.db") | ||
|
||
cur = conn.cursor() | ||
|
||
cur.execute( | ||
""" | ||
DELETE FROM val_puuids | ||
WHERE puuid = ? | ||
""", | ||
(puuid_input,), | ||
) | ||
|
||
conn.commit() | ||
conn.close() | ||
|
||
print("done!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import sqlite3 | ||
|
||
puuid_input = input("タスクに追加するPUUIDを入力してください。") | ||
|
||
try: | ||
elo_input = int(input("現在のELOを入力してください。")) | ||
except ValueError: | ||
print("ELOは整数でなければなりません。") | ||
exit(1) | ||
|
||
conn = sqlite3.connect("data/takohachi.db") | ||
|
||
cur = conn.cursor() | ||
|
||
cur.execute( | ||
""" | ||
INSERT INTO val_puuids (puuid, region, name, tag, yesterday_elo) | ||
VALUES (?, ?, ?, ?, ?) | ||
""", | ||
(puuid_input, "ap", "xxxxx", "xxxxx", elo_input), | ||
) | ||
|
||
conn.commit() | ||
conn.close() | ||
|
||
print("done!") |