Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: C#Builder/ECO/Core    [ Add a report in this area ]  
Report #:  29172   Status: Closed
Map ECO functions to DB function
Project:  C#Builder Build #:  10.0.2288.4245
Version:    10.0 Submitted By:   Dmitriy Nagirnyak
Report Type:  New Feature Request Date Reported:  5/16/2006 11:20:14 PM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   240189
Resolution: Won't Do (Resolution Comments) Resolved in Build: : 11.0.2383.32668
Duplicate of:  None
Voting and Rating
Overall Rating: (1 Total Rating)
5.00 out of 5
Total Votes: 2
It would be one of the greatest features if ECO allow mapping not only Classes to Tables but also ECO functions to DB functions.
Steps to Reproduce:

Boris Petukhov at 5/17/2006 12:18:47 AM -
It would be a very useful feature. I can see how we'll have to duplicate our funciton implementations in a DB and ECO.

Boris Petukhov at 5/17/2006 1:41:53 AM -
OK, let me give you a few examples of a potential usage of this feature:

1. Say I have an object CustomerAccount in ECO, it maps to a DB table CustomerAccount. I also have a udf uf_CustomerAccountBalance. It calculates account balance for given customer and given date effective.

I'd like to be able to map an ECO "function" to this DB function so that I do not have to rewrite the same implementation in ECO.

2. One more case... With the date managing routines. I'd like to have an ECO "function" mapped to the native Oracle function TO_DATE so that I could handle the dates explicitly in a way I know works regardless of any OS settings.

Hope it gives enough details. Please let me know if it does not.

Best regards.

Boris Petukhov.

Dmitriy Nagirnyak at 5/17/2006 5:49:45 AM -
This is not custom OCL and this is not just accessing DB from method. This is completly new feature (as I see).

I keep in mind the following:
1. Add operation to class during designing.
2. Set some propery of this operation that tells the method should call DB
function (property like IsDBOperation).
3. Configure DB function name, parameters mappings, return parameter(s) mappings.
4. When the operation is called it converts all the parameters (according
to 3) and calls the stored procedure of function directly in DB.
5. After DB function is finished - convert all output parameters according
to mapping defined in 3 and return value (if it is defeined in 3).

This is like we configure attributes being persistent. We tell "Attribute1 maps to Field1".

The similar I mean to be able with operations.

I understand in this case ECO will not be able fully control that ECO space
is in sync with DB when stored procedure will modify data.
But in the first version it can be put on the developer's shoulders.

Server Response from: ETNACODE01