← Back to team overview

maria-discuss team mailing list archive

Re: getting all name-value pairs from a dynamic column

 

On Fri, Dec 2, 2011 at 5:23 AM, Michael Widenius <monty@xxxxxxxxxxxx> wrote:
> MARK> How do you fetch all name-value pairs from a dynamic column in a
> MARK> format that can be consumed by a client?
>
> Do you mean from SQL or in the client library?

In the client

>
> MARK> The client can select the
> MARK> column as is but then must know how mariadb encoded it.
>
> Sorry, don't understand the question.
>
> When asking for a value for a column in the client , you get back a
> structure that tells how the data is encoded. See the 'struct
> st_dynamic_column_value'
>
> MARK> The function
> MARK> column_list returns the column names.

Dynamic columns are dynamic. The client doesn't know which key names
are used for each row selected. With the current code there is no way
for the client to get all key:value pairs set in a dynamic column for
some number of rows. They can select the column but probably won't
know how to decode the name:value pairs stored in it.

Apparently Jakob has code for this. So I don't have much more to add
for this thread.

-- 
Mark Callaghan
mdcallag@xxxxxxxxx


Follow ups

References