OCaml Forge
SCM

Detail: [#1259] casting functions

Patches: Browse | Download .csv | Monitor

[#1259] casting functions

Date:
2013-02-21 14:25
Priority:
3
State:
Open
Submitted by:
Fabian Pijcke (shepard)
Assigned to:
Nobody (None)
Resolution:
None
Version:
None
Component:
None
 
Summary:
casting functions

Detailed description
Casting functions are useful, for example, to concatenate a string with a number, as the concat function takes two strings as input.

I lacked this functionality as the default value for one of my columns was:

'generated_' || currval('some_sequence')

where || is the concatenation operator.

I implemented the cast functions as unary functions. Usage example:

<:value< cast_integer "42" >>

As for the previous patch, please tell me if anything is not correct from your point of view.

Followup

No Followups Have Been Posted

Attached Files:

Attachments:
casts.patch

Changes:

Field Old Value Date By
File Added205: casts.patch2013-02-21 14:25shepard