port: add result set format and request type to port_sql
Result set serialization formats of DQL and DML queries are different: the last one contains number of affected rows and optionally list of autoincremented ids; the first one comprises all meta-information including column names of resulting set and their types. What is more, serialization format is going to be different for execute and prepare requests. So let's introduce separate member to struct port_sql responsible for serialization format to be used. Note that C standard specifies that enums are integers, but it does not specify the size. Hence, let's use simple uint8 - mentioned enum are small enough to fit into it. What is more, prepared statement finalization is required only for PREPARE-AND-EXECUTE requests. So let's keep flag indicating required finalization as well. Needed for #2592
Loading
Please register or sign in to comment