Skip to content

Commit ba1df1a

Browse files
committed
Update to new command table name - CommandTableSettings -> ForeignTableSettings.
1 parent 93d62db commit ba1df1a

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

fdw.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ func handleCommandInsert(rinfo *C.ResultRelInfo, slot *C.TupleTableSlot, rel C.R
448448
opts := GetFTableOptions(types.Oid(relid))
449449

450450
switch opts["table"] {
451-
case constants.CommandTableSettings:
451+
case constants.ForeignTableSettings:
452452
tupleDesc := buildTupleDesc(rel.rd_att)
453453
attributes := tupleDesc.Attrs
454454
hub, err := hub.GetHub()
@@ -475,9 +475,9 @@ func handleCommandInsert(rinfo *C.ResultRelInfo, slot *C.TupleTableSlot, rel C.R
475475

476476
// map it to one of key/value
477477
switch a.Name {
478-
case constants.CommandTableSettingsKeyColumn:
478+
case constants.ForeignTableSettingsKeyColumn:
479479
key = &datumStr
480-
case constants.CommandTableSettingsValueColumn:
480+
case constants.ForeignTableSettingsValueColumn:
481481
value = &datumStr
482482
}
483483
}

go.mod

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ require (
88
github.com/hashicorp/go-hclog v1.5.0
99
github.com/hashicorp/go-version v1.6.0 // indirect
1010
github.com/turbot/go-kit v0.6.0-alpha.1
11-
// remove_steampipe_command
12-
github.com/turbot/steampipe v1.7.0-rc.0.0.20230516153230-a938a696d29e
11+
github.com/turbot/steampipe v0.20.0-rc.2b
1312
github.com/turbot/steampipe-plugin-sdk/v5 v5.4.1
1413
go.opentelemetry.io/otel v1.10.0
1514
google.golang.org/protobuf v1.30.0
@@ -133,7 +132,7 @@ require (
133132
github.com/sethvargo/go-retry v0.2.4 // indirect
134133
github.com/shiena/ansicolor v0.0.0-20200904210342-c7312218db18 // indirect
135134
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
136-
github.com/sirupsen/logrus v1.9.0 // indirect
135+
github.com/sirupsen/logrus v1.9.1 // indirect
137136
github.com/spf13/afero v1.9.3 // indirect
138137
github.com/spf13/cast v1.5.0 // indirect
139138
github.com/spf13/jwalterweatherman v1.1.0 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB
833833
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
834834
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
835835
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
836-
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
837-
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
836+
github.com/sirupsen/logrus v1.9.1 h1:Ou41VVR3nMWWmTiEUnj0OlsgOSCUFgsPAOl6jRIcVtQ=
837+
github.com/sirupsen/logrus v1.9.1/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
838838
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
839839
github.com/smartystreets/assertions v1.13.0 h1:Dx1kYM01xsSqKPno3aqLnrwac2LetPvN23diwyr69Qs=
840840
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
@@ -904,8 +904,8 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1
904904
github.com/tombuildsstuff/giovanni v0.15.1/go.mod h1:0TZugJPEtqzPlMpuJHYfXY6Dq2uLPrXf98D2XQSxNbA=
905905
github.com/turbot/go-kit v0.6.0-alpha.1 h1:mm1QpkwknuJQfA7oKzyzMiDRx5GsKlzxwsNa7n+Ttj4=
906906
github.com/turbot/go-kit v0.6.0-alpha.1/go.mod h1:oP9gLk6bETL4nkEuujZZbOlcv9jnHQlf7DYcI/+Ke8Q=
907-
github.com/turbot/steampipe v1.7.0-rc.0.0.20230516153230-a938a696d29e h1:xHKqH1CueFpviC1SAeQhmfxS5e4Mfn/jp/b7QRRLZm4=
908-
github.com/turbot/steampipe v1.7.0-rc.0.0.20230516153230-a938a696d29e/go.mod h1:sDC02Vc5RYn/FqZ3vpuWlMqmawR7J2jwIC9Q33qWgnE=
907+
github.com/turbot/steampipe v0.20.0-rc.2b h1:6SDb4xMpBICn8ANDwNQN8ijBLsabpx5C9Cid16L0p6Q=
908+
github.com/turbot/steampipe v0.20.0-rc.2b/go.mod h1:C285I4nnAaawrT2ItqMYYQWRlab7lmSyWgr6S3Dj8nk=
909909
github.com/turbot/steampipe-plugin-sdk/v5 v5.4.1 h1:1d2Rt4SH9D/lnLhi7e7Zhv6d7OX8PzwKzCBbyvSeD+o=
910910
github.com/turbot/steampipe-plugin-sdk/v5 v5.4.1/go.mod h1:bfvdKaLwemr13EPOMbnr7/hOQOO7m4oM7HnVMdNotgY=
911911
github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=

hub/hub.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -850,13 +850,13 @@ func (h *Hub) ApplySetting(key string, value string) error {
850850

851851
func (h *Hub) GetSettingsSchema() map[string]*proto.TableSchema {
852852
return map[string]*proto.TableSchema{
853-
constants.CommandTableSettings: {
853+
constants.ForeignTableSettings: {
854854
Columns: []*proto.ColumnDefinition{
855-
{Name: constants.CommandTableSettingsKeyColumn, Type: proto.ColumnType_STRING},
856-
{Name: constants.CommandTableSettingsValueColumn, Type: proto.ColumnType_STRING},
855+
{Name: constants.ForeignTableSettingsKeyColumn, Type: proto.ColumnType_STRING},
856+
{Name: constants.ForeignTableSettingsValueColumn, Type: proto.ColumnType_STRING},
857857
},
858858
},
859-
constants.CommandTableScanMetadata: {
859+
constants.ForeignTableScanMetadata: {
860860
Columns: []*proto.ColumnDefinition{
861861
{Name: "id", Type: proto.ColumnType_INT},
862862
{Name: "table", Type: proto.ColumnType_STRING},
@@ -889,7 +889,7 @@ func (h *Hub) throttle() {
889889

890890
func (h *Hub) executeCommandScan(table string) (Iterator, error) {
891891
switch table {
892-
case constants.CommandTableScanMetadata:
892+
case constants.ForeignTableScanMetadata:
893893
res := &QueryResult{
894894
Rows: make([]map[string]interface{}, len(h.scanMetadata)),
895895
}

0 commit comments

Comments
 (0)