Re: [fpc-pascal] Database Metadata proposal

2014-06-03 Thread Daniel Gaspary
On Tue, Jun 3, 2014 at 2:46 AM, LacaK la...@zoznam.sk wrote: TSQLConnection.GetTableNames(List: TStrings; SchemaName : String; Options : TSchemaOptions); Which IMO fits better in existing frame. Using this method, to take all tables, from all schemas, the user would need to run multiples

Re: [fpc-pascal] Database Metadata proposal

2014-06-02 Thread LacaK
Hi Daniel, If I understand correctly, when you will use new GetObjectNames then you must itterate throught returned collection to obtain schema names + object names (f.e. table names). IMO very similar result you can get also with existing implementation, when you use: with SQLQuery1 do

Re: [fpc-pascal] Database Metadata proposal

2014-06-02 Thread Daniel Gaspary
On Mon, Jun 2, 2014 at 3:01 AM, LacaK la...@zoznam.sk wrote: IMO very similar result you can get also with existing implementation, when you use: Yes, this is the way GetDBInfo do, but it's not public, and never return schema. What I did was to copy and modify this method. I have sent a patch:

Re: [fpc-pascal] Database Metadata proposal

2014-06-02 Thread LacaK
Daniel Gaspary wrote / napísal(a): On Mon, Jun 2, 2014 at 3:01 AM, LacaK la...@zoznam.sk wrote: IMO very similar result you can get also with existing implementation, when you use: Yes, this is the way GetDBInfo do, but it's not public, and never return schema. Code which I have

Re: [fpc-pascal] Database Metadata proposal

2014-06-02 Thread Michael Van Canneyt
On Mon, 2 Jun 2014, LacaK wrote: Daniel Gaspary  wrote / napísal(a): On Mon, Jun 2, 2014 at 3:01 AM, LacaK la...@zoznam.sk wrote: IMO very similar result you can get also with existing implementation, when you use: Yes, this is the way GetDBInfo do, but it's not public, and never return

Re: [fpc-pascal] Database Metadata proposal

2014-06-02 Thread Daniel Gaspary
On Mon, Jun 2, 2014 at 10:27 AM, LacaK la...@zoznam.sk wrote: (for SQLConnection which support schemas. I have used public method SetSchemaInfo not GetDBInfo) It's not public in SqlConnection, it's public in SqlQuery. Anyway, I don't see why avoid a dedicated method to do this instead of 3

Re: [fpc-pascal] Database Metadata proposal

2014-06-02 Thread Daniel Gaspary
On Mon, Jun 2, 2014 at 10:38 AM, Michael Van Canneyt mich...@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

Re: [fpc-pascal] Database Metadata proposal

2014-06-02 Thread LacaK
Michael Van Canneyt wrote / napísal(a): On Mon, 2 Jun 2014, LacaK wrote: Daniel Gaspary wrote / napísal(a): On Mon, Jun 2, 2014 at 3:01 AM, LacaK la...@zoznam.sk wrote: IMO very similar result you can get also with existing implementation, when you use: Yes, this is the way

Re: [fpc-pascal] Database Metadata proposal

2014-06-01 Thread Michael Van Canneyt
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

Re: [fpc-pascal] Database Metadata proposal

2014-06-01 Thread Daniel Gaspary
On Sun, Jun 1, 2014 at 5:27 AM, Michael Van Canneyt mich...@freepascal.org wrote: Make this a TCollection/TCollectionItem. Generics are not used in the DB units, and they should not be used for consistency. But I was thinking that TSqlObjectIdenfier could be reused at Data Dictionary Units. As

Re: [fpc-pascal] Database Metadata proposal

2014-06-01 Thread Michael Van Canneyt
On Sun, 1 Jun 2014, Daniel Gaspary wrote: On Sun, Jun 1, 2014 at 5:27 AM, Michael Van Canneyt mich...@freepascal.org wrote: Make this a TCollection/TCollectionItem. Generics are not used in the DB units, and they should not be used for consistency. But I was thinking that

Re: [fpc-pascal] Database Metadata proposal

2014-06-01 Thread silvioprog
2014-06-01 11:18 GMT-03:00 Michael Van Canneyt mich...@freepascal.org: On Sun, 1 Jun 2014, Daniel Gaspary wrote: On Sun, Jun 1, 2014 at 5:27 AM, Michael Van Canneyt mich...@freepascal.org wrote: Make this a TCollection/TCollectionItem. Generics are not used in the DB units, and they should

Re: [fpc-pascal] Database Metadata proposal

2014-06-01 Thread Daniel Gaspary
On Sun, Jun 1, 2014 at 11:18 AM, Michael Van Canneyt mich...@freepascal.org wrote: But I was thinking that TSqlObjectIdenfier could be reused at Data Dictionary Units. As a TCollectionItem could be harder to reuse, as it will depend of the existence of a TCollection. I don't understand what

Re: [fpc-pascal] Database Metadata proposal

2014-06-01 Thread Daniel Gaspary
An Issue was created with the patch: http://bugs.freepascal.org/view.php?id=26254 On Sun, Jun 1, 2014 at 11:28 AM, Daniel Gaspary dgasp...@gmail.com wrote: I see no problem. It was just a wrong impression that I had about TCollectionItem. ___

[fpc-pascal] Database Metadata proposal

2014-05-31 Thread Daniel Gaspary
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