| 12345678910111213141516171819202122232425262728293031 |
- from .base import BaseMySQLClient
- class DeconstructionWhat(BaseMySQLClient):
- async def insert_deconstruction_what(self, content_id, doc_id, what_text, description):
- query = """
- INSERT INTO deconstruction_what (doc_id, content_id, what_text, description)
- VALUES (%s, %s, %s, %s);
- """
- return await self.pool.async_save(
- query=query, params=(doc_id, content_id, what_text, description)
- )
- async def update_deconstruction_what_embedding_status(self, doc_id):
- query = """
- UPDATE deconstruction_what
- SET embedding_status = 1
- WHERE doc_id = %s
- """
- return await self.pool.async_save(
- query=query, params=(doc_id,)
- )
- async def insert_deconstruction_what_contents(self, content_id, content):
- query = """
- INSERT INTO deconstruction_what_contents (content_id, content)
- VALUES (%s, %s);
- """
- return await self.pool.async_save(
- query=query, params=(content_id, content,)
- )
|