diff --git a/README.md b/README.md index 490119b..d7a1204 100644 --- a/README.md +++ b/README.md @@ -403,5 +403,9 @@ You can run a benchmark and profile it with a command like: and then explore it with `go tool pprof`. The `-run` part excludes the tests for brevity. ## Acknowledgements - -We would like to thank the creators and contributors of the vertica-python library, and members of the Vertica team, for their help in understanding the wire protocol. +* @grzm (Github) +* @watercraft (Github) +* @fbernier (Github) +* @mlh758 (Github) for the awesome work filling in and enhancing the driver in many important ways. +* Tom Wall (Vertica) for the infinite patience and deep knowledge. +* The creators and contributors of the vertica-python library, and members of the Vertica team, for their help in understanding the wire protocol. diff --git a/driver.go b/driver.go index bc7bc37..754eaf6 100644 --- a/driver.go +++ b/driver.go @@ -46,7 +46,7 @@ type Driver struct{} const ( driverName string = "vertica-sql-go" - driverVersion string = "0.1.7" + driverVersion string = "0.2.0" protocolVersion uint32 = 0x00030008 ) diff --git a/driver_test.go b/driver_test.go index 8306a89..d9b9356 100644 --- a/driver_test.go +++ b/driver_test.go @@ -1,6 +1,6 @@ package vertigo -// Copyright (c) 2019 Micro Focus or one of its affiliates. +// Copyright (c) 2019-2020 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/logger_test.go b/logger_test.go index 4611935..f9e9c64 100644 --- a/logger_test.go +++ b/logger_test.go @@ -1,6 +1,6 @@ package vertigo -// Copyright (c) 2019 Micro Focus or one of its affiliates. +// Copyright (c) 2019-2020 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,12 +40,13 @@ import ( type LogMessage struct { Prefix string - Name string - Msg string + Name string + Msg string } type MyLogger struct { LastMessage *LogMessage } + func (l *MyLogger) Write(prefix string, name string, msg string) { l.LastMessage = &LogMessage{Prefix: prefix, Name: name, Msg: msg} } diff --git a/msgs/bedatarowmsg_test.go b/msgs/bedatarowmsg_test.go index bdd704a..09eb76d 100644 --- a/msgs/bedatarowmsg_test.go +++ b/msgs/bedatarowmsg_test.go @@ -1,5 +1,37 @@ package msgs +// Copyright (c) 2020 Micro Focus or one of its affiliates. +// +// 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. +// +// 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. + import ( "bytes" "encoding/binary" diff --git a/msgs/beinitstdinloadmsg.go b/msgs/beinitstdinloadmsg.go index 61ffd63..97ca806 100644 --- a/msgs/beinitstdinloadmsg.go +++ b/msgs/beinitstdinloadmsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // BEInitSTDINLoadMsg docs type BEInitSTDINLoadMsg struct { IsBinary bool diff --git a/msgs/febindmsg.go b/msgs/febindmsg.go index 34682c7..31de423 100644 --- a/msgs/febindmsg.go +++ b/msgs/febindmsg.go @@ -1,6 +1,6 @@ package msgs -// Copyright (c) 2019 Micro Focus or one of its affiliates. +// Copyright (c) 2019-2020 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/msgs/feclosemsg.go b/msgs/feclosemsg.go index f53f652..59ddd85 100644 --- a/msgs/feclosemsg.go +++ b/msgs/feclosemsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + type FECloseMsg struct { TargetType CmdTargetType TargetName string diff --git a/msgs/fedescribemsg.go b/msgs/fedescribemsg.go index d6a5393..e498366 100644 --- a/msgs/fedescribemsg.go +++ b/msgs/fedescribemsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // FEDescribeMsg docs type FEDescribeMsg struct { TargetType CmdTargetType diff --git a/msgs/feexecutemsg.go b/msgs/feexecutemsg.go index facfe38..18ea1f3 100644 --- a/msgs/feexecutemsg.go +++ b/msgs/feexecutemsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // FEExecuteMsg docs type FEExecuteMsg struct { Portal string diff --git a/msgs/feloaddatamsg.go b/msgs/feloaddatamsg.go index 09dfa33..129f09b 100644 --- a/msgs/feloaddatamsg.go +++ b/msgs/feloaddatamsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // FELoadDataMsg docs type FELoadDataMsg struct { Data []byte diff --git a/msgs/feloadfailmsg.go b/msgs/feloadfailmsg.go index a4d2122..42dea0b 100644 --- a/msgs/feloadfailmsg.go +++ b/msgs/feloadfailmsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // FELoadDoneMsg docs type FELoadFailMsg struct { Message string diff --git a/msgs/feparsemsg.go b/msgs/feparsemsg.go index aa804e7..97f6747 100644 --- a/msgs/feparsemsg.go +++ b/msgs/feparsemsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // FEParseMsg docs type FEParseMsg struct { PreparedName string diff --git a/msgs/fequerymsg.go b/msgs/fequerymsg.go index 4ea842b..0ef627b 100644 --- a/msgs/fequerymsg.go +++ b/msgs/fequerymsg.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // FEQueyMsg docs type FEQueryMsg struct { Query string diff --git a/msgs/feverifyloadfiles.go b/msgs/feverifyloadfiles.go index 81e4713..6a1eb2f 100644 --- a/msgs/feverifyloadfiles.go +++ b/msgs/feverifyloadfiles.go @@ -1,7 +1,5 @@ package msgs -import "fmt" - // Copyright (c) 2019 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -34,6 +32,8 @@ import "fmt" // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +import "fmt" + // FEVerifyLoadFiles docs type FEVerifyLoadFiles struct { FileNames []string diff --git a/parse/queryLex_test.go b/parse/queryLex_test.go index 611e94e..7eccda9 100644 --- a/parse/queryLex_test.go +++ b/parse/queryLex_test.go @@ -1,18 +1,36 @@ package parse // Copyright (c) 2020 Micro Focus or one of its affiliates. - +// // 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. +// +// 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. import "testing" diff --git a/result.go b/result.go index 9716dea..2a5f79b 100644 --- a/result.go +++ b/result.go @@ -1,6 +1,6 @@ package vertigo -// Copyright (c) 2019 Micro Focus or one of its affiliates. +// Copyright (c) 2019-2020 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rowcache/file.go b/rowcache/file.go index 29b07bd..4011208 100644 --- a/rowcache/file.go +++ b/rowcache/file.go @@ -1,5 +1,37 @@ package rowcache +// Copyright (c) 2020 Micro Focus or one of its affiliates. +// +// 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. +// +// 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. + import ( "bufio" "encoding/binary" diff --git a/rowcache/file_test.go b/rowcache/file_test.go index 5495990..9a98672 100644 --- a/rowcache/file_test.go +++ b/rowcache/file_test.go @@ -1,5 +1,37 @@ package rowcache +// Copyright (c) 2020 Micro Focus or one of its affiliates. +// +// 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. +// +// 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. + import ( "testing" diff --git a/rowcache/memory.go b/rowcache/memory.go index 9e1da9e..b24f2ad 100644 --- a/rowcache/memory.go +++ b/rowcache/memory.go @@ -1,5 +1,37 @@ package rowcache +// Copyright (c) 2020 Micro Focus or one of its affiliates. +// +// 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. +// +// 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. + import ( "github.com/vertica/vertica-sql-go/msgs" ) diff --git a/rowcache/memory_test.go b/rowcache/memory_test.go index 8ceaf28..26f8b80 100644 --- a/rowcache/memory_test.go +++ b/rowcache/memory_test.go @@ -1,5 +1,37 @@ package rowcache +// Copyright (c) 2020 Micro Focus or one of its affiliates. +// +// 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. +// +// 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. + import ( "testing" diff --git a/rows.go b/rows.go index 066dba8..46b8812 100644 --- a/rows.go +++ b/rows.go @@ -1,6 +1,6 @@ package vertigo -// Copyright (c) 2019 Micro Focus or one of its affiliates. +// Copyright (c) 2019-2020 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/rows_test.go b/rows_test.go index 0bc0f9a..06a21ab 100644 --- a/rows_test.go +++ b/rows_test.go @@ -1,5 +1,37 @@ package vertigo +// Copyright (c) 2020 Micro Focus or one of its affiliates. +// +// 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. +// +// 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. + import ( "bytes" "context" diff --git a/stmt.go b/stmt.go index a4b0b2b..337fa69 100644 --- a/stmt.go +++ b/stmt.go @@ -1,6 +1,6 @@ package vertigo -// Copyright (c) 2019 Micro Focus or one of its affiliates. +// Copyright (c) 2019-2020 Micro Focus or one of its affiliates. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stmt_test.go b/stmt_test.go index c18ae2f..17101c7 100644 --- a/stmt_test.go +++ b/stmt_test.go @@ -1,18 +1,36 @@ package vertigo // Copyright (c) 2020 Micro Focus or one of its affiliates. - +// // 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. +// +// 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. import ( "database/sql/driver"