diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-05-29 15:46:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-29 15:46:35 -0400 |
commit | 860e5d483cd952ec833c40312a2141bb3e4ef579 (patch) | |
tree | a854943f1f008f9b0f607f486de4b117b98e08e4 /vendor/github.com/go-gorp/gorp/index.go | |
parent | f9843b380074cc6082566a2752c5482210f912bb (diff) | |
download | chat-860e5d483cd952ec833c40312a2141bb3e4ef579.tar.gz chat-860e5d483cd952ec833c40312a2141bb3e4ef579.tar.bz2 chat-860e5d483cd952ec833c40312a2141bb3e4ef579.zip |
PLT-6341/PLT-6342 Update gorp to mattermost fork and add connection timeout setting (#6410)
* Update gorp to mattermost fork and add connection timeout setting
* Add go dependency
* Rename from connection timeout to query timeout
* Properly add gorp dependency
Diffstat (limited to 'vendor/github.com/go-gorp/gorp/index.go')
-rw-r--r-- | vendor/github.com/go-gorp/gorp/index.go | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/vendor/github.com/go-gorp/gorp/index.go b/vendor/github.com/go-gorp/gorp/index.go deleted file mode 100644 index 01ecd9eca..000000000 --- a/vendor/github.com/go-gorp/gorp/index.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2012 James Cooper. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -// Package gorp provides a simple way to marshal Go structs to and from -// SQL databases. It uses the database/sql package, and should work with any -// compliant database/sql driver. -// -// Source code and project home: -// https://github.com/go-gorp/gorp - -package gorp - -// IndexMap represents a mapping between a Go struct field and a single -// index in a table. -// Unique and MaxSize only inform the -// CreateTables() function and are not used by Insert/Update/Delete/Get. -type IndexMap struct { - // Index name in db table - IndexName string - - // If true, " unique" is added to create index statements. - // Not used elsewhere - Unique bool - - // Index type supported by Dialect - // Postgres: B-tree, Hash, GiST and GIN. - // Mysql: Btree, Hash. - // Sqlite: nil. - IndexType string - - // Columns name for single and multiple indexes - columns []string -} - -// Rename allows you to specify the index name in the table -// -// Example: table.IndMap("customer_test_idx").Rename("customer_idx") -// -func (idx *IndexMap) Rename(indname string) *IndexMap { - idx.IndexName = indname - return idx -} - -// SetUnique adds "unique" to the create index statements for this -// index, if b is true. -func (idx *IndexMap) SetUnique(b bool) *IndexMap { - idx.Unique = b - return idx -} - -// SetIndexType specifies the index type supported by chousen SQL Dialect -func (idx *IndexMap) SetIndexType(indtype string) *IndexMap { - idx.IndexType = indtype - return idx -} |