entlite

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package entlite holds the core types of the schema dsl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

type Contract interface {
	Contract()
}

Contract is one output layer a field or query belongs to.

type Field

type Field interface {
	Field()
}

Field is implemented by every field builder.

type Index

type Index interface {
	Index()
}

Index is implemented by every index builder.

type Layer added in v0.0.3

type Layer interface {
	Contract
	// ReadOnly exposes the field or query only when reading.
	ReadOnly() Contract
	// WriteOnly exposes the field or query only when writing.
	WriteOnly() Contract
}

Layer is a contract that can be narrowed to one direction.

func PROTO

func PROTO() Layer

PROTO selects the proto layer.

func SQLC

func SQLC() Layer

SQLC selects the sqlc layer.

type PROTOContract

type PROTOContract struct {
	// contains filtered or unexported fields
}

PROTOContract is the proto layer, it drives the api surface.

func (PROTOContract) Contract

func (PROTOContract) Contract()

marker method for sealed interface

func (PROTOContract) ReadOnly added in v0.0.3

func (c PROTOContract) ReadOnly() Contract

ReadOnly exposes the field or query only when reading.

func (PROTOContract) WriteOnly added in v0.0.3

func (c PROTOContract) WriteOnly() Contract

WriteOnly exposes the field or query only when writing.

type Query

type Query interface {
	Query()
}

Query is implemented by every query builder.

type SQLCContract

type SQLCContract struct {
	// contains filtered or unexported fields
}

SQLCContract is the sqlc layer, it drives the database code.

func (SQLCContract) Contract

func (SQLCContract) Contract()

marker method for sealed interface

func (SQLCContract) ReadOnly added in v0.0.3

func (c SQLCContract) ReadOnly() Contract

ReadOnly exposes the field or query only when reading.

func (SQLCContract) WriteOnly added in v0.0.3

func (c SQLCContract) WriteOnly() Contract

WriteOnly exposes the field or query only when writing.

type Schema

type Schema struct{}

Schema is embedded in a user schema struct to mark it as an entity.

Directories

Path Synopsis
Package field holds the field builders used to describe an entity schema.
Package field holds the field builders used to describe an entity schema.
Package filter holds the filters used by a ListBy query.
Package filter holds the filters used by a ListBy query.
Package index holds the index builders used in an entity schema.
Package index holds the index builders used in an entity schema.
Package query holds the query builders used in an entity schema.
Package query holds the query builders used in an entity schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL