maria-discuss team mailing list archive
Mailing list archive
Re: getting all name-value pairs from a dynamic column
I wrote this function already, and had it working as fast as any query, if
you'd like my code I wrote for a previous employer (and was NOT used, so
is available) I would gladly turn this over to the project.
I called it JSONIFY(QUERY_TEXT).
>>>>>> "MARK" == MARK CALLAGHAN <mdcallag@xxxxxxxxx> writes:
> MARK> These docs are excellent --
> 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
> 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.
> Mailing list: https://launchpad.net/~maria-discuss
> Post to : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help : https://help.launchpad.net/ListHelp