Skip to content

Commit

Permalink
Added sybase support. (#495)
Browse files Browse the repository at this point in the history
Signed-off-by: Mir Ansar <[email protected]>
  • Loading branch information
miransar authored May 14, 2024
1 parent c56a15d commit 4316c39
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (
github.com/itchyny/gojq v0.12.12
github.com/jeremywohl/flatten v1.0.1
github.com/lib/pq v1.10.9
github.com/newrelic-experimental/go-ase v1.2.0
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible
github.com/parnurzeal/gorequest v0.2.15
github.com/pkg/errors v0.9.1
Expand All @@ -41,8 +42,6 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/SAP/go-ase v0.0.0-20230911093826-e06baafeece3 // indirect
github.com/SAP/go-dblib v0.0.0-20220825075032-c1f3f4d6e7b3 // indirect
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/bitly/go-simplejson v0.5.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
Expand Down Expand Up @@ -74,6 +73,7 @@ require (
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/moul/http2curl v1.0.0 // indirect
github.com/newrelic-experimental/go-dblib v1.2.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ github.com/MonetDB/MonetDB-Go v1.0.2 h1:ovqY//8De9OzoJJbc1YkW4peNfGdLTgQhjc+fhBr
github.com/MonetDB/MonetDB-Go v1.0.2/go.mod h1:camniXrjGJnMoXXgZWhUY+2nKPVfjKmcA5mmrjuV2+A=
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/SAP/go-ase v0.0.0-20230911093826-e06baafeece3 h1:S2BdRIWytdt7gHV+39ZC9Fl8PbQlhlnWmBfQTy7iSUg=
github.com/SAP/go-ase v0.0.0-20230911093826-e06baafeece3/go.mod h1:RJNsL+XbiV4Ux3aTLlk5WIQy6kq6VW7OvAasNkq3j4U=
github.com/SAP/go-dblib v0.0.0-20220825075032-c1f3f4d6e7b3 h1:bX6dkWrQMTAO8IwVGZqXoNdWjZVQ3YnRU01p+x4X+Jw=
github.com/SAP/go-dblib v0.0.0-20220825075032-c1f3f4d6e7b3/go.mod h1:pyB1BEipxjxMcCYlymW+x6sgucc0N45V7LVPUnpDr/I=
github.com/SAP/go-hdb v0.107.3 h1:tX7CI+fsUFVNzR9LIAuX1mzyzRtuMiUkvuVVUgNSGss=
github.com/SAP/go-hdb v0.107.3/go.mod h1:EAlLPK5So38imnv2/aBADHZBjl76RVIWvu9Tkiu6LbY=
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI=
Expand Down Expand Up @@ -263,6 +259,10 @@ github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3P
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs=
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
github.com/newrelic-experimental/go-ase v1.2.0 h1:l9JN00pX+AUolLEvjCIiOXGiQxTsYW5YBrtsnMhss7k=
github.com/newrelic-experimental/go-ase v1.2.0/go.mod h1:phLmGUg0sxUkaNXqj752lG0PX7ElZkR/JyRZ7nJiWFc=
github.com/newrelic-experimental/go-dblib v1.2.0 h1:Dm0r9PdvbgjHKgpUxo78qehLfqP2Hy1mdm0NY2M1cQ8=
github.com/newrelic-experimental/go-dblib v1.2.0/go.mod h1:B8su1WE/yk105iCtDKvsWolUkg+LHYQvBxocCDrqCtA=
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible h1:Ktcm1aPAl7CW3o+FXAIKJ+jygWVXDXaUIWFyf2CXQTk=
github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible/go.mod h1:tMUHRMq6mJS0YyBnbWrTXAnREnQqC1AGO6Lu45u5xAM=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
Expand Down
6 changes: 3 additions & 3 deletions internal/inputs/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (

//Database Drivers
_ "github.com/MonetDB/MonetDB-Go/src" //MonetDB
// _ "github.com/SAP/go-ase" //Sybase
_ "github.com/SAP/go-hdb/driver" //SAP HANA
_ "github.com/denisenkom/go-mssqldb" //mssql | sql-server
_ "github.com/go-sql-driver/mysql" //mysql
_ "github.com/lib/pq" //postgres
_ "github.com/newrelic-experimental/go-ase" //Sybases
_ "github.com/sijms/go-ora/v2" //Oracle
vertigo "github.com/vertica/vertica-sql-go" //HP Vertica
//
Expand Down Expand Up @@ -228,8 +228,8 @@ func setDatabaseDriver(database, driver string, yml *load.Config, api load.API)
return load.DefaultMySQL
case "oracle":
return load.DefaultOracle
// case "sybase", "ase":
// return load.DefaultSybase
case "sybase", "ase":
return load.DefaultSybase
case "monetdb":
return load.DefaultMonetDB
case "hana", "go-hdb", "hdb":
Expand Down
2 changes: 1 addition & 1 deletion internal/load/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const (
DefaultMSSQLServer = "sqlserver"
DefaultMySQL = "mysql"
DefaultOracle = "oracle"
// DefaultSybase = "ase"
DefaultSybase = "ase"
DefaultMonetDB = "monetdb"
DefaultVertica = "vertica"
DefaultJmxHost = "127.0.0.1"
Expand Down

0 comments on commit 4316c39

Please sign in to comment.