Skip to content

About

An Abstraction of SQL variants

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql string templating

An Abstraction of SQL variants

Installing

⇒ git clone https://github.com/GochoMugo/sql-string-templating.git
⇒ cd sql-string-templating
⇒ python setup.py install

Getting Started

import sqlstr

mysql_builder = sqlstr.MySQL()
sqlite3_builder = sqlstr.SQLite3()

print("showing tables in mysql: {}".format(mysql_builder.build("show_tables")))
print("showing tables in sqlite3: {}".format(sqlite3_builder.build("show_tables")))

Contributor's Guide

All SQL variants inherit from the Base class (sqlstr.Base).

Sample SQL variant:

from sqlstr import *

blue_sql_pack = {
  "show_tables": "awesome tables come here;"
}

@lang_pack(blue_sql_pack)
@language
class BluSQL(Base):
  pass

Ensure to add any appropriate tests in the test/ directory.

license

The MIT License (MIT)

Copyright (c) 2014 Gocho Mugo mugo@forfuture.co.ke

About

An Abstraction of SQL variants

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages