Easy SQL Used pymysql
Project description
- Name:
easySQL
- Function:
use easy function to execute pyMySQL module
- Defect:
only easy SQL can be used
use:
database connect:
db=easySQL(databaseName, user, passwd, host) or easySQL(database)
table creat:
table = tableSQL(tableName, engine, charset)
table.addAttribute(aName, aType, aLong, default, isNotNull, isPrimaryKey, isAuto, isUnique, isUnsigned)
sql = table.creatLanguage()
db.commit(sql)
data find:
data = db.find(tableName, key1=value1, key2=value2…)
data add:
db.add(tableName, key1=value1, key2=value2…) or db.add(tableName, data)
data delete:
db.delete(tableName, key1=value1, key2=value2…) or db.add(tableName, data)
data update:
db.update(data, key1=value3, key2=value4…)
other:
db.commit(sql) or db.getData(sql)
data add dataList:
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.
db.addList(tableName, key1=list1, key2=list2…)
data add(data add data rather than data add to table)
data.add(data1)
creat table by DIC(json.loads()):
db.creat(tableName, childDeep=0, **kwargs)
2.0.4:
fix the columns in mysql maybe in confusion
2.0.5:
you can get data by a dict type
2.0.6:
fix a bug that dict use the same addr
2.0.7:
Modify a small amount of code and logic to improve efficiency
db.commit(sql) change to db.execute(sql)
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:
fix a wrong that NoneType in data
2.1.0:
change a lot of code to fix old question.
add type class for using easily.
2.1.1:
fix some questions.
change some logic.
2.1.2:
fix a lot questions.
update some new function.
2.1.3:
fix some type value.
2.1.4:
fix some type value.
3.0.1:
add threading to increase running speed.
change find_info in DataSql and EasySql for using easier.
add find_info_pri_key in DataSql and update() can only change data in DataSql.
add new function and fix old question.
3.0.2:
fix some question and change some logic.
3.0.3:
rewrite thread and sql_list to reduce memory used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for easySQL_fiachia-3.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7936ec3b65b146461998725fb8a59dd3e14117200e2b77c79d3dea8d04604818 |
|
MD5 | 0529082c8a90d63a65d0c8a39f565a9b |
|
BLAKE2b-256 | 7a4b3727fe80459c40e325e2e00a331a1c0f1f9d578cbd8dda5d28abe7289234 |