Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Remove ns_uri from feature ids and support inserts into views via pkey_sequence attr #48

Merged
merged 3 commits into from Nov 20, 2012

Conversation

Projects
None yet
2 participants

tsufiev commented Nov 20, 2012

No description provided.

Timur Sufiev added some commits Nov 20, 2012

Fix feature ids in JSON GetFeature output.
Produce '<layer_name>.<object_integer_id>' as feature ids
instead of '<namespace-uri>:<layer_name>.<object_integer_id>'.
Add "pkey_sequence" attribute (in addition to "pkey") to layer config.
In order to insert new feature into layer based on PostgreSQL view,
"pkey" attribute is not enough: one should be able to deduce sequence
name using pg_get_serial_sequence() function, which returns empty row
for views. Fix this by adding "pkey_sequence" attribute.

@tsufiev tsufiev closed this Nov 20, 2012

@tsufiev tsufiev reopened this Nov 20, 2012

Hi Timur,

Thanks for this report and this code add !

To be perfect on this subject, aim is also to have the same config enhancement in mapfile code
and to display pkey_sequence in layer_flush

Could you provide such a thing as a pull request too ?

This one was just commited, thanks for both report and patch providing !

tsufiev commented Nov 20, 2012

Hi, Olivier,

I don't understand what to do with mapfile config. sdikiy's commit for "pkey" support I used as an example (d5b6043) contains some lines from mapfile.c, but now they are removed (in dad3268) - how is it supposed to work?

Timur,

Humm so we face to an another issue, to add also pkey into mapfile.l
It should behave like others layer's mapfile config.
MAP_LMD_TITLE could be took as an example,

If it's not that clear, just say it, i will do.

tsufiev commented Nov 20, 2012

Olivier,

it seems to me, that not only pkey and pkey_sequence handling is missing. Consider the following code from mapfile.l

case MAP_LMD_SKIP: return;
case MAP_LMD_EXCLUDE_ITEMS:
case MAP_LMD_FEATURE_ID:
case MAP_LMD_INCLUDE_ITEMS:
case MAP_LMD_XML_ITEMS:
case MAP_LMD_EXTENT:
case MAP_LMD_METADATAURL_FORMAT:
case MAP_LMD_METADATAURL_HREF:
case MAP_LMD_METADATAURL_TYPE:
     /* TODO */ return;

So, it would be better if you fixed it.

ocourtin pushed a commit that referenced this pull request Nov 20, 2012

Merge pull request #48 from tsufiev/master
support inserts into views via pkey_sequence attr

@ocourtin ocourtin merged commit 3851010 into mapserver:master Nov 20, 2012

Ok i take the mapfile.c

Thanks again Timur !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment