SELECT_JSON_ARR (mysql/select_json.go)

jet · mysql/select_json.go · go · Apache-2.0
database

Builds MySQL SELECT statements that return JSON data for applications.

// 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 (
	"github.com/go-jet/jet/v2/internal/jet"
)

// SelectJsonStatement is an interface for MySQL statements that generate JSON on the server.
type SelectJsonStatement interface {
	Statement
	jet.Serializer

	AS(alias string) Projection

	FROM(table ReadableTable) SelectJsonStatement
	WHERE(condition BoolExpression) SelectJsonStatement
	ORDER_BY(orderByClauses ...OrderByClause) SelectJsonStatement
	LIMIT(limit int64) SelectJsonStatement
	OFFSET(offset int64) SelectJsonStatement
}

// SELECT_JSON_ARR creates a new SelectJsonStatement with a list of projections.
func SELECT_JS

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key