leansoftx-devi
v1.0.3
Published
JS打包测试
Downloads
9
Readme
leansoftx-devi
JS打包测试
安装
npm install leansoftx-devi
使用
直接使用本插件读取mysql数据库DDL
var mysql= {
type: 'mysql',
host: 'localhost',
user: 'root',
password: '123456',
database: 'test'
}
let db = new Db(mysql);
let ddl=await db.getDDL();
vscode copilot chat 扩展开发开始使用Mysql数据库帮助 1.vscode copilot chat 扩展开发开始使用Mysql数据库帮助
var mysql= {
type: 'mysql',
host: 'localhost',
user: 'root',
password: '123456',
database: 'test'
}
const deviParticipant = new Participant(mysql);
const participant = vscode.chat.createChatParticipant("leansoftx.devi", async (request, context, stream, token) => {
//Whenever a user hits enter, this is where we'll send the request
// await pg.handle(request, context, stream, token)
await deviParticipant.handle(request, context, stream, token)
});
2.修改vscode 配置如下
"chatParticipants": [
{
"id": "leansoftx.devi",
"name": "devi",
"description": "devi",
"isSticky": true,
"commands": [
{
"name": "query",
"description": "Generate sql queries suing natural language and db context."
},
{
"name": "schema",
"description": "Ask questions about database schema"
},
{
"name": "docs",
"description": "Generate database documents"
}
]
}
]