Documentation ¶
Index ¶
- Variables
- func FieldName(s string) string
- func FmtFieldName(s string) string
- func Generate(columnTypes []generatorModels.ColumnData, tableName string, structName string, ...) ([]byte, error)
- func GenerateGrapql(columnTypes []generatorModels.ColumnData, tableName string, structName string, ...) ([]byte, error)
- func GenerateGrapqlOrder(columnTypes []generatorModels.ColumnData, tableName string, structName string, ...) ([]byte, error)
- func GenerateOnlyStruct(columnTypes []generatorModels.ColumnData, tableName string, structName string, ...) ([]byte, error)
- func GenerateProtobuf(columnTypes []generatorModels.ColumnData, tableName string, structName string, ...) ([]byte, error)
- func GenerateSchemaForCloud() models.DBSCHEMA
- func GenerateWithImports(otherPackage string, columnTypes []generatorModels.ColumnData, ...) ([]byte, error)
- func GenerateWithImportsNoTime(otherPackage string, columnTypes []generatorModels.ColumnData, ...) ([]byte, error)
- func GetColumns(db *sql.DB, dbTable string, hiddenColumns []string) (string, error)
- func GetColumnsFromSQLlTable(db *sql.DB, dbTable string, hiddenColumns []string) ([]generatorModels.ColumnData, error)
- func GetColumnsWithMeta(db *sql.DB, dbTable string, hiddenColumns []string) ([]map[string]string, error)
- func GetDBSchema() models.DBSCHEMA
- func GetOnlyOneField(db *sql.DB, dbTable string, oneField string) (*map[string]map[string]string, error)
- func GetTableSchema(columnTypes []generatorModels.ColumnData) string
- func IsSecureField(table, column, dataType string) string
- func LcFirst(s string) string
- func StringifyFirstChar(str string) string
- func TableColumns(table string, hiddenColumns []string) string
- func TableColumnsWithMeta(table string, hiddenColumns []string) []map[string]string
- func TableMetas(tableName string) []models.TableMeta
- func TableToGraphql(table string, hiddenColumns []string, Subs []string, isInpute bool) string
- func TableToGraphqlOrderBy(table string, hiddenColumns []string) string
- func TableToStruct(table string, hiddenColumns []string, pkgName string, Subs []string) string
- func TableToStructNoTime(table string, hiddenColumns []string, pkgName string) string
- func Tables() map[string][]string
- func TablesForCloud() map[string][]string
- func ToGo(name string) string
- func TypeContains(v string, a []string) bool
- func UcFirst(s string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
View Source
var Enums []models.PostgresEnum
View Source
var TypeBigIntegers = []string{
"bigint",
"int8",
"LONG",
}
View Source
var TypeBinaries = []string{
"binary",
"blob",
"longblob",
"mediumblob",
"varbinary",
"BFILE",
"BLOB",
}
View Source
var TypeBool = []string{
"bool",
}
View Source
var TypeDates = []string{}
View Source
var TypeFloat32 = []string{
"float",
"float8",
"float4",
"real",
"FLOAT",
"NUMBER",
}
View Source
var TypeFloat64 = []string{
"decimal",
"double",
"numeric",
"BINARY_FLOAT",
"BINARY_DOUBLE",
"DECIMAL",
}
View Source
var TypeGeo = []string{}
View Source
var TypeIntegers = []string{
"tinyint",
"int",
"smallint",
"mediumint",
"int4",
"int2",
"year",
"SMALLINT",
"INT",
"INTEGER",
}
View Source
var TypeSecure = []string{
"secure",
}
View Source
var TypeStrings = []string{
"char",
"enum",
"varchar",
"nvarchar",
"longtext",
"mediumtext",
"text",
"ntext",
"tinytext",
"uuid",
"bpchar",
"CHARACTER",
"VARCHAR",
"VARCHAR2",
"NVARCHAR2",
"CLOB",
"CHAR",
"NCHAR",
"NCLOB",
"JSON",
"JSONB",
"json",
"ROWID",
"UROWID",
"jsonb",
"time",
"geometry",
}
View Source
var TypeTimes = []string{
"datetimeoffset",
"timestamptz",
"TIMESTAMP(6) WITH TIME ZONE",
"TIMESTAMP(6) WITH LOCAL TIME ZONE",
"TIMESTAMP",
"TIMESTAMP(6)",
"datetime",
"date",
"DATE",
"timestamp",
"TIMESTAMP",
}
Functions ¶
func FmtFieldName ¶
func GenerateGrapql ¶
func GenerateGrapqlOrder ¶
func GenerateOnlyStruct ¶
func GenerateProtobuf ¶
func GenerateSchemaForCloud ¶
func GenerateWithImports ¶
func GetColumns ¶
func GetColumnsFromSQLlTable ¶
func GetColumnsFromSQLlTable(db *sql.DB, dbTable string, hiddenColumns []string) ([]generatorModels.ColumnData, error)
func GetColumnsWithMeta ¶
func GetDBSchema ¶
func GetOnlyOneField ¶
func GetTableSchema ¶
func GetTableSchema(columnTypes []generatorModels.ColumnData) string
func IsSecureField ¶
func StringifyFirstChar ¶
func TableColumns ¶
func TableColumnsWithMeta ¶
func TableMetas ¶
func TableToGraphql ¶
func TableToGraphqlOrderBy ¶
func TableToStruct ¶
func TableToStructNoTime ¶
func TablesForCloud ¶
func TypeContains ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.