www.国产视频,一级看片免费视频囗交动图,波多野结衣高清无码中文456,中国一级特黄特级毛片,69mmWWW路cOm,天天摸夜夜摸黄片,aaaaaaaaa在线观看

Pysqlite Windows下載 最新軟件|熱門(mén)排行|軟件分類|軟件專題|廠商大全

您的位置: 首頁(yè)編程開(kāi)發(fā)數(shù)據(jù)庫(kù)類 → Pysqlite(嵌入式數(shù)據(jù)庫(kù)python api 接口) v2.6.3 官方版

Pysqlite(嵌入式數(shù)據(jù)庫(kù)python api 接口)

v2.6.3 官方版 Pysqlite(嵌入式數(shù)據(jù)庫(kù)python api 接口) 網(wǎng)友評(píng)分:8
  • 軟件大?。?span>472KB
  • 軟件語(yǔ)言:中文
  • 軟件類型:國(guó)產(chǎn)軟件
  • 軟件類別:免費(fèi)軟件 / 數(shù)據(jù)庫(kù)類
  • 更新時(shí)間:2017-06-30 14:22
  • 運(yùn)行環(huán)境:WinAll, WinXP, Win7, Win8, Win10
  • 軟件等級(jí):4級(jí)
  • 軟件廠商:
  • 官方網(wǎng)站:暫無(wú)
好評(píng):50%頂一個(gè)
壞評(píng):50踩一個(gè)

同類相關(guān)軟件

軟件介紹

Pysqlite Windows是一款專為windows用戶打造的api接口,旨在更好的幫助 sqlite 操作者工作,需要的朋友趕緊來(lái)綠色資源網(wǎng)下載吧

Pysqlite Windows版簡(jiǎn)介

pysqlite是一個(gè)sqlite 為 python 提供的 api 接口,它讓一切對(duì)于 sqlite 的操作都變得異常簡(jiǎn)單。

sqlite,它是一個(gè)嵌入式數(shù)據(jù)庫(kù),沒(méi)有服務(wù)器的概念,windows版的就是一個(gè)exe,自己把它放到一個(gè)合適的目錄里,然后把這個(gè)目錄加入系統(tǒng)的path變量.

Pysqlite使用說(shuō)明

在數(shù)據(jù)庫(kù)建立中Windows與Linux也有不同

XP版本:sqlite3.exe test.db

Linux版本:./sqlite3.bin test.db

目前針對(duì)不同的python版本,pysqlite有3個(gè)版本:2.5和2.6 、2.7,請(qǐng)根據(jù)自己的python版本選用.

3.然后就可以打開(kāi)自己喜歡的編輯器,寫(xiě)一段測(cè)試代碼了.

4.中文處理要注意的是sqlite默認(rèn)以u(píng)tf-8編碼存儲(chǔ).

5.另外要注意sqlite僅支持文件鎖,換句話說(shuō),它對(duì)并發(fā)的處理并不好,不推薦在網(wǎng)絡(luò)環(huán)境使用,適合單機(jī)環(huán)境;

import pysqlite2.dbapi2 as sqlite

def runTest():

cx = sqlite.connect('test.db')

cu = cx.cursor()

#create

cu.execute('''create table catalog(

id integer primary key,

pid integer,

name varchar(10) unique

)''')

#insert

cu.execute('insert into catalog values(0,0,"張小山")')

cu.execute('insert into catalog values(1,0,"hello")')

cx.commit()

#select

cu.execute('select * from catalog')

print '1:',

print cu.rowcount

rs = cu.fetchmany(1)

print '2:',

print rs

rs = cu.fetchall()

print '3:',

print rs

#delete

cu.execute('delete from catalog where id = 1 ')

cx.commit()

cu.execute('select * from catalog')

rs = cu.fetchall()

print '4:',

print rs

#select count

cu.execute("select count(*) from catalog")

rs = cu.fetchone()

print '5:',

print rs

cu.execute("select * from catalog")

cu.execute('drop table catalog')

if __name__ == '__main__':

runTest()

數(shù)據(jù)庫(kù)操作

Python的數(shù)據(jù)庫(kù)模塊都有統(tǒng)一的接口標(biāo)準(zhǔn),所以數(shù)據(jù)庫(kù)操作都基本上是統(tǒng)一的,基本上分成以下幾步(假設(shè)數(shù)據(jù)庫(kù)模塊為db):

用db.connect()創(chuàng)建數(shù)據(jù)庫(kù)連接,連接對(duì)象為conn。

如果不需要返回查詢結(jié)果,就直接調(diào)用conn.execute()。

如果需要返回查詢結(jié)果,則需要首先通過(guò)conn.cursor()創(chuàng)建游標(biāo)對(duì)象cur,并使用cur.fetchone()等函數(shù)獲取查詢結(jié)果。

根據(jù)數(shù)據(jù)庫(kù)隔離級(jí)別的不同,修改數(shù)據(jù)庫(kù)后,可能需要使用conn.commit()手動(dòng)提交事務(wù)。

調(diào)用相應(yīng)的close()方法關(guān)閉cur及conn。

軟件截圖

下載地址 電腦版

用戶評(píng)論

熱門(mén)評(píng)論

最新評(píng)論

發(fā)表評(píng)論 查看所有評(píng)論(0)

昵稱:
請(qǐng)不要評(píng)論無(wú)意義或臟話,我們所有評(píng)論會(huì)有人工審核.
字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過(guò)審核才能顯示)