<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                使用uliweb里面的數據庫操作函數。 安裝uliweb后,引用orm。 ~~~ #coding=utf-8 from uliweb.orm import * ~~~ ### 鏈接數據庫[?](http://uliweb.clkg.org/tutorial/view_chapter/189#title_0-0-1) ~~~ db=get_connection('mysql://root:root@localhost/mail?charset=utf8') ~~~ ### 表和字段[?](http://uliweb.clkg.org/tutorial/view_chapter/189#title_0-0-2) ~~~ class test(Model): testname = Field(str) dt = Field(datetime.datetime) status = Field(str) ~~~ 描述字段中,str 最大長度的例子; ~~~ name = Field(str, max_length=8096) ~~~ ### 在庫里面建立表[?](http://uliweb.clkg.org/tutorial/view_chapter/189#title_0-0-3) ~~~ db.metadata.create_all() ~~~ ### 新加一條記錄[?](http://uliweb.clkg.org/tutorial/view_chapter/189#title_0-0-4) ~~~ n = test() n.testname="jeapedu" n.status="0" n.save() ~~~ ### 更改一條記錄[?](http://uliweb.clkg.org/tutorial/view_chapter/189#title_0-0-5) ~~~ n = test.get(test.c.status=="0") n.update(status="1") n.save() ~~~ ### 讀取所有內容[?](http://uliweb.clkg.org/tutorial/view_chapter/189#title_0-0-6) ~~~ test.all() ~~~ 參考網址:?[https://github.com/limodou/uliweb/blob/master/test/test_orm.py](https://github.com/limodou/uliweb/blob/master/test/test_orm.py) 文檔地址:?[http://limodou.github.io/uliweb-doc/zh_CN/orm.html](http://limodou.github.io/uliweb-doc/zh_CN/orm.html)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看