Date: 03/15/01
- Next message: Kristian Köhntopp: "[phplib] [Fwd: phplib & informix]"
- Previous message: Bogdan Morar: "Re: [phplib] page with no data"
- Next in thread: Kristian Köhntopp: "Re: [phplib] DB_Sql::nextid() questions"
- Reply: Kristian Köhntopp: "Re: [phplib] DB_Sql::nextid() questions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Philip Strnad wrote:
> Since you're using Postgres you don't need the db_sequence table.
> However, since db_sql is supposed to be a portable database abstraction
> class it uses the db_sequence table (MySQL doesn't support sequences in
> the way that Oracle or Postgres do...although I don't know if Oracle and
> Postgres sequences are comparable).
>
> So, if you're not planning on changing your RDBMS anytime soon then you
> can override the nextid() method to do what you want it to do.
I can certainly do that (which I probably will), but I'm curious as to why pg_sql.inc was written to support that table. Since all that really matters in OOP with child classes is that the interface and returned data are the same (read as: each method is a black box as long they all look the same (across the all related children) and return the same data), why wasn't nextid() written to use nextval rather than the table? Let db_mysql.inc use that, while db_pgsql.inc, db_oracle.inc, etc use whatever is appropriate for the given DBMS. My $0.02, for what that's worth...
-- Jason Lee | Konqueror was developed as a counterpunch to sawfish? Programmer | I guess cars were developed in response to tapioca. -- dinotrac--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Kristian Köhntopp: "[phplib] [Fwd: phplib & informix]"
- Previous message: Bogdan Morar: "Re: [phplib] page with no data"
- Next in thread: Kristian Köhntopp: "Re: [phplib] DB_Sql::nextid() questions"
- Reply: Kristian Köhntopp: "Re: [phplib] DB_Sql::nextid() questions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

