Difference between revisions of "Gambas/libraries/gb.db"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
 
(reorganizing as subpages)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Navigation==
+
==About==
[[computing]]: [[software]]: [[programming]]: [[Gambas]]: [[gb.db]]
+
{{l/same|gb.db}} is a [[Gambas]] [[library (programming)|library]] which provides a [[database]] [[abstraction layer]]. It currently supports the following database [[backend]]s:
==Overview==
 
[[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 [[gb.db.Connection]] class for more information.  
+
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==
* [[Connection (gb.db)|Connection]]
+
* {{l/sub|Connection}}
* [[DB (gb.db)|DB]]
+
* {{l/sub|DB}}
* [[Database (gb.db)|Database]]
+
* {{l/sub|Database}}
* [[Field (gb.db)|Field]]
+
* {{l/sub|Field}}
* [[Index (gb.db)|Index]]
+
* {{l/sub|Index}}
* [[Result (gb.db)|Result]]
+
* {{l/sub|Result}}
* [[ResultField (gb.db)|ResultField]]
+
* {{l/sub|ResultField}}
* [[Table (gb.db)|Table]]
+
* {{l/sub|Table}}
* [[User (gb.db)|User]]
+
* {{l/sub|User}}
 +
===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)

Classes

Virtual Classes