From 0883ca4e16b76b8b13746f7ce052bf321a07afa7 Mon Sep 17 00:00:00 2001 From: "Mikto.Vtori" Date: Mon, 20 Feb 2023 11:01:50 +0200 Subject: [PATCH 1/4] Added queues and edited documentation --- ConsoleSQL.py | 112 ++++- ConsoleSQL_installer.zip | Bin 0 -> 9144 bytes databases/mydb/queues/resturant.txt | 5 + documentation.py | 58 ++- src/mydb.txt | 8 + test_usages/files/ConsoleSQL.py | 432 ++++++++++++++++++ .../__pycache__/ConsoleSQL.cpython-39.pyc | Bin 0 -> 10523 bytes test_usages/working_with_files.py | 10 + 8 files changed, 616 insertions(+), 9 deletions(-) create mode 100644 ConsoleSQL_installer.zip create mode 100644 databases/mydb/queues/resturant.txt create mode 100644 test_usages/files/ConsoleSQL.py create mode 100644 test_usages/files/__pycache__/ConsoleSQL.cpython-39.pyc create mode 100644 test_usages/working_with_files.py diff --git a/ConsoleSQL.py b/ConsoleSQL.py index 170ac7f..0a6bb07 100644 --- a/ConsoleSQL.py +++ b/ConsoleSQL.py @@ -13,7 +13,7 @@ def create_database(database, *args): try: - os.mkdir(f"databases/{database}"), os.mkdir(f"databases/{database}/files"), os.mkdir(f"databases/{database}/tables") + os.mkdir(f"databases/{database}"), os.mkdir(f"databases/{database}/files"), os.mkdir(f"databases/{database}/tables"), os.mkdir(f"databases/{database}/queues") except FileExistsError: return Fore.LIGHTWHITE_EX + "Database already exists" @@ -138,6 +138,69 @@ def write_in_file(database, file, *content): return Fore.LIGHTWHITE_EX + f"Database \"{database}\" or File \"{file}\" not found!" +def create_queue(database, queue_file_name, *args): + ''' + Console command + + CREATE QUEUE QueueName + + or + + CREATE QUE QueueName + + or + + CREATE Q QueueName + ''' + + if os.path.exists(f"databases/{database}/queues/{queue_file_name}.txt"): + return Fore.LIGHTWHITE_EX + "Queue already exists" + + file = open(f"databases/{database}/queues/{queue_file_name}.txt", 'x') + file.close() + + return Fore.LIGHTWHITE_EX + f"Queue \"{queue_file_name}\" was created!" + + +def add_to_queue(database, queue, *items): + ''' + Console command + ADD TO QueueName firstItem secondItem thirdItem + ''' + + if os.path.exists(f"databases/{database}/queues/{queue}.txt"): + with open(f"databases/{database}/queues/{queue}.txt", "a+") as q: + for item in items: + q.write(f"{item}\n") + + return Fore.LIGHTWHITE_EX + "Items added to queue!" + + return Fore.LIGHTWHITE_EX + f"Database \"{database}\" or Queue \"{queue}\" not found!" + + +def remove_from_queue(database, queue, *args): + ''' + Console command + REMOVE FROM QueueName + ''' + + if os.path.exists(f"databases/{database}/queues/{queue}.txt"): + + q = [item for item in open(f"databases/{database}/queues/{queue}.txt", "r")][1:] + + os.remove(f"databases/{database}/queues/{queue}.txt") + f = open(f"databases/{database}/queues/{queue}.txt", "a+") + + for item in q: + f.write(f"{item}") + + f.close() + + return "First element from queue removed!" + + return f"Queue \"{queue}\" not found!" + + def check_table_content(database, table, *args): ''' Console command @@ -168,6 +231,19 @@ def check_file_content(database, file_name, *border): return [] +def check_queue_content(database, queue, *args): + ''' + Console command + GET QueueName + ''' + + if os.path.exists(f"databases/{database}/queues/{queue}.txt"): + q = [line for line in open(f"databases/{database}/queues/{queue}.txt", "r")] + return ', '.join(q) + + return f"Queue {queue} not found!" + + def delete_lines(database, path, file_name, *lines): ''' Console command @@ -271,6 +347,24 @@ def delete_file(database, *files): return Fore.LIGHTWHITE_EX + "File/s deleted!" +def delete_queue(database, *queues): + ''' + Console command + + One Queue: + DEL QUEUE QueueName + + More Than One Queue: + DEL QUEUES FirstQueueName SecondQueueName ThirdQueueName... + ''' + + for queue in queues: + if os.path.exists(f"databases/{database}/queues/{queue}.txt"): + os.remove(f"databases/{database}/queues/{queue}.txt") + + return Fore.LIGHTWHITE_EX + "Queue/s deleted!" + + def code_saver(user_input, code_file, new_line): ''' Saves the code in the code file. @@ -329,7 +423,7 @@ def run_program(): code_saver(operation_code, file, '\n') - if len(operation) >= 3: + if len(operation) >= 2: if operation[-1]: if operation[:-1] == ["create", "database"]: @@ -406,6 +500,15 @@ def run_program(): code_saver(text[-3:], file, '\n\n\n') + elif operation[0] == "create" and (operation[1] == "queue" or operation[1] == "que" or operation[1] == "q"): + print(create_queue(database, operation[-1])) + + elif operation[0] == "add" and operation[1] == "to": + print(add_to_queue(database, operation[2], *operation[3:])) + + elif operation[0] == "remove" and operation[1] == "from": + print(remove_from_queue(database, operation[-1])) + elif operation[0] == "get" and operation[1] == "all": lines = check_table_content(database, operation[-1]) @@ -418,6 +521,9 @@ def run_program(): print() [print(line) for line in lines] + elif operation[0] == "get": + print(check_queue_content(database, operation[-1])) + elif len(operation) >= 5: if operation[0] == "del" and operation[3] == "lines": try: @@ -440,3 +546,5 @@ def run_program(): if "lines" not in operation: print(delete_file(database, *operation[2:])) + elif operation[0] == "del" and operation[1] == "queue" or operation[1] == "queues": + print(delete_queue(database, *operation[2:])) diff --git a/ConsoleSQL_installer.zip b/ConsoleSQL_installer.zip new file mode 100644 index 0000000000000000000000000000000000000000..ffc7f326f34bb641d173a9fa2a2bfb79ea21c773 GIT binary patch literal 9144 zcmV;pBS+jfdc3bE8~_B0$iQxOBLDyZ0000Z000000001vA(Z0ay?7yOT>vzjN@uuI zJag?dTF&$6Zf+5Ys9VpaG=pRVupY*rK8M+{nbG2}=4<$kfEH1TM(ny)ZdEl!7Eti# zA4^o7DY9GEB1ow*tBjWpMq+S*@8kW6)UxXx{Ndc9CgaT;&mTF5-Y@blqn?47Hih`T z!V_l0*W-|DT;o6asAwG>{O6l7M|qED(f!kUg!bKpP>Mq}in6hD!p>C3xkl+nd49?W z_+w0!Ywby$c-P7JW^&>(^BD?>pd^;!VM@lG{f%V=2@O^~eI-)56N%61O{cJABe9!l z#j3dxvPv3%uog|6I7?ec8=~_GUBYyjD`l@m)C>@a&8%SQ76V)mXe_s zEIRioDq>DTk~(;XwZko`3+H)K`An@s)(0Zp1%N$~s&KdyWyy@;=An_odpkB4)QPd~ z71?`0$7_w8JY$RECj7eGW1u4!7JoeFcSSa5RB*fd=*+Zk3AU{`Y?17$TghzJ#yE(9clsz5_Eps z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gpt-GeWBY#YHql+X$-y&}5}H> zX?tv%c24#gLmp^`{FW`t1A$%fSHXS26brLgwXq}5U70RPMIf4Bt}H?!=}U`5lgJ4`?iW-N_!z zFMWH(~J0*DAr=j)Vi+2B`x3Vd)y+35p;2r-M=FJ+l{spXg}BZS`5OqIHc-96#xG z;q@Vf@E>z%!$SHh>4mTgit$FvdrYCM?OcIMeXQjZ_qTFV(KJGSDRL>8rYhSSjTuYa z-4#Sr6VI8nTzSD~jR86U7Y3no0SSTv00#>J00AQd0RaVF01yBG428-H0VaO@r~m-K CC#uZ= literal 0 HcmV?d00001 diff --git a/databases/mydb/queues/resturant.txt b/databases/mydb/queues/resturant.txt new file mode 100644 index 0000000..7d64c9a --- /dev/null +++ b/databases/mydb/queues/resturant.txt @@ -0,0 +1,5 @@ +client2 +client3 +client4 +client5 +client6 diff --git a/documentation.py b/documentation.py index 79144e7..ba2bfae 100644 --- a/documentation.py +++ b/documentation.py @@ -7,12 +7,17 @@ def documentation(): - Creating DataBase - Using/Changing DataBase -- Creating Tables and Files +- Creating Tables, Files and Queues - Writing in Tables and Files -- Checking the content of Tables and Files -- Deleting DataBases, Tables and Files +- Adding elements to Queues +- Checking the content of Tables, Files and Queues +- Deleting content from Tables, Files and Queues +- Deleting DataBases, Tables, Files and Queues + +- Can be used in python files. - Saves all the code in File. + {Fore.MAGENTA + "All commands can be in upper or lower case!"} {Fore.GREEN + "1.How to create DataBase:"} @@ -58,15 +63,43 @@ def documentation(): content ;;; -{Fore.GREEN + "5.How to see the content of my Tables and Files:"} +{Fore.GREEN + "5.How to create Queue:"} + - To create queue, you must use one of the following commands: + + {Fore.MAGENTA + "CREATE QUEUE QueueName"} + + or + + CREATE QUE QueueName + + or + + CREATE Q QueueName + + {Fore.RED + '"NOTE!" You cannot remove any element from queue, every time you try to remove element, it will remove only the first one!'} + +{Fore.GREEN + "6.How to add elements to queue:"} + - To add elements in THE END of the queue, you should use this command: + + {Fore.LIGHTMAGENTA_EX + "ADD TO QueueName firstItem secondItem thirdItem"} + +{Fore.GREEN + "7.How to remove element from queue:"} + - Use this command: + + REMOVE FROM QueueName + + {Fore.RED + '"NOTE!" You can only remove the first element in the queue!'} + +{Fore.GREEN + "8.How to see the content of my Tables, Files and Queues:"} - Use this command for Tables: GET ALL TableName - Use this command for Files: GET FILE FileName + - Use this command for Queues: GET QueueName -6.How to delete content from files/tables: +9.How to delete content from files/tables: - Use this command for Tables: DEL TABLE TableName LINES firstline secondline seventhline - Use this command for Files: DEL FILE FileName LINES firstline secondline seventhline -7.How to delete DataBases, Tables and Files: +10.How to delete DataBases, Tables, Files and Queues: - Delete DataBase/s: {Fore.MAGENTA + "One DataBase:"} @@ -93,9 +126,20 @@ def documentation(): More Than One File: DEL FILES FirstFileName SecondFileName ThirdFileName... + {Fore.GREEN + "- Delete Queues:"} + + {Fore.MAGENTA + "One Queue:"} + DEL QUEUE QueueName + + More Than One Queue: + DEL QUEUES FirstQueueName SecondQueueName ThirdQueueName... + +{Fore.LIGHTGREEN_EX + "11.How to use the ConsoleSQL in Python code?"} + - You can simply, just import the ConsoleSQL file and call the functions. + For example, see the test_usages/ folder. -{Fore.LIGHTGREEN_EX + "8.How to save the code?"} +{Fore.LIGHTGREEN_EX + "12.How to save the code?"} - The code is saving by itself in the chosen at the beginning by you file, to change the file you must stop the program and rerun it. The file can be found in the same directory "src/filename" diff --git a/src/mydb.txt b/src/mydb.txt index 44be3f6..7194bc7 100644 --- a/src/mydb.txt +++ b/src/mydb.txt @@ -67,3 +67,11 @@ ADD testtable VALUES ( DEL TABLE testtable LINES 1 3 5 GET ALL testtable GET FILE testfile + +CREATE QUEUE resturant +ADD TO resturant client1 client2 client3 client4 client5 +ADD TO resturant client6 +REMOVE FROM resturant +GET resturant +CREATE QUEUE deletble +DEL QUEUE deletble diff --git a/test_usages/files/ConsoleSQL.py b/test_usages/files/ConsoleSQL.py new file mode 100644 index 0000000..c198fd7 --- /dev/null +++ b/test_usages/files/ConsoleSQL.py @@ -0,0 +1,432 @@ +import os +import shutil +from colorama import Fore + + +def create_database(database, *args): + ''' + Console command + CREATE DATABASE DataBaseName + ''' + + try: + + os.mkdir(f"databases/{database}"), os.mkdir(f"databases/{database}/files"), os.mkdir(f"databases/{database}/tables") + + except FileExistsError: + return Fore.LIGHTWHITE_EX + "Database already exists" + + return Fore.LIGHTWHITE_EX + f"Database \"{database}\" was created" + + +def use_database(database, *args): + ''' + Console command + USE DATABASE DataBaseName + ''' + + if os.path.exists(f"databases/{database}/"): + return [Fore.LIGHTWHITE_EX + f"Currently working with database \"{database}\"", database] + + return f"Database \"{database}\" not found!" + + +def create_table(database, table, values, *args): + ''' + Console command + CREATE TABLE TableName(id: int, name: str, age: float, more...) + ''' + + if os.path.exists(f"databases/{database}/tables/{table}.txt"): + return Fore.LIGHTWHITE_EX + f"Table already exists!" + + table = open(f"databases/{database}/tables/{table}.txt", "a+") + table.write(f"{values}\n\n") + table.close() + + return Fore.LIGHTWHITE_EX + f"Table \"{table.name.split('/')[-1][:-4]}\" was created!" + + +def add_content_to_table(database, table, *content): + ''' + Console command + + ADD TableName VALUES ( + (id, name, age, more...) + (id, name, age) + ); + + ''' + + try: + + with open(f"databases/{database}/tables/{table}.txt", "r") as file: + + values = [line for line in file][0] + values_dictionary = {} + + for item in values[1:-2].split(", "): + + key, value = item.split(": ") + values_dictionary[key] = value + + with open(f"databases/{database}/tables/{table}.txt", "a+") as write_file: + + for content_list in content: + + content_dict = {} + + for index, item in enumerate(values_dictionary.keys()): + + content_dict[item] = content_list[index] + + if type(content_dict[item]) is int and values_dictionary[item] == "'int'" or \ + type(content_dict[item]) is str and values_dictionary[item] == "'str'" or \ + type(content_dict[item]) is float and values_dictionary[item] == "'float'": + continue + + return f"item \"{item}\" is type \'{type(content_dict[item])}\' and it must be \'{values_dictionary[item]}\'" + + write_file.write(f"{content_dict}\n") + + except Exception as e: + raise e + + return Fore.LIGHTWHITE_EX + "Content added to table!" + + +def create_file(database, file_name): + ''' + Console command + CREATE FILE FileName + ''' + + if os.path.exists(f"databases/{database}/files/{file_name}.txt"): + return Fore.LIGHTWHITE_EX + "File already exists" + + file = open(f"databases/{database}/files/{file_name}.txt", 'x') + file.close() + + return Fore.LIGHTWHITE_EX + f"File \"{file_name}\" was created!" + + +def write_in_file(database, file, *content): + ''' + Console command + WRITE IN FileName: + Something isn't right. + + Some Messages! + content, content, content, + + content, content, + content, + content, + content + ;;; + ''' + + if os.path.exists(f"databases/{database}/files/{file}.txt"): + with open(f"databases/{database}/files/{file}.txt", "a+") as f: + for line in content: + f.write(f"{line}\n") + + return Fore.LIGHTWHITE_EX + "Content added to file!" + + return Fore.LIGHTWHITE_EX + f"Database \"{database}\" or File \"{file}\" not found!" + + +def check_table_content(database, table, *args): + ''' + Console command + GET ALL TableName + ''' + + if os.path.exists(f"databases/{database}/tables/{table}.txt"): + file = open(f"databases/{database}/tables/{table}.txt", "r") + + return [Fore.LIGHTWHITE_EX + line for line in file][2:] + + print(Fore.LIGHTWHITE_EX + "Table not found!") + return [] + + +def check_file_content(database, file_name, *border): + ''' + Console command + GET FILE FileName + ''' + + if os.path.exists(f"databases/{database}/files/{file_name}.txt"): + file = open(f"databases/{database}/files/{file_name}.txt", "r") + + return [Fore.LIGHTWHITE_EX + line for line in file] + + print(Fore.LIGHTWHITE_EX + "File not found!") + return [] + + +def delete_lines(database, path, file_name, *lines): + ''' + Console command + DEL TABLE/FILE FileName LINES firstline secondline seventhline + ''' + + if path == "table": + + if os.path.exists(f"databases/{database}/tables/{file_name}.txt"): + + file = [line[:-1] if line[-1] == '\n' else line for line in open(f"databases/{database}/tables/{file_name}.txt", "r")] + + for num, line in enumerate(lines): + if 0 <= (line+1)-num < len(file): + file.pop((line+1)-num) + + os.remove(f"databases/{database}/tables/{file_name}.txt") + f = open(f"databases/{database}/tables/{file_name}.txt", "a+") + + for line in file: + f.write(f"{line}\n") + + f.close() + + elif path == "file": + if os.path.exists(f"databases/{database}/files/{file_name}.txt"): + + file = [line[:-1] if line[-1] == '\n' else line for line in open(f"databases/{database}/files/{file_name}.txt", "r")] + + for num, line in enumerate(lines): + if 0 <= (line - 1) - num < len(file): + file.pop((line - 1) - num) + + os.remove(f"databases/{database}/files/{file_name}.txt") + f = open(f"databases/{database}/files/{file_name}.txt", "a+") + + for line in file: + f.write(f"{line}\n") + + f.close() + + else: + return Fore.LIGHTWHITE_EX + f"Invalid path name '{path}'" + + return Fore.LIGHTWHITE_EX + "lines removed!" + + +def drop_database(*databases): + ''' + Console command + + One DataBase: + FIRST WAY: DROP DB DataBaseName + SECOND WAY: DROP DATABASE DataBaseName + + More Than One DataBases: + FIRST WAY: DROP DBS FirstDataBaseName SecondDataBaseName ThirdDataBaseName... + SECOND WAY: DROP DATABASES FirstDataBaseName SecondDataBaseName ThirdDataBaseName... + ''' + + for db in databases: + if os.path.exists(f"databases/{db}/"): + shutil.rmtree(f"databases/{db}/") + + return Fore.LIGHTWHITE_EX + "Database/s dropped!" + + +def drop_table(database, *tables): + ''' + Console command + + One Table: + DROP TABLE TableName + + More Than One Table: + DROP TABLES FirstTableName SecondTableName ThirdTableName... + ''' + + for table in tables: + if os.path.exists(f"databases/{database}/tables/{table}.txt"): + os.remove(f"databases/{database}/tables/{table}.txt") + + return Fore.LIGHTWHITE_EX + "Table/s dropped!" + + +def delete_file(database, *files): + ''' + Console command + + One File: + DEL FILE FileName + + More Than One File: + DEL FILES FirstFileName SecondFileName ThirdFileName... + ''' + + for file in files: + if os.path.exists(f"databases/{database}/files/{file}.txt"): + os.remove(f"databases/{database}/files/{file}.txt") + + return Fore.LIGHTWHITE_EX + "File/s deleted!" + + +def code_saver(user_input, code_file, new_line): + ''' + Saves the code in the code file. + ''' + + file = open(f"src/{code_file}", "a+") + file.write(f"{user_input}{new_line}") + file.close() + + +def run_program(): + + while True: + db = input(Fore.LIGHTWHITE_EX + "create or use database: ") + + if db == 'create': + create_db = input(Fore.LIGHTWHITE_EX + "database name: ") + create_database(create_db) + d = use_database(create_db) + break + + elif db == "use": + d = use_database(input(Fore.LIGHTWHITE_EX + "database name: "))[-1] + break + + database = d + + while True: + file = input(Fore.LIGHTWHITE_EX + "Create or choose file where to save the code from your console experience:\n") + + if not os.path.exists(f"src/{file}.txt"): + f = open(f"src/{file}.txt", "x") + f.close() + + if file: + break + + file = f"{file}.txt" + + while True: + + operation_code = input() + + if operation_code == "END": + break + + operation = operation_code.lower().split() + + code_saver(operation_code, file, '\n') + + if len(operation) >= 3: + if operation[-1]: + + if operation[:-1] == ["create", "database"]: + print(create_database(operation[-1])) + + elif operation[:-1] == ["use", "database"]: + + db = use_database(operation[-1]) + print(db[0]) + database = db[-1] + + elif operation[:2] == ["create", "table"]: + + table_name = ' '.join(operation[2:])[:' '.join(operation[2:]).index("(")] + values = ' '.join(operation[2:])[' '.join(operation[2:]).index("(")+1:' '.join(operation[2:]).index(")")] + values_tuple = values.split(", ") + values_dict = {} + + for items in values_tuple: + + key, value = items.split(": ") + values_dict[key] = value + + print(create_table(database, table_name, values_dict)) + + elif operation[0] == "add" and operation[-2] == "values": + + table = operation[1] + + if operation[-1] == "(": + + lst_values = [] + item = input() + + while item != ");": + + code_saver(item, file, '\n') + items = item[1:-1].split(", ") + + for index in range(len(items)): + + if len(items[index].split(".")) == 2: + if items[index].split(".")[0].isdigit() and items[index].split(".")[1].isdigit(): + items[index] = float(items[index]) + + elif items[index].isdigit(): + items[index] = int(items[index]) + + lst_values.append(items) + item = input() + + code_saver(item, file, '\n\n\n') + print(add_content_to_table(database, table, *lst_values)) + + elif operation[:-1] == ["create", "file"]: + print(create_file(database, operation[-1])) + + elif operation[:-1] == ["write", "in"]: + + content = [] + text = input() + + while text[-3:] != ";;;": + + code_saver(text, file, '\n') + content.append(text) + text = input() + + if operation[-1][-1] == ':': + print(write_in_file(database, operation[-1][:-1], *content)) + + else: + print(write_in_file(database, operation[-1], *content)) + + code_saver(text[-3:], file, '\n\n\n') + + elif operation[0] == "get" and operation[1] == "all": + + lines = check_table_content(database, operation[-1]) + print() + [print(line) for line in lines] + + elif operation[:-1] == ["get", "file"]: + + lines = check_file_content(database, operation[-1]) + print() + [print(line) for line in lines] + + elif len(operation) >= 5: + if operation[0] == "del" and operation[3] == "lines": + try: + + print(delete_lines(database, operation[1], operation[2], *[int(l) for l in operation[4:]])) + + except ValueError: + print("line must be integer") + + elif operation[:-1] == ["drop", "db"] or operation[:-1] == ["drop", "database"] or operation[:2] == \ + ["drop", "dbs"] or operation[:2] == ["drop", "databases"]: + + dbs = operation[2:] + print(drop_database(*dbs)) + + elif operation[:2] == ["drop", "table"] or operation[:2] == ["drop", "tables"]: + print(drop_table(database, *operation[2:])) + + elif operation[:2] == ["del", "file"] or operation[:2] == ["del", "files"]: + if "lines" not in operation: + print(delete_file(database, *operation[2:])) + diff --git a/test_usages/files/__pycache__/ConsoleSQL.cpython-39.pyc b/test_usages/files/__pycache__/ConsoleSQL.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7d42b6e0082ef3de47dcf317c7abb0ed607ad918 GIT binary patch literal 10523 zcmcgyU2GiJb)I`?c6K?tT#`$QlxW!=(u%2-Ws-Ib$E8%ov`E=c_`YKJQu;B2#U5SDzpzp`bM;N zzjNnje@MzfTyz#YGxywcf6xE9Q||4xG+cjO{Kd+jyrOCUOojG~qwqTZ?gQL}CRkM~ zg-=#uDDx`c&`Ubggf5KlYb8UZgo$TLq(uf#Q}hT6&$P&j9G)4`EAn{uh(6JerzHkN z0ne-$6hnCC#0fEsXRjC$C-KaSQ(_d)KJk<|jc31jT0Dd2fMAPS@!7|im9|i1fpMiS zofSsK=%Sft@P8A3_cm^gS3PZy3Fd2mpgrXKtW^^Hq25u}seBu&x}nuh8=A*=t}~5( zo_@y=#)xKWA8L!*bXZPNkHUPYj{sIoH{P)9=(=35x%H}Juhcg-$~Dn~U!R{{nz!d> zmuBCXUBpY-E5A{8orUs-qmT|P0njag+^L2+b-Pk^+(vo|AbJ@ge5$m|Rq2$)j_us9 zxSo4pB^Be1-f{b0*|k@I;5nk03V7WOQXA`{B7?pw=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jh2Dcc_F7#1`4lUhJyiBVsda&myWYm?z>l^Yr zTR-0VPK3?joNK!pW$cB8k^ky}x%E7<_tw6)m)+NzX)ouS$nj@)bcjALAJb-rHDvgw@o%JXW8ltUk_)fQuFD zQM%=>wqO!QtP7ye(d2Lry2vk&YYtx2r~>k}i`BVAs? z{7<5EDk%+OuCywwToeE`<(XBj*{|p`;17t=bsgx zHSFg}V2Av|lO2t@>KXB@!Zf6fT^m%pHslWpJLC~DrgrZyG5%1pdxMxC=nKxK`3*hL zw|+C)f1<&-qRf9{+*9$mF%M(LgRL3YM%!^Z>u9`q4j5OhTdj~d;W><8$lt)2*lBSl zEP12xXpq|zUVfMK;#b7;-`D&T6i!E+6tDX^5$=#7Kk=SAqUA(q%SeXLuBRTPXCL36Ag}P1g~rJ+FHc!oSgPbZfEl}FhBb}8*u#yEv`adfG>Uc`-?*$k?x4mi zYjqqVBMe6(@ZOq($N|SoWWm~urmSz+JN0cKMd8Rb7r#w4GtF+{<8ax95du(Rq&e6fWXNm70`(8VoReiLuPVwFz(bVHF<%`<5W(`a&6TK z(iK-!Rx6%-g=%PRfmudCSQF~hPaROHvjmlBR>@1190;rr=;Mg+GbW1XRJ0(;GcAs& zWx?-LVzMl51x&P^Y*5;wl*gwSIBms2C^GHBDfJ}flBL3t@Jx+3xs;1ePQC3-9E)b7 zQgjZA6I56J8cl$*5=uf!Ru!K$g=q3Mf~sY!6BWaA?t6*@|gZ)j&C1Cs-0KXNbAc;*osTWFC(er6c&!wRQ>GC>RMj6Mq3Y2cao@QO}w>6vGz z8GVeE$NQ_y{M=-P&ka4t^87q|hM&Wniht_(di literal 0 HcmV?d00001 diff --git a/test_usages/working_with_files.py b/test_usages/working_with_files.py new file mode 100644 index 0000000..d702f2a --- /dev/null +++ b/test_usages/working_with_files.py @@ -0,0 +1,10 @@ +import files.ConsoleSQL as CS + +CS.create_database("testdatabase") +CS.create_file("testdatabase", "testfile") +CS.write_in_file("testdatabase", "testfile", "firstLine", "secondLine", "thirdLine", "fourthLine") +CS.delete_lines("testdatabase", "file", "testfile", 1) +[print(line) for line in CS.check_file_content("testdatabase", "testfile")] +lines = [line for line in open("databases/testdatabase/files/testfile.txt", "r")][:-1] +[print(line) for line in lines] +CS.drop_database("testdatabase") From 864981f54ab6697a639a451285665b9a0df1ee28 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov <112943652+MitkoVtori@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:12:41 +0200 Subject: [PATCH 2/4] Update readme.md --- readme.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/readme.md b/readme.md index e5c6838..8ef5248 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,26 @@ # Python-ConsoleSQL -This is an SQL for Python console. It's similar to MySql. +This is an SQL for Python console. It can be used in code too. + +### [Download Guide](Download-guide) +### [Documentation](Documentation) + + +# Download-guide + +**Go to the files above and click on ConsoleSQL_installer.zip, then click on view raw or download.** + +![Screenshot 2023-02-20 110454](https://user-images.githubusercontent.com/112943652/220061559-db5fc0cb-556f-4a66-90be-547d8322d00b.png) +![Screenshot 2023-02-20 110540](https://user-images.githubusercontent.com/112943652/220061591-54584fe9-cf62-4d99-b51f-3691ee4f2836.png) + + +# Documentation #### Run main.py to start the program. + #### To see the documentation, type "docs" on the console. +**This what you're gonna see.** + +![Screenshot 2023-02-20 104656](https://user-images.githubusercontent.com/112943652/220061875-c2174bdf-adfa-4c63-9c40-0634180d7f21.png) +![Screenshot 2023-02-20 104735](https://user-images.githubusercontent.com/112943652/220061869-4544ef81-c73f-47a5-a418-0ac53f21d88a.png) +![Screenshot 2023-02-20 104806](https://user-images.githubusercontent.com/112943652/220061861-b48d93a0-5b35-4702-b297-ebca379e5393.png) +![Screenshot 2023-02-20 104839](https://user-images.githubusercontent.com/112943652/220061882-50771220-6d42-4c6e-b56f-1061db5f5c60.png) From cb17ba3af49a71e3223732dff5afda8391334457 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov <112943652+MitkoVtori@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:13:38 +0200 Subject: [PATCH 3/4] Update readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 8ef5248..52e7076 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,8 @@ # Python-ConsoleSQL This is an SQL for Python console. It can be used in code too. -### [Download Guide](Download-guide) -### [Documentation](Documentation) +### [Download Guide](#Download-guide) +### [Documentation](#Documentation) # Download-guide From a1d11d5965592433088a8bbd223af9182ce393a0 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov <112943652+MitkoVtori@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:15:32 +0200 Subject: [PATCH 4/4] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 52e7076..efb153c 100644 --- a/readme.md +++ b/readme.md @@ -18,7 +18,7 @@ This is an SQL for Python console. It can be used in code too. #### Run main.py to start the program. #### To see the documentation, type "docs" on the console. -**This what you're gonna see.** +**This is what you're gonna see.** ![Screenshot 2023-02-20 104656](https://user-images.githubusercontent.com/112943652/220061875-c2174bdf-adfa-4c63-9c40-0634180d7f21.png) ![Screenshot 2023-02-20 104735](https://user-images.githubusercontent.com/112943652/220061869-4544ef81-c73f-47a5-a418-0ac53f21d88a.png)