修改模版内容

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()

View File

@@ -65,7 +65,7 @@ def get_redis_value_with_type(redis_client, key):
- 数据异常:记录警告并提供基本信息
示例:
>>> result = get_redis_value_with_type(client, "user:1001")
>>> result = get_redis_value_with_type(client, "user:example")
>>> print(result['type']) # 'string'
>>> print(result['value']) # 'John Doe'
>>> print(result['exists']) # True