-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…11042) Refactor as a follow-up to #11037 BEGIN_COMMIT_OVERRIDE fix(oracle)!: Add `region` & `availability_domain` to primary keys(#11042) BREAKING-CHANGE: The following primary key columns were added: * `oracle_filestorage_export_sets`: `availability_domain` * `oracle_filestorage_file_systems`: `availability_domain` * `oracle_filestorage_mount_targets`: `availability_domain` * `oracle_filestorage_replication_targets`: `availability_domain` * `oracle_filestorage_replications`: `availability_domain` * `oracle_identity_compartments`: `region` * `oracle_identity_cost_tracking_tags`: `region` * `oracle_identity_dynamic_groups`: `region` * `oracle_identity_groups`: `region` * `oracle_identity_network_sources`: `region` * `oracle_identity_users`: `region` END_COMMIT_OVERRIDE
- Loading branch information
1 parent
7c6a3e2
commit ee2b208
Showing
136 changed files
with
295 additions
and
1,895 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package client | ||
|
||
import ( | ||
"github.com/apache/arrow/go/v13/arrow" | ||
"github.com/cloudquery/plugin-sdk/v3/schema" | ||
) | ||
|
||
var ( | ||
RegionColumn = schema.Column{ | ||
Name: "region", | ||
Type: arrow.BinaryTypes.String, | ||
Resolver: ResolveOracleRegion, | ||
PrimaryKey: true, | ||
} | ||
CompartmentIDColumn = schema.Column{ | ||
Name: "compartment_id", | ||
Type: arrow.BinaryTypes.String, | ||
Resolver: ResolveCompartmentID, | ||
PrimaryKey: true, | ||
} | ||
AvailabilityDomainColumn = schema.Column{ | ||
Name: "availability_domain", | ||
Type: arrow.BinaryTypes.String, | ||
Resolver: ResolveAvailabilityDomain, | ||
PrimaryKey: true, | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package client | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/cloudquery/plugin-sdk/v3/schema" | ||
) | ||
|
||
// ResolveOracleRegion grabs the region from the cq-client, not from the resource. | ||
func ResolveOracleRegion(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { | ||
client := meta.(*Client) | ||
return r.Set(c.Name, client.Region) | ||
} | ||
|
||
// ResolveCompartmentID grabs the compartment-id from the cq-client, not from the resource. | ||
func ResolveCompartmentID(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { | ||
client := meta.(*Client) | ||
return r.Set(c.Name, client.CompartmentOcid) | ||
} | ||
|
||
// ResolveAvailabilityDomain grabs the compartment-id from the cq-client, not from the resource. | ||
func ResolveAvailabilityDomain(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error { | ||
client := meta.(*Client) | ||
return r.Set(c.Name, client.AvailabilityDomain) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.