Closed jkerr5 closed 6 years ago
@jkerr5 - there was a commit that refactored a line where string lengths were set to 128 for the fields
objects of the layer info service and the query service. Prior to this, they were also set to 128. There may be a limit to strings, but its greater than 128 (I've seen lengths of 1000). Perhaps we could explore a way to set these lengths dynamically.
OK, maybe I just never noticed it set before. It could be one reason ArcGIS crashes when using our service that has strings longer than 128 characters. If that property must be set, can we allow the provider to specify the field length in the metadata and then koop will only set it to 128 if the provider doesn't provide it?
Right now my provider returns fields like this
{ name: 'name', type: 'String' }
Can we pass something like this
{ name: 'name', type: 'String' , length: 500 }
and have koop pass that length through to the field metadata in the layer response?
@jkerr5 - it could possibly be stored in provider metadata and then transferred to FeatureServer at request time. What does your getData
function look like?
We have a pass-thru provider so there isn't much that runs on the koop/node side. The code is here: https://github.com/koopjs/koop-provider-marklogic/tree/master/src/koop
If you tell us what to send back, we can generate whatever metadata are needed to control the koop responses.
@jkerr5 - putting together a PR to address this using the solution you mentioned, i.e., passing something like { name: 'name', type: 'String' , length: 500 }
.
@jkerr5 FeatureServer 2.12.0 now allows you to set a field's length in provider's metadata.
A recent change set the length property of string fields to 128. Why was that done? Is 128 characters the maximum length of a string field? I do not see that documented anywhere.