Skip to main content

Easy SQL Used pymysql

Project description

Name:

easySQL

Author:

fiachia

Function:

use easy function to execute pyMySQL module

Defect:

only easy SQL can be used

use:

  • database connect:

    1. db=easySQL(databaseName, user, passwd, host) or easySQL(database)

  • table creat:

    1. table = tableSQL(tableName, engine, charset)

    1. table.addAttribute(aName, aType, aLong, default, isNotNull, isPrimaryKey, isAuto, isUnique, isUnsigned)

    1. sql = table.creatLanguage()

    1. db.commit(sql)

  • data find:

    1. data = db.find(tableName, key1=value1, key2=value2…)

  • data add:

    1. db.add(tableName, key1=value1, key2=value2…) or db.add(tableName, data)

  • data delete:

    1. db.delete(tableName, key1=value1, key2=value2…) or db.add(tableName, data)

  • data update:

    1. db.update(data, key1=value3, key2=value4…)

  • other:

    1. db.commit(sql) or db.getData(sql)

  • data add dataList:

    1. add all data in dataList. if input data is not list, it will be list in this function. this function need all input list type have the same length.

    1. db.addList(tableName, key1=list1, key2=list2…)

  • data add(data add data rather than data add to table)

    1. data.add(data1)

  • creat table by DIC(json.loads()):

    1. db.creat(tableName, childDeep=0, **kwargs)

2.0.4:

    1. fix the columns in mysql maybe in confusion

2.0.5:

    1. you can get data by a dict type

2.0.6:

    1. fix a bug that dict use the same addr

2.0.7:

    1. Modify a small amount of code and logic to improve efficiency

    1. db.commit(sql) change to db.execute(sql)

    1. you can use db.addSQL(sql(s)) db.showSQL(index=None) db.deleteSQL(index=None) to change sqlList and then db.commit() to run sqlList

2.0.8:

    1. fix a wrong that NoneType in data

2.1.0:

    1. change a lot of code to fix old question.

    1. add type class for using easily.

2.1.1:

    1. fix some questions.

    1. change some logic.

2.1.2:

    1. fix a lot questions.

    1. update some new function.

2.1.3:

    1. fix some type value.

2.1.4:

    1. fix some type value.

3.0.1:

    1. add threading to increase running speed.

    1. change find_info in DataSql and EasySql for using easier.

    1. add find_info_pri_key in DataSql and update() can only change data in DataSql.

    1. add new function and fix old question.

3.0.2:

    1. fix some question and change some logic.

3.0.3:

    1. rewrite thread and sql_list to reduce memory used.

3.1.0:

    1. change old logic and increase running speed.

3.1.1:

    1. change logic to using for big data.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easySQL_fiachia-3.1.1.tar.gz (28.8 kB view hashes)

Uploaded Source

Built Distribution

easySQL_fiachia-3.1.1-py2.py3-none-any.whl (29.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page