⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isam0001.tst

📁 B树算法实现
💻 TST
📖 第 1 页 / 共 4 页
字号:
#### Read the value of the index 0001key0 of the current record##get 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key4#### Find the first record who's index 0001dup1 value is alphabetically## equal to 'keya'##find 1 keya FI# pblIsamFind( FI, keya, 4 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key4#### Find any record who's index 0001dup1 value is alphabetically## equal to 'keya'##find 1 keya EQ# pblIsamFind( EQ, keya, 4 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key4find 1 notfound EQ# pblIsamFind( EQ, notfound, 8 )# rc -1, pbl_errno 1003, errno 0#### Find the last record who's index 0001dup1 value is alphabetically## equal to 'keya'##find 1 keya LA# pblIsamFind( LA, keya, 4 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key8#### Find a record who's index 0001dup1 value is alphabetically equal to 'keya'## or who's index 0001dup1 value is the smallest value that is alphabetically## bigger than 'keya'##find 1 keya GE# pblIsamFind( GE, keya, 4 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key8#### Find a record who's index 0001dup1 value is the smallest value## that is alphabetically bigger than 'keya'## Reports an error because 'keya' is the biggest value in index 0001dup1##find 1 keya GT# pblIsamFind( GT, keya, 4 )# rc -1, pbl_errno 1003, errno 0#### Read alphabetically last record according to index 0001key0## this sets the current record##get 0 LAST# pblIsamGet( 5, 0 )# keylen 5, key long4#### loop backward according to index 0001key0##get 0 PREV# pblIsamGet( 3, 0 )# keylen 5, key long3get 0 PREV# pblIsamGet( 3, 0 )# keylen 5, key long2get 0 PREV# pblIsamGet( 3, 0 )# keylen 5, key long1get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key keybget 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key keyaget 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key9get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key8get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key7get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key6get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key5get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key4get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key3get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key2get 0 PREV# pblIsamGet( 3, 0 )# keylen 4, key key1get 0 PREV# pblIsamGet( 3, 0 )# rc -1, pbl_errno 1003, errno 0get 0 PREV# pblIsamGet( 3, 0 )# rc -1, pbl_errno 1003, errno 0#### Loop forwards through the file according to index 0001dup1## Read alphabetically first record according to index 0001dup1## this sets the current record##get 1 FIRST# pblIsamGet( 4, 1 )# keylen 3, key key#### Get the index 0001key0 value of the current record## get 0 THIS# pblIsamGet( 1, 0 )# keylen 5, key long1#### ## Read alphabetically next record according to index 0001dup1## this sets the current record##get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key key#### Get the index 0001key0 value of the current record##get 0 THIS# pblIsamGet( 1, 0 )# keylen 5, key long2get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 5, key long3get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 5, key long4get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key1get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key2get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key3get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key9get 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key keyaget 1 NEXT# pblIsamGet( 2, 1 )# keylen 3, key keyget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key keybget 1 NEXT# pblIsamGet( 2, 1 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key4get 1 NEXT# pblIsamGet( 2, 1 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key5get 1 NEXT# pblIsamGet( 2, 1 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key6get 1 NEXT# pblIsamGet( 2, 1 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key7get 1 NEXT# pblIsamGet( 2, 1 )# keylen 4, key keyaget 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key8get 1 NEXT# pblIsamGet( 2, 1 )# rc -1, pbl_errno 1003, errno 0get 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key8get 1 NEXT# pblIsamGet( 2, 1 )# rc -1, pbl_errno 1003, errno 0get 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key8get 1 NEXT# pblIsamGet( 2, 1 )# rc -1, pbl_errno 1003, errno 0get 0 THIS# pblIsamGet( 1, 0 )# keylen 4, key key8#### Read alphabetically last record according to index 0001key0## this sets the current record##get 0 LAST# pblIsamGet( 5, 0 )# keylen 5, key long4#### Read alphabetically first record according to index 0001key0## this sets the current record##get 0 FIRST# pblIsamGet( 4, 0 )# keylen 4, key key1#### Start a transaction##transaction START# pblIsamStartTransaction( )# rc 0#### Delete 1000 records, reports an error after 15 records are deleted##ndelete 1000# pblIsamDelete( 1000 records )# i 15, rc -1, pbl_errno 1041, errno 0#### Read alphabetically last record according to index 0001key0## There is no such record##get 0 LAST# pblIsamGet( 5, 0 )# rc -1, pbl_errno 1003, errno 0#### Read alphabetically first record according to index 0001key0## There is no such record##get 0 FIRST# pblIsamGet( 4, 0 )# rc -1, pbl_errno 1003, errno 0#### Rollback the transaction, do not commit the deletes done above##transaction ROLLBACK# pblIsamCommit( ROLLBACK )# rc 1, pbl_errno 0, errno 0#### Read alphabetically last record according to index 0001key0## this sets the current record##get 0 LAST# pblIsamGet( 5, 0 )# keylen 5, key long4#### Read alphabetically first record according to index 0001key0## this sets the current record##get 0 FIRST# pblIsamGet( 4, 0 )# keylen 4, key key1#### Start a transaction##transaction START# pblIsamStartTransaction( )# rc 0#### Delete all records##ndelete 1000# pblIsamDelete( 1000 records )# i 15, rc -1, pbl_errno 1041, errno 0#### Read alphabetically last record according to index 0001key0## There is no such record##get 0 LAST# pblIsamGet( 5, 0 )# rc -1, pbl_errno 1003, errno 0#### Read alphabetically first record according to index 0001key0## There is no such record##get 0 FIRST# pblIsamGet( 4, 0 )# rc -1, pbl_errno 1003, errno 0#### Commit the transaction, make the deletes permanent##transaction COMMIT# pblIsamCommit( COMMIT )# rc 0#### Read alphabetically last record according to index 0001key0## There is no such record##get 0 LAST# pblIsamGet( 5, 0 )# rc -1, pbl_errno 1003, errno 0#### Read alphabetically first record according to index 0001key0## There is no such record

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -