← Back to team overview

maria-discuss team mailing list archive

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

 

Hi!

>>>>> "MARK" == MARK CALLAGHAN <mdcallag@xxxxxxxxx> writes:

MARK> These docs are excellent -- http://kb.askmonty.org/en/dynamic-columns

Thanks.

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?

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.

Yes, even if the column names are numbers for the moment.

MARK> If there were a function that
MARK> encoded all name-value pairs as JSON, then the client could do
MARK> something like this and be able to decode the result:
MARK>   select column_json(dynamic_column_name) from t where ...

We just got funding for half of the future planned work for dynamic
columns.  We will soon start looking at how to encode names for
dynamic columns.

Regards,
Monty




Follow ups

References