Difference between revisions of "Gambas/libraries/gb.db"
(→Classes: virtual classes) |
|||
Line 26: | Line 26: | ||
* [[Table (gb.db)|Table]] | * [[Table (gb.db)|Table]] | ||
* [[User (gb.db)|User]] | * [[User (gb.db)|User]] | ||
+ | ===Virtual Classes=== | ||
+ | * [[.ConnectionDatabases (gb.db)|.ConnectionDatabases]] | ||
+ | * [[.ConnectionTables (gb.db)|.ConnectionTables]] | ||
+ | * [[.ConnectionUsers (gb.db)|.ConnectionUsers]] |
Revision as of 16:32, 5 December 2006
computing: software: programming: Gambas: gb.db
Overview
gb.db is a Gambas library which provides a database abstraction layer. It currently supports the following database backends:
Both PostgreSQL and MySql are client/server databases, which means that the connection is made to a server process.
SQLite is more like a library which provides relational database services within the same process, so there is no server process to connect to. This means that the user may need to include a fully qualified path to the database file if the default is not satisfactory. See the gb.db.Connection class for more information.
This component creates an intermediate layer between the specific server and your program, so that in theory you can use exactly the same code whatever database backend you decide to use. However, there may be variations between engines unless all of the following conditions are met:
- You create your database by using the Gambas Database Manager or within Gambas code via gb.db
- You use the Find, Create and Edit methods
- Use the substitution feature of these methods rather than including parameter values directly within the SQL code
- You don't use the Exec method (which lets you send SQL request directly to the backend, bypassing the abstraction layer)