oqgraph-dev team mailing list archive
-
oqgraph-dev team
-
Mailing list archive
-
Message #00163
Re: Expected result of a 'no_search' operation?
Sorry, maybe make that next week, this week has been much busier than
anticipated at work. *sighs*
On 15/06/13 15:00, Andrew McDonnell wrote:
> Hi Arjen,
>
> Hopefully I'll be able to tie up some of these loose ends this week, work
> permitting
>
> --Andrew
>
>
>
>
> On 03/06/13 08:50, Arjen Lentz wrote:
>> Hi Andrew
>>
>>> The current behaviour always returns an empty set if the latch is NULL
>>> should this be changed then?
>>
>> v2 allowed latch to be NULL, so we should probably keep that.
>> I don't see any reason to handle NULL and 0 differently though.
>>
>>
>>> No latch specified seems to work correctly as you specify:
>>> - or should it not have the latch, seq, linkid columns?
>>
>> The below looks ok. Please ensure there are tests for each permutation in the basic test.
>> Perhaps we should create a no-search test as the basic test already checks schema foo which is really basic.
>>
>> You can't leave columns out as they're part of the schema. You can't half a row in an RDBMS.
>> Resultsets should always be relationally consistent - the server core will actually enforce this because as you know it always applies its own filters even if the engine doesn't.
>>
>> They are NULL because there is no WHERE clause on them specifying a different value, and no data to return - thus it should be the default of the column, which in case of a NULL column (e.g. a col that can be NULL) with no other DEFAULT value specified in the schema, is NULL.
>>
>>
>>> SELECT * FROM graph;
>>> latch origid destid weight seq linkid
>>> NULL 1 2 1 NULL NULL
>>> NULL 2 1 1 NULL NULL
>>> NULL 1 3 1 NULL NULL
>>> NULL 3 1 1 NULL NULL
>>> NULL 3 4 1 NULL NULL
>>> NULL 4 3 1 NULL NULL
>>> NULL 5 6 1 NULL NULL
>>> NULL 6 5 1 NULL NULL
>>>
>>> Same for no latch with a filter:
>>>
>>> SELECT * FROM graph WHERE destid=2 and origid=1;
>>> latch origid destid weight seq linkid
>>> NULL 1 2 1 NULL NULL
>>>
>>>
>>>
>>>
>>> On 29/05/13 08:08, Arjen Lentz wrote:
>>>> Hi Andrew
>>>>
>>>>> what should a no_search latch return?
>>>>
>>>> For latch=0/no_search, the table should look as inserted (i.e. like
>>>> a regular table).
>>>>
>>>> I was just wondering if you'd also set "no_search" as the default,
>>>> but I reckon it might be better to use an empty string or NULL
>>>> rather than no_search. Can you change that without causing hassles
>>>> elsewhere?
>>>>
>>>>
>>> <snipped>
>>>
>>> --
>>> Mailing list: https://launchpad.net/~oqgraph-dev
>>> Post to : oqgraph-dev@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~oqgraph-dev
>>> More help : https://help.launchpad.net/ListHelp
>>
>
>
Follow ups
References