jbellomy / bots

Automatically exported from code.google.com/p/bots
0 stars 0 forks source link

improve: QUERIES on different values #135

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
for QUERIES if you use a list, within that list only simple mpaths where 
usable. You can now use full mpaths.

Use case:
retrieve alt value for alt-translations.
alt-value is needed on message level.
I encountered case where alt-translation is dependent upon more than one value.

example:
{ID: 'UNH', MIN: 1, MAX: 1, 
    QUERIES: {
            'alt':  [
                    ({'BOTSID':'UNH'},{'BOTSID':'BGM','C002.1001':None}),
                    ({'BOTSID':'UNH'},{'BOTSID':'BGM','1225':None}),
                    ]
            },

Original issue reported on code.google.com by hjebb...@gmail.com on 10 May 2012 at 12:10

GoogleCodeExporter commented 9 years ago
QUERIES: {
         #simple:
         'value1': {'BOTSID':'UNH', '0056': None},
         #for deeper levels using python tuple:
         'value2': ({'BOTSID':'UNH'},{'BOTSID':'BGM','1225':None}),
         #concatenate several values using python list:
         'value3':  [
                    ({'BOTSID':'UNH'},{'BOTSID':'BGM','C002.1001':None}),
                    ({'BOTSID':'UNH'},{'BOTSID':'BGM','1225':None}),
                    ]
        },

Original comment by hjebb...@gmail.com on 22 Jun 2012 at 4:29

GoogleCodeExporter commented 9 years ago

Original comment by hjebb...@gmail.com on 10 Sep 2013 at 12:45