Hello everyone!
This is my first post to this list...
I just started using libzdb. It's exactly what I was looking for.
I realized that I have to use ResultSet_isnull() to differentiate between NULL and 0 on integers... I started to use the ...ByName functions because it makes my code more readable and also more robust.
Now I was wondering why there's no ResultSet_isnullByName() function. Maybe there's a good reason for it? I just added the missing code and I can't see any issue with using it...
Cheers Till
Is this list dead?
May 9, 2025 1:41 AM, g4-lisz@tonarchiv.ch (mailto:g4-lisz@tonarchiv.ch) wrote: Hello everyone!
This is my first post to this list...
I just started using libzdb. It's exactly what I was looking for.
I realized that I have to use ResultSet_isnull() to differentiate between NULL and 0 on integers... I started to use the ...ByName functions because it makes my code more readable and also more robust.
Now I was wondering why there's no ResultSet_isnullByName() function. Maybe there's a good reason for it? I just added the missing code and I can't see any issue with using it...
Cheers Till
The list is not dead, just low traffic :) Regarding your comment about ResultSet_isnullByName - this hasn't been added as there have not been any requests for it and also because in the API, ResultSet_isnull() is kind of a utility function rather than a retrieval function like the getXXX function.
On 12 May 2025, at 15:56, g4-lisz@tonarchiv.ch wrote:
Is this list dead?
May 9, 2025 1:41 AM, g4-lisz@tonarchiv.ch wrote: Hello everyone!
This is my first post to this list...
I just started using libzdb. It's exactly what I was looking for.
I realized that I have to use ResultSet_isnull() to differentiate between NULL and 0 on integers... I started to use the ...ByName functions because it makes my code more readable and also more robust.
Now I was wondering why there's no ResultSet_isnullByName() function. Maybe there's a good reason for it? I just added the missing code and I can't see any issue with using it...
Cheers Till
Hi
Thanks for your reply! I wonder a bit why no one was missing this function until now...
My argumentation for adding it to the lib is this: When you write the code for fetching the rows you decide to either go with indexes or with column names. But if you need one single NULL check, you render all ByName calls useless because you need to know the exact indexes anyway.
Or, as an alternative, you could make public / export the function _getIndex().
Cheers, Till
May 12, 2025 9:40 PM, "Jan-Henrik Haukeland" hauk@tildeslash.com wrote:
The list is not dead, just low traffic :) Regarding your comment about ResultSet_isnullByName - this hasn't been added as there have not been any requests for it and also because in the API, ResultSet_isnull() is kind of a utility function rather than a retrieval function like the getXXX function.
On 12 May 2025, at 15:56, g4-lisz@tonarchiv.ch wrote:
Is this list dead?
May 9, 2025 1:41 AM, g4-lisz@tonarchiv.ch wrote: Hello everyone!
This is my first post to this list...
I just started using libzdb. It's exactly what I was looking for.
I realized that I have to use ResultSet_isnull() to differentiate between NULL and 0 on integers... I started to use the ...ByName functions because it makes my code more readable and also more robust.
Now I was wondering why there's no ResultSet_isnullByName() function. Maybe there's a good reason for it? I just added the missing code and I can't see any issue with using it...
Cheers Till
You’re right, it does make sense to have an isnullByName() function to complement isnull(). Thanks for the suggestion. Added now (1). Too bad I forgot before I released 3.4.1. At least it’s in master and will be part of a future release.
Jan-Henrik
1. https://bitbucket.org/tildeslash/libzdb/commits/0f5fd9875a9512c9a456c98d77d3...
On 13 May 2025, at 00:24, g4-lisz@tonarchiv.ch wrote:
Hi
Thanks for your reply! I wonder a bit why no one was missing this function until now...
My argumentation for adding it to the lib is this: When you write the code for fetching the rows you decide to either go with indexes or with column names. But if you need one single NULL check, you render all ByName calls useless because you need to know the exact indexes anyway.
Or, as an alternative, you could make public / export the function _getIndex().
Cheers, Till
May 12, 2025 9:40 PM, "Jan-Henrik Haukeland" hauk@tildeslash.com wrote:
The list is not dead, just low traffic :) Regarding your comment about ResultSet_isnullByName - this hasn't been added as there have not been any requests for it and also because in the API, ResultSet_isnull() is kind of a utility function rather than a retrieval function like the getXXX function.
On 12 May 2025, at 15:56, g4-lisz@tonarchiv.ch wrote:
Is this list dead?
May 9, 2025 1:41 AM, g4-lisz@tonarchiv.ch wrote: Hello everyone!
This is my first post to this list...
I just started using libzdb. It's exactly what I was looking for.
I realized that I have to use ResultSet_isnull() to differentiate between NULL and 0 on integers... I started to use the ...ByName functions because it makes my code more readable and also more robust.
Now I was wondering why there's no ResultSet_isnullByName() function. Maybe there's a good reason for it? I just added the missing code and I can't see any issue with using it...
Cheers Till
Hi Jan-Henrik
Thanks for the update on this. That's good news! Glad to hear that my argumentation was convincing ;)
Cheers, Till
June 6, 2025 2:39 PM, "Jan-Henrik Haukeland" hauk@tildeslash.com wrote:
You’re right, it does make sense to have an isnullByName() function to complement isnull(). Thanks for the suggestion. Added now (1). Too bad I forgot before I released 3.4.1. At least it’s in master and will be part of a future release.
Jan-Henrik
On 13 May 2025, at 00:24, g4-lisz@tonarchiv.ch wrote:
Hi
Thanks for your reply! I wonder a bit why no one was missing this function until now...
My argumentation for adding it to the lib is this: When you write the code for fetching the rows you decide to either go with indexes or with column names. But if you need one single NULL check, you render all ByName calls useless because you need to know the exact indexes anyway.
Or, as an alternative, you could make public / export the function _getIndex().
Cheers, Till
May 12, 2025 9:40 PM, "Jan-Henrik Haukeland" hauk@tildeslash.com wrote:
The list is not dead, just low traffic :) Regarding your comment about ResultSet_isnullByName - this hasn't been added as there have not been any requests for it and also because in the API, ResultSet_isnull() is kind of a utility function rather than a retrieval function like the getXXX function.
On 12 May 2025, at 15:56, g4-lisz@tonarchiv.ch wrote:
Is this list dead?
May 9, 2025 1:41 AM, g4-lisz@tonarchiv.ch wrote: Hello everyone!
This is my first post to this list...
I just started using libzdb. It's exactly what I was looking for.
I realized that I have to use ResultSet_isnull() to differentiate between NULL and 0 on integers... I started to use the ...ByName functions because it makes my code more readable and also more robust.
Now I was wondering why there's no ResultSet_isnullByName() function. Maybe there's a good reason for it? I just added the missing code and I can't see any issue with using it...
Cheers Till