Send SQL command and receive response
(self, command: str)
| 137 | self.socket.connect(f"tcp://{self.host}:{self.port}") |
| 138 | |
| 139 | def execute_sql(self, command: str) -> str: |
| 140 | """Send SQL command and receive response""" |
| 141 | if not self.socket: |
| 142 | return "Error: Not connected to renderer" |
| 143 | self.socket.send_string(command) |
| 144 | return self.socket.recv_string() |
| 145 | |
| 146 | def close(self): |
| 147 | """Close the connection""" |