修改模版内容

This commit is contained in:
2025-08-12 16:27:00 +08:00
parent fbca92ba77
commit cdf7e36ba3
7 changed files with 51 additions and 51 deletions

View File

@@ -83,16 +83,16 @@ def create_connection(config):
使用示例:
config = {
'hosts': ['192.168.1.100', '192.168.1.101'],
'hosts': ['127.0.0.1'],
'port': 9042,
'username': 'cassandra',
'password': 'password',
'keyspace': 'my_keyspace',
'keyspace': 'example_keyspace',
'datacenter': 'dc1'
}
cluster, session = create_connection(config)
if session:
result = session.execute("SELECT * FROM my_table LIMIT 10")
result = session.execute("SELECT * FROM example_table LIMIT 10")
cluster.shutdown()
"""
start_time = time.time()