forked from CodePhiliaX/Chat2DB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
import React, { useEffect } from 'react'; | ||
import OpenScreenAnimation from '@/components/OpenScreenAnimation'; | ||
import sqlService from '@/service/sql'; | ||
|
||
function Test() { | ||
// const token = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOjIsImRldmljZSI6ImRlZmF1bHQtZGV2aWNlIiwiZWZmIjoxNzA2ODU0NTMwMDI3LCJyblN0ciI6Ik1RcHRPOUVBVlJlbGRQa1RFN01MZUpLeG5KTGVwRFpaIn0.knOw08E6mwWF_GpkeQ8KflQlfQuNu4jd-_Bgh7EnCj4' | ||
// useEffect(() => { | ||
// const socket = new WebSocket(`ws://127.0.0.1:10821/api/ws/${token}`); | ||
// socket.onopen = () => { | ||
// console.log('open'); | ||
// socket.send('hello'); | ||
// }; | ||
// }, []); | ||
return <OpenScreenAnimation />; | ||
const sql = "INSERT INTO `big_data_table` (`name1`,`name2`,`name3`,`name4`,`name5`,`name6`,`name7`,`name8`,`name9`,`name10`,`name11`,`name21`,`name31`,`name41`,`name51`,`name61`,`name71`,`name81`,`name91`,`name12`,`name22`,`name32`,`name42`,`name52`,`name62`,`name72`,`name82`,`name92`,`name13`,`name223`,`name323`,`name423`,`name523`,`name623`,`name723`,`name823`,`name923`) VALUES ('牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛','牛牛牛牛牛牛牛牛牛牛牛牛');"; | ||
const sqls:any = []; | ||
for (let i = 30; i < 1030; i++) { | ||
sqls.push(sql) | ||
} | ||
const a = () =>{ | ||
const executeSQLParams = { | ||
sql: sqls.join(''), | ||
dataSourceId:2, | ||
databaseName: "e-commerc", | ||
}; | ||
// 获取当前SQL的查询结果 | ||
return sqlService.executeSql(executeSQLParams).finally(()=>{ | ||
a() | ||
}); | ||
} | ||
useEffect(() => { | ||
a() | ||
},[]) | ||
return 11111; | ||
} | ||
|
||
export default Test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters