import sqlite3 as lite import sys from couchbase.bucket import Bucket con = None cb = Bucket('couchbase://localhost/bibbiacei2008') cb.flush() try: con = lite.connect('dbBibbia.sqlite') cur = con.cursor() cur.execute('SELECT * FROM TESTI') rows = cur.fetchall() for row in rows: # print (row) # Interroga SQLite per trovare il numero di capitolo del versetto cur2 = con.cursor() cur2.execute( str("SELECT _id, IDLIBRO, CAPITOLO FROM CAPITOLI WHERE _id LIKE '" + str(row[1]) + "'")) capitolo = cur2.fetchone() if str(capitolo[2]) == "0": if capitolo[1] and capitolo[2]: idlibro = capitolo[1] capitolo = capitolo[2] # Dal numero del libro, interroga il database per trovare il nome del libro cur3 = con.cursor()
def reset_game_rules_bucket(): bucket = Bucket('couchbase://localhost/game_rules') print('flushing game_rules') bucket.flush() print('game_rules flushed') initialize_game_rules_bucket(bucket)
def reset_game_rules_bucket(): bucket = Bucket("couchbase://localhost/game_rules") print("flushing game_rules") bucket.flush() print("game_rules flushed") initialize_game_rules_bucket(bucket)