mysql-haskell-0.8.4.1: pure haskell MySQL driver

Copyright(c) Winterland 2016
LicenseBSD
Maintainerdrkoster@qq.com
Stabilityexperimental
PortabilityPORTABLE
Safe HaskellNone
LanguageHaskell2010

Database.MySQL.Protocol.Escape

Description

This module provide escape machinery for bytes and text types.

reference: http://dev.mysql.com/doc/refman/5.7/en/string-literals.html

  • Escape Sequence Character Represented by Sequence
  • 0 An ASCII NUL (X'00') character
  • ' A single quote (“'”) character
  • " A double quote (“"”) character
  • b A backspace character
  • n A newline (linefeed) character
  • r A carriage return character
  • t A tab character
  • Z ASCII 26 (Control+Z); see note following the table
  • \ A backslash (“”) character
  • % A “%” character; see note following the table
  • _ A “_” character; see note following the table

The % and _ sequences are used to search for literal instances of % and _ in pattern-matching contexts where they would otherwise be interpreted as wildcard characters, so we won't auto escape % or _ here.

Documentation