[fpc-pascal] Database Metadata proposal
Daniel Gaspary
dgaspary at gmail.com
Mon Jun 2 15:44:40 CEST 2014
On Mon, Jun 2, 2014 at 10:38 AM, Michael Van Canneyt
<michael at freepascal.org> wrote:
> While this is correct, the collection approach is much easier to use:
> With the metadataset, you must know which fields exist and type them
> correctly: FieldByName('XYZ').AsString
>
> With collections, the IDE codetools will tell you what properties exist.
> That is a order of magnitude more comfortable and less error prone.
Correct. And beyond the method, I have created the following const array:
TSchemaObjectNames: array[TSchemaType] of String = ('???', 'table_name',
'???', 'procedure_name', 'column_name', 'param_name',
'index_name', 'package_name', 'schema_name');
To avoid this need for retyping field names, over and over.
More information about the fpc-pascal
mailing list