ostap / comp

a tool for querying files in various formats
MIT License
43 stars 2 forks source link

allowing attribute names which are not valid comp identifiers #6

Closed julochrobak closed 11 years ago

julochrobak commented 11 years ago

There are a lot of datasets available with rather complex attributes names which are not valid comp identifiers. This change allows to access these attributes in the following fashion:

record["complex attribute name"]

example:

[ a["my identifiers with spaces"] | a <- inputdata ]

The attributes with names as valid comp identifiers are therefore accessible in two ways:

[ a.id | a <- inputdata ]

or

[ a["id"] | a <- inputdata ]
ostap commented 11 years ago

it is a great enhancement. please add tests to web_test.go and squash the changes and let's merge it. to complete the picture with the [] operator i created #7 and #8. lack of #7 is particularly painful.

julochrobak commented 11 years ago

ok, it's ready. I added a test to web_test.go and rebased with a single commit.