gen

package module
v0.0.0-...-40ce4ec Latest Latest
Warning

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

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

README

GORM DBML Gen

dbml

DBML (Database Markup Language) is an open-source DSL language designed to define and document database schemas and structures. It is designed to be simple, consistent and highly-readable.

Install

go install github.com/alonelucky/gen/cmd/dbmlgen@latest

Features

  1. Easily record data changes with code.

Usage of hmq:

Usage of dbmlgen
  -dbml string
        database mark languge
  -null
        generate model global configuration
  -output string
        curd and model output dir (default "./gen/curd")
  -type string
        specify data type mapping relationship (default "datetime=string"), exp "coltyp1=int,coltyp2=bool..."

Documentation

Overview

Package gen as dbml

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelName

func CamelName(name string) string

CamelName 下划线写法转为驼峰写法

func NewDBML

func NewDBML(r io.Reader, g *gen.Generator, opts ...Option) *dbml

NewDBML as

func NewDBMLField

func NewDBMLField(model core.Column) helper.Field

NewDBMLField as

func NewDBMLObject

func NewDBMLObject(model core.Table) helper.Object

NewDBMLObject as

func UnderscoreName

func UnderscoreName(name string) string

UnderscoreName as

Types

type Option

type Option func(*dbml)

func WithType

func WithType(coltype, gotyp string) Option

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳