parse

package
v0.0.0-...-bedebd1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Orders

type Orders struct {
	OrderID int `night:"primary_key"`
	UserID  int `night:"unique"`
	Amount  string
}

type Parser

type Parser struct {
	Driver flags.DataBaseDriver

	Tables []Table
	// contains filtered or unexported fields
}

func NewParser

func NewParser(driver flags.DataBaseDriver, contents []byte) *Parser

func (*Parser) Parse

func (p *Parser) Parse() (query string, error error)

type Table

type Table struct {
	Name   string
	Fields [][]string
}

table example writin in Go

type Users struct {
    ID int `night:"primary_key"`
    Name string
    Email string `night:"unique"`
    EmailVerified bool `night:"nullable"`
}

type Users

type Users struct {
	ID   int    `night:"primary_key"`
	Name string `night:"nullable"`
}

Jump to

Keyboard shortcuts

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