xorm

package
v0.0.0-...-960d387 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package xorm @author 张海生<[email protected]> @dateTime : 2021/11/8 4:30 下午

Index

Constants

This section is empty.

Variables

View Source
var Db *sql.DB = nil

Functions

func ConfigFilePath

func ConfigFilePath() string

func CreateMysqlDb

func CreateMysqlDb(dsn string) (*sql.DB, error)

CreateMysqlDb 创建db

func FileExists

func FileExists(path string) bool

判断文件/文件夹是否存在 -功能类似php的file_exists

func InitStruct

func InitStruct(xormDsn string, table string)

func SaveXormModelFile

func SaveXormModelFile(filePath, dsn string) error

func UcFirst

func UcFirst(str string) string

func XormModelFilePath

func XormModelFilePath() string

Types

type YamlFile

type YamlFile struct {
	Dsn  string
	Data struct {
		Database struct {
			Driver string
			Source string
		}
		Mysql struct {
			Default struct {
				Driver string
				Dsn    string
			}
		}
	}
}

func ReadYamlFile

func ReadYamlFile(yamlFilePath string) YamlFile

Jump to

Keyboard shortcuts

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