ResultsetRow packet

A ResultsetRow packet contains one row in a result set.

The value of columns can usually be accessed directly, e.g.: context.packet.first_name. However, if the row contains more than one column with a given name, you may need to use getColumnValue and setColumnValue instead.

Properties


Methods


Character sets

MySQL supports a wide range of character sets, but exactly which character encoding is used depends on a number of factors which are beyond the scope of this documentation -- we'll refer you to the MySQL documentation.

In general, Gallium Data tries to figure out the current character encoding by keeping track of the value of certain system variables, specifically character_set_client (for requests) and character_set_results (for result sets). 

However, databases often contain data in other encodings, or database clients often request data using a different encoding. In these cases, Gallium Data may not be able to guess the encoding correctly, in which case you can use the methods getColumnStringValue and setColumnStringValue to specify the encoding.

The complete list of character encodings supported by your copy of MySQL can be seen by executing the command SHOW CHARACTER SET.

The complete list of character encodings supported by Gallium Data can be seen here.  Notice that the list do not usually match completely. If Gallium Data sees an encoding that it does not support, it will assume UTF-8, which is usually not ideal. In those cases, you can use the special encoding "binary" with the methods getColumnStringValue and setColumnStringValue, and they will return/accept the raw bytes of the string.