zoukankan      html  css  js  c++  java
  • 每日日报8月24日

    1.今天学习了

    使用 PrepraredStatement
    public class Tester {
    public void tx_insertDemo() {
    Dao.dao.execute("delete from user");
    Dao.dao.execute("insert user (username,age) values(" + W("user1") + "," + W(10) + ")");
    Dao.dao.execute("insert user (username,age) values(" + W("user2", 20) + ")");
    Dao.dao.execute("insert user (username,age) values(?,?)" + K("user3") + K(30));
    Dao.dao.execute("insert user (username,age) values(?,?)" + K("user4", 40));
    Dao.dao.execute(
    "insert " + User.Table + " (" + User.UserName + "," + User.Age + ") values(" + W("user5", 50) + ")");
    Dao.dao.execute("update user set username=?,address=? " + K("Sam", "BeiJing") + " where age=" + W(50));
    User user = new User();
    user.setUsername("user3");
    user.setAge(40);
    user.dao().save(); //TODO
    }

    public void tx_batchInsertDemo() {
    for (int i = 6; i < 100000; i++)
    Dao.dao.cacheSQL("insert user (username,age) values(?,?)" + K("user" + i, 60));
    Dao.dao.executeCatchedSQLs();
    }

    public static void main(String[] args) {
    Tester tester = BeanBox.getBean(Tester.class);//获取代理实例
    tester.tx_insertDemo();//包装在Spring的声明式事务中
    tester.tx_batchInsertDemo();
    }
    }
    2.没有遇到问题
    3明天打算学习
    修改功能和删除功能演示
    修改用户信息查看界面.
  • 相关阅读:
    haproxy 基于 cookie 的会话保持
    haproxy 透明代理
    haproxy tcp keepalive
    haproxy 支持 websocket
    python 中给文件加锁
    使用python生成二维码
    python中的uuid简介
    django建表报错
    pip安装第三方包PIL失败
    python获取mac地址的方法
  • 原文地址:https://www.cnblogs.com/wanghaoning/p/13591797.html
Copyright © 2011-2022 走看看