Adriano dos Santos Fernandes
unread,Oct 4, 2025, 8:20:02 AM (6 days ago) Oct 4Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to firebir...@googlegroups.com
Hi!
It's very difficult for client libraries to implement conversion of
types in the same manner as implemented internally by Firebird (client
or engine). There are many complexities like conversion of floating
point types and integral scaled ones, for example.
It's not sufficient to let client change message field types and let
Firebird do it.
Usually, libraries have methods like getInt, getString, etc for
individual columns and nobody can anticipate what the developer is going
to call. The same for setters.
Therefore I propose new utility function:
interface Util : Versioned
{
...
void convert(
Status status,
uint sourceType,
uint sourceScale,
uint sourceLength,
const void* source,
uint targetType,
uint targetScale,
uint targetLength,
void* target);
}
It will be very raw, as anyone that can already read/write data to
messages can use this function with buffers and read/write data to it.
It will be thin wrapper for a CVT_move call. It should not work for blobs.
Adriano