[fpc-pascal] Database Metadata proposal

Michael Van Canneyt michael at freepascal.org
Sun Jun 1 10:27:42 CEST 2014



On Sat, 31 May 2014, Daniel Gaspary wrote:

> Hi.
>
>   In December 2012, this[1] thread has brought some ideas about
> Database metadata, in special the retrieving of Schema names.
>
>   This[2] wiki page summarizes what was discussed.  Some further
> conclusion after that thread?
>
>   I agree that using Information schema, wherever is supported, is
> the best solution.
>
>   I propose the following types and methods:
>
>    TSqlObjectIdenfier = class
>    public
>          property SchemaName: String;
>          property ObjectName: String;
>
>          //Optional / Reuse TSchemaType?
>          property SqlObjectType: TSqlObjectType;
>    end;
>
>    TSqlObjectList = specialize TFPGList<TSqlObjectIdenfier>;

Make this a TCollection/TCollectionItem. 
Generics are not used in the DB units, and they should not be used for consistency.

Michael.



More information about the fpc-pascal mailing list