Documentation
¶
Overview ¶
*************************************************************************** MIT License
Copyright (c) 2022 yjhi ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************
*************************************************************************** MIT License
Copyright (c) 2022 yjhi ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************
*************************************************************************** MIT License
Copyright (c) 2022 yjhi ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************
Index ¶
- func CreateSqlServerString(server string, user string, pass string, db string) string
- func CreateSqliteString(file string, config string) string
- func CreateSqliteStringWithPass(file string, user string, pass string, config string) string
- type SqlServerUtils
- type SqlUtils
- func (s *SqlUtils) Begin() bool
- func (s *SqlUtils) End() bool
- func (s *SqlUtils) Error() string
- func (s *SqlUtils) ExecBatch(args ...interface{}) bool
- func (s *SqlUtils) ExecCmd(cmd string) bool
- func (s *SqlUtils) ExecCmdWithArgs(cmd string, args ...interface{}) bool
- func (s *SqlUtils) GetInt(cmd string) (int64, bool)
- func (s *SqlUtils) GetString(cmd string) (string, bool)
- func (s *SqlUtils) Prepare(cmd string) bool
- func (s *SqlUtils) SetError(err error)
- type SqliteUtils
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSqlServerString ¶
func CreateSqliteString ¶
Types ¶
type SqlServerUtils ¶
* add by yjh 211125 * for sqlserver *
func BuildSqlServer ¶
func BuildSqlServer() *SqlServerUtils
func (*SqlServerUtils) CloseSqlServer ¶
func (s *SqlServerUtils) CloseSqlServer()
func (*SqlServerUtils) ConnectSqlServer ¶
func (s *SqlServerUtils) ConnectSqlServer(constr string) bool
func (*SqlServerUtils) ConnectSqlServerString ¶
type SqlUtils ¶
type SqlUtils struct { Db *sql.DB Result sql.Result Tx *sql.Tx Stmt *sql.Stmt // contains filtered or unexported fields }
* add by yjh 211109 * define base type *
func (*SqlUtils) ExecCmdWithArgs ¶
type SqliteUtils ¶
* add by yjh 211125 * for sqlserver *
func BuildSqlite ¶
func BuildSqlite() *SqliteUtils
func (*SqliteUtils) OpenFile ¶
func (s *SqliteUtils) OpenFile(dbFile string) bool
func (*SqliteUtils) OpenFileWithPass ¶
func (s *SqliteUtils) OpenFileWithPass(dbFile string, user string, pass string) bool