Difference between revisions of "Gambas/libraries/gb.db"
m (Woozle moved page gb.db to Gambas/libraries/gb.db: reorganizing) |
(reorganizing as subpages) |
||
Line 1: | Line 1: | ||
− | == | + | ==About== |
− | + | {{l/same|gb.db}} is a [[Gambas]] [[library (programming)|library]] which provides a [[database]] [[abstraction layer]]. It currently supports the following database [[backend]]s: | |
− | |||
− | |||
* [[PostgreSQL]] | * [[PostgreSQL]] | ||
* [[MySQL]] | * [[MySQL]] | ||
Line 9: | Line 7: | ||
Both PostgreSQL and MySql are [[client/server]] databases, which means that the connection is made to a [[server process]]. | 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 | + | 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 {{l/sub|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: | 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: | ||
Line 17: | Line 15: | ||
* You don't use the Exec method (which lets you send SQL request directly to the [[backend]], bypassing the [[abstraction layer]]) | * You don't use the Exec method (which lets you send SQL request directly to the [[backend]], bypassing the [[abstraction layer]]) | ||
==Classes== | ==Classes== | ||
− | * | + | * {{l/sub|Connection}} |
− | * | + | * {{l/sub|DB}} |
− | * | + | * {{l/sub|Database}} |
− | * | + | * {{l/sub|Field}} |
− | * | + | * {{l/sub|Index}} |
− | * | + | * {{l/sub|Result}} |
− | * | + | * {{l/sub|ResultField}} |
− | * | + | * {{l/sub|Table}} |
− | * | + | * {{l/sub|User}} |
===Virtual Classes=== | ===Virtual Classes=== | ||
− | * | + | * {{l/sub|.ConnectionDatabases}} |
− | * | + | * {{l/sub|.ConnectionTables}} |
− | * | + | * {{l/sub|.ConnectionUsers}} |
Latest revision as of 20:15, 24 April 2013
About
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 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)