[Trellis-developers] new database abstraction class

James M. Carlos james at learning.net
Tue Apr 15 10:48:31 PDT 2008


These are great updates!
So to summarize the query methods to be used with the new db class:
select
select_row
select_rows
select_column
select_field
affect
count
exists

Are there any that I may have overlooked?

James Carlos
The Learning Network
www.learning.net
510.764.1796
james at learning.net



Shaddy Zeineddine wrote:
> New features:
>
> improved efficiency: removed anything that wasn't necessary and made use
> of mysqli class for very simple and clean code
>
> load balancing support: very simple support for load balancing reads
> while keeping all writes on a single database. requires that the
> username/passwords and database names be identical across hosts. read
> host is randomly selected per execution.
>
> prepared statements: through mysqli
>
> transactions: through mysqli
>
> improved select_column: automatically decides whether to create an
> associative array based on the number of columns selected
>
>
> changes from SteamDB:
>
> query no longer exists
>
> for selects that were previously done with query, use select_rows instead
>
> for inserts, updates, and deletes, use affect
>
> this was done to eliminate processing required to identify the query type
>
> step_select is now just select
>
> select_column no longer has the second argument, if you select one
> column, select_column will create a basic array of that column, if you
> select two columns, it will create an associative array using the first
> column as the key.
>
> last_query no longer exists
>
> all other changes will not affect current code.
>
>
> what needs to be done in order to use TrellisDB...
>
> -change all query methods to either select_rows or affect
> -change all step_select methods to select
> -remove second argument from select_column (still works with it)
>
>
> since there i expect there to be some significant performance
> improvements in high load environments (maybe a 5-10% reduction in
> loading time), i would like to start using it as soon as possible. i
> think it is reasonable to implement it in 0.5.1. Transactions will be
> postponed until 0.6.0 because they will require InnoDB tables. This
> requirement will mean that all write hosts must use all InnoDB tables.
> We currently use a mix of InnoDB and MyISAM tables. However in version
> 0.6.0, InnoDB tables will be standard. MyISAM and Memory tables will be
> used only on dedicated read hosts for maximum performance. (MyISAM is
> only beneficial in FULL TEXT searching, Memory can only be used if
> tables do not have any TEXT/BLOB columns). Prepared statements can be
> used right away, but should be reserved for repetitive queries. This
> includes queries found in some events and actions.
>
> _______________________________________________
> Trellis-developers mailing list
> Trellis-developers at trellis.learning.net
> http://trellis.learning.net/mailman/listinfo/trellis-developers
>   


More information about the Trellis-developers mailing list