From: Milan B. <mil...@gm...> - 2010-10-23 16:15:53
|
On Sat, Oct 23, 2010 at 5:57 PM, Michael Hieke <mg...@gm...> wrote: > I don't think that > all the RDB$XXX domains should be nodes in the "Domains" subtree. I Agree. In fact, I think none of those should be there. > And there are so many differences between these three kinds of domains > (user, system and automatic) that they should probably go into three > different collections. Should we finally bite the bullet and create a > system domain collection class? As long as I'm not biting that bullet by doing the coding, I have nothing against it. ;) > As I understand it the system domain collection would be similar to the > system table collection (optionally shown in the tree) while the > collection of automatic domains would be an internal one. Both would be > SysDomains, right? I'm not sure. Why would anyone want to see those system domains like RDB$SYSTEM_FLAG? They are internal, undocumented feature of Firebird system tables and user's probably should not use them for columns of user tables anyway because it is not guaranteed to be compatible with future versions of FB. Here's MHO how it should work. Definitions: 1. UDD (user defined domain) - explicitly defined using CREATE DOMAIN 2. SD (system domain) - RDB$ domain with a name, not a number after RDB$, say RDB$SYSTEM_FLAG 3. AD (automatic domain) - assigned for user tables when column is created without explicit domain RDB$123 - only UDD should be listed in tree and shown in FieldPropertiesDialog - when both domain and datatype is shown for column in tree or property page, we should show UDD and SD if available - when extracting DDL, the priority should be: UDD, SD, datatype string, AD In this last case AD is shown if datatype is not detected. Shouldn't ever happen unless system tables are modified directly. Now, I don't see any of these requires that we have 3 collections. I see only a need for two, one containing UDDs and other containing SDs and ADs. Difference between SD and AD is only observed for a particular domain, never as a collection. All IMHO, of course. -- Milan Babuskov http://www.flamerobin.org |