当前位置:网站首页>Implementation of SQL online editor based on Vue + codemirror
Implementation of SQL online editor based on Vue + codemirror
2022-06-11 19:43:00 【Kexiaonan】
One 、 Project introduction
This project is based on Vue2 + Codemirror Developed Web edition SQL Editor , The following functions are provided :
- The online operation SQL sentence
- Real time command prompt ( Support table name 、 Field name 、SQL Keyword tips )
- see SQL Execution results
- Submit SQL Command set
- Quick use command set
- SQL Statement formatting
- SQL code differ
- Dynamic settings editor configuration item
- View the table structure in real time
Front end project address :https://gitee.com/web1024cn/vue-sqleditor
This project provides supporting back-end sample code ( be based on Node + Express Realization )
Project backend address :https://gitee.com/web1024cn/sqleditor-server
Two 、 Project Download
clone project :
git clone https://gitee.com/web1024cn/vue-sqleditor.git
Installation dependency :
npm install
start-up :
npm run serve
visit :
http://localhost:8080
3、 ... and 、 Effect demonstration
- Editor effect :

- Display query results :

- Real time table name 、 Field name 、 Keyword tips :

- SQL Execute exception prompt :

- View command save record :

- Save the command code differ see :

- Dynamic settings editor configuration item :

- Quick use command set :

Four 、 Code Introduction
- Used in the project [email protected] Realize the editor function ;
- Use axios Realization HTTP request , stay vue.config.js Configuration of the webpack-server The agent solves cross domain problems ;
- encapsulation axios Request module , standard API Format ;
- Use vuex modules and vuex-persistedstate Implement front-end data cache ;
- Use [email protected] The module handles date formatting .
5、 ... and 、 Back end sample code
Vue SQLEditor On-line SQL Back end code editor for the project , Is based on Node + Exopress Realization , Database usage Mysql.
install :
# clone project
git clone https://gitee.com/web1024cn/sqleditor-server.git
# Installation dependency
npm install
# Start project
npm start
The access address of the project is http://127.0.0.1:3000, This project does not provide a page , Are all RESTful api Interface .
Interface specification :
- perform SQL sentence http://127.0.0.1:3000/ext (method:post,params:{sql:’’})
- Query all table names http://127.0.0.1:3000/query/tables (method:get)
- Query the fields under the specified table http://127.0.0.1:3000/query/field (method:get)
Code instructions :
- be based on [email protected] Development
- Use [email protected] Module connection MySQL database
- Use mysql Module provided pool Instance implements data connection pool
- Use nodemon Manage hot deployments , You need to install nodemon
Be careful : The project USES nodemon Manage hot deployments , It needs to be installed locally first nodemon ! This project uses nodemon Install for global .
边栏推荐
- Operator new and placement new
- Merge multiple binary search trees
- Merge sort divide and conquer
- Three common sense that managers must know
- Big work and requirements of economics in autumn 21 of Dagong [standard answer]
- SISO decoder for repetition (supplementary Chapter 4)
- AHB2Standard_ handshake_ Bridge design
- AHB2APB_bridge 设计
- Use Mysql to determine the day of the week
- Proficient in xmake2
猜你喜欢

基于 Vue + Codemirror 实现 SQL 在线编辑器

司空见惯 - 会议室名称

Introduction to go language (V) -- branch statement

CMU 15-445 數據庫課程第五課文字版 - 緩沖池

Golang学习笔记—基础篇

接口隔离原则
![[assembly] analysis of Experiment 7 of the fourth edition of assembly language](/img/ac/a3c5bfeb2dcb93b123dd337993bab3.jpg)
[assembly] analysis of Experiment 7 of the fourth edition of assembly language

30讲 线性代数第二讲 矩阵

Leetcode 1992. Find all farm groups (yes, once)

AHB2Standard_ handshake_ Bridge design
随机推荐
Internet_ Business Analysis Overview
激活函数公式、导数、图像笔记
[untitled]
On the selection and design of management subsystem of collection system
Neural network and deep learning-2-simple example of machine learning pytorch
Lecture 30 linear algebra Lecture 2 Matrix
[help] how can wechat official account articles be opened in an external browser to display the selected messages below?
Operator new and placement new
【Laravel系列7.5】事件系统
[C language questions -- 10 simple questions for leetcode]
司空见惯 - 会议室名称
【mysql进阶】10种数据类型的区别以及如何优化表结构(三)
Qubicle notes: Hello voxel
MySQL federated index and BTREE
This article introduces you to the infrastructure of sofaregistry
Go语言入门(五)——分支语句
MySQL - transaction
模块八作业
Off line operation of situation and policy (version) of Dayong in autumn 21 [standard answer]
Major work title and requirements of engineering earthquake resistance in autumn 21 [standard answer]