Skip to main content

Module helper

Module helper 

Source

StructsΒ§

PlaceholderSpan πŸ”’
Location of a prepared-statement placeholder in the original SQL text.

FunctionsΒ§

collect_placeholder_spans πŸ”’
convert_bytes_to_date πŸ”’
convert_bytes_to_timestamp πŸ”’
convert_expr_to_scalar_value
Convert an MySQL expression to a scalar value. It automatically handles the conversion of strings to numeric values.
convert_value
Convert [ParamValue] into Value according to param type. It will try it’s best to do type conversions if possible
format_placeholder
Returns the placeholder string β€œ$i”.
placeholder_index πŸ”’
placeholder_spans πŸ”’
Collect spans of β€œ$i” placeholders in a statement.
transform_placeholders_with_count
Transform all the β€œ?” placeholders into β€œ$i” and return the number of transformed placeholders.
visit_placeholders πŸ”’