Issues

Select view

Select search mode

 

Add support for array/struct metadata typing

Description

Copying from WEAT-1809 - Lucee does not support arrayGetMetadata(), arraySetMetadata(), structGetMetadata() or structSetMetadata().

Support must also include the equivalent member functions - myArray.setMetadata(), myArray.getMetadata(), myStruct.getMetadata(), myStruct.setMetadata().

Array metadata:

myArray = [ "1", "2", "abc" ]; metadata = { "items" : [ "integer", "integer", "string" ] }; // test arraySetMetadata SETTER and member function arraySetMetadata( myArray, metadata ); myArray.setMetadata( metadata ); // test arraySetMetadata GETTER and member function writeDump( var = arrayGetMetadata( ), label = "arrayGetMetadata" ); writeDump( var = myArray.getMetadata(), label = "array.GetMetadata" );

Struct metadata:

myStruct = { "make" : "Ford", "year" : "2012", "price" : 990.95 }; metadata = { "make" : { "type" : "string" }, "year" : { "type" : "integer" }, "price" : { "type" : "numeric" } }; // test structSetMetadata SETTER and member function structSetMetadata( myStruct, { items : [ "integer", "integer", "string" ] } ); myStruct.setMetadata( { items : [ "integer", "integer", "string" ] } ); // test structSetMetadata GETTER and member function writeDump( var = structGetMetadata( myStruct ), label = "structGetMetadata" ); writeDump( var = myStruct.getMetadata(), label = "struct.GetMetadata" );

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Priority

Created 7 July 2021 at 13:47
Updated 1 July 2023 at 15:37

Activity

Show:

Matthew Brown4 May 2022 at 10:04

Contrary to the label, these were added in ACF 2016, not ACF 2018.

Flag notifications