(self, script_file)
| 103 | self.run_sql_script("ddl/20_users.sql") |
| 104 | |
| 105 | def run_sql_script(self, script_file): |
| 106 | if not self.connection: |
| 107 | raise Exception("Invalid connection") |
| 108 | |
| 109 | with open(script_file, "r") as file: |
| 110 | ddl = file.read() |
| 111 | |
| 112 | cursor = self.connection.cursor() |
| 113 | cursor.execute(ddl) |
| 114 | self.connection.commit() |
| 115 | |
| 116 | cursor.close() |
| 117 | |
| 118 | |
| 119 | def parse_connect_string(connect_string): |