Documentation ¶
Overview ¶
Copyright 2017 Tamás Gulácsi
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func GetCfg(dsn string) (srvCfg ora.SrvCfg, sesCfg ora.SesCfg)
- func GetConnection(dsn string) (*sql.DB, error)
- func GetDSN(srvCfg ora.SrvCfg, sesCfg ora.SesCfg) string
- func GetRawConnection(dsn string) (*ora.Ses, error)
- func MapToSlice(qry string, metParam func(string) interface{}) (string, []interface{})
- func SplitDSN(dsn string) (username, password, sid string)
- type Column
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCfg ¶
func GetCfg(dsn string) (srvCfg ora.SrvCfg, sesCfg ora.SesCfg)
GetDSN returns a (command-line defined) connection string
func GetConnection ¶
GetConnection returns a connection - using GetDSN if dsn is empty
func GetRawConnection ¶
GetRawConnection returns a raw (*ora.Ses) connection - using GetDSN if dsn is empty
func MapToSlice ¶
MapToSlice modifies query for map (:paramname) to :%d placeholders + slice of params.
Calls metParam for each parameter met, and returns the slice of their results.