[sqltypes] Add support to serialize and deserialize them