123456789101112131415161718192021 |
- (
- (library "alterto.yql")
- (import alterto_module '"alterto.yql")
- (let config (DataSource 'config))
- (let targetType (TupleType (DataType 'Uint8) (DataType 'Utf8)))
- (let failValue '((Uint8 '0) (Utf8 '"not converted")))
- # (Int32, String) -> (Uint8, Utf8)
- (let value '((Int32 '1) (String 'one)))
- (let world (Apply (bind alterto_module 'doAlterTo) world value targetType failValue))
- # (Int32, String) -> (Uint8, Utf8) (fail)
- (let value '((Int32 '1) (String '"garbage\xff")))
- (let world (Apply (bind alterto_module 'doAlterTo) world value targetType failValue))
- (return world)
- )
|