Watch, Follow, &
Connect with Us
Public Report
Report From: InterBase/Server/Internal/DSQL    [ Add a report in this area ]  
Report #:  47437   Status: Open
Allow Domains to be used in Params for SP's & Triggers
Project:  InterBase Build #:  162
Version:    8.0 Submitted By:   Loren Szendre
Report Type:  Suggestion / Enhancement Request Date Reported:  6/12/2007 2:21:58 PM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    Not OS or platform specific Internal Tracking #:   261555
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: 16
Description
There was recently a discusion on the public ng about this issue.

I argued for param declarations in SP's as follows:

PARAM_NAME TypeOf(ADOMAIN)

Because IB until recently had native Boolean type, MANY developers still have DB's in IB versions that do have a Boolean data type, that use Char(1) 1/0 or Y/N, most often encapsulated in a domain with a NOT NULL constraint, a check constraint and a default. Likewise there is no built-in currency domain. I have standardized on NUMERIC(18,4) lately. Neither my Bool nor my Money domain is likely to change in this century.

It would be real handy to be able to declare params such as:

PARAM1 BOOL
PARAM2 MONEY

You could also support:

PARAM1 TypeOf(BOOL)
PARAM2 TypeOf(MONEY)

The issue comes up of having to enforce the constraints of the domains. This is not necessary! (it could come later, perhaps).

If you declared to the world that using domains in sp and trig params was automatically a "TypeOf" usage, users would not have to type "TypeOf", saving time and simplifying syntax.

Implementing it this way removes all the complexity of worrying about the domains other features, and makes it basically just an alias for the underlying type, making it relatively easy to implement.
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01