mirror of
https://github.com/hanzo-ds/connect.git
synced 2026-10-30 20:31:24 +00:00
The wire protocol was the last holdout and it was not cosmetic: the Hanzo Datastore server reads X-Datastore-User, and answers a request bearing X-ClickHouse-User with 401. Verified against the live server, both directions. So a client still sending the old headers is not merely off-brand, it cannot authenticate over HTTP. Everything else follows: types, dialects, error modules, docstrings and doc links now name Datastore, and doc URLs point at docs.hanzo.ai/datastore rather than the upstream vendor's site. Zero occurrences of the old name remain. Still cut from the pinned upstream version, so behaviour is unchanged.
23 lines
796 B
Python
23 lines
796 B
Python
#!/usr/bin/env python3 -u
|
|
|
|
import os
|
|
|
|
import datastore_connect
|
|
|
|
|
|
def main():
|
|
host = os.getenv('DATASTORE_CONNECT_TEST_HOST', 'localhost')
|
|
port = int(os.getenv('DATASTORE_CONNECT_TEST_PORT', '8123'))
|
|
password = os.getenv('DATASTORE_CONNECT_TEST_PASSWORD', '')
|
|
client = datastore_connect.get_client(host=host, port=port, password=password)
|
|
database_result = client.query("SELECT name FROM system.databases WHERE name ilike '%test%'").result_rows
|
|
for database_row in database_result:
|
|
database:str = database_row[0]
|
|
if database.startswith('dbt_datastore') or database.startswith('datastore_connect'):
|
|
print(f'DROPPING DATABASE `{database}`')
|
|
client.command(f'DROP DATABASE IF EXISTS {database}')
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|