z1mongo

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReverseSlashFlag = `___z1ReverseSlashFlagz1____`

Functions

func CheckJoin

func CheckJoin(on_str, mainTable string) (join int, err error)

func Connect

func Connect(uri, dbName string, timeout, clientMaxNum uint64) (db *mongo.Database, err error)

connetc pool url mongodb://localhost:27017, mongodb://username:password@localhost:27017

func Disconnect

func Disconnect(db *mongo.Database) (err error)

func GetIgnoreCase added in v1.2.0

func GetIgnoreCase(db *gorm.DB) (b bool)

func Parse

func Parse(sql string, ignoreCase bool) (string, string, error)

func ParsingDDLSQL

func ParsingDDLSQL(stmt sqlparser.Statement) (ret map[string]string, err error)

func ParsingDeleteSQL

func ParsingDeleteSQL(stmt sqlparser.Statement, ignoreCase bool) (ret map[string]string, err error)

func ParsingInsertSQL

func ParsingInsertSQL(stmt sqlparser.Statement, ignoreCase bool) (ret map[string]string, err error)

func ParsingSQL

func ParsingSQL(sql string, ignoreCase bool) (ret map[string]string, err error)

func ParsingSelectSQL

func ParsingSelectSQL(stmt sqlparser.Statement, ignoreCase bool) (ret map[string]string, err error)

func ParsingUpdateSQL

func ParsingUpdateSQL(stmt sqlparser.Statement, ignoreCase bool) (ret map[string]string, err error)

func RegexEscapeString added in v1.3.1

func RegexEscapeString(input string) (out string)

func ShowQueryInfo

func ShowQueryInfo(sql, query string)

func Sql2Mongo

func Sql2Mongo(gdb *gorm.DB, DB *mongo.Database, sql string, z1count, showQuery bool, ret ...interface{}) (result []bson.M, total int64, action string, err error)

https://github.com/shan-chen/sql2mongo/blob/master/parse.go

Types

This section is empty.

Jump to

Keyboard shortcuts

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