|
@@ -2,14 +2,14 @@ from .base import BaseMySQLClient
|
|
|
|
|
|
|
|
|
|
class Contents(BaseMySQLClient):
|
|
class Contents(BaseMySQLClient):
|
|
- async def insert_content(self, doc_id, text, text_type, title, dataset_id):
|
|
|
|
|
|
+ async def insert_content(self, doc_id, text, text_type, title, dataset_id, ext):
|
|
query = """
|
|
query = """
|
|
INSERT IGNORE INTO contents
|
|
INSERT IGNORE INTO contents
|
|
- (doc_id, text, text_type, title, dataset_id)
|
|
|
|
- VALUES (%s, %s, %s, %s, %s);
|
|
|
|
|
|
+ (doc_id, text, text_type, title, dataset_id, ext)
|
|
|
|
+ VALUES (%s, %s, %s, %s, %s, %s);
|
|
"""
|
|
"""
|
|
return await self.pool.async_save(
|
|
return await self.pool.async_save(
|
|
- query=query, params=(doc_id, text, text_type, title, dataset_id)
|
|
|
|
|
|
+ query=query, params=(doc_id, text, text_type, title, dataset_id, ext)
|
|
)
|
|
)
|
|
|
|
|
|
async def update_content_info(self, doc_id, text, text_type, title, dataset_id):
|
|
async def update_content_info(self, doc_id, text, text_type, title, dataset_id):
|