有用的数据库层包

greenapple的Python项目详细描述


#创建一个student
import greenapple

gco=greenapple.model.connectoperations()
gco.con.dbengine=“mysql”
gco.con.database=“eshule”
gco.con.username=“root”
gco.con.password=“root”

student={“first戥name”:“alexandria“,last戥name”:“nandyose”,“table”:“student”,“子句”:“where id=4”}
student[“姓氏”]=“'marvin stevens'”
gco.insert(student)

对于数据集中的记录:
>打印记录





postgressql示例




gco.con.dbengine=“psql”
>gco.con.database=“eshule”
gco.con.username=“root”





学生名为{“第一个姓名”:“爱马卡儿”的学生。”我是说,“姓氏”:“'akongo'”,“表”:“student”}
gco.insert(student)
student[“姓氏”]=“'opata'
student[“子句”]=“其中id=1”;
gco.update(student)

dataset=gco.select\dataset({“表”:“student”}
在数据集中记录:
打印记录

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Grails2.1.0/Java7在Windows8.1上从何处获取当前用户名?   JavaSpringJMSActiveMQ   java异常处理,捕获导致while循环停止   sql server 2008将日期时间解析为JAVA日期   java是第一个servlet,但无法打开它   如何在Java中使用XML bean创建典型的XML头?   java将iOs应用程序转换为Android   java将jsp页面内容读取到其他jsp页面中的html   客户端计算机中小型数据库应用程序的java实现   java同步和ServletContextListener   安卓 Java将所有转义字符替换为双转义   当我在布局单元中实现ScrollView时,java GridView的setOnItemLongClickListener不起作用(使用适配器)   禁用Java web服务端点Wsdl   java如何编写一个程序来反转用户输入的数字