[development] Extend database abstraction layer,
to includetablecreation.
Khalid B
kb at 2bits.com
Sun May 14 16:59:23 UTC 2006
> > If we realize that we can no longer optimize for a specific engine
> > without losing
> > portability,
>
> What's wrong with doing :
>
> db_create_table('blah' // etc.
>
> if ($globals['db_type'] == 'type') {
> // optimise the table for that db type.
> }
>
> It's still a lot less code than duplicating every single line of
> every single schema
> for every single db type.
>
> When we look at our usage patterns up to now, that ends up being the
> exception and not the rule.
Nothing wrong with that. And that enforces my point that there is no
practical absolute abstraction.
If a PostgreSQL guy writes this and does not bother with writing a MySQL
part, then that piece of code is now PostgreSQL specific and no longer
abstracted.
As I said, nothing wrong with that AS LONG AS WE REALIZE that by
allowing this, we wander off into engine specific code again ...
More information about the development
mailing list