在准备环境前提交次全部更改。

This commit is contained in:
Neo
2026-02-19 08:35:13 +08:00
parent ded6dfb9d8
commit 4eac07da47
1387 changed files with 6107191 additions and 33002 deletions

View File

@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-
"""数据库查看器 Pydantic 模型
定义 Schema 浏览、表结构查看、SQL 查询的请求/响应模型。
"""
from __future__ import annotations
from typing import Any
from pydantic import BaseModel
class SchemaInfo(BaseModel):
"""Schema 信息。"""
name: str
class TableInfo(BaseModel):
"""表信息(含行数统计)。"""
name: str
row_count: int | None = None
class ColumnInfo(BaseModel):
"""列定义。"""
name: str
data_type: str
is_nullable: bool
column_default: str | None = None
class QueryRequest(BaseModel):
"""SQL 查询请求。"""
sql: str
class QueryResponse(BaseModel):
"""SQL 查询响应。"""
columns: list[str]
rows: list[list[Any]]
row_count: int