Provides MySQL-specific SQL serialization for the jet builder library with custom operators and JSON encoding.
// Source: https://github.com/go-jet/jet | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package mysql
import (
"encoding/hex"
"fmt"
"strings"
"github.com/go-jet/jet/v2/internal/jet"
)
// Dialect is implementation of MySQL dialect for SQL Builder serialization.
var Dialect = newDialect()
func newDialect() jet.Dialect {
operatorSerializeOverrides := map[string]jet.SerializeOverride{}
operatorSerializeOverrides["IS DISTINCT FROM"] = mysqlISDISTINCTFROM
operatorSerializeOverrides["IS NOT DISTINCT FROM"] = mysqlISNOTDISTINCTFROM
operatorSerializeOverrides["/"] = mysqlDivision
operatorSerializeOverrides["#"] = mysqlBitXor
operatorSerializeOverrides[jet.StringConcatOperato
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key