[PHPLIB-DEV] Common DB interface From: Kirill Maximov (kir <email protected>)
Date: 04/05/00

Hi,

  Probably, this question was discussed some time ago, but
  I didn't find any references about it (probably, i was too lazy
  to dig very deep). The question is:

  Why there is no base "abstract" DB_Sql class in PHPLIB ?

  There are a number of operations which are implementation-
  independent. For instance, such functions as halt(), p(), f(),
  link_id(), query_id(), aliases np(), nf(),
  (probably) constructor. The code of such functions is the same
  for the most of the implementation classes.

  Moreover, existance of such a class
  could ease adding more methods, such as begin_transaction()/
  end_transaction(), which will be empty in default implementation
  but make real sense in real db's with transactions.

  Base DB_Sql class could be a good description of DB_Sql class
  interface to be redefined in concrete implementation classes.

  And, such a class will ease understanding and
  maintainability of the code, won't it ?

  If the answer to my question is "No, it will slow things"
  I'd appreciate to get information about benchmarks ...

  With best regards,
  KIR

-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.