星期三, 9月 03, 2008

Pix_Db 與 Pix_ORM

整理一下,找機會 open source 出來。這兩個 class 都是 PHP5 的 class,儘量使用 PHP5 的語言特性以及 interface,讓使用的人更方便使用。

Pix_Db 主要的特性包括:
  1. JSON 檔為設定檔。(這點在考慮改寫)
  2. 以 PDO MySQL 為底層,只打算支援 MySQL。
  3. 比其他 Database Wrapper 方便的操作方式,像是 $dbh->query('DELETE FROM comment WHERE blogid = ?, articleid = ?', $id, $article);,而非 array($id, $article)
  4. 多台 Slave 時的 Round-Robin 以及 failover。
  5. Master/Slave 架構時,如果判斷 SQL query 有寫入動作,使用 Master 連線。
  6. 解決單一 handler 配合 transaction 互相干擾的問題。
  7. 同樣帳號密碼的連線能夠重複使用。
  8. 只有一個檔案。
  9. 目前只有 293 行。
Pix_ORM 是一套 ORM framework,但與目前的 ORM framework 不同的地方在於:
  1. 架構在 Pix_Db 上。
  2. 不需要指定 columns,也不會到資料庫裡查 table metadata。
  3. 僅需要指定 primary key。
  4. 支援 has_one 與 has_many,目前沒打算支援 have_many (many-to-many),因為可以用前兩者配合出來。
  5. 可以自己寫 aliases 做到更特殊的效果。
  6. 目前只有 510 行。
目前還在研究要用什麼 license,以及程序問題...

1 則留言:

kaijanadig 提到...

The free on line casino video slots offerings are ideal for|are good for} all ages and for any capability degree. If you need the best odds if you play the slots, choose the slot machines in high-traffic, seen areas, since those machines have extra frequent payouts. Always bet the maximum quantity have the ability to|you probably can}, and purpose for the highest returns possible through the use of larger denominations. For probably the https://casino.edu.kg/yesbet88.html most frequent payouts, attempt to choose machines with the smallest jackpots.