- 创建包含 JSON 表的时候,需要使用实验功能
SET allow_experimental_object_type=1;
CREATE table rc_field_json(fieldData JSON,event String, timestamp DATETIME64) ENGINE = MergeTree ORDER BY (event, timestamp)
2024/5/6大约 6 分钟约 1864 字
SET allow_experimental_object_type=1;
CREATE table rc_field_json(fieldData JSON,event String, timestamp DATETIME64) ENGINE = MergeTree ORDER BY (event, timestamp)
文档地址:https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mongo.core
MongoTemplate 帮助类和 MongoRepository 支持文档与POJO的对象映射
Maven
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>3.0.3.RELEASE</version>
</dependency>
db = pymysql.connect("localhost", "用户名", "密码", "数据库名", charset='utf8')
cursor = db.cursor() # 游标对象