Skip to content

ydotmalik/datastore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Datastore

The datastore was implemented using Python2. Run by doing python datastore.py.

Commands

This datastore implements the following commands:

create database <database_name>

list databases

use database <database_name>

create table <table_name> (col1 col2 col3..., col1_type col2_type col3_type...) The column type can either be int or varchar

insert into <table_name> (col1 col2..., col1_value col2_value...) If the column type is varchar, the string must be enclosed in single quotes, i.e, 'This is a varchar'.

select * from <table_name> col=value Similar to insert, if the column value is a string, the value must be enclosed in single quotes. The output is in CSV format.

list tables List all tables in currently set database.

Unitest and code coverage

Install the coverage pip package. First run coverage run unittest_datastore.py to execute all the test cases and then run coverage report -m to get the code coverage report.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages