sqlx

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Example
package main

import (
	"context"
	"os"
	"path/filepath"

	"github.com/xoctopus/genx/pkg/genx"
	"github.com/xoctopus/x/misc/must"

	_ "github.com/xoctopus/sqlx/devpkg/sqlx/v1"
)

func main() {
	cwd := must.NoErrorV(os.Getwd())

	entry := filepath.Join(cwd, "..", "..", "..", "testdata")

	ctx := genx.NewContext(&genx.Args{
		Entrypoint: []string{entry},
	})

	if err := ctx.Execute(context.Background(), genx.Get()...); err != nil {
		panic(err)
	}

}

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

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

func NewModel

func NewModel(g genx.Context, t types.Type) *Model

func (*Model) IndexList

func (m *Model) IndexList(unique bool) s.Snippet

func (*Model) ModeledCT

func (m *Model) ModeledCT(ctx context.Context, t typx.Type) s.Snippet

func (*Model) ModeledColDefList

func (m *Model) ModeledColDefList(ctx context.Context) s.Snippet

func (*Model) ModeledColInitList

func (m *Model) ModeledColInitList(ctx context.Context) s.Snippet

func (*Model) ModeledKeyDefList

func (m *Model) ModeledKeyDefList(ctx context.Context) s.Snippet

func (*Model) ModeledKeyInitList

func (m *Model) ModeledKeyInitList(_ context.Context) s.Snippet

func (*Model) ModeledM

func (m *Model) ModeledM(ctx context.Context) s.Snippet

func (*Model) ModeledTCol

func (m *Model) ModeledTCol(ctx context.Context, t typx.Type) s.Snippet

func (*Model) ModeledTable

func (m *Model) ModeledTable(ctx context.Context) s.Snippet

func (*Model) PrimaryColList

func (m *Model) PrimaryColList() s.Snippet

func (*Model) T

func (m *Model) T() s.Snippet

func (*Model) TableDesc

func (m *Model) TableDesc() []string

func (*Model) TableName

func (m *Model) TableName() string

Jump to

Keyboard shortcuts

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