kyototycoon get_bulk 複数レコードを処理する。

[http://fallabs.com/kyototycoon/spex.html]

/rpc/get_bulk
Retrieve records at once.
input: DB: (optional): the database identifier.
input: atomic: (optional): to perform all operations atomically. If it is omitted, non-atomic operations are performed.
input: (optional): arbitrary keys which trail “_”.
output: num: the number of retrieved reocrds.
output: (optional): arbitrary keys which trail the character “_”.
status code: 200.

配列を渡すようにget_bulk。

public function get_bulk($keys,$db=null){
   $api = $this->baseUrl;
   if( is_array($keys) ){
     $api .= ‘get_bulk';
     foreach($keys as $k){
       $params['_'.$k] = ”;
     }
   }else{
     return false;
   }
   if($db) $params['DB']=$db;
   return $this->post($api, $params);
 }

set_bulk, remove_bulkも同じ感じで。

This entry was posted on 火曜日, 7月 17th, 2012 at 4:52 PM and is filed under Kyototycoon/cabinet. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。