MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / Example_invalidNumber

Function Example_invalidNumber

pkg/errors/examples_test.go:77–86  ·  view source on GitHub ↗

Example_invalidNumber demonstrates invalid number format error

()

Source from the content-addressed store, hash-verified

75
76// Example_invalidNumber demonstrates invalid number format error
77func Example_invalidNumber() {
78 sql := "SELECT * FROM products WHERE price > 19.99.5"
79 location := models.Location{Line: 1, Column: 38}
80
81 err := errors.InvalidNumberError("19.99.5", location, sql)
82
83 fmt.Println("Invalid Number Example:")
84 fmt.Println(err.Error())
85 fmt.Println()
86}
87
88// Example_missingClause demonstrates missing clause error with suggestions
89func Example_missingClause() {

Callers

nothing calls this directly

Calls 2

InvalidNumberErrorFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected