Skip to content

LittleGreenMouse/SQLCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLCompiler

A simple SQL compiler


Already implemented

  • Type
    • string
    • integer
  • Statement
    • CREATE DATABASE
    • DROP DATABASE
    • SHOW DATABASES
    • USE DATABASE
    • CREATE TABLE
    • DROP TABLE
    • SHOW TABLES
    • INSERT
    • DELETE
    • UODATE
    • SELECT

Note:Currently only supports simple where syntax


How to run?

  • Python version: 3.x
  • Python package:
  • Test database:MySQL
  • Test data:testData.txt
  • Configure database information line 296 in yacc.py
    conn = pymysql.connect(host='127.0.0.1', user='root', passwd='mysql', db='mysql')
  • Run
    python yacc.py
  • Select mode
    • 1 Read data from testData.txt
    • 2 Read data from terminal

Releases

No releases published

Packages

No packages published

Languages