datschema

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(s *Schema) (model.Models, enum.Enums, error)

Types

type Column

type Column struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Array       bool   `json:"array,omitempty"`
	Type        string `json:"type"`
	Unique      bool   `json:"unique,omitempty"`
	Localized   bool   `json:"localized,omitempty"`
	References  any    `json:"references,omitempty"`
	Until       any    `json:"until,omitempty"`
	File        any    `json:"file,omitempty"`
	Files       any    `json:"files,omitempty"`
}

func (*Column) SafeName

func (c *Column) SafeName() string

type Columns

type Columns []*Column

type Enumeration

type Enumeration struct {
	Name        string   `json:"name"`
	Indexing    int      `json:"indexing"`
	Enumerators []string `json:"enumerators,omitempty"`
}

type Enumerations

type Enumerations []*Enumeration

type Schema

type Schema struct {
	Version      int          `json:"version"`
	CreatedAt    int          `json:"createdAt"`
	Tables       Tables       `json:"tables,omitempty"`
	Enumerations Enumerations `json:"enumerations,omitempty"`
}

type Table

type Table struct {
	Name    string   `json:"name"`
	Columns Columns  `json:"columns"`
	Tags    []string `json:"tags,omitempty"`
}

type Tables

type Tables []*Table

Jump to

Keyboard shortcuts

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