[fpc-pascal] Re: FCL-DB/SQLDB docs started
Adrian Maier
adrian.maier at gmail.com
Tue Dec 4 09:41:53 CET 2007
On Dec 3, 2007 2:07 PM, Leonardo M. Ramé <martinrame at yahoo.com> wrote:
> I like the idea, can you start by creating the section's skeleton?
Here is a possible structure of the page. I'm not familiar yet to
working with this
lufdoc , that's why i'm putting the skeleton here on the mailing list
for the moment.
Sqldb guide
1. Introduction
- what is FCL-db
- what is Sqldb ; the supported databases
- the current document concentrates on the sql databases
2. Concepts
- the diagram shown here
http://wiki.lazarus.freepascal.org/SQLdb_Programming_Reference
- explanations about each of the classes
3. Connecting to a database
- how to instatiate a TsqlConnection for each of the supported databases
- checking that the connection succeeded
- closing the connection
- frequently used methods of the TSqlConnection class
- maybe : link to another doc "Setting up the database for the sqldb
guide examples" , so that
the specific instructions for creating the db doesn't clutter this guide
4. Transactions
- how to instantiate a TsqlTransaction and "link" it to the connection object
- frequently used methods of the TSqlTransaction class :
StartTransaction, Commit, CommitRetaining, Rollback.
5. Executing SQL commands
5.1 The TSqlQuery class
- how to instante and "link" the query to the transaction and connection.
- frequently used methods
5.2 Executing simple sql queries (which don't return tuples)
- cfilltable.pp
5.3 Executing a sql query and traversing the records
- example for accessing the fields by name - dshowtable.pp
- example for accessing the fields by position
- using filters - gfiltertable.pp
5.4 Editing the records
- fedittable.pp
5.5 Queries with parameters
- efilltableparams.pp
5.6 Executing sql commands with connection.ExecuteDirect
- example for using ExecuteDirect - bcreatetable.pp
- advantages/disavantages compared to using a TSqlQUery
5.7 Other stuff
- getting the list of tables - alisttables.pp
- other functionality that i'm not aware of
6. Developing FCL-DB and SqlDb
6.1 Structure of the FCL-DB directory in the FPC sources
6.2 Implementing a new kind of TSqlConnection
7. Resources
- links to the reference pages of the classes used
- links to tutorials, wiki pages, etc.
--
Adrian Maier
More information about the fpc-pascal
mailing list