From dc490c32f5b1b0f4f6e7e96e6ff31e63d7fa1a50 Mon Sep 17 00:00:00 2001 From: Mariana Date: Mon, 10 Feb 2020 17:26:16 +0100 Subject: [PATCH 01/16] work on GA --- CHANGELOG.next.asciidoc | 2 + NOTICE.txt | 2 +- .../Azure/azure-event-hubs-go/v3/changelog.md | 10 ++- .../Azure/azure-event-hubs-go/v3/eph/eph.go | 67 +++++++++++++------ .../Azure/azure-event-hubs-go/v3/go.sum | 1 + .../v3/storage/credential.go | 2 +- .../Azure/azure-event-hubs-go/v3/version.go | 2 +- vendor/vendor.json | 10 +-- x-pack/filebeat/input/azureeventhub/eph.go | 9 ++- 9 files changed, 71 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index b9e8da68ee4..3446c662049 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -106,6 +106,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d *Filebeat* + - Set event.outcome field based on googlecloud audit log output. {pull}15731[15731] - Add dashboard for AWS ELB fileset. {pull}15804[15804] - Add dashboard for AWS vpcflow fileset. {pull}16007[16007] @@ -113,6 +114,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add custom string mapping to CEF module to support Forcepoint NGFW {issue}14663[14663] {pull}15910[15910] - move create-[module,fileset,fields] to mage and enable in x-pack/filebeat {pull}15836[15836] - Add ECS tls and categorization fields to apache module. {issue}16032[16032] {pull}16121[16121] +- Work on e2e ACK's for the azure-eventhub input {issue}15671[15671] *Heartbeat* diff --git a/NOTICE.txt b/NOTICE.txt index 1bee6d854de..649fd18a9d9 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -291,7 +291,7 @@ License type (autodetected): MIT -------------------------------------------------------------------- Dependency: github.com/Azure/azure-event-hubs-go/v3 -Version: v3.0.0 +Version: v3.1.2 Revision: 7a1b2e2089e284bcec716b3bdc64ee2e5e626871 License type (autodetected): MIT ./vendor/github.com/Azure/azure-event-hubs-go/v3/LICENSE: diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md b/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md index 0b92dd38158..8e14f9d4236 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md @@ -1,6 +1,14 @@ # Change Log -## `head` +## `v3.1.2` +- fix errors in message handling being ignored [#155](https://github.com/Azure/azure-event-hubs-go/issues/155) + +## `v3.1.1` +- Azure storage SAS token regeneration fix [#157](https://github.com/Azure/azure-event-hubs-go/issues/157) + +## `v3.1.0` +- add support for websocket connections with eph with `eph.WithWebSocketConnection()` + ## `v2.0.4` - add comment on the `PartitionID` field in `SystemProperties` to clarify that it will always return a nil value [#131](https://github.com/Azure/azure-event-hubs-go/issues/131) diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go index 1d14df5a12d..fda6965e579 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go @@ -60,21 +60,22 @@ const ( type ( // EventProcessorHost provides functionality for coordinating and balancing load across multiple Event Hub partitions EventProcessorHost struct { - namespace string - hubName string - name string - consumerGroup string - tokenProvider auth.TokenProvider - client *eventhub.Hub - leaser Leaser - checkpointer Checkpointer - scheduler *scheduler - handlers map[string]eventhub.Handler - hostMu sync.Mutex - handlersMu sync.Mutex - partitionIDs []string - noBanner bool - env *azure.Environment + namespace string + hubName string + name string + consumerGroup string + tokenProvider auth.TokenProvider + client *eventhub.Hub + leaser Leaser + checkpointer Checkpointer + scheduler *scheduler + handlers map[string]eventhub.Handler + hostMu sync.Mutex + handlersMu sync.Mutex + partitionIDs []string + noBanner bool + webSocketConnection bool + env *azure.Environment } // EventProcessorHostOption provides configuration options for an EventProcessorHost @@ -117,6 +118,14 @@ func WithEnvironment(env azure.Environment) EventProcessorHostOption { } } +// WithWebSocketConnection will configure an EventProcessorHost to use websockets +func WithWebSocketConnection() EventProcessorHostOption { + return func(host *EventProcessorHost) error { + host.webSocketConnection = true + return nil + } +} + // NewFromConnectionString builds a new Event Processor Host from an Event Hub connection string which can be found in // the Azure portal func NewFromConnectionString(ctx context.Context, connStr string, leaser Leaser, checkpointer Checkpointer, opts ...EventProcessorHostOption) (*EventProcessorHost, error) { @@ -165,6 +174,10 @@ func NewFromConnectionString(ctx context.Context, connStr string, leaser Leaser, hubOpts = append(hubOpts, eventhub.HubWithEnvironment(*host.env)) } + if host.webSocketConnection { + hubOpts = append(hubOpts, eventhub.HubWithWebSocketConnection()) + } + client, err := eventhub.NewHubFromConnectionString(connStr, hubOpts...) if err != nil { tab.For(ctx).Error(err) @@ -217,6 +230,10 @@ func New(ctx context.Context, namespace, hubName string, tokenProvider auth.Toke hubOpts = append(hubOpts, eventhub.HubWithEnvironment(*host.env)) } + if host.webSocketConnection { + hubOpts = append(hubOpts, eventhub.HubWithWebSocketConnection()) + } + client, err := eventhub.NewHub(namespace, hubName, tokenProvider, hubOpts...) if err != nil { return nil, err @@ -411,18 +428,24 @@ func (h *EventProcessorHost) compositeHandlers() eventhub.Handler { h.handlersMu.Lock() defer h.handlersMu.Unlock() - var wg sync.WaitGroup - for _, handle := range h.handlers { + // we accept that this will contain any of the possible len(h.handlers) errors + // as it will be used to later decide of delivery is considered a failure + // and NOT further inspected + var lastError error + + wg := &sync.WaitGroup{} + for _, handler := range h.handlers { wg.Add(1) - go func(boundHandle eventhub.Handler) { - if err := boundHandle(ctx, event); err != nil { + go func(boundHandler eventhub.Handler) { + defer wg.Done() // consider if panics should be cought here, too. Currently would crash process + if err := boundHandler(ctx, event); err != nil { + lastError = err tab.For(ctx).Error(err) } - wg.Done() - }(handle) + }(handler) } wg.Wait() - return nil + return lastError } } diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/go.sum b/vendor/github.com/Azure/azure-event-hubs-go/v3/go.sum index aa9f7c7d383..7156f037963 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/go.sum +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/go.sum @@ -67,6 +67,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/storage/credential.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/storage/credential.go index 3344a74de34..999287e0df5 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/storage/credential.go +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/storage/credential.go @@ -153,7 +153,7 @@ func (cred *AADSASCredential) getToken(ctx context.Context) (SASToken, error) { defer span.End() if cred.token != nil { - if cred.token.expiry.Before(time.Now().Add(-5 * time.Minute)) { + if !cred.token.expiry.Before(time.Now().Add(5 * time.Minute)) { return *cred.token, nil } } diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go index 81e7ecfb69f..536932abe86 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go @@ -2,5 +2,5 @@ package eventhub const ( // Version is the semantic version number - Version = "3.0.0" + Version = "3.1.2" ) diff --git a/vendor/vendor.json b/vendor/vendor.json index 4b29c2259eb..57d2ec352ed 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -206,7 +206,7 @@ "path": "github.com/Azure/azure-event-hubs-go/v3", "revision": "7a1b2e2089e284bcec716b3bdc64ee2e5e626871", "revisionTime": "2019-12-17T22:59:24Z", - "version": "v3.0.0", + "version": "v3.1.2", "versionExact": "v3.0.0" }, { @@ -215,7 +215,7 @@ "path": "github.com/Azure/azure-event-hubs-go/v3/atom", "revision": "7a1b2e2089e284bcec716b3bdc64ee2e5e626871", "revisionTime": "2019-12-17T22:59:24Z", - "version": "v3.0.0", + "version": "v3.1.2", "versionExact": "v3.0.0" }, { @@ -224,7 +224,7 @@ "path": "github.com/Azure/azure-event-hubs-go/v3/eph", "revision": "7a1b2e2089e284bcec716b3bdc64ee2e5e626871", "revisionTime": "2019-12-17T22:59:24Z", - "version": "v3.0.0", + "version": "v3.1.2", "versionExact": "v3.0.0" }, { @@ -233,7 +233,7 @@ "path": "github.com/Azure/azure-event-hubs-go/v3/persist", "revision": "7a1b2e2089e284bcec716b3bdc64ee2e5e626871", "revisionTime": "2019-12-17T22:59:24Z", - "version": "v3.0.0", + "version": "v3.1.2", "versionExact": "v3.0.0" }, { @@ -242,7 +242,7 @@ "path": "github.com/Azure/azure-event-hubs-go/v3/storage", "revision": "7a1b2e2089e284bcec716b3bdc64ee2e5e626871", "revisionTime": "2019-12-17T22:59:24Z", - "version": "v3.0.0", + "version": "v3.1.2", "versionExact": "v3.0.0" }, { diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index afd26264529..7123a12c3d1 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -7,8 +7,7 @@ package azureeventhub import ( "context" "fmt" - - eventhub "github.com/Azure/azure-event-hubs-go/v3" + "github.com/Azure/azure-event-hubs-go/v3" "github.com/Azure/azure-event-hubs-go/v3/eph" "github.com/Azure/azure-event-hubs-go/v3/storage" "github.com/Azure/azure-storage-blob-go/azblob" @@ -49,7 +48,11 @@ func (a *azureInput) runWithEPH() error { handlerID, err := a.processor.RegisterHandler(a.workerCtx, func(c context.Context, e *eventhub.Event) error { // partitionID is not yet mapped in the azure-eventhub sdk - return a.processEvents(e, "") + err := a.processEvents(e, "") + if err != nil { + a.log.Errorf("Error received from processing events: %v", err) + } + return err }) if err != nil { return err From 762ec62fbc4335c92b6ee63630eec0db6c025437 Mon Sep 17 00:00:00 2001 From: Mariana Date: Mon, 10 Feb 2020 17:41:19 +0100 Subject: [PATCH 02/16] update changelog --- CHANGELOG.next.asciidoc | 2 +- x-pack/filebeat/input/azureeventhub/eph.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 3446c662049..f76f6108486 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -114,7 +114,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Add custom string mapping to CEF module to support Forcepoint NGFW {issue}14663[14663] {pull}15910[15910] - move create-[module,fileset,fields] to mage and enable in x-pack/filebeat {pull}15836[15836] - Add ECS tls and categorization fields to apache module. {issue}16032[16032] {pull}16121[16121] -- Work on e2e ACK's for the azure-eventhub input {issue}15671[15671] +- Work on e2e ACK's for the azure-eventhub input {issue}15671[15671] {pull}16215[16215] *Heartbeat* diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index 7123a12c3d1..e893d7261bf 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -48,11 +48,7 @@ func (a *azureInput) runWithEPH() error { handlerID, err := a.processor.RegisterHandler(a.workerCtx, func(c context.Context, e *eventhub.Event) error { // partitionID is not yet mapped in the azure-eventhub sdk - err := a.processEvents(e, "") - if err != nil { - a.log.Errorf("Error received from processing events: %v", err) - } - return err + return a.processEvents(e, "") }) if err != nil { return err From 23dc2dc7cc89dd97d01bc978595a31cefb6920ae Mon Sep 17 00:00:00 2001 From: Mariana Date: Mon, 10 Feb 2020 18:31:01 +0100 Subject: [PATCH 03/16] go vet --- x-pack/filebeat/input/azureeventhub/eph.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index e893d7261bf..afd26264529 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -7,7 +7,8 @@ package azureeventhub import ( "context" "fmt" - "github.com/Azure/azure-event-hubs-go/v3" + + eventhub "github.com/Azure/azure-event-hubs-go/v3" "github.com/Azure/azure-event-hubs-go/v3/eph" "github.com/Azure/azure-event-hubs-go/v3/storage" "github.com/Azure/azure-storage-blob-go/azblob" From 883be197ffdc9ee735f117b8149b84f12c260245 Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 18 Feb 2020 15:10:10 +0100 Subject: [PATCH 04/16] work on error --- x-pack/filebeat/input/azureeventhub/eph.go | 6 +++++- x-pack/filebeat/input/azureeventhub/input.go | 16 +++++++++++----- .../filebeat/input/azureeventhub/input_test.go | 3 ++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index afd26264529..ae33eff7e0f 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -49,7 +49,11 @@ func (a *azureInput) runWithEPH() error { handlerID, err := a.processor.RegisterHandler(a.workerCtx, func(c context.Context, e *eventhub.Event) error { // partitionID is not yet mapped in the azure-eventhub sdk - return a.processEvents(e, "") + err := a.processEvents(e, "") + if err != nil { + a.Stop() + } + return err }) if err != nil { return err diff --git a/x-pack/filebeat/input/azureeventhub/input.go b/x-pack/filebeat/input/azureeventhub/input.go index 68eff0547d6..d3aab756f20 100644 --- a/x-pack/filebeat/input/azureeventhub/input.go +++ b/x-pack/filebeat/input/azureeventhub/input.go @@ -184,7 +184,10 @@ func (a *azureInput) processEvents(event *eventhub.Event, partitionID string) er "eventhub": a.config.EventHubName, "consumer_group": a.config.ConsumerGroup, } - messages := a.parseMultipleMessages(event.Data) + messages, err := a.parseMultipleMessages(event.Data) + if err != nil { + return err + } for _, msg := range messages { azure.Put("offset", event.SystemProperties.Offset) azure.Put("sequence_number", event.SystemProperties.SequenceNumber) @@ -197,19 +200,21 @@ func (a *azureInput) processEvents(event *eventhub.Event, partitionID string) er }, }) if !ok { - return errors.New("event has not been sent") + err := errors.New("event has been processed but the send process has failed") + a.log.Error(err) + return err } } return nil } // parseMultipleMessages will try to split the message into multiple ones based on the group field provided by the configuration -func (a *azureInput) parseMultipleMessages(bMessage []byte) []string { +func (a *azureInput) parseMultipleMessages(bMessage []byte) ([]string, error) { var obj map[string][]interface{} err := json.Unmarshal(bMessage, &obj) if err != nil { a.log.Errorw(fmt.Sprintf("deserializing multiple messages using the group object `records`"), "error", err) - return []string{string(bMessage)} + return []string{string(bMessage)}, nil } var messages []string if len(obj[expandEventListFromField]) > 0 { @@ -219,8 +224,9 @@ func (a *azureInput) parseMultipleMessages(bMessage []byte) []string { messages = append(messages, string(js)) } else { a.log.Errorw(fmt.Sprintf("serializing message %s", ms), "error", err) + return nil, err } } } - return messages + return messages, nil } diff --git a/x-pack/filebeat/input/azureeventhub/input_test.go b/x-pack/filebeat/input/azureeventhub/input_test.go index 35e0683133a..489d1879b76 100644 --- a/x-pack/filebeat/input/azureeventhub/input_test.go +++ b/x-pack/filebeat/input/azureeventhub/input_test.go @@ -74,7 +74,8 @@ func TestParseMultipleMessages(t *testing.T) { "{\"test\":\"this is 2nd message\",\"time\":\"2019-12-17T13:43:44.4946995Z\"}," + "{\"test\":\"this is 3rd message\",\"time\":\"2019-12-17T13:43:44.4946995Z\"}]}" input := azureInput{} - messages := input.parseMultipleMessages([]byte(msg)) + messages, err := input.parseMultipleMessages([]byte(msg)) + assert.Nil(t, err) assert.NotNil(t, messages) assert.Equal(t, len(messages), 3) msgs := []string{ From bc674ffbec883c2a1c19a8345de3f9addfcd83c7 Mon Sep 17 00:00:00 2001 From: Mariana Date: Thu, 20 Feb 2020 12:23:07 +0100 Subject: [PATCH 05/16] error handling --- x-pack/filebeat/input/azureeventhub/eph.go | 10 +++++++--- x-pack/filebeat/input/azureeventhub/input.go | 19 ++++++------------- .../input/azureeventhub/input_test.go | 9 ++++----- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index ae33eff7e0f..c6a9421a2c2 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -6,6 +6,7 @@ package azureeventhub import ( "context" + "errors" "fmt" eventhub "github.com/Azure/azure-event-hubs-go/v3" @@ -49,11 +50,14 @@ func (a *azureInput) runWithEPH() error { handlerID, err := a.processor.RegisterHandler(a.workerCtx, func(c context.Context, e *eventhub.Event) error { // partitionID is not yet mapped in the azure-eventhub sdk - err := a.processEvents(e, "") - if err != nil { + ok := a.processEvents(e, "") + if !ok { + onEventErr := errors.New("event has been processed but the send process has failed. Stopping input worker.") + a.log.Debug(onEventErr.Error()) a.Stop() + return onEventErr } - return err + return nil }) if err != nil { return err diff --git a/x-pack/filebeat/input/azureeventhub/input.go b/x-pack/filebeat/input/azureeventhub/input.go index d3aab756f20..e85a9d31446 100644 --- a/x-pack/filebeat/input/azureeventhub/input.go +++ b/x-pack/filebeat/input/azureeventhub/input.go @@ -176,7 +176,7 @@ func (a *azureInput) Wait() { a.Stop() } -func (a *azureInput) processEvents(event *eventhub.Event, partitionID string) error { +func (a *azureInput) processEvents(event *eventhub.Event, partitionID string) bool { timestamp := time.Now() azure := common.MapStr{ // partitionID is only mapped in the non-eph option which is not available yet, this field will be temporary unavailable @@ -184,10 +184,7 @@ func (a *azureInput) processEvents(event *eventhub.Event, partitionID string) er "eventhub": a.config.EventHubName, "consumer_group": a.config.ConsumerGroup, } - messages, err := a.parseMultipleMessages(event.Data) - if err != nil { - return err - } + messages := a.parseMultipleMessages(event.Data) for _, msg := range messages { azure.Put("offset", event.SystemProperties.Offset) azure.Put("sequence_number", event.SystemProperties.SequenceNumber) @@ -200,21 +197,18 @@ func (a *azureInput) processEvents(event *eventhub.Event, partitionID string) er }, }) if !ok { - err := errors.New("event has been processed but the send process has failed") - a.log.Error(err) - return err + return ok } } - return nil + return true } // parseMultipleMessages will try to split the message into multiple ones based on the group field provided by the configuration -func (a *azureInput) parseMultipleMessages(bMessage []byte) ([]string, error) { +func (a *azureInput) parseMultipleMessages(bMessage []byte) []string { var obj map[string][]interface{} err := json.Unmarshal(bMessage, &obj) if err != nil { a.log.Errorw(fmt.Sprintf("deserializing multiple messages using the group object `records`"), "error", err) - return []string{string(bMessage)}, nil } var messages []string if len(obj[expandEventListFromField]) > 0 { @@ -224,9 +218,8 @@ func (a *azureInput) parseMultipleMessages(bMessage []byte) ([]string, error) { messages = append(messages, string(js)) } else { a.log.Errorw(fmt.Sprintf("serializing message %s", ms), "error", err) - return nil, err } } } - return messages, nil + return messages } diff --git a/x-pack/filebeat/input/azureeventhub/input_test.go b/x-pack/filebeat/input/azureeventhub/input_test.go index 489d1879b76..25a3a30941e 100644 --- a/x-pack/filebeat/input/azureeventhub/input_test.go +++ b/x-pack/filebeat/input/azureeventhub/input_test.go @@ -57,9 +57,9 @@ func TestProcessEvents(t *testing.T) { Data: []byte(msg), SystemProperties: &properties, } - err = input.processEvents(&ev, "0") - if err != nil { - t.Fatal(err) + ok := input.processEvents(&ev, "0") + if !ok { + t.Fatal("OnEvent function returned false") } assert.Equal(t, len(o.Events), 1) message, err := o.Events[0].Fields.GetValue("message") @@ -74,8 +74,7 @@ func TestParseMultipleMessages(t *testing.T) { "{\"test\":\"this is 2nd message\",\"time\":\"2019-12-17T13:43:44.4946995Z\"}," + "{\"test\":\"this is 3rd message\",\"time\":\"2019-12-17T13:43:44.4946995Z\"}]}" input := azureInput{} - messages, err := input.parseMultipleMessages([]byte(msg)) - assert.Nil(t, err) + messages := input.parseMultipleMessages([]byte(msg)) assert.NotNil(t, messages) assert.Equal(t, len(messages), 3) msgs := []string{ From ebce98715c7e59ae0918331a3ba61a9c6899efd6 Mon Sep 17 00:00:00 2001 From: Mariana Date: Thu, 20 Feb 2020 12:26:05 +0100 Subject: [PATCH 06/16] error message --- x-pack/filebeat/input/azureeventhub/eph.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index c6a9421a2c2..f50270c1444 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -52,7 +52,7 @@ func (a *azureInput) runWithEPH() error { // partitionID is not yet mapped in the azure-eventhub sdk ok := a.processEvents(e, "") if !ok { - onEventErr := errors.New("event has been processed but the send process has failed. Stopping input worker.") + onEventErr := errors.New("OnEvent function returned false. Stopping input worker") a.log.Debug(onEventErr.Error()) a.Stop() return onEventErr From c8c197e3237195f007e68ad763c0f6b1aeb6b415 Mon Sep 17 00:00:00 2001 From: Mariana Date: Fri, 21 Feb 2020 15:11:12 +0100 Subject: [PATCH 07/16] temp --- x-pack/filebeat/input/azureeventhub/eph.go | 8 +- x-pack/filebeat/input/azureeventhub/input.go | 34 ++++-- .../filebeat/input/azureeventhub/message.go | 100 ++++++++++++++++++ 3 files changed, 128 insertions(+), 14 deletions(-) create mode 100644 x-pack/filebeat/input/azureeventhub/message.go diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index f50270c1444..24cbb7fa10a 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -49,15 +49,17 @@ func (a *azureInput) runWithEPH() error { // register a message handler -- many can be registered handlerID, err := a.processor.RegisterHandler(a.workerCtx, func(c context.Context, e *eventhub.Event) error { + var onEventErr error // partitionID is not yet mapped in the azure-eventhub sdk ok := a.processEvents(e, "") if !ok { - onEventErr := errors.New("OnEvent function returned false. Stopping input worker") + onEventErr = errors.New("OnEvent function returned false. Stopping input worker") a.log.Debug(onEventErr.Error()) a.Stop() - return onEventErr } - return nil + x := <-a.ackChannel + _= x + return onEventErr }) if err != nil { return err diff --git a/x-pack/filebeat/input/azureeventhub/input.go b/x-pack/filebeat/input/azureeventhub/input.go index e85a9d31446..11130123eba 100644 --- a/x-pack/filebeat/input/azureeventhub/input.go +++ b/x-pack/filebeat/input/azureeventhub/input.go @@ -21,7 +21,7 @@ import ( "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" - eventhub "github.com/Azure/azure-event-hubs-go/v3" + "github.com/Azure/azure-event-hubs-go/v3" "github.com/Azure/azure-event-hubs-go/v3/eph" ) @@ -42,6 +42,7 @@ type azureInput struct { workerWg sync.WaitGroup // waits on worker goroutine. processor *eph.EventProcessorHost // eph will be assigned if users have enabled the option hub *eventhub.Hub // hub will be assigned + ackChannel chan int } const ( @@ -66,14 +67,6 @@ func NewInput( if err := cfg.Unpack(&config); err != nil { return nil, errors.Wrapf(err, "reading %s input config", inputName) } - out, err := connector.ConnectWith(cfg, beat.ClientConfig{ - Processing: beat.ProcessingConfig{ - DynamicFields: inputContext.DynamicFields, - }, - }) - if err != nil { - return nil, err - } inputCtx, cancelInputCtx := context.WithCancel(context.Background()) go func() { @@ -91,12 +84,30 @@ func NewInput( input := &azureInput{ config: config, log: logp.NewLogger(fmt.Sprintf("%s input", inputName)).With("connection string", config.ConnectionString), - outlet: out, context: inputContext, workerCtx: workerCtx, workerCancel: workerCancel, } - + out, err := connector.ConnectWith(cfg, beat.ClientConfig{ + Processing: beat.ProcessingConfig{ + DynamicFields: inputContext.DynamicFields, + }, + ACKEvents: func(privates []interface{}) { + for _, priv := range privates { + if msg, ok := priv.(*[]byte); ok { + input.ackChannel <- 0 + _= msg + //msg.Ack() + } else { + input.log.Error("Failed ACKing azure-eventhub event") + } + } + }, + }) + if err != nil { + return nil, err + } + input.outlet = out input.log.Infof("Initialized %s input.", inputName) return input, nil } @@ -195,6 +206,7 @@ func (a *azureInput) processEvents(event *eventhub.Event, partitionID string) bo "message": msg, "azure": azure, }, + Private: event.Data, }) if !ok { return ok diff --git a/x-pack/filebeat/input/azureeventhub/message.go b/x-pack/filebeat/input/azureeventhub/message.go new file mode 100644 index 00000000000..b675aa655b2 --- /dev/null +++ b/x-pack/filebeat/input/azureeventhub/message.go @@ -0,0 +1,100 @@ +// Copyright 2016 Google LLC +// +// 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. + +package azureeventhub + +import ( + "time" + + "github.com/golang/protobuf/ptypes" + pb "google.golang.org/genproto/googleapis/pubsub/v1" +) + +// Message represents a Pub/Sub message. +type Message struct { + // ID identifies this message. + // This ID is assigned by the server and is populated for Messages obtained from a subscription. + // This field is read-only. + ID string + + // Data is the actual data in the message. + Data []byte + + // Attributes represents the key-value pairs the current message + // is labelled with. + Attributes map[string]string + + // ackID is the identifier to acknowledge this message. + ackID string + + // The time at which the message was published. + // This is populated by the server for Messages obtained from a subscription. + // This field is read-only. + PublishTime time.Time + + // receiveTime is the time the message was received by the client. + receiveTime time.Time + + // size is the approximate size of the message's data and attributes. + size int + + calledDone bool + + // The done method of the iterator that created this Message. + doneFunc func(string, bool, time.Time) +} + +func toMessage(resp *pb.ReceivedMessage) (*Message, error) { + if resp.Message == nil { + return &Message{ackID: resp.AckId}, nil + } + + pubTime, err := ptypes.Timestamp(resp.Message.PublishTime) + if err != nil { + return nil, err + } + return &Message{ + ackID: resp.AckId, + Data: resp.Message.Data, + Attributes: resp.Message.Attributes, + ID: resp.Message.MessageId, + PublishTime: pubTime, + }, nil +} + +// Ack indicates successful processing of a Message passed to the Subscriber.Receive callback. +// It should not be called on any other Message value. +// If message acknowledgement fails, the Message will be redelivered. +// Client code must call Ack or Nack when finished for each received Message. +// Calls to Ack or Nack have no effect after the first call. +func (m *Message) Ack() { + m.done(true) +} + +// Nack indicates that the client will not or cannot process a Message passed to the Subscriber.Receive callback. +// It should not be called on any other Message value. +// Nack will result in the Message being redelivered more quickly than if it were allowed to expire. +// Client code must call Ack or Nack when finished for each received Message. +// Calls to Ack or Nack have no effect after the first call. +func (m *Message) Nack() { + m.done(false) +} + +func (m *Message) done(ack bool) { + if m.calledDone { + return + } + m.calledDone = true + m.doneFunc(m.ackID, ack, m.receiveTime) +} From c3243cf5fd82263f30467ce939cb65a2751a9472 Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 3 Mar 2020 16:37:58 +0100 Subject: [PATCH 08/16] temp --- .../azureeventhub/azureeventhub_integration_test.go | 10 +++++----- x-pack/filebeat/input/azureeventhub/input.go | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go index f53da1971d8..949cd707e1a 100644 --- a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go +++ b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go @@ -2,7 +2,7 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -// +build integration + package azureeventhub @@ -16,10 +16,10 @@ import ( eventhub "github.com/Azure/azure-event-hubs-go/v3" "github.com/stretchr/testify/assert" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" ) var ( diff --git a/x-pack/filebeat/input/azureeventhub/input.go b/x-pack/filebeat/input/azureeventhub/input.go index 11130123eba..6a61ff3da7d 100644 --- a/x-pack/filebeat/input/azureeventhub/input.go +++ b/x-pack/filebeat/input/azureeventhub/input.go @@ -11,15 +11,15 @@ import ( "sync" "time" - "github.com/elastic/beats/libbeat/common/cfgwarn" + "github.com/elastic/beats/v7/libbeat/common/cfgwarn" "github.com/pkg/errors" - "github.com/elastic/beats/filebeat/channel" - "github.com/elastic/beats/filebeat/input" - "github.com/elastic/beats/libbeat/beat" - "github.com/elastic/beats/libbeat/common" - "github.com/elastic/beats/libbeat/logp" + "github.com/elastic/beats/v7/filebeat/channel" + "github.com/elastic/beats/v7/filebeat/input" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/common" + "github.com/elastic/beats/v7/libbeat/logp" "github.com/Azure/azure-event-hubs-go/v3" "github.com/Azure/azure-event-hubs-go/v3/eph" From fa69972b888465c95e689fdf87f6c83453740aae Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 3 Mar 2020 17:24:51 +0100 Subject: [PATCH 09/16] undo tests --- x-pack/filebeat/input/azureeventhub/eph.go | 2 - x-pack/filebeat/input/azureeventhub/input.go | 11 -- .../filebeat/input/azureeventhub/message.go | 100 ------------------ 3 files changed, 113 deletions(-) delete mode 100644 x-pack/filebeat/input/azureeventhub/message.go diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index 24cbb7fa10a..8848483c8be 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -57,8 +57,6 @@ func (a *azureInput) runWithEPH() error { a.log.Debug(onEventErr.Error()) a.Stop() } - x := <-a.ackChannel - _= x return onEventErr }) if err != nil { diff --git a/x-pack/filebeat/input/azureeventhub/input.go b/x-pack/filebeat/input/azureeventhub/input.go index 6a61ff3da7d..f260c148227 100644 --- a/x-pack/filebeat/input/azureeventhub/input.go +++ b/x-pack/filebeat/input/azureeventhub/input.go @@ -92,17 +92,6 @@ func NewInput( Processing: beat.ProcessingConfig{ DynamicFields: inputContext.DynamicFields, }, - ACKEvents: func(privates []interface{}) { - for _, priv := range privates { - if msg, ok := priv.(*[]byte); ok { - input.ackChannel <- 0 - _= msg - //msg.Ack() - } else { - input.log.Error("Failed ACKing azure-eventhub event") - } - } - }, }) if err != nil { return nil, err diff --git a/x-pack/filebeat/input/azureeventhub/message.go b/x-pack/filebeat/input/azureeventhub/message.go deleted file mode 100644 index b675aa655b2..00000000000 --- a/x-pack/filebeat/input/azureeventhub/message.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2016 Google LLC -// -// 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. - -package azureeventhub - -import ( - "time" - - "github.com/golang/protobuf/ptypes" - pb "google.golang.org/genproto/googleapis/pubsub/v1" -) - -// Message represents a Pub/Sub message. -type Message struct { - // ID identifies this message. - // This ID is assigned by the server and is populated for Messages obtained from a subscription. - // This field is read-only. - ID string - - // Data is the actual data in the message. - Data []byte - - // Attributes represents the key-value pairs the current message - // is labelled with. - Attributes map[string]string - - // ackID is the identifier to acknowledge this message. - ackID string - - // The time at which the message was published. - // This is populated by the server for Messages obtained from a subscription. - // This field is read-only. - PublishTime time.Time - - // receiveTime is the time the message was received by the client. - receiveTime time.Time - - // size is the approximate size of the message's data and attributes. - size int - - calledDone bool - - // The done method of the iterator that created this Message. - doneFunc func(string, bool, time.Time) -} - -func toMessage(resp *pb.ReceivedMessage) (*Message, error) { - if resp.Message == nil { - return &Message{ackID: resp.AckId}, nil - } - - pubTime, err := ptypes.Timestamp(resp.Message.PublishTime) - if err != nil { - return nil, err - } - return &Message{ - ackID: resp.AckId, - Data: resp.Message.Data, - Attributes: resp.Message.Attributes, - ID: resp.Message.MessageId, - PublishTime: pubTime, - }, nil -} - -// Ack indicates successful processing of a Message passed to the Subscriber.Receive callback. -// It should not be called on any other Message value. -// If message acknowledgement fails, the Message will be redelivered. -// Client code must call Ack or Nack when finished for each received Message. -// Calls to Ack or Nack have no effect after the first call. -func (m *Message) Ack() { - m.done(true) -} - -// Nack indicates that the client will not or cannot process a Message passed to the Subscriber.Receive callback. -// It should not be called on any other Message value. -// Nack will result in the Message being redelivered more quickly than if it were allowed to expire. -// Client code must call Ack or Nack when finished for each received Message. -// Calls to Ack or Nack have no effect after the first call. -func (m *Message) Nack() { - m.done(false) -} - -func (m *Message) done(ack bool) { - if m.calledDone { - return - } - m.calledDone = true - m.doneFunc(m.ackID, ack, m.receiveTime) -} From 5bb0a5280352c413070cea96e79f9dd7fff359da Mon Sep 17 00:00:00 2001 From: Mariana Date: Tue, 3 Mar 2020 18:06:03 +0100 Subject: [PATCH 10/16] update --- go.mod | 11 ++++++----- go.sum | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index de1bb8b07f9..84e19080aa4 100644 --- a/go.mod +++ b/go.mod @@ -10,11 +10,12 @@ require ( code.cloudfoundry.org/go-diodes v0.0.0-20190809170250-f77fb823c7ee // indirect code.cloudfoundry.org/go-loggregator v7.4.0+incompatible code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a // indirect - github.com/Azure/azure-event-hubs-go/v3 v3.1.0 - github.com/Azure/azure-sdk-for-go v37.1.0+incompatible + github.com/Azure/azure-event-hubs-go/v3 v3.2.0 + github.com/Azure/azure-sdk-for-go v40.0.0+incompatible github.com/Azure/azure-storage-blob-go v0.8.0 + github.com/Azure/go-amqp v0.12.7 // indirect github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect - github.com/Azure/go-autorest/autorest v0.9.4 + github.com/Azure/go-autorest/autorest v0.10.0 github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 github.com/Azure/go-autorest/autorest/date v0.2.0 github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 @@ -137,9 +138,9 @@ require ( go.uber.org/atomic v1.3.1 go.uber.org/multierr v1.1.1-0.20170829224307-fb7d312c2c04 go.uber.org/zap v1.7.1 - golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 + golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f - golang.org/x/net v0.0.0-20200202094626-16171245cfb2 + golang.org/x/net v0.0.0-20200301022130-244492dfa37a golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e golang.org/x/sys v0.0.0-20200102141924-c96a22e43c9c diff --git a/go.sum b/go.sum index d95286d6c56..202e50ec018 100644 --- a/go.sum +++ b/go.sum @@ -33,17 +33,23 @@ github.com/Azure/azure-amqp-common-go/v3 v3.0.0 h1:j9tjcwhypb/jek3raNrwlCIl7iKQY github.com/Azure/azure-amqp-common-go/v3 v3.0.0/go.mod h1:SY08giD/XbhTz07tJdpw1SoxQXHPN30+DI3Z04SYqyg= github.com/Azure/azure-event-hubs-go/v3 v3.1.0 h1:j+/WXzke3PTRu5gAgSpWgWJVfpwIyaedIqqgdgkjAe0= github.com/Azure/azure-event-hubs-go/v3 v3.1.0/go.mod h1:hR40byNJjKkS74+3RhloPQ8sJ8zFQeJ920Uk3oYY0+k= +github.com/Azure/azure-event-hubs-go/v3 v3.2.0 h1:CQlxKH5a4NX1ZmbdqXUPRwuNGh2XvtgmhkZvkEuWzhs= +github.com/Azure/azure-event-hubs-go/v3 v3.2.0/go.mod h1:BPIIJNH/l/fVHYq3Rm6eg4clbrULrQ3q7+icmqHyyLc= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.1.9/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-sdk-for-go v37.1.0+incompatible h1:aFlw3lP7ZHQi4m1kWCpcwYtczhDkGhDoRaMTaxcOf68= github.com/Azure/azure-sdk-for-go v37.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v40.0.0+incompatible h1:hVVkxE0XB/dozwERSNNgONUxmoCSXQzBRyJog+m+a0Y= +github.com/Azure/azure-sdk-for-go v40.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-storage-blob-go v0.6.0/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-amqp v0.12.6 h1:34yItuwhA/nusvq2sPSNPQxZLCf/CtaogYH8n578mnY= github.com/Azure/go-amqp v0.12.6/go.mod h1:qApuH6OFTSKZFmCOxccvAv5rLizBQf4v8pRmG138DPo= +github.com/Azure/go-amqp v0.12.7 h1:/Uyqh30J5JrDFAOERQtEqP0qPWkrNXxr94vRnSa54Ac= +github.com/Azure/go-amqp v0.12.7/go.mod h1:qApuH6OFTSKZFmCOxccvAv5rLizBQf4v8pRmG138DPo= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v12.2.0+incompatible h1:2Fxszbg492oAJrcvJlgyVaTqnQYRkxmEK6VPCLLVpBI= @@ -53,10 +59,14 @@ github.com/Azure/go-autorest/autorest v0.9.3 h1:OZEIaBbMdUE/Js+BQKlpO81XlISgipr6 github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= +github.com/Azure/go-autorest/autorest v0.10.0 h1:mvdtztBqcL8se7MdrUweNieTNi4kfNG6GOJuurQJpuY= +github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= @@ -653,6 +663,8 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vK golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 h1:+ELyKg6m8UBf0nPFSqD0mi7zUfwPyXo23HNjMnXPz7w= golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -698,6 +710,8 @@ golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= From 0a946466b84a02a7804b2fee5a8a97dd01fbff48 Mon Sep 17 00:00:00 2001 From: Mariana Date: Wed, 18 Mar 2020 11:48:59 +0100 Subject: [PATCH 11/16] integration --- .../input/azureeventhub/azureeventhub_integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go index 949cd707e1a..9d65ff80104 100644 --- a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go +++ b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go @@ -2,7 +2,7 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. - +// +build integration package azureeventhub From c65eb3273e6484db980ebb0ae4f4e8fd46c81cd1 Mon Sep 17 00:00:00 2001 From: Mariana Date: Wed, 18 Mar 2020 12:46:22 +0100 Subject: [PATCH 12/16] fmt update --- go.mod | 1 + x-pack/filebeat/input/azureeventhub/input.go | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 84e19080aa4..9cf982a8947 100644 --- a/go.mod +++ b/go.mod @@ -16,6 +16,7 @@ require ( github.com/Azure/go-amqp v0.12.7 // indirect github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect github.com/Azure/go-autorest/autorest v0.10.0 + github.com/Azure/go-autorest/autorest/adal v0.8.2 github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 github.com/Azure/go-autorest/autorest/date v0.2.0 github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 diff --git a/x-pack/filebeat/input/azureeventhub/input.go b/x-pack/filebeat/input/azureeventhub/input.go index f260c148227..1435801893d 100644 --- a/x-pack/filebeat/input/azureeventhub/input.go +++ b/x-pack/filebeat/input/azureeventhub/input.go @@ -21,7 +21,7 @@ import ( "github.com/elastic/beats/v7/libbeat/common" "github.com/elastic/beats/v7/libbeat/logp" - "github.com/Azure/azure-event-hubs-go/v3" + eventhub "github.com/Azure/azure-event-hubs-go/v3" "github.com/Azure/azure-event-hubs-go/v3/eph" ) @@ -81,7 +81,7 @@ func NewInput( // to be recreated with each restart. workerCtx, workerCancel := context.WithCancel(inputCtx) - input := &azureInput{ + in := &azureInput{ config: config, log: logp.NewLogger(fmt.Sprintf("%s input", inputName)).With("connection string", config.ConnectionString), context: inputContext, @@ -96,9 +96,9 @@ func NewInput( if err != nil { return nil, err } - input.outlet = out - input.log.Infof("Initialized %s input.", inputName) - return input, nil + in.outlet = out + in.log.Infof("Initialized %s input.", inputName) + return in, nil } // Run starts the input worker then returns. Only the first invocation From 8392b86e8dc884d13c48c6298007cf4a09281788 Mon Sep 17 00:00:00 2001 From: Mariana Date: Thu, 19 Mar 2020 14:40:00 +0100 Subject: [PATCH 13/16] upgrade --- go.mod | 8 +- go.sum | 12 +- .../Azure/azure-event-hubs-go/v3/changelog.md | 2 - .../Azure/azure-event-hubs-go/v3/eph/eph.go | 50 +- .../Azure/azure-event-hubs-go/v3/version.go | 2 +- .../github.com/Azure/azure-sdk-for-go/LICENSE | 2 +- .../mgmt/2017-04-01/eventhub/client.go | 3 +- .../2017-04-01/eventhub/consumergroups.go | 15 +- .../eventhub/disasterrecoveryconfigs.go | 34 +- .../mgmt/2017-04-01/eventhub/eventhubs.go | 36 +- .../mgmt/2017-04-01/eventhub/namespaces.go | 54 +- .../mgmt/2017-04-01/eventhub/operations.go | 6 +- .../mgmt/2017-04-01/eventhub/regions.go | 6 +- .../mgmt/2019-06-01/insights/actiongroups.go | 24 +- .../2019-06-01/insights/activitylogalerts.go | 22 +- .../mgmt/2019-06-01/insights/activitylogs.go | 6 +- .../2019-06-01/insights/alertruleincidents.go | 10 +- .../mgmt/2019-06-01/insights/alertrules.go | 21 +- .../2019-06-01/insights/autoscalesettings.go | 22 +- .../mgmt/2019-06-01/insights/baselines.go | 6 +- .../mgmt/2019-06-01/insights/client.go | 3 +- .../2019-06-01/insights/diagnosticsettings.go | 16 +- .../insights/diagnosticsettingscategory.go | 10 +- .../2019-06-01/insights/eventcategories.go | 6 +- .../mgmt/2019-06-01/insights/logprofiles.go | 18 +- .../mgmt/2019-06-01/insights/metricalerts.go | 21 +- .../2019-06-01/insights/metricalertsstatus.go | 10 +- .../2019-06-01/insights/metricbaseline.go | 9 +- .../2019-06-01/insights/metricdefinitions.go | 7 +- .../2019-06-01/insights/metricnamespaces.go | 7 +- .../mgmt/2019-06-01/insights/metrics.go | 6 +- .../mgmt/2019-06-01/insights/models.go | 8 +- .../mgmt/2019-06-01/insights/operations.go | 6 +- .../insights/scheduledqueryrules.go | 22 +- .../2019-06-01/insights/tenantactivitylogs.go | 7 +- .../mgmt/2019-06-01/insights/vminsights.go | 6 +- .../mgmt/2019-03-01/resources/client.go | 3 +- .../resources/deploymentoperations.go | 16 +- .../mgmt/2019-03-01/resources/deployments.go | 54 +- .../mgmt/2019-03-01/resources/groups.go | 24 +- .../mgmt/2019-03-01/resources/models.go | 74 +- .../mgmt/2019-03-01/resources/operations.go | 6 +- .../mgmt/2019-03-01/resources/providers.go | 15 +- .../mgmt/2019-03-01/resources/resources.go | 133 +- .../mgmt/2019-03-01/resources/tags.go | 18 +- .../mgmt/2017-10-01/storage/accounts.go | 36 +- .../storage/mgmt/2017-10-01/storage/client.go | 3 +- .../mgmt/2017-10-01/storage/operations.go | 6 +- .../storage/mgmt/2017-10-01/storage/skus.go | 6 +- .../storage/mgmt/2017-10-01/storage/usage.go | 6 +- .../Azure/azure-sdk-for-go/version/version.go | 2 +- vendor/github.com/Azure/go-amqp/client.go | 28 + .../Azure/go-autorest/autorest/adal/token.go | 7 +- .../go-autorest/autorest/authorization.go | 31 +- .../autorest/authorization_storage.go | 3 + .../Azure/go-autorest/autorest/azure/async.go | 12 +- .../Azure/go-autorest/autorest/client.go | 23 + .../Azure/go-autorest/autorest/go.mod | 2 +- .../Azure/go-autorest/autorest/go.sum | 4 +- .../Azure/go-autorest/autorest/sender.go | 25 +- .../Azure/go-autorest/autorest/utility.go | 11 + .../Azure/go-autorest/autorest/version.go | 2 +- .../godror/godror/odpi/CONTRIBUTING.md | 1 - .../github.com/godror/godror/odpi/LICENSE.md | 217 - .../github.com/godror/godror/odpi/README.md | 63 - .../godror/godror/odpi/embed/README.md | 3 - .../github.com/godror/godror/odpi/embed/dpi.c | 50 - .../godror/godror/odpi/include/dpi.h | 1814 -- .../godror/godror/odpi/src/dpiConn.c | 2249 -- .../godror/godror/odpi/src/dpiContext.c | 329 - .../godror/godror/odpi/src/dpiData.c | 899 - .../godror/godror/odpi/src/dpiDebug.c | 183 - .../godror/godror/odpi/src/dpiDeqOptions.c | 369 - .../godror/godror/odpi/src/dpiEnqOptions.c | 173 - .../godror/godror/odpi/src/dpiEnv.c | 180 - .../godror/godror/odpi/src/dpiError.c | 222 - .../godror/godror/odpi/src/dpiErrorMessages.h | 90 - .../godror/godror/odpi/src/dpiGen.c | 307 - .../godror/godror/odpi/src/dpiGlobal.c | 291 - .../godror/godror/odpi/src/dpiHandleList.c | 116 - .../godror/godror/odpi/src/dpiHandlePool.c | 119 - .../godror/godror/odpi/src/dpiImpl.h | 1905 -- .../godror/godror/odpi/src/dpiLob.c | 504 - .../godror/godror/odpi/src/dpiMsgProps.c | 487 - .../godror/godror/odpi/src/dpiObject.c | 966 - .../godror/godror/odpi/src/dpiObjectAttr.c | 114 - .../godror/godror/odpi/src/dpiObjectType.c | 344 - .../godror/godror/odpi/src/dpiOci.c | 3823 ---- .../godror/godror/odpi/src/dpiOracleType.c | 504 - .../godror/godror/odpi/src/dpiPool.c | 586 - .../godror/godror/odpi/src/dpiQueue.c | 560 - .../godror/godror/odpi/src/dpiRowid.c | 134 - .../godror/godror/odpi/src/dpiSodaColl.c | 812 - .../godror/odpi/src/dpiSodaCollCursor.c | 144 - .../godror/godror/odpi/src/dpiSodaDb.c | 431 - .../godror/godror/odpi/src/dpiSodaDoc.c | 231 - .../godror/godror/odpi/src/dpiSodaDocCursor.c | 144 - .../godror/godror/odpi/src/dpiStmt.c | 1898 -- .../godror/godror/odpi/src/dpiSubscr.c | 713 - .../godror/godror/odpi/src/dpiUtils.c | 401 - .../godror/godror/odpi/src/dpiVar.c | 1813 -- .../mitchellh/mapstructure/.travis.yml | 1 + .../mitchellh/mapstructure/CHANGELOG.md | 8 + .../github.com/mitchellh/mapstructure/go.mod | 2 + .../mitchellh/mapstructure/mapstructure.go | 210 +- vendor/github.com/tsg/go-daemon/src/god.c | 313 - .../github.com/yuin/gopher-lua/parse/Makefile | 4 + .../x/crypto/openpgp/packet/packet.go | 67 +- .../golang.org/x/crypto/sha3/xor_unaligned.go | 11 + .../x/crypto/ssh/terminal/terminal.go | 13 +- vendor/golang.org/x/net/http2/http2.go | 6 - vendor/golang.org/x/net/http2/server.go | 11 +- vendor/golang.org/x/net/http2/transport.go | 3 - vendor/golang.org/x/net/ipv4/helper.go | 17 +- vendor/golang.org/x/net/ipv4/sys_asmreq.go | 3 + vendor/golang.org/x/net/ipv6/helper.go | 1 - vendor/golang.org/x/net/publicsuffix/table.go | 19102 ++++++++-------- vendor/modules.txt | 16 +- 118 files changed, 10421 insertions(+), 34609 deletions(-) delete mode 100644 vendor/github.com/godror/godror/odpi/CONTRIBUTING.md delete mode 100644 vendor/github.com/godror/godror/odpi/LICENSE.md delete mode 100644 vendor/github.com/godror/godror/odpi/README.md delete mode 100644 vendor/github.com/godror/godror/odpi/embed/README.md delete mode 100644 vendor/github.com/godror/godror/odpi/embed/dpi.c delete mode 100644 vendor/github.com/godror/godror/odpi/include/dpi.h delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiConn.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiContext.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiData.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiDebug.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiEnv.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiError.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiGen.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiGlobal.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiHandleList.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiImpl.h delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiLob.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiObject.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiObjectType.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiOci.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiOracleType.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiPool.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiQueue.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiRowid.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiStmt.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSubscr.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiUtils.c delete mode 100644 vendor/github.com/godror/godror/odpi/src/dpiVar.c delete mode 100644 vendor/github.com/tsg/go-daemon/src/god.c create mode 100644 vendor/github.com/yuin/gopher-lua/parse/Makefile diff --git a/go.mod b/go.mod index 857db36a58a..b2bcd975a13 100644 --- a/go.mod +++ b/go.mod @@ -10,8 +10,8 @@ require ( code.cloudfoundry.org/go-diodes v0.0.0-20190809170250-f77fb823c7ee // indirect code.cloudfoundry.org/go-loggregator v7.4.0+incompatible code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a // indirect - github.com/Azure/azure-event-hubs-go/v3 v3.2.0 - github.com/Azure/azure-sdk-for-go v40.0.0+incompatible + github.com/Azure/azure-event-hubs-go/v3 v3.1.2 + github.com/Azure/azure-sdk-for-go v40.4.0+incompatible github.com/Azure/azure-storage-blob-go v0.8.0 github.com/Azure/go-amqp v0.12.7 // indirect github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect @@ -114,7 +114,7 @@ require ( github.com/miekg/dns v1.1.15 github.com/mitchellh/gox v1.0.1 github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51 - github.com/mitchellh/mapstructure v1.1.2 + github.com/mitchellh/mapstructure v1.2.0 github.com/morikuni/aec v1.0.0 // indirect github.com/oklog/ulid v1.3.1 github.com/opencontainers/go-digest v1.0.0-rc1.0.20190228220655-ac19fd6e7483 // indirect @@ -145,7 +145,7 @@ require ( go.uber.org/atomic v1.3.1 go.uber.org/multierr v1.1.1-0.20170829224307-fb7d312c2c04 go.uber.org/zap v1.7.1 - golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 + golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f golang.org/x/net v0.0.0-20200301022130-244492dfa37a golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d diff --git a/go.sum b/go.sum index 426be3a381d..d62b65f8fd4 100644 --- a/go.sum +++ b/go.sum @@ -33,6 +33,8 @@ github.com/Azure/azure-amqp-common-go/v3 v3.0.0 h1:j9tjcwhypb/jek3raNrwlCIl7iKQY github.com/Azure/azure-amqp-common-go/v3 v3.0.0/go.mod h1:SY08giD/XbhTz07tJdpw1SoxQXHPN30+DI3Z04SYqyg= github.com/Azure/azure-event-hubs-go/v3 v3.1.0 h1:j+/WXzke3PTRu5gAgSpWgWJVfpwIyaedIqqgdgkjAe0= github.com/Azure/azure-event-hubs-go/v3 v3.1.0/go.mod h1:hR40byNJjKkS74+3RhloPQ8sJ8zFQeJ920Uk3oYY0+k= +github.com/Azure/azure-event-hubs-go/v3 v3.1.2 h1:S/NjCZ1Z2R4rHJd2Hbbad6rIhxJ4lZZebKTsKHweX4A= +github.com/Azure/azure-event-hubs-go/v3 v3.1.2/go.mod h1:hR40byNJjKkS74+3RhloPQ8sJ8zFQeJ920Uk3oYY0+k= github.com/Azure/azure-event-hubs-go/v3 v3.2.0 h1:CQlxKH5a4NX1ZmbdqXUPRwuNGh2XvtgmhkZvkEuWzhs= github.com/Azure/azure-event-hubs-go/v3 v3.2.0/go.mod h1:BPIIJNH/l/fVHYq3Rm6eg4clbrULrQ3q7+icmqHyyLc= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= @@ -43,6 +45,8 @@ github.com/Azure/azure-sdk-for-go v37.1.0+incompatible h1:aFlw3lP7ZHQi4m1kWCpcwY github.com/Azure/azure-sdk-for-go v37.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v40.0.0+incompatible h1:hVVkxE0XB/dozwERSNNgONUxmoCSXQzBRyJog+m+a0Y= github.com/Azure/azure-sdk-for-go v40.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/azure-sdk-for-go v40.4.0+incompatible h1:fqIZrZZOfzH4BikHmEtVax+ewacSVCY8u9hXNPUSxF4= +github.com/Azure/azure-sdk-for-go v40.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-storage-blob-go v0.6.0/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= @@ -117,8 +121,8 @@ github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20 h1:7rj9qZ63knnVo2Z github.com/andrewkroh/goja v0.0.0-20190128172624-dd2ac4456e20/go.mod h1:cI59GRkC2FRaFYtgbYEqMlgnnfvAwXzjojyZKXwklNg= github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43 h1:WFwa9pqou0Nb4DdfBOyaBTH0GqLE74Qwdf61E7ITHwQ= github.com/andrewkroh/sys v0.0.0-20151128191922-287798fe3e43/go.mod h1:tJPYQG4mnMeUtQvQKNkbsFrnmZOg59Qnf8CcctFv5v4= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antlr/antlr4 v0.0.0-20200225173536-225249fdaef5 h1:nkZ9axP+MvUFCu8JRN/MCY+DmTfs6lY7hE0QnJbxSdI= github.com/antlr/antlr4 v0.0.0-20200225173536-225249fdaef5/go.mod h1:T7PbCXFs94rrTttyxjbyT5+/1V8T2TYDejxUfHJjw1Y= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -506,6 +510,8 @@ github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWe github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.2.0 h1:pFIkD+d/36DA4zE+VL2xI0Th1yNh+CWaUcJkaGivz3A= +github.com/mitchellh/mapstructure v1.2.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -703,6 +709,8 @@ golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 h1:+ELyKg6m8UBf0nPFSqD0mi golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 h1:TjszyFsQsyZNHwdVdZ5m7bjmreu0znc2kRYsEml9/Ww= +golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -742,8 +750,8 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md b/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md index 549ad582022..8e14f9d4236 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/changelog.md @@ -10,8 +10,6 @@ - add support for websocket connections with eph with `eph.WithWebSocketConnection()` -- add support for websocket connections with eph with `eph.WithWebSocketConnection()` - ## `v2.0.4` - add comment on the `PartitionID` field in `SystemProperties` to clarify that it will always return a nil value [#131](https://github.com/Azure/azure-event-hubs-go/issues/131) diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go index 38d05a146e5..fda6965e579 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/eph/eph.go @@ -60,22 +60,22 @@ const ( type ( // EventProcessorHost provides functionality for coordinating and balancing load across multiple Event Hub partitions EventProcessorHost struct { - namespace string - hubName string - name string - consumerGroup string - tokenProvider auth.TokenProvider - client *eventhub.Hub - leaser Leaser - checkpointer Checkpointer - scheduler *scheduler - handlers map[string]eventhub.Handler - hostMu sync.Mutex - handlersMu sync.Mutex - partitionIDs []string - noBanner bool + namespace string + hubName string + name string + consumerGroup string + tokenProvider auth.TokenProvider + client *eventhub.Hub + leaser Leaser + checkpointer Checkpointer + scheduler *scheduler + handlers map[string]eventhub.Handler + hostMu sync.Mutex + handlersMu sync.Mutex + partitionIDs []string + noBanner bool webSocketConnection bool - env *azure.Environment + env *azure.Environment } // EventProcessorHostOption provides configuration options for an EventProcessorHost @@ -428,18 +428,24 @@ func (h *EventProcessorHost) compositeHandlers() eventhub.Handler { h.handlersMu.Lock() defer h.handlersMu.Unlock() - var wg sync.WaitGroup - for _, handle := range h.handlers { + // we accept that this will contain any of the possible len(h.handlers) errors + // as it will be used to later decide of delivery is considered a failure + // and NOT further inspected + var lastError error + + wg := &sync.WaitGroup{} + for _, handler := range h.handlers { wg.Add(1) - go func(boundHandle eventhub.Handler) { - if err := boundHandle(ctx, event); err != nil { + go func(boundHandler eventhub.Handler) { + defer wg.Done() // consider if panics should be cought here, too. Currently would crash process + if err := boundHandler(ctx, event); err != nil { + lastError = err tab.For(ctx).Error(err) } - wg.Done() - }(handle) + }(handler) } wg.Wait() - return nil + return lastError } } diff --git a/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go b/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go index 3c676a70e3f..536932abe86 100644 --- a/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go +++ b/vendor/github.com/Azure/azure-event-hubs-go/v3/version.go @@ -2,5 +2,5 @@ package eventhub const ( // Version is the semantic version number - Version = "3.1.0" + Version = "3.1.2" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE index af39a91e703..047555ec7e5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE +++ b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016 Microsoft Corporation + Copyright 2020 Microsoft Corporation 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/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go index 87055b6514c..7be22d87dce 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go index 4dd76088081..472eb4d59ee 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go @@ -36,7 +36,8 @@ func NewConsumerGroupsClient(subscriptionID string) ConsumerGroupsClient { return NewConsumerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client. +// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewConsumerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerGroupsClient { return ConsumerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -124,8 +125,7 @@ func (client ConsumerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -221,8 +221,7 @@ func (client ConsumerGroupsClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -317,8 +316,7 @@ func (client ConsumerGroupsClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -431,8 +429,7 @@ func (client ConsumerGroupsClient) ListByEventHubPreparer(ctx context.Context, r // ListByEventHubSender sends the ListByEventHub request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) ListByEventHubSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByEventHubResponder handles the response to the ListByEventHub request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go index 3a202f057d5..9fba41a5e88 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go @@ -36,7 +36,9 @@ func NewDisasterRecoveryConfigsClient(subscriptionID string) DisasterRecoveryCon return NewDisasterRecoveryConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client. +// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client using a +// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, +// Azure stack). func NewDisasterRecoveryConfigsClientWithBaseURI(baseURI string, subscriptionID string) DisasterRecoveryConfigsClient { return DisasterRecoveryConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -117,8 +119,7 @@ func (client DisasterRecoveryConfigsClient) BreakPairingPreparer(ctx context.Con // BreakPairingSender sends the BreakPairing request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) BreakPairingSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // BreakPairingResponder handles the response to the BreakPairing request. The method always @@ -208,8 +209,7 @@ func (client DisasterRecoveryConfigsClient) CheckNameAvailabilityPreparer(ctx co // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -303,8 +303,7 @@ func (client DisasterRecoveryConfigsClient) CreateOrUpdatePreparer(ctx context.C // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -395,8 +394,7 @@ func (client DisasterRecoveryConfigsClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -486,8 +484,7 @@ func (client DisasterRecoveryConfigsClient) FailOverPreparer(ctx context.Context // FailOverSender sends the FailOver request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) FailOverSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // FailOverResponder handles the response to the FailOver request. The method always @@ -577,8 +574,7 @@ func (client DisasterRecoveryConfigsClient) GetPreparer(ctx context.Context, res // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -673,8 +669,7 @@ func (client DisasterRecoveryConfigsClient) GetAuthorizationRulePreparer(ctx con // GetAuthorizationRuleSender sends the GetAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) GetAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always @@ -761,8 +756,7 @@ func (client DisasterRecoveryConfigsClient) ListPreparer(ctx context.Context, re // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -891,8 +885,7 @@ func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesPreparer(ctx c // ListAuthorizationRulesSender sends the ListAuthorizationRules request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always @@ -1024,8 +1017,7 @@ func (client DisasterRecoveryConfigsClient) ListKeysPreparer(ctx context.Context // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListKeysResponder handles the response to the ListKeys request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go index d9b70ccb444..214d8c946d5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go @@ -36,7 +36,8 @@ func NewEventHubsClient(subscriptionID string) EventHubsClient { return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client. +// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -136,8 +137,7 @@ func (client EventHubsClient) CreateOrUpdatePreparer(ctx context.Context, resour // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -153,7 +153,8 @@ func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (resu return } -// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub. +// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub. Creation/update +// of the AuthorizationRule will take a few seconds to take effect. // Parameters: // resourceGroupName - name of the resource group within the azure subscription. // namespaceName - the Namespace name @@ -238,8 +239,7 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRulePreparer(ctx contex // CreateOrUpdateAuthorizationRuleSender sends the CreateOrUpdateAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) CreateOrUpdateAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always @@ -330,8 +330,7 @@ func (client EventHubsClient) DeletePreparer(ctx context.Context, resourceGroupN // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -425,8 +424,7 @@ func (client EventHubsClient) DeleteAuthorizationRulePreparer(ctx context.Contex // DeleteAuthorizationRuleSender sends the DeleteAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) DeleteAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteAuthorizationRuleResponder handles the response to the DeleteAuthorizationRule request. The method always @@ -516,8 +514,7 @@ func (client EventHubsClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -612,8 +609,7 @@ func (client EventHubsClient) GetAuthorizationRulePreparer(ctx context.Context, // GetAuthorizationRuleSender sends the GetAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) GetAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always @@ -705,8 +701,7 @@ func (client EventHubsClient) ListAuthorizationRulesPreparer(ctx context.Context // ListAuthorizationRulesSender sends the ListAuthorizationRules request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) ListAuthorizationRulesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always @@ -850,8 +845,7 @@ func (client EventHubsClient) ListByNamespacePreparer(ctx context.Context, resou // ListByNamespaceSender sends the ListByNamespace request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByNamespaceResponder handles the response to the ListByNamespace request. The method always @@ -983,8 +977,7 @@ func (client EventHubsClient) ListKeysPreparer(ctx context.Context, resourceGrou // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListKeysResponder handles the response to the ListKeys request. The method always @@ -1082,8 +1075,7 @@ func (client EventHubsClient) RegenerateKeysPreparer(ctx context.Context, resour // RegenerateKeysSender sends the RegenerateKeys request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) RegenerateKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go index 919bea875af..33a18ba85eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go @@ -36,7 +36,8 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -106,8 +107,7 @@ func (client NamespacesClient) CheckNameAvailabilityPreparer(ctx context.Context // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -204,9 +204,8 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -307,8 +306,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(ctx conte // CreateOrUpdateAuthorizationRuleSender sends the CreateOrUpdateAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CreateOrUpdateAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always @@ -397,8 +395,7 @@ func (client NamespacesClient) CreateOrUpdateNetworkRuleSetPreparer(ctx context. // CreateOrUpdateNetworkRuleSetSender sends the CreateOrUpdateNetworkRuleSet request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CreateOrUpdateNetworkRuleSetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateNetworkRuleSetResponder handles the response to the CreateOrUpdateNetworkRuleSet request. The method always @@ -478,9 +475,8 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -574,8 +570,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(ctx context.Conte // DeleteAuthorizationRuleSender sends the DeleteAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) DeleteAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteAuthorizationRuleResponder handles the response to the DeleteAuthorizationRule request. The method always @@ -660,8 +655,7 @@ func (client NamespacesClient) GetPreparer(ctx context.Context, resourceGroupNam // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -751,8 +745,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(ctx context.Context, // GetAuthorizationRuleSender sends the GetAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always @@ -838,8 +831,7 @@ func (client NamespacesClient) GetMessagingPlanPreparer(ctx context.Context, res // GetMessagingPlanSender sends the GetMessagingPlan request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetMessagingPlanSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetMessagingPlanResponder handles the response to the GetMessagingPlan request. The method always @@ -925,8 +917,7 @@ func (client NamespacesClient) GetNetworkRuleSetPreparer(ctx context.Context, re // GetNetworkRuleSetSender sends the GetNetworkRuleSet request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetNetworkRuleSetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetNetworkRuleSetResponder handles the response to the GetNetworkRuleSet request. The method always @@ -998,8 +989,7 @@ func (client NamespacesClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -1123,8 +1113,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(ctx context.Contex // ListAuthorizationRulesSender sends the ListAuthorizationRules request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListAuthorizationRulesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always @@ -1243,8 +1232,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -1371,8 +1359,7 @@ func (client NamespacesClient) ListKeysPreparer(ctx context.Context, resourceGro // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListKeysResponder handles the response to the ListKeys request. The method always @@ -1459,8 +1446,7 @@ func (client NamespacesClient) ListNetworkRuleSetsPreparer(ctx context.Context, // ListNetworkRuleSetsSender sends the ListNetworkRuleSets request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListNetworkRuleSetsSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListNetworkRuleSetsResponder handles the response to the ListNetworkRuleSets request. The method always @@ -1590,8 +1576,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(ctx context.Context, resou // RegenerateKeysSender sends the RegenerateKeys request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) RegenerateKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always @@ -1681,8 +1666,7 @@ func (client NamespacesClient) UpdatePreparer(ctx context.Context, resourceGroup // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go index e2a19e4ef24..3198ceb45d1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -92,8 +93,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go index 4a936843735..576fa3ab535 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go @@ -36,7 +36,8 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -107,8 +108,7 @@ func (client RegionsClient) ListBySkuPreparer(ctx context.Context, sku string) ( // ListBySkuSender sends the ListBySku request. The method will close the // http.Response Body if it receives an error. func (client RegionsClient) ListBySkuSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySkuResponder handles the response to the ListBySku request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go index d7d55d29ad4..71a2fd337e3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go @@ -36,7 +36,8 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -114,8 +115,7 @@ func (client ActionGroupsClient) CreateOrUpdatePreparer(ctx context.Context, res // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -191,8 +191,7 @@ func (client ActionGroupsClient) DeletePreparer(ctx context.Context, resourceGro // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -277,8 +276,7 @@ func (client ActionGroupsClient) EnableReceiverPreparer(ctx context.Context, res // EnableReceiverSender sends the EnableReceiver request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) EnableReceiverSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // EnableReceiverResponder handles the response to the EnableReceiver request. The method always @@ -353,8 +351,7 @@ func (client ActionGroupsClient) GetPreparer(ctx context.Context, resourceGroupN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -428,8 +425,7 @@ func (client ActionGroupsClient) ListByResourceGroupPreparer(ctx context.Context // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -500,8 +496,7 @@ func (client ActionGroupsClient) ListBySubscriptionIDPreparer(ctx context.Contex // ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always @@ -580,8 +575,7 @@ func (client ActionGroupsClient) UpdatePreparer(ctx context.Context, resourceGro // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go index ed927c20655..ab43adfe136 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go @@ -36,7 +36,9 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -115,8 +117,7 @@ func (client ActivityLogAlertsClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -192,8 +193,7 @@ func (client ActivityLogAlertsClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -268,8 +268,7 @@ func (client ActivityLogAlertsClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -343,8 +342,7 @@ func (client ActivityLogAlertsClient) ListByResourceGroupPreparer(ctx context.Co // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -415,8 +413,7 @@ func (client ActivityLogAlertsClient) ListBySubscriptionIDPreparer(ctx context.C // ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always @@ -495,8 +492,7 @@ func (client ActivityLogAlertsClient) UpdatePreparer(ctx context.Context, resour // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go index 60e31eca2b5..9188a5e8f52 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go @@ -35,7 +35,8 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -118,8 +119,7 @@ func (client ActivityLogsClient) ListPreparer(ctx context.Context, filter string // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go index 86569442a22..b82137bb33f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go @@ -35,7 +35,9 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client AlertRuleIncidentsClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AlertRuleIncidentsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -179,8 +180,7 @@ func (client AlertRuleIncidentsClient) ListByAlertRulePreparer(ctx context.Conte // ListByAlertRuleSender sends the ListByAlertRule request. The method will close the // http.Response Body if it receives an error. func (client AlertRuleIncidentsClient) ListByAlertRuleSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByAlertRuleResponder handles the response to the ListByAlertRule request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go index 34239f106a8..bcf0ffa0b7c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go @@ -36,7 +36,8 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. +// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAlertRulesClientWithBaseURI(baseURI string, subscriptionID string) AlertRulesClient { return AlertRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -114,8 +115,7 @@ func (client AlertRulesClient) CreateOrUpdatePreparer(ctx context.Context, resou // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -191,8 +191,7 @@ func (client AlertRulesClient) DeletePreparer(ctx context.Context, resourceGroup // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -267,8 +266,7 @@ func (client AlertRulesClient) GetPreparer(ctx context.Context, resourceGroupNam // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -342,8 +340,7 @@ func (client AlertRulesClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -414,8 +411,7 @@ func (client AlertRulesClient) ListBySubscriptionPreparer(ctx context.Context) ( // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -494,8 +490,7 @@ func (client AlertRulesClient) UpdatePreparer(ctx context.Context, resourceGroup // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go index 450ade01118..d801640c589 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go @@ -36,7 +36,9 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -113,8 +115,7 @@ func (client AutoscaleSettingsClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -190,8 +191,7 @@ func (client AutoscaleSettingsClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -266,8 +266,7 @@ func (client AutoscaleSettingsClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -342,8 +341,7 @@ func (client AutoscaleSettingsClient) ListByResourceGroupPreparer(ctx context.Co // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -452,8 +450,7 @@ func (client AutoscaleSettingsClient) ListBySubscriptionPreparer(ctx context.Con // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -569,8 +566,7 @@ func (client AutoscaleSettingsClient) UpdatePreparer(ctx context.Context, resour // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go index 990d564d1c7..3e763f4abe5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go @@ -35,7 +35,8 @@ func NewBaselinesClient(subscriptionID string) BaselinesClient { return NewBaselinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client. +// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewBaselinesClientWithBaseURI(baseURI string, subscriptionID string) BaselinesClient { return BaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -136,8 +137,7 @@ func (client BaselinesClient) ListPreparer(ctx context.Context, resourceURI stri // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client BaselinesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go index 5ed388022a2..557e8413f01 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go index 3b607d4d819..efe6c33b6b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,8 +104,7 @@ func (client DiagnosticSettingsClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -178,8 +179,7 @@ func (client DiagnosticSettingsClient) DeletePreparer(ctx context.Context, resou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // DeleteResponder handles the response to the Delete request. The method always @@ -253,8 +253,7 @@ func (client DiagnosticSettingsClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always @@ -327,8 +326,7 @@ func (client DiagnosticSettingsClient) ListPreparer(ctx context.Context, resourc // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go index 587b7f562de..5c9ed250454 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go @@ -35,7 +35,9 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client +// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign +// clouds, Azure stack). func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,8 +101,7 @@ func (client DiagnosticSettingsCategoryClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsCategoryClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always @@ -173,8 +174,7 @@ func (client DiagnosticSettingsCategoryClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsCategoryClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go index b09fb63c688..68a74514678 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go @@ -35,7 +35,8 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -92,8 +93,7 @@ func (client EventCategoriesClient) ListPreparer(ctx context.Context) (*http.Req // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client EventCategoriesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go index e96cea0a618..6f46c7d9f68 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go @@ -36,7 +36,8 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -116,8 +117,7 @@ func (client LogProfilesClient) CreateOrUpdatePreparer(ctx context.Context, logP // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -191,8 +191,7 @@ func (client LogProfilesClient) DeletePreparer(ctx context.Context, logProfileNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -265,8 +264,7 @@ func (client LogProfilesClient) GetPreparer(ctx context.Context, logProfileName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -337,8 +335,7 @@ func (client LogProfilesClient) ListPreparer(ctx context.Context) (*http.Request // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -415,8 +412,7 @@ func (client LogProfilesClient) UpdatePreparer(ctx context.Context, logProfileNa // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go index 055a96e3ed3..16398347e8a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go @@ -36,7 +36,8 @@ func NewMetricAlertsClient(subscriptionID string) MetricAlertsClient { return NewMetricAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client. +// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsClient { return MetricAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -117,8 +118,7 @@ func (client MetricAlertsClient) CreateOrUpdatePreparer(ctx context.Context, res // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -194,8 +194,7 @@ func (client MetricAlertsClient) DeletePreparer(ctx context.Context, resourceGro // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -270,8 +269,7 @@ func (client MetricAlertsClient) GetPreparer(ctx context.Context, resourceGroupN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -345,8 +343,7 @@ func (client MetricAlertsClient) ListByResourceGroupPreparer(ctx context.Context // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -417,8 +414,7 @@ func (client MetricAlertsClient) ListBySubscriptionPreparer(ctx context.Context) // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -497,8 +493,7 @@ func (client MetricAlertsClient) UpdatePreparer(ctx context.Context, resourceGro // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go index 04617c64355..2673f9d7fc9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go @@ -35,7 +35,9 @@ func NewMetricAlertsStatusClient(subscriptionID string) MetricAlertsStatusClient return NewMetricAlertsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client. +// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsStatusClient { return MetricAlertsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -100,8 +102,7 @@ func (client MetricAlertsStatusClient) ListPreparer(ctx context.Context, resourc // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsStatusClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -179,8 +180,7 @@ func (client MetricAlertsStatusClient) ListByNamePreparer(ctx context.Context, r // ListByNameSender sends the ListByName request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsStatusClient) ListByNameSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByNameResponder handles the response to the ListByName request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go index d12bd9d4f2b..7195cd1b274 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go @@ -36,7 +36,8 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. +// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -111,8 +112,7 @@ func (client MetricBaselineClient) CalculateBaselinePreparer(ctx context.Context // CalculateBaselineSender sends the CalculateBaseline request. The method will close the // http.Response Body if it receives an error. func (client MetricBaselineClient) CalculateBaselineSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CalculateBaselineResponder handles the response to the CalculateBaseline request. The method always @@ -211,8 +211,7 @@ func (client MetricBaselineClient) GetPreparer(ctx context.Context, resourceURI // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client MetricBaselineClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetResponder handles the response to the Get request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go index 29a5bbee531..2e4a8073953 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go @@ -35,7 +35,9 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,8 +103,7 @@ func (client MetricDefinitionsClient) ListPreparer(ctx context.Context, resource // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricDefinitionsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go index 5ff2cdaa2de..887572a511f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go @@ -35,7 +35,9 @@ func NewMetricNamespacesClient(subscriptionID string) MetricNamespacesClient { return NewMetricNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client. +// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewMetricNamespacesClientWithBaseURI(baseURI string, subscriptionID string) MetricNamespacesClient { return MetricNamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,8 +103,7 @@ func (client MetricNamespacesClient) ListPreparer(ctx context.Context, resourceU // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricNamespacesClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go index f1952a3fe2a..df0dfb564b8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go @@ -35,7 +35,8 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -145,8 +146,7 @@ func (client MetricsClient) ListPreparer(ctx context.Context, resourceURI string // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go index effcd2f083e..072db4706ac 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go @@ -3403,8 +3403,8 @@ type Metric struct { type MetricAlertAction struct { // ActionGroupID - the id of the action group to use. ActionGroupID *string `json:"actionGroupId,omitempty"` - // WebhookProperties - The properties of a webhook object. - WebhookProperties map[string]*string `json:"webhookProperties"` + // WebHookProperties - The properties of a webhook object. + WebHookProperties map[string]*string `json:"webHookProperties"` } // MarshalJSON is the custom marshaler for MetricAlertAction. @@ -3413,8 +3413,8 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { if maa.ActionGroupID != nil { objectMap["actionGroupId"] = maa.ActionGroupID } - if maa.WebhookProperties != nil { - objectMap["webhookProperties"] = maa.WebhookProperties + if maa.WebHookProperties != nil { + objectMap["webHookProperties"] = maa.WebHookProperties } return json.Marshal(objectMap) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go index bd8af5c238d..71df71aff3f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go index b4bb9bca5dd..1791a6252cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go @@ -36,7 +36,9 @@ func NewScheduledQueryRulesClient(subscriptionID string) ScheduledQueryRulesClie return NewScheduledQueryRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client. +// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID string) ScheduledQueryRulesClient { return ScheduledQueryRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -118,8 +120,7 @@ func (client ScheduledQueryRulesClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -195,8 +196,7 @@ func (client ScheduledQueryRulesClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -271,8 +271,7 @@ func (client ScheduledQueryRulesClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -351,8 +350,7 @@ func (client ScheduledQueryRulesClient) ListByResourceGroupPreparer(ctx context. // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -429,8 +427,7 @@ func (client ScheduledQueryRulesClient) ListBySubscriptionPreparer(ctx context.C // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -509,8 +506,7 @@ func (client ScheduledQueryRulesClient) UpdatePreparer(ctx context.Context, reso // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go index 23739ed5d28..6ddebcb2ba8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go @@ -35,7 +35,9 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -119,8 +121,7 @@ func (client TenantActivityLogsClient) ListPreparer(ctx context.Context, filter // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client TenantActivityLogsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go index 76178c59cd2..7f4c2fcf35b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go @@ -35,7 +35,8 @@ func NewVMInsightsClient(subscriptionID string) VMInsightsClient { return NewVMInsightsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client. +// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewVMInsightsClientWithBaseURI(baseURI string, subscriptionID string) VMInsightsClient { return VMInsightsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -98,8 +99,7 @@ func (client VMInsightsClient) GetOnboardingStatusPreparer(ctx context.Context, // GetOnboardingStatusSender sends the GetOnboardingStatus request. The method will close the // http.Response Body if it receives an error. func (client VMInsightsClient) GetOnboardingStatusSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetOnboardingStatusResponder handles the response to the GetOnboardingStatus request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go index 2b25d2191e9..39f90ff0970 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go index 7b0413e9395..1b53e4a6eb2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go @@ -36,7 +36,9 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom +// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure +// stack). func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -115,8 +117,7 @@ func (client DeploymentOperationsClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -200,8 +201,7 @@ func (client DeploymentOperationsClient) GetAtSubscriptionScopePreparer(ctx cont // GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always @@ -294,8 +294,7 @@ func (client DeploymentOperationsClient) ListPreparer(ctx context.Context, resou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -419,8 +418,7 @@ func (client DeploymentOperationsClient) ListAtSubscriptionScopePreparer(ctx con // ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go index b65dff16bbd..6d74104fe76 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go @@ -36,7 +36,8 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use +// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -96,8 +97,7 @@ func (client DeploymentsClient) CalculateTemplateHashPreparer(ctx context.Contex // CalculateTemplateHashSender sends the CalculateTemplateHash request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CalculateTemplateHashSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CalculateTemplateHashResponder handles the response to the CalculateTemplateHash request. The method always @@ -187,8 +187,7 @@ func (client DeploymentsClient) CancelPreparer(ctx context.Context, resourceGrou // CancelSender sends the Cancel request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CancelSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CancelResponder handles the response to the Cancel request. The method always @@ -271,8 +270,7 @@ func (client DeploymentsClient) CancelAtSubscriptionScopePreparer(ctx context.Co // CancelAtSubscriptionScopeSender sends the CancelAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CancelAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CancelAtSubscriptionScopeResponder handles the response to the CancelAtSubscriptionScope request. The method always @@ -360,8 +358,7 @@ func (client DeploymentsClient) CheckExistencePreparer(ctx context.Context, reso // CheckExistenceSender sends the CheckExistence request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckExistenceResponder handles the response to the CheckExistence request. The method always @@ -442,8 +439,7 @@ func (client DeploymentsClient) CheckExistenceAtSubscriptionScopePreparer(ctx co // CheckExistenceAtSubscriptionScopeSender sends the CheckExistenceAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckExistenceAtSubscriptionScopeResponder handles the response to the CheckExistenceAtSubscriptionScope request. The method always @@ -535,9 +531,8 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -629,9 +624,8 @@ func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopePreparer(ctx co // CreateOrUpdateAtSubscriptionScopeSender sends the CreateOrUpdateAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeSender(req *http.Request) (future DeploymentsCreateOrUpdateAtSubscriptionScopeFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -725,9 +719,8 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -812,9 +805,8 @@ func (client DeploymentsClient) DeleteAtSubscriptionScopePreparer(ctx context.Co // DeleteAtSubscriptionScopeSender sends the DeleteAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) DeleteAtSubscriptionScopeSender(req *http.Request) (future DeploymentsDeleteAtSubscriptionScopeFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -906,8 +898,7 @@ func (client DeploymentsClient) ExportTemplatePreparer(ctx context.Context, reso // ExportTemplateSender sends the ExportTemplate request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ExportTemplateResponder handles the response to the ExportTemplate request. The method always @@ -989,8 +980,7 @@ func (client DeploymentsClient) ExportTemplateAtSubscriptionScopePreparer(ctx co // ExportTemplateAtSubscriptionScopeSender sends the ExportTemplateAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ExportTemplateAtSubscriptionScopeResponder handles the response to the ExportTemplateAtSubscriptionScope request. The method always @@ -1078,8 +1068,7 @@ func (client DeploymentsClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -1161,8 +1150,7 @@ func (client DeploymentsClient) GetAtSubscriptionScopePreparer(ctx context.Conte // GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always @@ -1244,8 +1232,7 @@ func (client DeploymentsClient) ListAtSubscriptionScopePreparer(ctx context.Cont // ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always @@ -1375,8 +1362,7 @@ func (client DeploymentsClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -1513,8 +1499,7 @@ func (client DeploymentsClient) ValidatePreparer(ctx context.Context, resourceGr // ValidateSender sends the Validate request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ValidateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ValidateResponder handles the response to the Validate request. The method always @@ -1607,8 +1592,7 @@ func (client DeploymentsClient) ValidateAtSubscriptionScopePreparer(ctx context. // ValidateAtSubscriptionScopeSender sends the ValidateAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ValidateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ValidateAtSubscriptionScopeResponder handles the response to the ValidateAtSubscriptionScope request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go index a74460950c0..96a71282273 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go @@ -36,7 +36,8 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -107,8 +108,7 @@ func (client GroupsClient) CheckExistencePreparer(ctx context.Context, resourceG // CheckExistenceSender sends the CheckExistence request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckExistenceResponder handles the response to the CheckExistence request. The method always @@ -199,8 +199,7 @@ func (client GroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -277,9 +276,8 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -368,8 +366,7 @@ func (client GroupsClient) ExportTemplatePreparer(ctx context.Context, resourceG // ExportTemplateSender sends the ExportTemplate request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ExportTemplateResponder handles the response to the ExportTemplate request. The method always @@ -451,8 +448,7 @@ func (client GroupsClient) GetPreparer(ctx context.Context, resourceGroupName st // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -534,8 +530,7 @@ func (client GroupsClient) ListPreparer(ctx context.Context, filter string, top // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -658,8 +653,7 @@ func (client GroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go index 5a354d58968..7b5ea2e58ff 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go @@ -839,6 +839,68 @@ func (gr GenericResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// GenericResourceExpanded resource information. +type GenericResourceExpanded struct { + // CreatedTime - READ-ONLY; The created time of the resource. This is only present if requested via the $expand query parameter. + CreatedTime *date.Time `json:"createdTime,omitempty"` + // ChangedTime - READ-ONLY; The changed time of the resource. This is only present if requested via the $expand query parameter. + ChangedTime *date.Time `json:"changedTime,omitempty"` + // ProvisioningState - READ-ONLY; The provisioning state of the resource. This is only present if requested via the $expand query parameter. + ProvisioningState *string `json:"provisioningState,omitempty"` + // Plan - The plan of the resource. + Plan *Plan `json:"plan,omitempty"` + // Properties - The resource properties. + Properties interface{} `json:"properties,omitempty"` + // Kind - The kind of the resource. + Kind *string `json:"kind,omitempty"` + // ManagedBy - ID of the resource that manages this resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Sku - The SKU of the resource. + Sku *Sku `json:"sku,omitempty"` + // Identity - The identity of the resource. + Identity *Identity `json:"identity,omitempty"` + // ID - READ-ONLY; Resource ID + ID *string `json:"id,omitempty"` + // Name - READ-ONLY; Resource name + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; Resource type + Type *string `json:"type,omitempty"` + // Location - Resource location + Location *string `json:"location,omitempty"` + // Tags - Resource tags + Tags map[string]*string `json:"tags"` +} + +// MarshalJSON is the custom marshaler for GenericResourceExpanded. +func (gre GenericResourceExpanded) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if gre.Plan != nil { + objectMap["plan"] = gre.Plan + } + if gre.Properties != nil { + objectMap["properties"] = gre.Properties + } + if gre.Kind != nil { + objectMap["kind"] = gre.Kind + } + if gre.ManagedBy != nil { + objectMap["managedBy"] = gre.ManagedBy + } + if gre.Sku != nil { + objectMap["sku"] = gre.Sku + } + if gre.Identity != nil { + objectMap["identity"] = gre.Identity + } + if gre.Location != nil { + objectMap["location"] = gre.Location + } + if gre.Tags != nil { + objectMap["tags"] = gre.Tags + } + return json.Marshal(objectMap) +} + // GenericResourceFilter resource filter. type GenericResourceFilter struct { // ResourceType - The resource type. @@ -1147,12 +1209,12 @@ type IdentityUserAssignedIdentitiesValue struct { type ListResult struct { autorest.Response `json:"-"` // Value - An array of resources. - Value *[]GenericResource `json:"value,omitempty"` + Value *[]GenericResourceExpanded `json:"value,omitempty"` // NextLink - READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListResultIterator provides access to a complete listing of GenericResource values. +// ListResultIterator provides access to a complete listing of GenericResourceExpanded values. type ListResultIterator struct { i int page ListResultPage @@ -1203,9 +1265,9 @@ func (iter ListResultIterator) Response() ListResult { // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListResultIterator) Value() GenericResource { +func (iter ListResultIterator) Value() GenericResourceExpanded { if !iter.page.NotDone() { - return GenericResource{} + return GenericResourceExpanded{} } return iter.page.Values()[iter.i] } @@ -1232,7 +1294,7 @@ func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, err autorest.WithBaseURL(to.String(lr.NextLink))) } -// ListResultPage contains a page of GenericResource values. +// ListResultPage contains a page of GenericResourceExpanded values. type ListResultPage struct { fn func(context.Context, ListResult) (ListResult, error) lr ListResult @@ -1277,7 +1339,7 @@ func (page ListResultPage) Response() ListResult { } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListResultPage) Values() []GenericResource { +func (page ListResultPage) Values() []GenericResourceExpanded { if page.lr.IsEmpty() { return nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go index b5a4f9cddbb..d51d47fedcb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -92,8 +93,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go index e9fff221c87..0e5d9ac8052 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go @@ -35,7 +35,8 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,8 +104,7 @@ func (client ProvidersClient) GetPreparer(ctx context.Context, resourceProviderN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -187,8 +187,7 @@ func (client ProvidersClient) ListPreparer(ctx context.Context, top *int32, expa // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -299,8 +298,7 @@ func (client ProvidersClient) RegisterPreparer(ctx context.Context, resourceProv // RegisterSender sends the Register request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) RegisterSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // RegisterResponder handles the response to the Register request. The method always @@ -374,8 +372,7 @@ func (client ProvidersClient) UnregisterPreparer(ctx context.Context, resourcePr // UnregisterSender sends the Unregister request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) UnregisterSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UnregisterResponder handles the response to the Unregister request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go index a473370f6cd..511ab472b8b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go @@ -36,7 +36,8 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client. +// NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting +// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { return Client{NewWithBaseURI(baseURI, subscriptionID)} } @@ -49,7 +50,8 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { // parentResourcePath - the parent resource identity. // resourceType - the resource type. // resourceName - the name of the resource to check whether it exists. -func (client Client) CheckExistence(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result autorest.Response, err error) { +// APIVersion - the API version to use for the operation. +func (client Client) CheckExistence(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckExistence") defer func() { @@ -68,7 +70,7 @@ func (client Client) CheckExistence(ctx context.Context, resourceGroupName strin return result, validation.NewError("resources.Client", "CheckExistence", err.Error()) } - req, err := client.CheckExistencePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) + req, err := client.CheckExistencePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", nil, "Failure preparing request") return @@ -90,7 +92,7 @@ func (client Client) CheckExistence(ctx context.Context, resourceGroupName strin } // CheckExistencePreparer prepares the CheckExistence request. -func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { +func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -100,7 +102,6 @@ func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -116,8 +117,7 @@ func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupNa // CheckExistenceSender sends the CheckExistence request. The method will close the // http.Response Body if it receives an error. func (client Client) CheckExistenceSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckExistenceResponder handles the response to the CheckExistence request. The method always @@ -137,7 +137,8 @@ func (client Client) CheckExistenceResponder(resp *http.Response) (result autore // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -func (client Client) CheckExistenceByID(ctx context.Context, resourceID string) (result autorest.Response, err error) { +// APIVersion - the API version to use for the operation. +func (client Client) CheckExistenceByID(ctx context.Context, resourceID string, APIVersion string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckExistenceByID") defer func() { @@ -148,7 +149,7 @@ func (client Client) CheckExistenceByID(ctx context.Context, resourceID string) tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CheckExistenceByIDPreparer(ctx, resourceID) + req, err := client.CheckExistenceByIDPreparer(ctx, resourceID, APIVersion) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", nil, "Failure preparing request") return @@ -170,12 +171,11 @@ func (client Client) CheckExistenceByID(ctx context.Context, resourceID string) } // CheckExistenceByIDPreparer prepares the CheckExistenceByID request. -func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) { +func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -191,8 +191,7 @@ func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID // CheckExistenceByIDSender sends the CheckExistenceByID request. The method will close the // http.Response Body if it receives an error. func (client Client) CheckExistenceByIDSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // CheckExistenceByIDResponder handles the response to the CheckExistenceByID request. The method always @@ -214,8 +213,9 @@ func (client Client) CheckExistenceByIDResponder(resp *http.Response) (result au // parentResourcePath - the parent resource identity. // resourceType - the resource type of the resource to create. // resourceName - the name of the resource to create. +// APIVersion - the API version to use for the operation. // parameters - parameters for creating or updating the resource. -func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (result CreateOrUpdateFuture, err error) { +func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result CreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate") defer func() { @@ -237,7 +237,7 @@ func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName strin return result, validation.NewError("resources.Client", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure preparing request") return @@ -253,7 +253,7 @@ func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName strin } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (*http.Request, error) { +func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -263,7 +263,6 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,9 +280,8 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -309,8 +307,9 @@ func (client Client) CreateOrUpdateResponder(resp *http.Response) (result Generi // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} +// APIVersion - the API version to use for the operation. // parameters - create or update resource parameters. -func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, parameters GenericResource) (result CreateOrUpdateByIDFuture, err error) { +func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result CreateOrUpdateByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdateByID") defer func() { @@ -328,7 +327,7 @@ func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, return result, validation.NewError("resources.Client", "CreateOrUpdateByID", err.Error()) } - req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceID, parameters) + req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceID, APIVersion, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure preparing request") return @@ -344,12 +343,11 @@ func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, } // CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request. -func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID string, parameters GenericResource) (*http.Request, error) { +func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -367,9 +365,8 @@ func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID // CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the // http.Response Body if it receives an error. func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return } @@ -398,7 +395,8 @@ func (client Client) CreateOrUpdateByIDResponder(resp *http.Response) (result Ge // parentResourcePath - the parent resource identity. // resourceType - the resource type. // resourceName - the name of the resource to delete. -func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result DeleteFuture, err error) { +// APIVersion - the API version to use for the operation. +func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result DeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete") defer func() { @@ -417,7 +415,7 @@ func (client Client) Delete(ctx context.Context, resourceGroupName string, resou return result, validation.NewError("resources.Client", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure preparing request") return @@ -433,7 +431,7 @@ func (client Client) Delete(ctx context.Context, resourceGroupName string, resou } // DeletePreparer prepares the Delete request. -func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { +func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -443,7 +441,6 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -459,9 +456,8 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -486,7 +482,8 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -func (client Client) DeleteByID(ctx context.Context, resourceID string) (result DeleteByIDFuture, err error) { +// APIVersion - the API version to use for the operation. +func (client Client) DeleteByID(ctx context.Context, resourceID string, APIVersion string) (result DeleteByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.DeleteByID") defer func() { @@ -497,7 +494,7 @@ func (client Client) DeleteByID(ctx context.Context, resourceID string) (result tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteByIDPreparer(ctx, resourceID) + req, err := client.DeleteByIDPreparer(ctx, resourceID, APIVersion) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure preparing request") return @@ -513,12 +510,11 @@ func (client Client) DeleteByID(ctx context.Context, resourceID string) (result } // DeleteByIDPreparer prepares the DeleteByID request. -func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) { +func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -534,9 +530,8 @@ func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string) // DeleteByIDSender sends the DeleteByID request. The method will close the // http.Response Body if it receives an error. func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return } @@ -564,7 +559,8 @@ func (client Client) DeleteByIDResponder(resp *http.Response) (result autorest.R // parentResourcePath - the parent resource identity. // resourceType - the resource type of the resource. // resourceName - the name of the resource to get. -func (client Client) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result GenericResource, err error) { +// APIVersion - the API version to use for the operation. +func (client Client) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result GenericResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get") defer func() { @@ -583,7 +579,7 @@ func (client Client) Get(ctx context.Context, resourceGroupName string, resource return result, validation.NewError("resources.Client", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) + req, err := client.GetPreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "Get", nil, "Failure preparing request") return @@ -605,7 +601,7 @@ func (client Client) Get(ctx context.Context, resourceGroupName string, resource } // GetPreparer prepares the Get request. -func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { +func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -615,7 +611,6 @@ func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -631,8 +626,7 @@ func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client Client) GetSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetResponder handles the response to the Get request. The method always @@ -653,7 +647,8 @@ func (client Client) GetResponder(resp *http.Response) (result GenericResource, // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -func (client Client) GetByID(ctx context.Context, resourceID string) (result GenericResource, err error) { +// APIVersion - the API version to use for the operation. +func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion string) (result GenericResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetByID") defer func() { @@ -664,7 +659,7 @@ func (client Client) GetByID(ctx context.Context, resourceID string) (result Gen tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetByIDPreparer(ctx, resourceID) + req, err := client.GetByIDPreparer(ctx, resourceID, APIVersion) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", nil, "Failure preparing request") return @@ -686,12 +681,11 @@ func (client Client) GetByID(ctx context.Context, resourceID string) (result Gen } // GetByIDPreparer prepares the GetByID request. -func (client Client) GetByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) { +func (client Client) GetByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -707,8 +701,7 @@ func (client Client) GetByIDPreparer(ctx context.Context, resourceID string) (*h // GetByIDSender sends the GetByID request. The method will close the // http.Response Body if it receives an error. func (client Client) GetByIDSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // GetByIDResponder handles the response to the GetByID request. The method always @@ -737,8 +730,8 @@ func (client Client) GetByIDResponder(resp *http.Response) (result GenericResour // use $filter=tagName eq 'tag1' and tagValue eq 'Value1'

You can use some properties together when // filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and // plan/name, identity and identity/principalId. -// expand - the $expand query parameter. You can expand createdTime and changedTime. For example, to expand -// both properties, use $expand=changedTime,createdTime +// expand - comma-separated list of additional properties to be included in the response. Valid values include +// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. // top - the number of results to return. If null is passed, returns all resource groups. func (client Client) List(ctx context.Context, filter string, expand string, top *int32) (result ListResultPage, err error) { if tracing.IsEnabled() { @@ -804,8 +797,7 @@ func (client Client) ListPreparer(ctx context.Context, filter string, expand str // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client Client) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -872,8 +864,8 @@ func (client Client) ListComplete(ctx context.Context, filter string, expand str // use $filter=tagName eq 'tag1' and tagValue eq 'Value1'

You can use some properties together when // filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and // plan/name, identity and identity/principalId. -// expand - the $expand query parameter. You can expand createdTime and changedTime. For example, to expand -// both properties, use $expand=changedTime,createdTime +// expand - comma-separated list of additional properties to be included in the response. Valid values include +// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. // top - the number of results to return. If null is passed, returns all resources. func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultPage, err error) { if tracing.IsEnabled() { @@ -948,8 +940,7 @@ func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGr // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -1067,9 +1058,8 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr // MoveResourcesSender sends the MoveResources request. The method will close the // http.Response Body if it receives an error. func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1096,8 +1086,9 @@ func (client Client) MoveResourcesResponder(resp *http.Response) (result autores // parentResourcePath - the parent resource identity. // resourceType - the resource type of the resource to update. // resourceName - the name of the resource to update. +// APIVersion - the API version to use for the operation. // parameters - parameters for updating the resource. -func (client Client) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (result UpdateFuture, err error) { +func (client Client) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result UpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update") defer func() { @@ -1116,7 +1107,7 @@ func (client Client) Update(ctx context.Context, resourceGroupName string, resou return result, validation.NewError("resources.Client", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure preparing request") return @@ -1132,7 +1123,7 @@ func (client Client) Update(ctx context.Context, resourceGroupName string, resou } // UpdatePreparer prepares the Update request. -func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (*http.Request, error) { +func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1142,7 +1133,6 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1160,9 +1150,8 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -1188,8 +1177,9 @@ func (client Client) UpdateResponder(resp *http.Response) (result GenericResourc // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} +// APIVersion - the API version to use for the operation. // parameters - update resource parameters. -func (client Client) UpdateByID(ctx context.Context, resourceID string, parameters GenericResource) (result UpdateByIDFuture, err error) { +func (client Client) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result UpdateByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.UpdateByID") defer func() { @@ -1200,7 +1190,7 @@ func (client Client) UpdateByID(ctx context.Context, resourceID string, paramete tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateByIDPreparer(ctx, resourceID, parameters) + req, err := client.UpdateByIDPreparer(ctx, resourceID, APIVersion, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure preparing request") return @@ -1216,12 +1206,11 @@ func (client Client) UpdateByID(ctx context.Context, resourceID string, paramete } // UpdateByIDPreparer prepares the UpdateByID request. -func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, parameters GenericResource) (*http.Request, error) { +func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } - const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1239,9 +1228,8 @@ func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, // UpdateByIDSender sends the UpdateByID request. The method will close the // http.Response Body if it receives an error. func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) if err != nil { return } @@ -1329,9 +1317,8 @@ func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceRe // ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the // http.Response Body if it receives an error. func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go index bb2b96320ae..3a315c02973 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go @@ -35,7 +35,8 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client. +// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,8 +100,7 @@ func (client TagsClient) CreateOrUpdatePreparer(ctx context.Context, tagName str // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -176,8 +176,7 @@ func (client TagsClient) CreateOrUpdateValuePreparer(ctx context.Context, tagNam // CreateOrUpdateValueSender sends the CreateOrUpdateValue request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) CreateOrUpdateValueSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CreateOrUpdateValueResponder handles the response to the CreateOrUpdateValue request. The method always @@ -251,8 +250,7 @@ func (client TagsClient) DeletePreparer(ctx context.Context, tagName string) (*h // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -327,8 +325,7 @@ func (client TagsClient) DeleteValuePreparer(ctx context.Context, tagName string // DeleteValueSender sends the DeleteValue request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) DeleteValueSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteValueResponder handles the response to the DeleteValue request. The method always @@ -399,8 +396,7 @@ func (client TagsClient) ListPreparer(ctx context.Context) (*http.Request, error // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go index 7700b6b273d..36a6d3ff3be 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go @@ -36,7 +36,8 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -108,8 +109,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -207,9 +207,8 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = autorest.SendWithSender(client, req, sd...) + resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) if err != nil { return } @@ -303,8 +302,7 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // DeleteResponder handles the response to the Delete request. The method always @@ -393,8 +391,7 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource // GetPropertiesSender sends the GetProperties request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // GetPropertiesResponder handles the response to the GetProperties request. The method always @@ -466,8 +463,7 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always @@ -561,8 +557,7 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc // ListAccountSASSender sends the ListAccountSAS request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListAccountSASSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListAccountSASResponder handles the response to the ListAccountSAS request. The method always @@ -646,8 +641,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -736,8 +730,7 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListKeysResponder handles the response to the ListKeys request. The method always @@ -833,8 +826,7 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc // ListServiceSASSender sends the ListServiceSAS request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListServiceSASSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListServiceSASResponder handles the response to the ListServiceSAS request. The method always @@ -928,8 +920,7 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource // RegenerateKeySender sends the RegenerateKey request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // RegenerateKeyResponder handles the response to the RegenerateKey request. The method always @@ -1026,8 +1017,7 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go index 2be951c81f1..abba376eda8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go @@ -41,7 +41,8 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client. +// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with +// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go index eb1434d0770..1c53ff4a443 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go @@ -35,7 +35,8 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this +// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -91,8 +92,7 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go index cf469d1dba1..fa842a2a34e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go @@ -35,7 +35,8 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -95,8 +96,7 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SkusClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go index 4d66508587f..87c19e995fe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go @@ -35,7 +35,8 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client. +// NewUsageClientWithBaseURI creates an instance of the UsageClient client using a custom endpoint. Use this when +// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient { return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -95,8 +96,7 @@ func (client UsageClient) ListPreparer(ctx context.Context) (*http.Request, erro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client UsageClient) ListSender(req *http.Request) (*http.Response, error) { - sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) - return autorest.SendWithSender(client, req, sd...) + return client.Send(req, azure.DoRetryWithRegistration(client.Client)) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index 672e7e77a9b..dd586a91262 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v37.1.0" +const Number = "v40.4.0" diff --git a/vendor/github.com/Azure/go-amqp/client.go b/vendor/github.com/Azure/go-amqp/client.go index e06f0ffb8d9..ea1bde7ed56 100644 --- a/vendor/github.com/Azure/go-amqp/client.go +++ b/vendor/github.com/Azure/go-amqp/client.go @@ -1810,6 +1810,20 @@ func LinkTargetExpiryPolicy(p ExpiryPolicy) LinkOption { } } +// LinkTargetTimeout sets the duration that an expiring target will be retained. +// +// Default: 0. +func LinkTargetTimeout(timeout uint32) LinkOption { + return func(l *link) error { + if l.target == nil { + l.target = new(target) + } + l.target.Timeout = timeout + + return nil + } +} + // LinkSourceDurability sets the source durability policy. // // Default: DurabilityNone. @@ -1847,6 +1861,20 @@ func LinkSourceExpiryPolicy(p ExpiryPolicy) LinkOption { } } +// LinkSourceTimeout sets the duration that an expiring source will be retained. +// +// Default: 0. +func LinkSourceTimeout(timeout uint32) LinkOption { + return func(l *link) error { + if l.source == nil { + l.source = new(source) + } + l.source.Timeout = timeout + + return nil + } +} + // Receiver receives messages on a single AMQP link. type Receiver struct { link *link // underlying link diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go index 33bbd6ea150..b65b2c8b206 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go @@ -24,6 +24,7 @@ import ( "encoding/json" "errors" "fmt" + "io" "io/ioutil" "math" "net/http" @@ -248,7 +249,7 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo "sub": spt.inner.ClientID, "jti": base64.URLEncoding.EncodeToString(jti), "nbf": time.Now().Unix(), - "exp": time.Now().Add(time.Hour * 24).Unix(), + "exp": time.Now().Add(24 * time.Hour).Unix(), } signedString, err := token.SignedString(secret.PrivateKey) @@ -972,6 +973,10 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http delay := time.Duration(0) for attempt < maxAttempts { + if resp != nil && resp.Body != nil { + io.Copy(ioutil.Discard, resp.Body) + resp.Body.Close() + } resp, err = sender.Do(req) // we want to retry if err is not nil or the status code is in the list of retry codes if err == nil && !responseHasStatusCode(resp, retries...) { diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go index 54e87b5b648..f43e1a6ed5a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization.go @@ -171,20 +171,21 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { removeRequestBody(&rCopy) resp, err := bacb.sender.Do(&rCopy) - if err == nil && resp.StatusCode == 401 { - defer resp.Body.Close() - if hasBearerChallenge(resp) { - bc, err := newBearerChallenge(resp) + if err != nil { + return r, err + } + DrainResponseBody(resp) + if resp.StatusCode == 401 && hasBearerChallenge(resp.Header) { + bc, err := newBearerChallenge(resp.Header) + if err != nil { + return r, err + } + if bacb.callback != nil { + ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) if err != nil { return r, err } - if bacb.callback != nil { - ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) - if err != nil { - return r, err - } - return Prepare(r, ba.WithAuthorization()) - } + return Prepare(r, ba.WithAuthorization()) } } } @@ -194,8 +195,8 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { } // returns true if the HTTP response contains a bearer challenge -func hasBearerChallenge(resp *http.Response) bool { - authHeader := resp.Header.Get(bearerChallengeHeader) +func hasBearerChallenge(header http.Header) bool { + authHeader := header.Get(bearerChallengeHeader) if len(authHeader) == 0 || strings.Index(authHeader, bearer) < 0 { return false } @@ -206,8 +207,8 @@ type bearerChallenge struct { values map[string]string } -func newBearerChallenge(resp *http.Response) (bc bearerChallenge, err error) { - challenge := strings.TrimSpace(resp.Header.Get(bearerChallengeHeader)) +func newBearerChallenge(header http.Header) (bc bearerChallenge, err error) { + challenge := strings.TrimSpace(header.Get(bearerChallengeHeader)) trimmedChallenge := challenge[len(bearer)+1:] // challenge is a set of key=value pairs that are comma delimited diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go index 33e5f127017..b844a3df418 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go @@ -104,6 +104,9 @@ func (sk *SharedKeyAuthorizer) WithAuthorization() PrepareDecorator { } sk, err := buildSharedKey(sk.accountName, sk.accountKey, r, sk.keyType) + if err != nil { + return r, err + } return Prepare(r, WithHeader(headerAuthorization, sk)) }) } diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go index 1cb41cbeb1b..c5fc511f67c 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go @@ -258,7 +258,17 @@ func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) { if err != nil { return nil, err } - return sender.Do(req) + resp, err := sender.Do(req) + if err == nil && resp.Body != nil { + // copy the body and close it so callers don't have to + defer resp.Body.Close() + b, err := ioutil.ReadAll(resp.Body) + if err != nil { + return resp, err + } + resp.Body = ioutil.NopCloser(bytes.NewReader(b)) + } + return resp, err } type pollingTracker interface { diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go index 1c6a0617a1f..e04f9fd4ecd 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/client.go +++ b/vendor/github.com/Azure/go-autorest/autorest/client.go @@ -179,6 +179,11 @@ type Client struct { // Set to true to skip attempted registration of resource providers (false by default). SkipResourceProviderRegistration bool + + // SendDecorators can be used to override the default chain of SendDecorators. + // This can be used to specify things like a custom retry SendDecorator. + // Set this to an empty slice to use no SendDecorators. + SendDecorators []SendDecorator } // NewClientWithUserAgent returns an instance of a Client with the UserAgent set to the passed @@ -298,3 +303,21 @@ func (c Client) ByInspecting() RespondDecorator { } return c.ResponseInspector } + +// Send sends the provided http.Request using the client's Sender or the default sender. +// It returns the http.Response and possible error. It also accepts a, possibly empty, +// default set of SendDecorators used when sending the request. +// SendDecorators have the following precedence: +// 1. In a request's context via WithSendDecorators() +// 2. Specified on the client in SendDecorators +// 3. The default values specified in this method +func (c Client) Send(req *http.Request, decorators ...SendDecorator) (*http.Response, error) { + if c.SendDecorators != nil { + decorators = c.SendDecorators + } + inCtx := req.Context().Value(ctxSendDecorators{}) + if sd, ok := inCtx.([]SendDecorator); ok { + decorators = sd + } + return SendWithSender(c, req, decorators...) +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/Azure/go-autorest/autorest/go.mod index 6f1fcd4a4db..499c56de48a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/go-autorest/autorest go 1.12 require ( - github.com/Azure/go-autorest/autorest/adal v0.8.0 + github.com/Azure/go-autorest/autorest/adal v0.8.2 github.com/Azure/go-autorest/autorest/mocks v0.3.0 github.com/Azure/go-autorest/logger v0.1.0 github.com/Azure/go-autorest/tracing v0.5.0 diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/Azure/go-autorest/autorest/go.sum index e0d94da0a25..37398d1d48a 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/go.sum @@ -1,8 +1,8 @@ github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= -github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= +github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go index 5e595d7b1a3..704f3e55e08 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/sender.go +++ b/vendor/github.com/Azure/go-autorest/autorest/sender.go @@ -243,6 +243,7 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { if err != nil { return resp, err } + DrainResponseBody(resp) resp, err = s.Do(rr.Request()) if err == nil { return resp, err @@ -256,6 +257,12 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { } } +// Count429AsRetry indicates that a 429 response should be included as a retry attempt. +var Count429AsRetry = true + +// Max429Delay is the maximum duration to wait between retries on a 429 if no Retry-After header was received. +var Max429Delay time.Duration + // DoRetryForStatusCodes returns a SendDecorator that retries for specified statusCodes for up to the specified // number of attempts, exponentially backing off between requests using the supplied backoff // time.Duration (which may be zero). Retrying may be canceled by cancelling the context on the http.Request. @@ -263,7 +270,7 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) SendDecorator { return func(s Sender) Sender { return SenderFunc(func(r *http.Request) (*http.Response, error) { - return doRetryForStatusCodesImpl(s, r, false, attempts, backoff, 0, codes...) + return doRetryForStatusCodesImpl(s, r, Count429AsRetry, attempts, backoff, 0, codes...) }) } } @@ -275,7 +282,7 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, codes ...int) SendDecorator { return func(s Sender) Sender { return SenderFunc(func(r *http.Request) (*http.Response, error) { - return doRetryForStatusCodesImpl(s, r, true, attempts, backoff, cap, codes...) + return doRetryForStatusCodesImpl(s, r, Count429AsRetry, attempts, backoff, cap, codes...) }) } } @@ -283,11 +290,12 @@ func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, code func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempts int, backoff, cap time.Duration, codes ...int) (resp *http.Response, err error) { rr := NewRetriableRequest(r) // Increment to add the first call (attempts denotes number of retries) - for attempt := 0; attempt < attempts+1; { + for attempt, delayCount := 0, 0; attempt < attempts+1; { err = rr.Prepare() if err != nil { return } + DrainResponseBody(resp) resp, err = s.Do(rr.Request()) // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication // resp and err will both have a value, so in this case we don't want to retry as it will never succeed. @@ -295,7 +303,12 @@ func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempt return resp, err } delayed := DelayWithRetryAfter(resp, r.Context().Done()) - if !delayed && !DelayForBackoffWithCap(backoff, cap, attempt, r.Context().Done()) { + // if this was a 429 set the delay cap as specified. + // applicable only in the absence of a retry-after header. + if resp != nil && resp.StatusCode == http.StatusTooManyRequests { + cap = Max429Delay + } + if !delayed && !DelayForBackoffWithCap(backoff, cap, delayCount, r.Context().Done()) { return resp, r.Context().Err() } // when count429 == false don't count a 429 against the number @@ -303,6 +316,9 @@ func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempt if count429 || (resp == nil || resp.StatusCode != http.StatusTooManyRequests) { attempt++ } + // delay count is tracked separately from attempts to + // ensure that 429 participates in exponential back-off + delayCount++ } return resp, err } @@ -347,6 +363,7 @@ func DoRetryForDuration(d time.Duration, backoff time.Duration) SendDecorator { if err != nil { return resp, err } + DrainResponseBody(resp) resp, err = s.Do(rr.Request()) if err == nil { return resp, err diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go index 27f824f544b..67baab2cee2 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/utility.go +++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go @@ -20,6 +20,7 @@ import ( "encoding/xml" "fmt" "io" + "io/ioutil" "net" "net/http" "net/url" @@ -226,3 +227,13 @@ func IsTemporaryNetworkError(err error) bool { } return false } + +// DrainResponseBody reads the response body then closes it. +func DrainResponseBody(resp *http.Response) error { + if resp != nil && resp.Body != nil { + _, err := io.Copy(ioutil.Discard, resp.Body) + resp.Body.Close() + return err + } + return nil +} diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go index 6c1d865668d..2bf84cc8f48 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/version.go +++ b/vendor/github.com/Azure/go-autorest/autorest/version.go @@ -19,7 +19,7 @@ import ( "runtime" ) -const number = "v13.3.2" +const number = "v14.0.0" var ( userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", diff --git a/vendor/github.com/godror/godror/odpi/CONTRIBUTING.md b/vendor/github.com/godror/godror/odpi/CONTRIBUTING.md deleted file mode 100644 index 272ff94f74a..00000000000 --- a/vendor/github.com/godror/godror/odpi/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Sorry, Pull Requests for ODPI-C cannot be accepted. Please report bugs and ask questions using [GitHub issues](https://github.com/oracle/odpi/issues) diff --git a/vendor/github.com/godror/godror/odpi/LICENSE.md b/vendor/github.com/godror/godror/odpi/LICENSE.md deleted file mode 100644 index cb344b76c16..00000000000 --- a/vendor/github.com/godror/godror/odpi/LICENSE.md +++ /dev/null @@ -1,217 +0,0 @@ -Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved. - -This program is free software: you can modify it and/or redistribute it under -the terms of: - -(i) the Universal Permissive License v 1.0 or at your option, any - later version (); and/or - -(ii) the Apache License v 2.0. () - - -The Universal Permissive License (UPL), Version 1.0 -=================================================== - -Subject to the condition set forth below, permission is hereby granted to any -person obtaining a copy of this software, associated documentation and/or data -(collectively the "Software"), free of charge and under any and all copyright -rights in the Software, and any and all patent rights owned or freely -licensable by each licensor hereunder covering either (i) the unmodified -Software as contributed to or provided by such licensor, or (ii) the Larger -Works (as defined below), to deal in both - -(a) the Software, and - -(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if - one is included with the Software (each a "Larger Work" to which the - Software is contributed by such licensors), - -without restriction, including without limitation the rights to copy, create -derivative works of, display, perform, and distribute the Software and make, -use, sell, offer for sale, import, export, have made, and have sold the -Software and the Larger Work(s), and to sublicense the foregoing rights on -either these or other terms. - -This license is subject to the following condition: - -The above copyright notice and either this complete permission notice or at a -minimum a reference to the UPL must 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. - - -Apache License -============== - -Version 2.0, January 2004 - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. **Definitions**. - - "License" shall mean the terms and conditions for use, reproduction, and - distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by the - copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all other - entities that control, are controlled by, or are under common control with - that entity. For the purposes of this definition, "control" means (i) the - power, direct or indirect, to cause the direction or management of such - entity, whether by contract or otherwise, or (ii) ownership of fifty - percent (50%) or more of the outstanding shares, or (iii) beneficial - ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity exercising - permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation source, - and configuration files. - - "Object" form shall mean any form resulting from mechanical transformation - or translation of a Source form, including but not limited to compiled - object code, generated documentation, and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or Object form, - made available under the License, as indicated by a copyright notice that - is included in or attached to the work (an example is provided in the - Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object form, - that is based on (or derived from) the Work and for which the editorial - revisions, annotations, elaborations, or other modifications represent, as - a whole, an original work of authorship. For the purposes of this License, - Derivative Works shall not include works that remain separable from, or - merely link (or bind by name) to the interfaces of, the Work and Derivative - Works thereof. - - "Contribution" shall mean any work of authorship, including the original - version of the Work and any modifications or additions to that Work or - Derivative Works thereof, that is intentionally submitted to Licensor for - inclusion in the Work by the copyright owner or by an individual or Legal - Entity authorized to submit on behalf of the copyright owner. For the - purposes of this definition, "submitted" means any form of electronic, - verbal, or written communication sent to the Licensor or its - representatives, including but not limited to communication on electronic - mailing lists, source code control systems, and issue tracking systems that - are managed by, or on behalf of, the Licensor for the purpose of discussing - and improving the Work, but excluding communication that is conspicuously - marked or otherwise designated in writing by the copyright owner as "Not a - Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity on - behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. **Grant of Copyright License.** Subject to the terms and conditions of this - License, each Contributor hereby grants to You a perpetual, worldwide, - non-exclusive, no-charge, royalty-free, irrevocable copyright license to - reproduce, prepare Derivative Works of, publicly display, publicly perform, - sublicense, and distribute the Work and such Derivative Works in Source or - Object form. - -3. **Grant of Patent License.** Subject to the terms and conditions of this - License, each Contributor hereby grants to You a perpetual, worldwide, - non-exclusive, no-charge, royalty-free, irrevocable (except as stated in - this section) patent license to make, have made, use, offer to sell, sell, - import, and otherwise transfer the Work, where such license applies only to - those patent claims licensable by such Contributor that are necessarily - infringed by their Contribution(s) alone or by combination of their - Contribution(s) with the Work to which such Contribution(s) was submitted. - If You institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work or a - Contribution incorporated within the Work constitutes direct or - contributory patent infringement, then any patent licenses granted to You - under this License for that Work shall terminate as of the date such - litigation is filed. - -4. **Redistribution.** You may reproduce and distribute copies of the Work or - Derivative Works thereof in any medium, with or without modifications, and - in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a - copy of this License; and - - 2. You must cause any modified files to carry prominent notices stating - that You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You - distribute, all copyright, patent, trademark, and attribution notices - from the Source form of the Work, excluding those notices that do not - pertain to any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, - then any Derivative Works that You distribute must include a readable - copy of the attribution notices contained within such NOTICE file, - excluding those notices that do not pertain to any part of the - Derivative Works, in at least one of the following places: within a - NOTICE text file distributed as part of the Derivative Works; within - the Source form or documentation, if provided along with the Derivative - Works; or, within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents of the - NOTICE file are for informational purposes only and do not modify the - License. You may add Your own attribution notices within Derivative - Works that You distribute, alongside or as an addendum to the NOTICE - text from the Work, provided that such additional attribution notices - cannot be construed as modifying the License. - - You may add Your own copyright statement to Your modifications and may - provide additional or different license terms and conditions for use, - reproduction, or distribution of Your modifications, or for any such - Derivative Works as a whole, provided Your use, reproduction, and - distribution of the Work otherwise complies with the conditions stated - in this License. - -5. **Submission of Contributions.** Unless You explicitly state otherwise, any - Contribution intentionally submitted for inclusion in the Work by You to - the Licensor shall be under the terms and conditions of this License, - without any additional terms or conditions. Notwithstanding the above, - nothing herein shall supersede or modify the terms of any separate license - agreement you may have executed with Licensor regarding such Contributions. - -6. **Trademarks.** This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, except - as required for reasonable and customary use in describing the origin of - the Work and reproducing the content of the NOTICE file. - -7. **Disclaimer of Warranty.** Unless required by applicable law or agreed to - in writing, Licensor provides the Work (and each Contributor provides its - Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied, including, without limitation, any - warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or - FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for - determining the appropriateness of using or redistributing the Work and - assume any risks associated with Your exercise of permissions under this - License. - -8. **Limitation of Liability.** In no event and under no legal theory, whether - in tort (including negligence), contract, or otherwise, unless required by - applicable law (such as deliberate and grossly negligent acts) or agreed to - in writing, shall any Contributor be liable to You for damages, including - any direct, indirect, special, incidental, or consequential damages of any - character arising as a result of this License or out of the use or - inability to use the Work (including but not limited to damages for loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor has been - advised of the possibility of such damages. - -9. **Accepting Warranty or Additional Liability.** While redistributing the - Work or Derivative Works thereof, You may choose to offer, and charge a fee - for, acceptance of support, warranty, indemnity, or other liability - obligations and/or rights consistent with this License. However, in - accepting such obligations, You may act only on Your own behalf and on Your - sole responsibility, not on behalf of any other Contributor, and only if - You agree to indemnify, defend, and hold each Contributor harmless for any - liability incurred by, or claims asserted against, such Contributor by - reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/vendor/github.com/godror/godror/odpi/README.md b/vendor/github.com/godror/godror/odpi/README.md deleted file mode 100644 index fa911cc2130..00000000000 --- a/vendor/github.com/godror/godror/odpi/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# ODPI-C version 3.3 - -Oracle Database Programming Interface for C (ODPI-C) is an open source library -of C code that simplifies access to Oracle Database for applications written in -C or C++. It is a wrapper over [Oracle Call Interface -(OCI)](http://www.oracle.com/technetwork/database/features/oci/index.html) that -makes applications and language interfaces easier to develop. - -ODPI-C supports basic and advanced features of Oracle Database and -Oracle Client. See the [homepage](https://oracle.github.io/odpi/) for -a list. - -## Installation - -See [ODPI-C Installation](https://oracle.github.io/odpi/doc/installation.html). - -## Documentation - -See the [ODPI-C Documentation](https://oracle.github.io/odpi/doc/index.html) and -[Release Notes](https://oracle.github.io/odpi/doc/releasenotes.html). - -## Samples - -See [/samples](https://github.com/oracle/odpi/tree/master/samples). - -## Help - -Please report bugs and ask questions using [GitHub issues](https://github.com/oracle/odpi/issues). - -## Tests - -See [/test](https://github.com/oracle/odpi/tree/master/test). - -## Contributing - -See [CONTRIBUTING](https://github.com/oracle/odpi/blob/master/CONTRIBUTING.md). - -## Drivers Using ODPI-C - -Oracle Drivers: -* [cx_Oracle](https://oracle.github.io/python-cx_Oracle) Python interface. -* [node-oracledb](https://oracle.github.io/node-oracledb) Node.js module. - -Third-party Drivers: -* [go-goracle](https://gopkg.in/goracle.v2) Go Driver. -* [mirmir](https://github.com/rustyhorde/mimir) Rust Bindings. -* [odpic-raw](https://github.com/leptonyu/odpic-raw) Haskell Raw Bindings. -* [ruby-ODPI ](https://github.com/kubo/ruby-odpi) Ruby Interface. -* [rust-oracle ](https://github.com/kubo/rust-oracle) Driver for Rust. -* [Oracle.jl](https://github.com/felipenoris/Oracle.jl) Driver for Julia. -* [oranif](https://github.com/K2InformaticsGmbH/oranif) Driver for Erlang. - -## License - -Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. - -This program is free software: you can modify it and/or redistribute it under -the terms of: - -(i) the Universal Permissive License v 1.0 or at your option, any - later version (); and/or - -(ii) the Apache License v 2.0. () diff --git a/vendor/github.com/godror/godror/odpi/embed/README.md b/vendor/github.com/godror/godror/odpi/embed/README.md deleted file mode 100644 index dfe0b4524c0..00000000000 --- a/vendor/github.com/godror/godror/odpi/embed/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains the file dpi.c which can be used to embed ODPI-C -within your project without having to manage the individual files that make up -the library. The files can also be compiled independently if that is preferred. diff --git a/vendor/github.com/godror/godror/odpi/embed/dpi.c b/vendor/github.com/godror/godror/odpi/embed/dpi.c deleted file mode 100644 index 7d0c6dc83bb..00000000000 --- a/vendor/github.com/godror/godror/odpi/embed/dpi.c +++ /dev/null @@ -1,50 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpi.c -// Include this file in your project in order to embed ODPI-C source without -// having to compile files individually. Only the definitions in the file -// include/dpi.h are intended to be used publicly. Each file can also be -// compiled independently if that is preferable. -//----------------------------------------------------------------------------- - -#include "../src/dpiConn.c" -#include "../src/dpiContext.c" -#include "../src/dpiData.c" -#include "../src/dpiDebug.c" -#include "../src/dpiDeqOptions.c" -#include "../src/dpiEnqOptions.c" -#include "../src/dpiEnv.c" -#include "../src/dpiError.c" -#include "../src/dpiGen.c" -#include "../src/dpiGlobal.c" -#include "../src/dpiHandleList.c" -#include "../src/dpiHandlePool.c" -#include "../src/dpiLob.c" -#include "../src/dpiMsgProps.c" -#include "../src/dpiObjectAttr.c" -#include "../src/dpiObject.c" -#include "../src/dpiObjectType.c" -#include "../src/dpiOci.c" -#include "../src/dpiOracleType.c" -#include "../src/dpiPool.c" -#include "../src/dpiQueue.c" -#include "../src/dpiRowid.c" -#include "../src/dpiSodaColl.c" -#include "../src/dpiSodaCollCursor.c" -#include "../src/dpiSodaDb.c" -#include "../src/dpiSodaDoc.c" -#include "../src/dpiSodaDocCursor.c" -#include "../src/dpiStmt.c" -#include "../src/dpiSubscr.c" -#include "../src/dpiUtils.c" -#include "../src/dpiVar.c" diff --git a/vendor/github.com/godror/godror/odpi/include/dpi.h b/vendor/github.com/godror/godror/odpi/include/dpi.h deleted file mode 100644 index 58b3a2d5867..00000000000 --- a/vendor/github.com/godror/godror/odpi/include/dpi.h +++ /dev/null @@ -1,1814 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpi.h -// Master include file for ODPI-C library. -//----------------------------------------------------------------------------- - -#ifndef DPI_PUBLIC -#define DPI_PUBLIC - -// define standard integer types for older versions of Microsoft Visual Studio -#ifdef _MSC_VER -#if _MSC_VER < 1600 -#define int8_t signed __int8 -#define int16_t signed __int16 -#define int32_t signed __int32 -#define int64_t signed __int64 -#define uint8_t unsigned __int8 -#define uint16_t unsigned __int16 -#define uint32_t unsigned __int32 -#define uint64_t unsigned __int64 -#endif -#endif - -#ifndef int8_t -#include -#endif - -// define __func__ for older versions of Microsoft Visual Studio -#ifdef _MSC_VER -#if _MSC_VER < 1900 -#define __func__ __FUNCTION__ -#endif -#endif - -// define ODPI-C version information -#define DPI_MAJOR_VERSION 3 -#define DPI_MINOR_VERSION 3 -#define DPI_PATCH_LEVEL 0 -#define DPI_VERSION_SUFFIX - -#define DPI_STR_HELPER(x) #x -#define DPI_STR(x) DPI_STR_HELPER(x) -#define DPI_VERSION_STRING \ - DPI_STR(DPI_MAJOR_VERSION) "." \ - DPI_STR(DPI_MINOR_VERSION) "." \ - DPI_STR(DPI_PATCH_LEVEL) \ - DPI_VERSION_SUFFIX -#define DPI_DEFAULT_DRIVER_NAME "ODPI-C : " DPI_VERSION_STRING - -#define DPI_VERSION_TO_NUMBER(major, minor, patch) \ - ((major * 10000) + (minor * 100) + patch) -#define DPI_VERSION_NUMBER \ - DPI_VERSION_TO_NUMBER(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, \ - DPI_PATCH_LEVEL) - -#define DPI_ORACLE_VERSION_TO_NUMBER(versionNum, releaseNum, updateNum, \ - portReleaseNum, portUpdateNum) \ - ((versionNum * 100000000) + (releaseNum * 1000000) + \ - (updateNum * 10000) + (portReleaseNum * 100) + (portUpdateNum)) - -// define default array size to use -#define DPI_DEFAULT_FETCH_ARRAY_SIZE 100 - -// define ping interval (in seconds) used when getting connections -#define DPI_DEFAULT_PING_INTERVAL 60 - -// define ping timeout (in milliseconds) used when getting connections -#define DPI_DEFAULT_PING_TIMEOUT 5000 - -// define constants for dequeue wait (AQ) -#define DPI_DEQ_WAIT_NO_WAIT 0 -#define DPI_DEQ_WAIT_FOREVER ((uint32_t) -1) - -// define maximum precision that can be supported by an int64_t value -#define DPI_MAX_INT64_PRECISION 18 - -// define constants for success and failure of methods -#define DPI_SUCCESS 0 -#define DPI_FAILURE -1 - -// set debug level (DPI_DEBUG_LEVEL) as a bitmask of desired flags -// reporting is to stderr -// 0x0001: reports errors during free -// 0x0002: reports on reference count changes -// 0x0004: reports on public function calls -// 0x0008: reports on all errors -// 0x0010: reports on all SQL statements -// 0x0020: reports on all memory allocations/frees -#define DPI_DEBUG_LEVEL_FREES 0x0001 -#define DPI_DEBUG_LEVEL_REFS 0x0002 -#define DPI_DEBUG_LEVEL_FNS 0x0004 -#define DPI_DEBUG_LEVEL_ERRORS 0x0008 -#define DPI_DEBUG_LEVEL_SQL 0x0010 -#define DPI_DEBUG_LEVEL_MEM 0x0020 - - -//----------------------------------------------------------------------------- -// Enumerations -//----------------------------------------------------------------------------- - - -// connection/pool authorization modes -typedef uint32_t dpiAuthMode; -#define DPI_MODE_AUTH_DEFAULT 0x00000000 -#define DPI_MODE_AUTH_SYSDBA 0x00000002 -#define DPI_MODE_AUTH_SYSOPER 0x00000004 -#define DPI_MODE_AUTH_PRELIM 0x00000008 -#define DPI_MODE_AUTH_SYSASM 0x00008000 -#define DPI_MODE_AUTH_SYSBKP 0x00020000 -#define DPI_MODE_AUTH_SYSDGD 0x00040000 -#define DPI_MODE_AUTH_SYSKMT 0x00080000 -#define DPI_MODE_AUTH_SYSRAC 0x00100000 - -// connection close modes -typedef uint32_t dpiConnCloseMode; -#define DPI_MODE_CONN_CLOSE_DEFAULT 0x0000 -#define DPI_MODE_CONN_CLOSE_DROP 0x0001 -#define DPI_MODE_CONN_CLOSE_RETAG 0x0002 - -// connection/pool creation modes -typedef uint32_t dpiCreateMode; -#define DPI_MODE_CREATE_DEFAULT 0x00000000 -#define DPI_MODE_CREATE_THREADED 0x00000001 -#define DPI_MODE_CREATE_EVENTS 0x00000004 - -// dequeue modes for advanced queuing -typedef uint32_t dpiDeqMode; -#define DPI_MODE_DEQ_BROWSE 1 -#define DPI_MODE_DEQ_LOCKED 2 -#define DPI_MODE_DEQ_REMOVE 3 -#define DPI_MODE_DEQ_REMOVE_NO_DATA 4 - -// dequeue navigation flags for advanced queuing -typedef uint32_t dpiDeqNavigation; -#define DPI_DEQ_NAV_FIRST_MSG 1 -#define DPI_DEQ_NAV_NEXT_TRANSACTION 2 -#define DPI_DEQ_NAV_NEXT_MSG 3 - -// event types -typedef uint32_t dpiEventType; -#define DPI_EVENT_NONE 0 -#define DPI_EVENT_STARTUP 1 -#define DPI_EVENT_SHUTDOWN 2 -#define DPI_EVENT_SHUTDOWN_ANY 3 -#define DPI_EVENT_DEREG 5 -#define DPI_EVENT_OBJCHANGE 6 -#define DPI_EVENT_QUERYCHANGE 7 -#define DPI_EVENT_AQ 100 - -// statement execution modes -typedef uint32_t dpiExecMode; -#define DPI_MODE_EXEC_DEFAULT 0x00000000 -#define DPI_MODE_EXEC_DESCRIBE_ONLY 0x00000010 -#define DPI_MODE_EXEC_COMMIT_ON_SUCCESS 0x00000020 -#define DPI_MODE_EXEC_BATCH_ERRORS 0x00000080 -#define DPI_MODE_EXEC_PARSE_ONLY 0x00000100 -#define DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS 0x00100000 - -// statement fetch modes -typedef uint16_t dpiFetchMode; -#define DPI_MODE_FETCH_NEXT 0x0002 -#define DPI_MODE_FETCH_FIRST 0x0004 -#define DPI_MODE_FETCH_LAST 0x0008 -#define DPI_MODE_FETCH_PRIOR 0x0010 -#define DPI_MODE_FETCH_ABSOLUTE 0x0020 -#define DPI_MODE_FETCH_RELATIVE 0x0040 - -// message delivery modes in advanced queuing -typedef uint16_t dpiMessageDeliveryMode; -#define DPI_MODE_MSG_PERSISTENT 1 -#define DPI_MODE_MSG_BUFFERED 2 -#define DPI_MODE_MSG_PERSISTENT_OR_BUFFERED 3 - -// message states in advanced queuing -typedef uint32_t dpiMessageState; -#define DPI_MSG_STATE_READY 0 -#define DPI_MSG_STATE_WAITING 1 -#define DPI_MSG_STATE_PROCESSED 2 -#define DPI_MSG_STATE_EXPIRED 3 - -// native C types -typedef uint32_t dpiNativeTypeNum; -#define DPI_NATIVE_TYPE_INT64 3000 -#define DPI_NATIVE_TYPE_UINT64 3001 -#define DPI_NATIVE_TYPE_FLOAT 3002 -#define DPI_NATIVE_TYPE_DOUBLE 3003 -#define DPI_NATIVE_TYPE_BYTES 3004 -#define DPI_NATIVE_TYPE_TIMESTAMP 3005 -#define DPI_NATIVE_TYPE_INTERVAL_DS 3006 -#define DPI_NATIVE_TYPE_INTERVAL_YM 3007 -#define DPI_NATIVE_TYPE_LOB 3008 -#define DPI_NATIVE_TYPE_OBJECT 3009 -#define DPI_NATIVE_TYPE_STMT 3010 -#define DPI_NATIVE_TYPE_BOOLEAN 3011 -#define DPI_NATIVE_TYPE_ROWID 3012 - -// operation codes (database change and continuous query notification) -typedef uint32_t dpiOpCode; -#define DPI_OPCODE_ALL_OPS 0x0 -#define DPI_OPCODE_ALL_ROWS 0x1 -#define DPI_OPCODE_INSERT 0x2 -#define DPI_OPCODE_UPDATE 0x4 -#define DPI_OPCODE_DELETE 0x8 -#define DPI_OPCODE_ALTER 0x10 -#define DPI_OPCODE_DROP 0x20 -#define DPI_OPCODE_UNKNOWN 0x40 - -// Oracle types -typedef uint32_t dpiOracleTypeNum; -#define DPI_ORACLE_TYPE_NONE 2000 -#define DPI_ORACLE_TYPE_VARCHAR 2001 -#define DPI_ORACLE_TYPE_NVARCHAR 2002 -#define DPI_ORACLE_TYPE_CHAR 2003 -#define DPI_ORACLE_TYPE_NCHAR 2004 -#define DPI_ORACLE_TYPE_ROWID 2005 -#define DPI_ORACLE_TYPE_RAW 2006 -#define DPI_ORACLE_TYPE_NATIVE_FLOAT 2007 -#define DPI_ORACLE_TYPE_NATIVE_DOUBLE 2008 -#define DPI_ORACLE_TYPE_NATIVE_INT 2009 -#define DPI_ORACLE_TYPE_NUMBER 2010 -#define DPI_ORACLE_TYPE_DATE 2011 -#define DPI_ORACLE_TYPE_TIMESTAMP 2012 -#define DPI_ORACLE_TYPE_TIMESTAMP_TZ 2013 -#define DPI_ORACLE_TYPE_TIMESTAMP_LTZ 2014 -#define DPI_ORACLE_TYPE_INTERVAL_DS 2015 -#define DPI_ORACLE_TYPE_INTERVAL_YM 2016 -#define DPI_ORACLE_TYPE_CLOB 2017 -#define DPI_ORACLE_TYPE_NCLOB 2018 -#define DPI_ORACLE_TYPE_BLOB 2019 -#define DPI_ORACLE_TYPE_BFILE 2020 -#define DPI_ORACLE_TYPE_STMT 2021 -#define DPI_ORACLE_TYPE_BOOLEAN 2022 -#define DPI_ORACLE_TYPE_OBJECT 2023 -#define DPI_ORACLE_TYPE_LONG_VARCHAR 2024 -#define DPI_ORACLE_TYPE_LONG_RAW 2025 -#define DPI_ORACLE_TYPE_NATIVE_UINT 2026 -#define DPI_ORACLE_TYPE_MAX 2027 - -// session pool close modes -typedef uint32_t dpiPoolCloseMode; -#define DPI_MODE_POOL_CLOSE_DEFAULT 0x0000 -#define DPI_MODE_POOL_CLOSE_FORCE 0x0001 - -// modes used when acquiring a connection from a session pool -typedef uint8_t dpiPoolGetMode; -#define DPI_MODE_POOL_GET_WAIT 0 -#define DPI_MODE_POOL_GET_NOWAIT 1 -#define DPI_MODE_POOL_GET_FORCEGET 2 -#define DPI_MODE_POOL_GET_TIMEDWAIT 3 - -// purity values when acquiring a connection from a pool -typedef uint32_t dpiPurity; -#define DPI_PURITY_DEFAULT 0 -#define DPI_PURITY_NEW 1 -#define DPI_PURITY_SELF 2 - -// database shutdown modes -typedef uint32_t dpiShutdownMode; -#define DPI_MODE_SHUTDOWN_DEFAULT 0 -#define DPI_MODE_SHUTDOWN_TRANSACTIONAL 1 -#define DPI_MODE_SHUTDOWN_TRANSACTIONAL_LOCAL 2 -#define DPI_MODE_SHUTDOWN_IMMEDIATE 3 -#define DPI_MODE_SHUTDOWN_ABORT 4 -#define DPI_MODE_SHUTDOWN_FINAL 5 - -// SODA flags -#define DPI_SODA_FLAGS_DEFAULT 0x00 -#define DPI_SODA_FLAGS_ATOMIC_COMMIT 0x01 -#define DPI_SODA_FLAGS_CREATE_COLL_MAP 0x02 -#define DPI_SODA_FLAGS_INDEX_DROP_FORCE 0x04 - -// database startup modes -typedef uint32_t dpiStartupMode; -#define DPI_MODE_STARTUP_DEFAULT 0 -#define DPI_MODE_STARTUP_FORCE 1 -#define DPI_MODE_STARTUP_RESTRICT 2 - -// statement types -typedef uint16_t dpiStatementType; -#define DPI_STMT_TYPE_UNKNOWN 0 -#define DPI_STMT_TYPE_SELECT 1 -#define DPI_STMT_TYPE_UPDATE 2 -#define DPI_STMT_TYPE_DELETE 3 -#define DPI_STMT_TYPE_INSERT 4 -#define DPI_STMT_TYPE_CREATE 5 -#define DPI_STMT_TYPE_DROP 6 -#define DPI_STMT_TYPE_ALTER 7 -#define DPI_STMT_TYPE_BEGIN 8 -#define DPI_STMT_TYPE_DECLARE 9 -#define DPI_STMT_TYPE_CALL 10 -#define DPI_STMT_TYPE_EXPLAIN_PLAN 15 -#define DPI_STMT_TYPE_MERGE 16 -#define DPI_STMT_TYPE_ROLLBACK 17 -#define DPI_STMT_TYPE_COMMIT 21 - -// subscription grouping classes -typedef uint8_t dpiSubscrGroupingClass; -#define DPI_SUBSCR_GROUPING_CLASS_TIME 1 - -// subscription grouping types -typedef uint8_t dpiSubscrGroupingType; -#define DPI_SUBSCR_GROUPING_TYPE_SUMMARY 1 -#define DPI_SUBSCR_GROUPING_TYPE_LAST 2 - -// subscription namespaces -typedef uint32_t dpiSubscrNamespace; -#define DPI_SUBSCR_NAMESPACE_AQ 1 -#define DPI_SUBSCR_NAMESPACE_DBCHANGE 2 - -// subscription protocols -typedef uint32_t dpiSubscrProtocol; -#define DPI_SUBSCR_PROTO_CALLBACK 0 -#define DPI_SUBSCR_PROTO_MAIL 1 -#define DPI_SUBSCR_PROTO_PLSQL 2 -#define DPI_SUBSCR_PROTO_HTTP 3 - -// subscription quality of service -typedef uint32_t dpiSubscrQOS; -#define DPI_SUBSCR_QOS_RELIABLE 0x01 -#define DPI_SUBSCR_QOS_DEREG_NFY 0x02 -#define DPI_SUBSCR_QOS_ROWIDS 0x04 -#define DPI_SUBSCR_QOS_QUERY 0x08 -#define DPI_SUBSCR_QOS_BEST_EFFORT 0x10 - -// visibility of messages in advanced queuing -typedef uint32_t dpiVisibility; -#define DPI_VISIBILITY_IMMEDIATE 1 -#define DPI_VISIBILITY_ON_COMMIT 2 - - -//----------------------------------------------------------------------------- -// Handle Types -//----------------------------------------------------------------------------- -typedef struct dpiConn dpiConn; -typedef struct dpiPool dpiPool; -typedef struct dpiStmt dpiStmt; -typedef struct dpiVar dpiVar; -typedef struct dpiLob dpiLob; -typedef struct dpiObject dpiObject; -typedef struct dpiObjectAttr dpiObjectAttr; -typedef struct dpiObjectType dpiObjectType; -typedef struct dpiRowid dpiRowid; -typedef struct dpiSubscr dpiSubscr; -typedef struct dpiDeqOptions dpiDeqOptions; -typedef struct dpiEnqOptions dpiEnqOptions; -typedef struct dpiMsgProps dpiMsgProps; - - -//----------------------------------------------------------------------------- -// Complex Native Data Types (used for transferring data to/from ODPI-C) -//----------------------------------------------------------------------------- - -// structure used for transferring byte strings to/from ODPI-C -typedef struct { - char *ptr; - uint32_t length; - const char *encoding; -} dpiBytes; - -// structure used for transferring day/seconds intervals to/from ODPI-C -typedef struct { - int32_t days; - int32_t hours; - int32_t minutes; - int32_t seconds; - int32_t fseconds; -} dpiIntervalDS; - -// structure used for transferring years/months intervals to/from ODPI-C -typedef struct { - int32_t years; - int32_t months; -} dpiIntervalYM; - -// structure used for transferring dates to/from ODPI-C -typedef struct { - int16_t year; - uint8_t month; - uint8_t day; - uint8_t hour; - uint8_t minute; - uint8_t second; - uint32_t fsecond; - int8_t tzHourOffset; - int8_t tzMinuteOffset; -} dpiTimestamp; - - -//----------------------------------------------------------------------------- -// Other Types -//----------------------------------------------------------------------------- - -// forward declarations -typedef struct dpiAppContext dpiAppContext; -typedef struct dpiCommonCreateParams dpiCommonCreateParams; -typedef struct dpiConnCreateParams dpiConnCreateParams; -typedef struct dpiContext dpiContext; -typedef struct dpiData dpiData; -typedef struct dpiDataTypeInfo dpiDataTypeInfo; -typedef struct dpiEncodingInfo dpiEncodingInfo; -typedef struct dpiErrorInfo dpiErrorInfo; -typedef struct dpiObjectAttrInfo dpiObjectAttrInfo; -typedef struct dpiObjectTypeInfo dpiObjectTypeInfo; -typedef struct dpiPoolCreateParams dpiPoolCreateParams; -typedef struct dpiQueryInfo dpiQueryInfo; -typedef struct dpiQueue dpiQueue; -typedef struct dpiShardingKeyColumn dpiShardingKeyColumn; -typedef struct dpiSodaColl dpiSodaColl; -typedef struct dpiSodaCollNames dpiSodaCollNames; -typedef struct dpiSodaCollCursor dpiSodaCollCursor; -typedef struct dpiSodaDb dpiSodaDb; -typedef struct dpiSodaDoc dpiSodaDoc; -typedef struct dpiSodaDocCursor dpiSodaDocCursor; -typedef struct dpiSodaOperOptions dpiSodaOperOptions; -typedef struct dpiStmtInfo dpiStmtInfo; -typedef struct dpiSubscrCreateParams dpiSubscrCreateParams; -typedef struct dpiSubscrMessage dpiSubscrMessage; -typedef struct dpiSubscrMessageQuery dpiSubscrMessageQuery; -typedef struct dpiSubscrMessageRow dpiSubscrMessageRow; -typedef struct dpiSubscrMessageTable dpiSubscrMessageTable; -typedef struct dpiVersionInfo dpiVersionInfo; - -// union used for providing a buffer of any data type -typedef union { - int asBoolean; - int64_t asInt64; - uint64_t asUint64; - float asFloat; - double asDouble; - dpiBytes asBytes; - dpiTimestamp asTimestamp; - dpiIntervalDS asIntervalDS; - dpiIntervalYM asIntervalYM; - dpiLob *asLOB; - dpiObject *asObject; - dpiStmt *asStmt; - dpiRowid *asRowid; -} dpiDataBuffer; - -// structure used for application context -struct dpiAppContext { - const char *namespaceName; - uint32_t namespaceNameLength; - const char *name; - uint32_t nameLength; - const char *value; - uint32_t valueLength; -}; - -// structure used for common parameters used for creating standalone -// connections and session pools -struct dpiCommonCreateParams { - dpiCreateMode createMode; - const char *encoding; - const char *nencoding; - const char *edition; - uint32_t editionLength; - const char *driverName; - uint32_t driverNameLength; -}; - -// structure used for creating connections -struct dpiConnCreateParams { - dpiAuthMode authMode; - const char *connectionClass; - uint32_t connectionClassLength; - dpiPurity purity; - const char *newPassword; - uint32_t newPasswordLength; - dpiAppContext *appContext; - uint32_t numAppContext; - int externalAuth; - void *externalHandle; - dpiPool *pool; - const char *tag; - uint32_t tagLength; - int matchAnyTag; - const char *outTag; - uint32_t outTagLength; - int outTagFound; - dpiShardingKeyColumn *shardingKeyColumns; - uint8_t numShardingKeyColumns; - dpiShardingKeyColumn *superShardingKeyColumns; - uint8_t numSuperShardingKeyColumns; - int outNewSession; -}; - -// structure used for transferring data to/from ODPI-C -struct dpiData { - int isNull; - dpiDataBuffer value; -}; - -// structure used for providing metadata about data types -struct dpiDataTypeInfo { - dpiOracleTypeNum oracleTypeNum; - dpiNativeTypeNum defaultNativeTypeNum; - uint16_t ociTypeCode; - uint32_t dbSizeInBytes; - uint32_t clientSizeInBytes; - uint32_t sizeInChars; - int16_t precision; - int8_t scale; - uint8_t fsPrecision; - dpiObjectType *objectType; -}; - -// structure used for transferring encoding information from ODPI-C -struct dpiEncodingInfo { - const char *encoding; - int32_t maxBytesPerCharacter; - const char *nencoding; - int32_t nmaxBytesPerCharacter; -}; - -// structure used for transferring error information from ODPI-C -struct dpiErrorInfo { - int32_t code; - uint16_t offset; - const char *message; - uint32_t messageLength; - const char *encoding; - const char *fnName; - const char *action; - const char *sqlState; - int isRecoverable; -}; - -// structure used for transferring object attribute information from ODPI-C -struct dpiObjectAttrInfo { - const char *name; - uint32_t nameLength; - dpiDataTypeInfo typeInfo; -}; - -// structure used for transferring object type information from ODPI-C -struct dpiObjectTypeInfo { - const char *schema; - uint32_t schemaLength; - const char *name; - uint32_t nameLength; - int isCollection; - dpiDataTypeInfo elementTypeInfo; - uint16_t numAttributes; -}; - -// structure used for creating pools -struct dpiPoolCreateParams { - uint32_t minSessions; - uint32_t maxSessions; - uint32_t sessionIncrement; - int pingInterval; - int pingTimeout; - int homogeneous; - int externalAuth; - dpiPoolGetMode getMode; - const char *outPoolName; - uint32_t outPoolNameLength; - uint32_t timeout; - uint32_t waitTimeout; - uint32_t maxLifetimeSession; - const char *plsqlFixupCallback; - uint32_t plsqlFixupCallbackLength; - uint32_t maxSessionsPerShard; -}; - -// structure used for transferring query metadata from ODPI-C -struct dpiQueryInfo { - const char *name; - uint32_t nameLength; - dpiDataTypeInfo typeInfo; - int nullOk; -}; - -// structure used for sharding key columns -struct dpiShardingKeyColumn { - dpiOracleTypeNum oracleTypeNum; - dpiNativeTypeNum nativeTypeNum; - dpiDataBuffer value; -}; - -// structure used for getting collection names from the database -struct dpiSodaCollNames { - uint32_t numNames; - const char **names; - uint32_t *nameLengths; -}; - -// structure used for SODA operations (find/replace/remove) -struct dpiSodaOperOptions { - uint32_t numKeys; - const char **keys; - uint32_t *keyLengths; - const char *key; - uint32_t keyLength; - const char *version; - uint32_t versionLength; - const char *filter; - uint32_t filterLength; - uint32_t skip; - uint32_t limit; -}; - -// structure used for transferring statement information from ODPI-C -struct dpiStmtInfo { - int isQuery; - int isPLSQL; - int isDDL; - int isDML; - dpiStatementType statementType; - int isReturning; -}; - -// callback for subscriptions -typedef void (*dpiSubscrCallback)(void* context, dpiSubscrMessage *message); - -// structure used for creating subscriptions -struct dpiSubscrCreateParams { - dpiSubscrNamespace subscrNamespace; - dpiSubscrProtocol protocol; - dpiSubscrQOS qos; - dpiOpCode operations; - uint32_t portNumber; - uint32_t timeout; - const char *name; - uint32_t nameLength; - dpiSubscrCallback callback; - void *callbackContext; - const char *recipientName; - uint32_t recipientNameLength; - const char *ipAddress; - uint32_t ipAddressLength; - uint8_t groupingClass; - uint32_t groupingValue; - uint8_t groupingType; - uint64_t outRegId; - int clientInitiated; -}; - -// structure used for transferring messages in subscription callbacks -struct dpiSubscrMessage { - dpiEventType eventType; - const char *dbName; - uint32_t dbNameLength; - dpiSubscrMessageTable *tables; - uint32_t numTables; - dpiSubscrMessageQuery *queries; - uint32_t numQueries; - dpiErrorInfo *errorInfo; - const void *txId; - uint32_t txIdLength; - int registered; - const char *queueName; - uint32_t queueNameLength; - const char *consumerName; - uint32_t consumerNameLength; -}; - -// structure used for transferring query information in messages in -// subscription callbacks (continuous query notification) -struct dpiSubscrMessageQuery { - uint64_t id; - dpiOpCode operation; - dpiSubscrMessageTable *tables; - uint32_t numTables; -}; - -// structure used for transferring row information in messages in -// subscription callbacks -struct dpiSubscrMessageRow { - dpiOpCode operation; - const char *rowid; - uint32_t rowidLength; -}; - -// structure used for transferring table information in messages in -// subscription callbacks -struct dpiSubscrMessageTable { - dpiOpCode operation; - const char *name; - uint32_t nameLength; - dpiSubscrMessageRow *rows; - uint32_t numRows; -}; - -// structure used for transferring version information -struct dpiVersionInfo { - int versionNum; - int releaseNum; - int updateNum; - int portReleaseNum; - int portUpdateNum; - uint32_t fullVersionNum; -}; - - -//----------------------------------------------------------------------------- -// Context Methods (dpiContext) -//----------------------------------------------------------------------------- - -// create a context handle and validate the version information -int dpiContext_create(unsigned int majorVersion, unsigned int minorVersion, - dpiContext **context, dpiErrorInfo *errorInfo); - -// destroy context handle -int dpiContext_destroy(dpiContext *context); - -// return the OCI client version in use -int dpiContext_getClientVersion(const dpiContext *context, - dpiVersionInfo *versionInfo); - -// get error information -void dpiContext_getError(const dpiContext *context, dpiErrorInfo *errorInfo); - -// initialize context parameters to default values -int dpiContext_initCommonCreateParams(const dpiContext *context, - dpiCommonCreateParams *params); - -// initialize connection create parameters to default values -int dpiContext_initConnCreateParams(const dpiContext *context, - dpiConnCreateParams *params); - -// initialize pool create parameters to default values -int dpiContext_initPoolCreateParams(const dpiContext *context, - dpiPoolCreateParams *params); - -// initialize SODA operation options to default values -int dpiContext_initSodaOperOptions(const dpiContext *context, - dpiSodaOperOptions *options); - -// initialize subscription create parameters to default values -int dpiContext_initSubscrCreateParams(const dpiContext *context, - dpiSubscrCreateParams *params); - - -//----------------------------------------------------------------------------- -// Connection Methods (dpiConn) -//----------------------------------------------------------------------------- - -// add a reference to a connection -int dpiConn_addRef(dpiConn *conn); - -// begin a distributed transaction -int dpiConn_beginDistribTrans(dpiConn *conn, long formatId, - const char *transactionId, uint32_t transactionIdLength, - const char *branchId, uint32_t branchIdLength); - -// break execution of the statement running on the connection -int dpiConn_breakExecution(dpiConn *conn); - -// change the password for the specified user -int dpiConn_changePassword(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *oldPassword, - uint32_t oldPasswordLength, const char *newPassword, - uint32_t newPasswordLength); - -// close the connection now, not when the reference count reaches zero -int dpiConn_close(dpiConn *conn, dpiConnCloseMode mode, const char *tag, - uint32_t tagLength); - -// commits the current active transaction -int dpiConn_commit(dpiConn *conn); - -// create a connection and return a reference to it -int dpiConn_create(const dpiContext *context, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - const dpiCommonCreateParams *commonParams, - dpiConnCreateParams *createParams, dpiConn **conn); - -// dequeue a message from a queue -int dpiConn_deqObject(dpiConn *conn, const char *queueName, - uint32_t queueNameLength, dpiDeqOptions *options, dpiMsgProps *props, - dpiObject *payload, const char **msgId, uint32_t *msgIdLength); - -// enqueue a message to a queue -int dpiConn_enqObject(dpiConn *conn, const char *queueName, - uint32_t queueNameLength, dpiEnqOptions *options, dpiMsgProps *props, - dpiObject *payload, const char **msgId, uint32_t *msgIdLength); - -// get call timeout in place for round-trips with this connection -int dpiConn_getCallTimeout(dpiConn *conn, uint32_t *value); - -// get current schema associated with the connection -int dpiConn_getCurrentSchema(dpiConn *conn, const char **value, - uint32_t *valueLength); - -// get edition associated with the connection -int dpiConn_getEdition(dpiConn *conn, const char **value, - uint32_t *valueLength); - -// return the encoding information used by the connection -int dpiConn_getEncodingInfo(dpiConn *conn, dpiEncodingInfo *info); - -// get external name associated with the connection -int dpiConn_getExternalName(dpiConn *conn, const char **value, - uint32_t *valueLength); - -// get the OCI service context handle associated with the connection -int dpiConn_getHandle(dpiConn *conn, void **handle); - -// get internal name associated with the connection -int dpiConn_getInternalName(dpiConn *conn, const char **value, - uint32_t *valueLength); - -// get logical transaction id associated with the connection -int dpiConn_getLTXID(dpiConn *conn, const char **value, uint32_t *valueLength); - -// create a new object type and return it for subsequent object creation -int dpiConn_getObjectType(dpiConn *conn, const char *name, uint32_t nameLength, - dpiObjectType **objType); - -// return information about the server version in use -int dpiConn_getServerVersion(dpiConn *conn, const char **releaseString, - uint32_t *releaseStringLength, dpiVersionInfo *versionInfo); - -// get SODA interface object -int dpiConn_getSodaDb(dpiConn *conn, dpiSodaDb **db); - -// return the statement cache size -int dpiConn_getStmtCacheSize(dpiConn *conn, uint32_t *cacheSize); - -// create a new dequeue options object and return it -int dpiConn_newDeqOptions(dpiConn *conn, dpiDeqOptions **options); - -// create a new enqueue options object and return it -int dpiConn_newEnqOptions(dpiConn *conn, dpiEnqOptions **options); - -// create a new message properties object and return it -int dpiConn_newMsgProps(dpiConn *conn, dpiMsgProps **props); - -// create a new AQ queue -int dpiConn_newQueue(dpiConn *conn, const char *name, uint32_t nameLength, - dpiObjectType *payloadType, dpiQueue **queue); - -// create a new temporary LOB -int dpiConn_newTempLob(dpiConn *conn, dpiOracleTypeNum lobType, dpiLob **lob); - -// create a new variable and return it for subsequent binding/defining -int dpiConn_newVar(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, - dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, - int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, - dpiData **data); - -// ping the connection to see if it is still alive -int dpiConn_ping(dpiConn *conn); - -// prepare a distributed transaction for commit -int dpiConn_prepareDistribTrans(dpiConn *conn, int *commitNeeded); - -// prepare a statement and return it for subsequent execution/fetching -int dpiConn_prepareStmt(dpiConn *conn, int scrollable, const char *sql, - uint32_t sqlLength, const char *tag, uint32_t tagLength, - dpiStmt **stmt); - -// release a reference to the connection -int dpiConn_release(dpiConn *conn); - -// rolls back the current active transaction -int dpiConn_rollback(dpiConn *conn); - -// set action associated with the connection -int dpiConn_setAction(dpiConn *conn, const char *value, uint32_t valueLength); - -// set call timeout for subsequent round-trips with this connection -int dpiConn_setCallTimeout(dpiConn *conn, uint32_t value); - -// set client identifier associated with the connection -int dpiConn_setClientIdentifier(dpiConn *conn, const char *value, - uint32_t valueLength); - -// set client info associated with the connection -int dpiConn_setClientInfo(dpiConn *conn, const char *value, - uint32_t valueLength); - -// set current schema associated with the connection -int dpiConn_setCurrentSchema(dpiConn *conn, const char *value, - uint32_t valueLength); - -// set database operation associated with the connection -int dpiConn_setDbOp(dpiConn *conn, const char *value, uint32_t valueLength); - -// set external name associated with the connection -int dpiConn_setExternalName(dpiConn *conn, const char *value, - uint32_t valueLength); - -// set internal name associated with the connection -int dpiConn_setInternalName(dpiConn *conn, const char *value, - uint32_t valueLength); - -// set module associated with the connection -int dpiConn_setModule(dpiConn *conn, const char *value, uint32_t valueLength); - -// set the statement cache size -int dpiConn_setStmtCacheSize(dpiConn *conn, uint32_t cacheSize); - -// shutdown the database -int dpiConn_shutdownDatabase(dpiConn *conn, dpiShutdownMode mode); - -// startup the database -int dpiConn_startupDatabase(dpiConn *conn, dpiStartupMode mode); - -// subscribe to events in the database -int dpiConn_subscribe(dpiConn *conn, dpiSubscrCreateParams *params, - dpiSubscr **subscr); - -// unsubscribe from events in the database -int dpiConn_unsubscribe(dpiConn *conn, dpiSubscr *subscr); - - -//----------------------------------------------------------------------------- -// Data Methods (dpiData) -//----------------------------------------------------------------------------- - -// return the boolean portion of the data -int dpiData_getBool(dpiData *data); - -// return the bytes portion of the data -dpiBytes *dpiData_getBytes(dpiData *data); - -// return the double portion of the data -double dpiData_getDouble(dpiData *data); - -// return the float portion of the data -float dpiData_getFloat(dpiData *data); - -// return the integer portion of the data -int64_t dpiData_getInt64(dpiData *data); - -// return the interval (days/seconds) portion of the data -dpiIntervalDS *dpiData_getIntervalDS(dpiData *data); - -// return the interval (years/months) portion of the data -dpiIntervalYM *dpiData_getIntervalYM(dpiData *data); - -// return whether data value is null or not -int dpiData_getIsNull(dpiData *data); - -// return the LOB portion of the data -dpiLob *dpiData_getLOB(dpiData *data); - -// return the object portion of the data -dpiObject *dpiData_getObject(dpiData *data); - -// return the statement portion of the data -dpiStmt *dpiData_getStmt(dpiData *data); - -// return the timestamp portion of the data -dpiTimestamp *dpiData_getTimestamp(dpiData *data); - -// return the unsigned integer portion of the data -uint64_t dpiData_getUint64(dpiData *data); - -// set the boolean portion of the data -void dpiData_setBool(dpiData *data, int value); - -// set the bytes portion of the data -void dpiData_setBytes(dpiData *data, char *ptr, uint32_t length); - -// set the double portion of the data -void dpiData_setDouble(dpiData *data, double value); - -// set the float portion of the data -void dpiData_setFloat(dpiData *data, float value); - -// set the integer portion of the data -void dpiData_setInt64(dpiData *data, int64_t value); - -// set the interval (days/seconds) portion of the data -void dpiData_setIntervalDS(dpiData *data, int32_t days, int32_t hours, - int32_t minutes, int32_t seconds, int32_t fsceconds); - -// set the interval (years/months) portion of the data -void dpiData_setIntervalYM(dpiData *data, int32_t years, int32_t months); - -// set the LOB portion of the data -void dpiData_setLOB(dpiData *data, dpiLob *lob); - -// set data to the null value -void dpiData_setNull(dpiData *data); - -// set the object portion of the data -void dpiData_setObject(dpiData *data, dpiObject *obj); - -// set the statement portion of the data -void dpiData_setStmt(dpiData *data, dpiStmt *stmt); - -// set the timestamp portion of the data -void dpiData_setTimestamp(dpiData *data, int16_t year, uint8_t month, - uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, - uint32_t fsecond, int8_t tzHourOffset, int8_t tzMinuteOffset); - -// set the unsigned integer portion of the data -void dpiData_setUint64(dpiData *data, uint64_t value); - - -//----------------------------------------------------------------------------- -// Dequeue Option Methods (dpiDeqOptions) -//----------------------------------------------------------------------------- - -// add a reference to dequeue options -int dpiDeqOptions_addRef(dpiDeqOptions *options); - -// return condition associated with dequeue options -int dpiDeqOptions_getCondition(dpiDeqOptions *options, const char **value, - uint32_t *valueLength); - -// return consumer name associated with dequeue options -int dpiDeqOptions_getConsumerName(dpiDeqOptions *options, const char **value, - uint32_t *valueLength); - -// return correlation associated with dequeue options -int dpiDeqOptions_getCorrelation(dpiDeqOptions *options, const char **value, - uint32_t *valueLength); - -// return mode associated with dequeue options -int dpiDeqOptions_getMode(dpiDeqOptions *options, dpiDeqMode *value); - -// return message id associated with dequeue options -int dpiDeqOptions_getMsgId(dpiDeqOptions *options, const char **value, - uint32_t *valueLength); - -// return navigation associated with dequeue options -int dpiDeqOptions_getNavigation(dpiDeqOptions *options, - dpiDeqNavigation *value); - -// return transformation associated with dequeue options -int dpiDeqOptions_getTransformation(dpiDeqOptions *options, const char **value, - uint32_t *valueLength); - -// return visibility associated with dequeue options -int dpiDeqOptions_getVisibility(dpiDeqOptions *options, dpiVisibility *value); - -// return wait time associated with dequeue options -int dpiDeqOptions_getWait(dpiDeqOptions *options, uint32_t *value); - -// release a reference from dequeue options -int dpiDeqOptions_release(dpiDeqOptions *options); - -// set condition associated with dequeue options -int dpiDeqOptions_setCondition(dpiDeqOptions *options, const char *value, - uint32_t valueLength); - -// set consumer name associated with dequeue options -int dpiDeqOptions_setConsumerName(dpiDeqOptions *options, const char *value, - uint32_t valueLength); - -// set correlation associated with dequeue options -int dpiDeqOptions_setCorrelation(dpiDeqOptions *options, const char *value, - uint32_t valueLength); - -// set delivery mode associated with dequeue options -int dpiDeqOptions_setDeliveryMode(dpiDeqOptions *options, - dpiMessageDeliveryMode value); - -// set mode associated with dequeue options -int dpiDeqOptions_setMode(dpiDeqOptions *options, dpiDeqMode value); - -// set message id associated with dequeue options -int dpiDeqOptions_setMsgId(dpiDeqOptions *options, const char *value, - uint32_t valueLength); - -// set navigation associated with dequeue options -int dpiDeqOptions_setNavigation(dpiDeqOptions *options, - dpiDeqNavigation value); - -// set transformation associated with dequeue options -int dpiDeqOptions_setTransformation(dpiDeqOptions *options, const char *value, - uint32_t valueLength); - -// set visibility associated with dequeue options -int dpiDeqOptions_setVisibility(dpiDeqOptions *options, dpiVisibility value); - -// set wait time associated with dequeue options -int dpiDeqOptions_setWait(dpiDeqOptions *options, uint32_t value); - - -//----------------------------------------------------------------------------- -// Enqueue Option Methods (dpiEnqOptions) -//----------------------------------------------------------------------------- - -// add a reference to enqueue options -int dpiEnqOptions_addRef(dpiEnqOptions *options); - -// return transformation associated with enqueue options -int dpiEnqOptions_getTransformation(dpiEnqOptions *options, const char **value, - uint32_t *valueLength); - -// return visibility associated with enqueue options -int dpiEnqOptions_getVisibility(dpiEnqOptions *options, dpiVisibility *value); - -// release a reference from enqueue options -int dpiEnqOptions_release(dpiEnqOptions *options); - -// set delivery mode associated with enqueue options -int dpiEnqOptions_setDeliveryMode(dpiEnqOptions *options, - dpiMessageDeliveryMode value); - -// set transformation associated with enqueue options -int dpiEnqOptions_setTransformation(dpiEnqOptions *options, const char *value, - uint32_t valueLength); - -// set visibility associated with enqueue options -int dpiEnqOptions_setVisibility(dpiEnqOptions *options, dpiVisibility value); - - -//----------------------------------------------------------------------------- -// LOB Methods (dpiLob) -//----------------------------------------------------------------------------- - -// add a reference to the LOB -int dpiLob_addRef(dpiLob *lob); - -// close the LOB -int dpiLob_close(dpiLob *lob); - -// close the LOB's resources -int dpiLob_closeResource(dpiLob *lob); - -// create a copy of the LOB -int dpiLob_copy(dpiLob *lob, dpiLob **copiedLob); - -// get buffer size in bytes for a LOB -int dpiLob_getBufferSize(dpiLob *lob, uint64_t sizeInChars, - uint64_t *sizeInBytes); - -// return the chunk size for the LOB -int dpiLob_getChunkSize(dpiLob *lob, uint32_t *size); - -// return the directory alias name and file name of a BFILE LOB -int dpiLob_getDirectoryAndFileName(dpiLob *lob, const char **directoryAlias, - uint32_t *directoryAliasLength, const char **fileName, - uint32_t *fileNameLength); - -// return if the file associated with a BFILE LOB exists -int dpiLob_getFileExists(dpiLob *lob, int *exists); - -// return if the LOB's resources are currently open -int dpiLob_getIsResourceOpen(dpiLob *lob, int *isOpen); - -// return the current size of the LOB -int dpiLob_getSize(dpiLob *lob, uint64_t *size); - -// open the LOB's resources (used to improve performance of multiple -// read/writes operations) -int dpiLob_openResource(dpiLob *lob); - -// read bytes from the LOB at the specified offset -int dpiLob_readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, - char *value, uint64_t *valueLength); - -// release a reference to the LOB -int dpiLob_release(dpiLob *lob); - -// set the directory name and file name of the BFILE LOB -int dpiLob_setDirectoryAndFileName(dpiLob *lob, const char *directoryAlias, - uint32_t directoryAliasLength, const char *fileName, - uint32_t fileNameLength); - -// sets the contents of a LOB from a byte string -int dpiLob_setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength); - -// trim the LOB to the specified size -int dpiLob_trim(dpiLob *lob, uint64_t newSize); - -// write bytes to the LOB at the specified offset -int dpiLob_writeBytes(dpiLob *lob, uint64_t offset, const char *value, - uint64_t valueLength); - - -//----------------------------------------------------------------------------- -// Message Properties Methods (dpiMsgProps) -//----------------------------------------------------------------------------- - -// add a reference to message properties -int dpiMsgProps_addRef(dpiMsgProps *props); - -// return the number of attempts made to deliver the message -int dpiMsgProps_getNumAttempts(dpiMsgProps *props, int32_t *value); - -// return correlation associated with the message -int dpiMsgProps_getCorrelation(dpiMsgProps *props, const char **value, - uint32_t *valueLength); - -// return the number of seconds the message was delayed -int dpiMsgProps_getDelay(dpiMsgProps *props, int32_t *value); - -// return the mode used for delivering the message -int dpiMsgProps_getDeliveryMode(dpiMsgProps *props, - dpiMessageDeliveryMode *value); - -// return the time the message was enqueued -int dpiMsgProps_getEnqTime(dpiMsgProps *props, dpiTimestamp *value); - -// return the name of the exception queue associated with the message -int dpiMsgProps_getExceptionQ(dpiMsgProps *props, const char **value, - uint32_t *valueLength); - -// return the number of seconds until the message expires -int dpiMsgProps_getExpiration(dpiMsgProps *props, int32_t *value); - -// return the message id for the message (after enqueuing or dequeuing) -int dpiMsgProps_getMsgId(dpiMsgProps *props, const char **value, - uint32_t *valueLength); - -// return the original message id for the message -int dpiMsgProps_getOriginalMsgId(dpiMsgProps *props, const char **value, - uint32_t *valueLength); - -// return the payload of the message (object or bytes) -int dpiMsgProps_getPayload(dpiMsgProps *props, dpiObject **obj, - const char **value, uint32_t *valueLength); - -// return the priority of the message -int dpiMsgProps_getPriority(dpiMsgProps *props, int32_t *value); - -// return the state of the message -int dpiMsgProps_getState(dpiMsgProps *props, dpiMessageState *value); - -// release a reference from message properties -int dpiMsgProps_release(dpiMsgProps *props); - -// set correlation associated with the message -int dpiMsgProps_setCorrelation(dpiMsgProps *props, const char *value, - uint32_t valueLength); - -// set the number of seconds to delay the message -int dpiMsgProps_setDelay(dpiMsgProps *props, int32_t value); - -// set the name of the exception queue associated with the message -int dpiMsgProps_setExceptionQ(dpiMsgProps *props, const char *value, - uint32_t valueLength); - -// set the number of seconds until the message expires -int dpiMsgProps_setExpiration(dpiMsgProps *props, int32_t value); - -// set the original message id for the message -int dpiMsgProps_setOriginalMsgId(dpiMsgProps *props, const char *value, - uint32_t valueLength); - -// set the payload of the message (as a series of bytes) -int dpiMsgProps_setPayloadBytes(dpiMsgProps *props, const char *value, - uint32_t valueLength); - -// set the payload of the message (as an object) -int dpiMsgProps_setPayloadObject(dpiMsgProps *props, dpiObject *obj); - -// set the priority of the message -int dpiMsgProps_setPriority(dpiMsgProps *props, int32_t value); - - -//----------------------------------------------------------------------------- -// Object Methods (dpiObject) -//----------------------------------------------------------------------------- - -// add a reference to the object -int dpiObject_addRef(dpiObject *obj); - -// append an element to the collection -int dpiObject_appendElement(dpiObject *obj, dpiNativeTypeNum nativeTypeNum, - dpiData *value); - -// copy the object and return the copied object -int dpiObject_copy(dpiObject *obj, dpiObject **copiedObj); - -// delete an element from the collection -int dpiObject_deleteElementByIndex(dpiObject *obj, int32_t index); - -// get the value of the specified attribute -int dpiObject_getAttributeValue(dpiObject *obj, dpiObjectAttr *attr, - dpiNativeTypeNum nativeTypeNum, dpiData *value); - -// return whether an element exists in a collection at the specified index -int dpiObject_getElementExistsByIndex(dpiObject *obj, int32_t index, - int *exists); - -// get the value of the element in a collection at the specified index -int dpiObject_getElementValueByIndex(dpiObject *obj, int32_t index, - dpiNativeTypeNum nativeTypeNum, dpiData *value); - -// return the first index used in a collection -int dpiObject_getFirstIndex(dpiObject *obj, int32_t *index, int *exists); - -// return the last index used in a collection -int dpiObject_getLastIndex(dpiObject *obj, int32_t *index, int *exists); - -// return the next index used in a collection given an index -int dpiObject_getNextIndex(dpiObject *obj, int32_t index, int32_t *nextIndex, - int *exists); - -// return the previous index used in a collection given an index -int dpiObject_getPrevIndex(dpiObject *obj, int32_t index, int32_t *prevIndex, - int *exists); - -// return the number of elements in a collection -int dpiObject_getSize(dpiObject *obj, int32_t *size); - -// release a reference to the object -int dpiObject_release(dpiObject *obj); - -// set the value of the specified attribute -int dpiObject_setAttributeValue(dpiObject *obj, dpiObjectAttr *attr, - dpiNativeTypeNum nativeTypeNum, dpiData *value); - -// set the value of the element in a collection at the specified index -int dpiObject_setElementValueByIndex(dpiObject *obj, int32_t index, - dpiNativeTypeNum nativeTypeNum, dpiData *value); - -// trim a number of elements from the end of a collection -int dpiObject_trim(dpiObject *obj, uint32_t numToTrim); - - -//----------------------------------------------------------------------------- -// Object Type Attribute Methods (dpiObjectAttr) -//----------------------------------------------------------------------------- - -// add a reference to the attribute -int dpiObjectAttr_addRef(dpiObjectAttr *attr); - -// return the name of the attribute -int dpiObjectAttr_getInfo(dpiObjectAttr *attr, dpiObjectAttrInfo *info); - -// release a reference to the attribute -int dpiObjectAttr_release(dpiObjectAttr *attr); - - -//----------------------------------------------------------------------------- -// Object Type Methods (dpiObjectType) -//----------------------------------------------------------------------------- - -// add a reference to the object type -int dpiObjectType_addRef(dpiObjectType *objType); - -// create an object of the specified type and return it -int dpiObjectType_createObject(dpiObjectType *objType, dpiObject **obj); - -// return the attributes available on the object type -int dpiObjectType_getAttributes(dpiObjectType *objType, uint16_t numAttributes, - dpiObjectAttr **attributes); - -// return information about the object type -int dpiObjectType_getInfo(dpiObjectType *objType, dpiObjectTypeInfo *info); - -// release a reference to the object type -int dpiObjectType_release(dpiObjectType *objType); - - -//----------------------------------------------------------------------------- -// Session Pools Methods (dpiPool) -//----------------------------------------------------------------------------- - -// acquire a connection from the pool and return it -int dpiPool_acquireConnection(dpiPool *pool, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - dpiConnCreateParams *createParams, dpiConn **conn); - -// add a reference to a pool -int dpiPool_addRef(dpiPool *pool); - -// destroy the pool now, not when its reference count reaches zero -int dpiPool_close(dpiPool *pool, dpiPoolCloseMode closeMode); - -// create a session pool and return it -int dpiPool_create(const dpiContext *context, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - const dpiCommonCreateParams *commonParams, - dpiPoolCreateParams *createParams, dpiPool **pool); - -// get the pool's busy count -int dpiPool_getBusyCount(dpiPool *pool, uint32_t *value); - -// return the encoding information used by the session pool -int dpiPool_getEncodingInfo(dpiPool *pool, dpiEncodingInfo *info); - -// get the pool's "get" mode -int dpiPool_getGetMode(dpiPool *pool, dpiPoolGetMode *value); - -// get the pool's maximum lifetime session -int dpiPool_getMaxLifetimeSession(dpiPool *pool, uint32_t *value); - -// get the pool's open count -int dpiPool_getOpenCount(dpiPool *pool, uint32_t *value); - -// return the statement cache size -int dpiPool_getStmtCacheSize(dpiPool *pool, uint32_t *cacheSize); - -// get the pool's timeout value -int dpiPool_getTimeout(dpiPool *pool, uint32_t *value); - -// get the pool's wait timeout value -int dpiPool_getWaitTimeout(dpiPool *pool, uint32_t *value); - -// release a reference to the pool -int dpiPool_release(dpiPool *pool); - -// set the pool's "get" mode -int dpiPool_setGetMode(dpiPool *pool, dpiPoolGetMode value); - -// set the pool's maximum lifetime session -int dpiPool_setMaxLifetimeSession(dpiPool *pool, uint32_t value); - -// set the statement cache size -int dpiPool_setStmtCacheSize(dpiPool *pool, uint32_t cacheSize); - -// set the pool's timeout value -int dpiPool_setTimeout(dpiPool *pool, uint32_t value); - -// set the pool's wait timeout value -int dpiPool_setWaitTimeout(dpiPool *pool, uint32_t value); - - -//----------------------------------------------------------------------------- -// AQ Queue Methods (dpiQueue) -//----------------------------------------------------------------------------- - -// add a reference to the queue -int dpiQueue_addRef(dpiQueue *queue); - -// dequeue multiple messages from the queue -int dpiQueue_deqMany(dpiQueue *queue, uint32_t *numProps, dpiMsgProps **props); - -// dequeue a single message from the queue -int dpiQueue_deqOne(dpiQueue *queue, dpiMsgProps **props); - -// enqueue multiple message to the queue -int dpiQueue_enqMany(dpiQueue *queue, uint32_t numProps, dpiMsgProps **props); - -// enqueue a single message to the queue -int dpiQueue_enqOne(dpiQueue *queue, dpiMsgProps *props); - -// get a reference to the dequeue options associated with the queue -int dpiQueue_getDeqOptions(dpiQueue *queue, dpiDeqOptions **options); - -// get a reference to the enqueue options associated with the queue -int dpiQueue_getEnqOptions(dpiQueue *queue, dpiEnqOptions **options); - -// release a reference to the queue -int dpiQueue_release(dpiQueue *queue); - - -//----------------------------------------------------------------------------- -// SODA Collection Methods (dpiSodaColl) -//----------------------------------------------------------------------------- - -// add a reference to the SODA collection -int dpiSodaColl_addRef(dpiSodaColl *coll); - -// create an index on the collection -int dpiSodaColl_createIndex(dpiSodaColl *coll, const char *indexSpec, - uint32_t indexSpecLength, uint32_t flags); - -// drop a SODA collection -int dpiSodaColl_drop(dpiSodaColl *coll, uint32_t flags, int *isDropped); - -// drop an index on the collection -int dpiSodaColl_dropIndex(dpiSodaColl *coll, const char *name, - uint32_t nameLength, uint32_t flags, int *isDropped); - -// find documents in a SODA collection and return a cursor -int dpiSodaColl_find(dpiSodaColl *coll, const dpiSodaOperOptions *options, - uint32_t flags, dpiSodaDocCursor **cursor); - -// find a single document in a SODA collection -int dpiSodaColl_findOne(dpiSodaColl *coll, const dpiSodaOperOptions *options, - uint32_t flags, dpiSodaDoc **doc); - -// get the data guide for the collection -int dpiSodaColl_getDataGuide(dpiSodaColl *coll, uint32_t flags, - dpiSodaDoc **doc); - -// get the count of documents that match the criteria -int dpiSodaColl_getDocCount(dpiSodaColl *coll, - const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count); - -// get the metadata of the collection -int dpiSodaColl_getMetadata(dpiSodaColl *coll, const char **value, - uint32_t *valueLength); - -// get the name of the collection -int dpiSodaColl_getName(dpiSodaColl *coll, const char **value, - uint32_t *valueLength); - -// insert multiple documents into the SODA collection -int dpiSodaColl_insertMany(dpiSodaColl *coll, uint32_t numDocs, - dpiSodaDoc **docs, uint32_t flags, dpiSodaDoc **insertedDocs); - -// insert a document into the SODA collection -int dpiSodaColl_insertOne(dpiSodaColl *coll, dpiSodaDoc *doc, uint32_t flags, - dpiSodaDoc **insertedDoc); - -// release a reference to the SODA collection -int dpiSodaColl_release(dpiSodaColl *coll); - -// remove documents from a SODA collection (with operation options) -int dpiSodaColl_remove(dpiSodaColl *coll, const dpiSodaOperOptions *options, - uint32_t flags, uint64_t *count); - -// replace a document in a SODA collection (with operation options) -int dpiSodaColl_replaceOne(dpiSodaColl *coll, - const dpiSodaOperOptions *options, dpiSodaDoc *doc, uint32_t flags, - int *replaced, dpiSodaDoc **replacedDoc); - - -//----------------------------------------------------------------------------- -// SODA Collection Cursor Methods (dpiSodaCollCursor) -//----------------------------------------------------------------------------- - -// add a reference to the SODA collection cursor -int dpiSodaCollCursor_addRef(dpiSodaCollCursor *cursor); - -// close the SODA collection cursor -int dpiSodaCollCursor_close(dpiSodaCollCursor *cursor); - -// get the next collection from the cursor -int dpiSodaCollCursor_getNext(dpiSodaCollCursor *cursor, uint32_t flags, - dpiSodaColl **coll); - -// release a reference to the SODA collection cursor -int dpiSodaCollCursor_release(dpiSodaCollCursor *cursor); - - -//----------------------------------------------------------------------------- -// SODA Database Methods (dpiSodaDb) -//----------------------------------------------------------------------------- - -// add a reference to the SODA database -int dpiSodaDb_addRef(dpiSodaDb *db); - -// create a new SODA collection -int dpiSodaDb_createCollection(dpiSodaDb *db, const char *name, - uint32_t nameLength, const char *metadata, uint32_t metadataLength, - uint32_t flags, dpiSodaColl **coll); - -// create a new SODA document -int dpiSodaDb_createDocument(dpiSodaDb *db, const char *key, - uint32_t keyLength, const char *content, uint32_t contentLength, - const char *mediaType, uint32_t mediaTypeLength, uint32_t flags, - dpiSodaDoc **doc); - -// free the memory allocated when getting an array of SODA collection names -int dpiSodaDb_freeCollectionNames(dpiSodaDb *db, dpiSodaCollNames *names); - -// return a cursor to iterate over SODA collections -int dpiSodaDb_getCollections(dpiSodaDb *db, const char *startName, - uint32_t startNameLength, uint32_t flags, dpiSodaCollCursor **cursor); - -// return an array of SODA collection names -int dpiSodaDb_getCollectionNames(dpiSodaDb *db, const char *startName, - uint32_t startNameLength, uint32_t limit, uint32_t flags, - dpiSodaCollNames *names); - -// open an existing SODA collection -int dpiSodaDb_openCollection(dpiSodaDb *db, const char *name, - uint32_t nameLength, uint32_t flags, dpiSodaColl **coll); - -// release a reference to the SODA database -int dpiSodaDb_release(dpiSodaDb *db); - - -//----------------------------------------------------------------------------- -// SODA Document Methods (dpiSodaDoc) -//----------------------------------------------------------------------------- - -// add a reference to the SODA document -int dpiSodaDoc_addRef(dpiSodaDoc *cursor); - -// get the content of the document -int dpiSodaDoc_getContent(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength, const char **encoding); - -// get the created timestamp associated with the document -int dpiSodaDoc_getCreatedOn(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength); - -// get the key associated with the document -int dpiSodaDoc_getKey(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength); - -// get the last modified timestamp associated with the document -int dpiSodaDoc_getLastModified(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength); - -// get the media type of the document -int dpiSodaDoc_getMediaType(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength); - -// get the version of the document -int dpiSodaDoc_getVersion(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength); - -// release a reference to the SODA document -int dpiSodaDoc_release(dpiSodaDoc *cursor); - - -//----------------------------------------------------------------------------- -// SODA Document Cursor Methods (dpiSodaDocCursor) -//----------------------------------------------------------------------------- - -// add a reference to the SODA document cursor -int dpiSodaDocCursor_addRef(dpiSodaDocCursor *cursor); - -// close the SODA document cursor -int dpiSodaDocCursor_close(dpiSodaDocCursor *cursor); - -// get the next document from the cursor -int dpiSodaDocCursor_getNext(dpiSodaDocCursor *cursor, uint32_t flags, - dpiSodaDoc **doc); - -// release a reference to the SODA document cursor -int dpiSodaDocCursor_release(dpiSodaDocCursor *cursor); - - -//----------------------------------------------------------------------------- -// Statement Methods (dpiStmt) -//----------------------------------------------------------------------------- - -// add a reference to a statement -int dpiStmt_addRef(dpiStmt *stmt); - -// bind a variable to the statement using the given name -int dpiStmt_bindByName(dpiStmt *stmt, const char *name, uint32_t nameLength, - dpiVar *var); - -// bind a variable to the statement at the given position -// positions are determined by the order in which names are introduced -int dpiStmt_bindByPos(dpiStmt *stmt, uint32_t pos, dpiVar *var); - -// bind a value to the statement using the given name -// this creates the variable by looking at the type and then binds it -int dpiStmt_bindValueByName(dpiStmt *stmt, const char *name, - uint32_t nameLength, dpiNativeTypeNum nativeTypeNum, dpiData *data); - -// bind a value to the statement at the given position -// this creates the variable by looking at the type and then binds it -int dpiStmt_bindValueByPos(dpiStmt *stmt, uint32_t pos, - dpiNativeTypeNum nativeTypeNum, dpiData *data); - -// close the statement now, not when its reference count reaches zero -int dpiStmt_close(dpiStmt *stmt, const char *tag, uint32_t tagLength); - -// define a variable to accept the data for the specified column (1 based) -int dpiStmt_define(dpiStmt *stmt, uint32_t pos, dpiVar *var); - -// define type of data to use for the specified column (1 based) -int dpiStmt_defineValue(dpiStmt *stmt, uint32_t pos, - dpiOracleTypeNum oracleTypeNum, dpiNativeTypeNum nativeTypeNum, - uint32_t size, int sizeIsBytes, dpiObjectType *objType); - -// execute the statement and return the number of query columns -// zero implies the statement is not a query -int dpiStmt_execute(dpiStmt *stmt, dpiExecMode mode, - uint32_t *numQueryColumns); - -// execute the statement multiple times (queries not supported) -int dpiStmt_executeMany(dpiStmt *stmt, dpiExecMode mode, uint32_t numIters); - -// fetch a single row and return the index into the defined variables -// this will internally perform any execute and array fetch as needed -int dpiStmt_fetch(dpiStmt *stmt, int *found, uint32_t *bufferRowIndex); - -// return the number of rows that are available in the defined variables -// up to the maximum specified; this will internally perform execute/array -// fetch only if no rows are available in the defined variables and there are -// more rows available to fetch -int dpiStmt_fetchRows(dpiStmt *stmt, uint32_t maxRows, - uint32_t *bufferRowIndex, uint32_t *numRowsFetched, int *moreRows); - -// get the number of batch errors that took place in the previous execution -int dpiStmt_getBatchErrorCount(dpiStmt *stmt, uint32_t *count); - -// get the batch errors that took place in the previous execution -int dpiStmt_getBatchErrors(dpiStmt *stmt, uint32_t numErrors, - dpiErrorInfo *errors); - -// get the number of bind variables that are in the prepared statement -int dpiStmt_getBindCount(dpiStmt *stmt, uint32_t *count); - -// get the names of the bind variables that are in the prepared statement -int dpiStmt_getBindNames(dpiStmt *stmt, uint32_t *numBindNames, - const char **bindNames, uint32_t *bindNameLengths); - -// get the number of rows to (internally) fetch at one time -int dpiStmt_getFetchArraySize(dpiStmt *stmt, uint32_t *arraySize); - -// get next implicit result from previous execution; NULL if no more exist -int dpiStmt_getImplicitResult(dpiStmt *stmt, dpiStmt **implicitResult); - -// return information about the statement -int dpiStmt_getInfo(dpiStmt *stmt, dpiStmtInfo *info); - -// get the rowid of the last row affected by a DML statement -int dpiStmt_getLastRowid(dpiStmt *stmt, dpiRowid **rowid); - -// get the number of query columns (zero implies the statement is not a query) -int dpiStmt_getNumQueryColumns(dpiStmt *stmt, uint32_t *numQueryColumns); - -// return metadata about the column at the specified position (1 based) -int dpiStmt_getQueryInfo(dpiStmt *stmt, uint32_t pos, dpiQueryInfo *info); - -// get the value for the specified column of the current row fetched -int dpiStmt_getQueryValue(dpiStmt *stmt, uint32_t pos, - dpiNativeTypeNum *nativeTypeNum, dpiData **data); - -// get the row count for the statement -// for queries, this is the number of rows that have been fetched so far -// for non-queries, this is the number of rows affected by the last execution -int dpiStmt_getRowCount(dpiStmt *stmt, uint64_t *count); - -// get the number of rows affected for each DML operation just executed -// using the mode DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS -int dpiStmt_getRowCounts(dpiStmt *stmt, uint32_t *numRowCounts, - uint64_t **rowCounts); - -// get subscription query id for continuous query notification -int dpiStmt_getSubscrQueryId(dpiStmt *stmt, uint64_t *queryId); - -// release a reference to the statement -int dpiStmt_release(dpiStmt *stmt); - -// scroll the statement to the desired row -// this is only valid for scrollable statements -int dpiStmt_scroll(dpiStmt *stmt, dpiFetchMode mode, int32_t offset, - int32_t rowCountOffset); - -// set the number of rows to (internally) fetch at one time -int dpiStmt_setFetchArraySize(dpiStmt *stmt, uint32_t arraySize); - - -//----------------------------------------------------------------------------- -// Rowid Methods (dpiRowid) -//----------------------------------------------------------------------------- - -// add a reference to the rowid -int dpiRowid_addRef(dpiRowid *rowid); - -// get string representation from rowid -int dpiRowid_getStringValue(dpiRowid *rowid, const char **value, - uint32_t *valueLength); - -// release a reference to the rowid -int dpiRowid_release(dpiRowid *subscr); - - -//----------------------------------------------------------------------------- -// Subscription Methods (dpiSubscr) -//----------------------------------------------------------------------------- - -// add a reference to the subscription -int dpiSubscr_addRef(dpiSubscr *subscr); - -// prepare statement for registration with subscription -int dpiSubscr_prepareStmt(dpiSubscr *subscr, const char *sql, - uint32_t sqlLength, dpiStmt **stmt); - -// release a reference to the subscription -int dpiSubscr_release(dpiSubscr *subscr); - - -//----------------------------------------------------------------------------- -// Variable Methods (dpiVar) -//----------------------------------------------------------------------------- - -// add a reference to the variable -int dpiVar_addRef(dpiVar *var); - -// copy the data from one variable to another variable -int dpiVar_copyData(dpiVar *var, uint32_t pos, dpiVar *sourceVar, - uint32_t sourcePos); - -// return the number of elements in a PL/SQL index-by table -int dpiVar_getNumElementsInArray(dpiVar *var, uint32_t *numElements); - -// return pointer to array of dpiData structures for transferring data -// this is needed for DML returning where the number of elements is modified -int dpiVar_getReturnedData(dpiVar *var, uint32_t pos, uint32_t *numElements, - dpiData **data); - -// return the size in bytes of the buffer used for fetching/binding -int dpiVar_getSizeInBytes(dpiVar *var, uint32_t *sizeInBytes); - -// release a reference to the variable -int dpiVar_release(dpiVar *var); - -// set the value of the variable from a byte string -int dpiVar_setFromBytes(dpiVar *var, uint32_t pos, const char *value, - uint32_t valueLength); - -// set the value of the variable from a LOB -int dpiVar_setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob); - -// set the value of the variable from an object -int dpiVar_setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj); - -// set the value of the variable from a rowid -int dpiVar_setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid); - -// set the value of the variable from a statement -int dpiVar_setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt); - -// set the number of elements in a PL/SQL index-by table -int dpiVar_setNumElementsInArray(dpiVar *var, uint32_t numElements); - -#endif diff --git a/vendor/github.com/godror/godror/odpi/src/dpiConn.c b/vendor/github.com/godror/godror/odpi/src/dpiConn.c deleted file mode 100644 index faa5dc5266b..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiConn.c +++ /dev/null @@ -1,2249 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiConn.c -// Implementation of connection. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" -#include - -// forward declarations of internal functions only used in this file -static int dpiConn__attachExternal(dpiConn *conn, void *externalHandle, - dpiError *error); -static int dpiConn__createStandalone(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - const dpiCommonCreateParams *commonParams, - const dpiConnCreateParams *createParams, dpiError *error); -static int dpiConn__get(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - dpiConnCreateParams *createParams, dpiPool *pool, dpiError *error); -static int dpiConn__getHandles(dpiConn *conn, dpiError *error); -static int dpiConn__getServerCharset(dpiConn *conn, dpiError *error); -static int dpiConn__getSession(dpiConn *conn, uint32_t mode, - const char *connectString, uint32_t connectStringLength, - dpiConnCreateParams *params, void *authInfo, dpiError *error); -static int dpiConn__setAttributesFromCreateParams(dpiConn *conn, void *handle, - uint32_t handleType, const char *userName, uint32_t userNameLength, - const char *password, uint32_t passwordLength, - const dpiConnCreateParams *params, dpiError *error); -static int dpiConn__setShardingKey(dpiConn *conn, void **shardingKey, - void *handle, uint32_t handleType, uint32_t attribute, - const char *action, dpiShardingKeyColumn *columns, uint8_t numColumns, - dpiError *error); -static int dpiConn__setShardingKeyValue(dpiConn *conn, void *shardingKey, - dpiShardingKeyColumn *column, dpiError *error); - - -//----------------------------------------------------------------------------- -// dpiConn__attachExternal() [INTERNAL] -// Attach to the server and session of an existing service context handle. -//----------------------------------------------------------------------------- -static int dpiConn__attachExternal(dpiConn *conn, void *externalHandle, - dpiError *error) -{ - // mark connection as using an external handle so that no attempts are - // made to close it - conn->externalHandle = 1; - - // acquire handles from existing service context handle - conn->handle = externalHandle; - if (dpiConn__getHandles(conn, error) < 0) { - conn->handle = NULL; - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__check() [INTERNAL] -// Validate the connection handle and that it is still connected to the -// database. -//----------------------------------------------------------------------------- -static int dpiConn__check(dpiConn *conn, const char *fnName, dpiError *error) -{ - if (dpiGen__startPublicFn(conn, DPI_HTYPE_CONN, fnName, error) < 0) - return DPI_FAILURE; - return dpiConn__checkConnected(conn, error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__checkConnected() [INTERNAL] -// Check to see if the connection is still open and raise an exception if it -// is not. -//----------------------------------------------------------------------------- -int dpiConn__checkConnected(dpiConn *conn, dpiError *error) -{ - if (!conn->handle || conn->closing || (conn->pool && !conn->pool->handle)) - return dpiError__set(error, "check connected", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__close() [INTERNAL] -// Internal method used for closing the connection. Any transaction is rolled -// back and any handles allocated are freed. For connections acquired from a -// pool and that aren't marked as needed to be dropped, the last time used is -// updated. This is called from dpiConn_close() where errors are expected to be -// propagated and from dpiConn__free() where errors are ignored. -//----------------------------------------------------------------------------- -static int dpiConn__close(dpiConn *conn, uint32_t mode, const char *tag, - uint32_t tagLength, int propagateErrors, dpiError *error) -{ - int status, txnInProgress; - uint32_t serverStatus, i; - time_t *lastTimeUsed; - dpiObject *obj; - dpiStmt *stmt; - dpiLob *lob; - - // rollback any outstanding transaction, if one is in progress; drop the - // session if any errors take place - txnInProgress = 0; - if (!conn->deadSession && !conn->externalHandle && conn->sessionHandle) { - txnInProgress = 1; - if (conn->env->versionInfo->versionNum >= 12) - dpiOci__attrGet(conn->sessionHandle, DPI_OCI_HTYPE_SESSION, - &txnInProgress, NULL, DPI_OCI_ATTR_TRANSACTION_IN_PROGRESS, - NULL, error); - } - if (txnInProgress && - dpiOci__transRollback(conn, propagateErrors, error) < 0) - conn->deadSession = 1; - - // close all objects; note that no references are retained by the - // handle list (otherwise all objects would be left until an explicit - // close of the connection was made) so a reference needs to be acquired - // first, as otherwise the object may be freed while the close is being - // performed! - if (conn->objects && !conn->externalHandle) { - for (i = 0; i < conn->objects->numSlots; i++) { - obj = (dpiObject*) conn->objects->handles[i]; - if (!obj) - continue; - if (conn->env->threaded) { - dpiMutex__acquire(conn->env->mutex); - status = dpiGen__checkHandle(obj, DPI_HTYPE_OBJECT, NULL, - NULL); - if (status == DPI_SUCCESS) - obj->refCount += 1; - dpiMutex__release(conn->env->mutex); - if (status < 0) - continue; - } - status = dpiObject__close(obj, propagateErrors, error); - if (conn->env->threaded) - dpiGen__setRefCount(obj, error, -1); - if (status < 0) - return DPI_FAILURE; - } - } - - // close all open statements; note that no references are retained by the - // handle list (otherwise all statements would be left open until an - // explicit close was made of either the statement or the connection) so - // a reference needs to be acquired first, as otherwise the statement may - // be freed while the close is being performed! - if (conn->openStmts && !conn->externalHandle) { - for (i = 0; i < conn->openStmts->numSlots; i++) { - stmt = (dpiStmt*) conn->openStmts->handles[i]; - if (!stmt) - continue; - if (conn->env->threaded) { - dpiMutex__acquire(conn->env->mutex); - status = dpiGen__checkHandle(stmt, DPI_HTYPE_STMT, NULL, NULL); - if (status == DPI_SUCCESS) - stmt->refCount += 1; - dpiMutex__release(conn->env->mutex); - if (status < 0) - continue; - } - status = dpiStmt__close(stmt, NULL, 0, propagateErrors, error); - if (conn->env->threaded) - dpiGen__setRefCount(stmt, error, -1); - if (status < 0) - return DPI_FAILURE; - } - } - - // close all open LOBs; the same comments apply as for statements - if (conn->openLobs && !conn->externalHandle) { - for (i = 0; i < conn->openLobs->numSlots; i++) { - lob = (dpiLob*) conn->openLobs->handles[i]; - if (!lob) - continue; - if (conn->env->threaded) { - dpiMutex__acquire(conn->env->mutex); - status = dpiGen__checkHandle(lob, DPI_HTYPE_LOB, NULL, NULL); - if (status == DPI_SUCCESS) - lob->refCount += 1; - dpiMutex__release(conn->env->mutex); - if (status < 0) - continue; - } - status = dpiLob__close(lob, propagateErrors, error); - if (conn->env->threaded) - dpiGen__setRefCount(lob, error, -1); - if (status < 0) - return DPI_FAILURE; - } - } - - // handle connections created with an external handle - if (conn->externalHandle) { - conn->sessionHandle = NULL; - - // handle standalone connections - } else if (conn->standalone) { - - // end session and free session handle - if (dpiOci__sessionEnd(conn, propagateErrors, error) < 0) - return DPI_FAILURE; - dpiOci__handleFree(conn->sessionHandle, DPI_OCI_HTYPE_SESSION); - conn->sessionHandle = NULL; - - // detach from server and free server handle - if (dpiOci__serverDetach(conn, propagateErrors, error) < 0) - return DPI_FAILURE; - dpiOci__handleFree(conn->serverHandle, DPI_OCI_HTYPE_SERVER); - - // free service context handle - dpiOci__handleFree(conn->handle, DPI_OCI_HTYPE_SVCCTX); - - // handle pooled connections - } else { - - // if session is to be dropped, mark it as a dead session - if (mode & DPI_OCI_SESSRLS_DROPSESS) - conn->deadSession = 1; - - // update last time used (if the session isn't going to be dropped) - // clear last time used (if the session is going to be dropped) - // do nothing, however, if not using a pool or the pool is being closed - if (conn->sessionHandle && conn->pool && conn->pool->handle) { - - // get the pointer from the context associated with the session - lastTimeUsed = NULL; - if (dpiOci__contextGetValue(conn, DPI_CONTEXT_LAST_TIME_USED, - (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), - (void**) &lastTimeUsed, propagateErrors, error) < 0) - return DPI_FAILURE; - - // if pointer available and session is going to be dropped, clear - // memory in order to avoid memory leak in OCI - if (lastTimeUsed && conn->deadSession) { - dpiOci__contextSetValue(conn, DPI_CONTEXT_LAST_TIME_USED, - (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), - NULL, 0, error); - dpiOci__memoryFree(conn, lastTimeUsed, error); - lastTimeUsed = NULL; - - // otherwise, if the pointer is not available, allocate a new - // pointer and set it - } else if (!lastTimeUsed && !conn->deadSession) { - if (dpiOci__memoryAlloc(conn, (void**) &lastTimeUsed, - sizeof(time_t), propagateErrors, error) < 0) - return DPI_FAILURE; - if (dpiOci__contextSetValue(conn, DPI_CONTEXT_LAST_TIME_USED, - (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), - lastTimeUsed, propagateErrors, error) < 0) { - dpiOci__memoryFree(conn, lastTimeUsed, error); - lastTimeUsed = NULL; - } - } - - // set last time used (used when acquiring a session to determine - // if ping is required) - if (lastTimeUsed) - *lastTimeUsed = time(NULL); - - } - - // check server status; if not connected, ensure session is dropped - if (conn->serverHandle) { - if (dpiOci__attrGet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - &serverStatus, NULL, DPI_OCI_ATTR_SERVER_STATUS, - "get server status", error) < 0 || - serverStatus != DPI_OCI_SERVER_NORMAL) - conn->deadSession = 1; - } - - // release session - if (conn->deadSession) - mode |= DPI_OCI_SESSRLS_DROPSESS; - else if (dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 2, - NULL) == DPI_SUCCESS && (mode & DPI_MODE_CONN_CLOSE_RETAG) && - tag && tagLength > 0) - mode |= DPI_OCI_SESSRLS_MULTIPROPERTY_TAG; - if (dpiOci__sessionRelease(conn, tag, tagLength, mode, propagateErrors, - error) < 0) - return DPI_FAILURE; - conn->sessionHandle = NULL; - - } - conn->handle = NULL; - conn->serverHandle = NULL; - - // destroy sharding and super sharding key descriptors, if applicable - if (conn->shardingKey) { - dpiOci__descriptorFree(conn->shardingKey, DPI_OCI_DTYPE_SHARDING_KEY); - conn->shardingKey = NULL; - } - if (conn->superShardingKey) { - dpiOci__descriptorFree(conn->superShardingKey, - DPI_OCI_DTYPE_SHARDING_KEY); - conn->superShardingKey = NULL; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__create() [PRIVATE] -// Perform internal initialization of the connection. -//----------------------------------------------------------------------------- -int dpiConn__create(dpiConn *conn, const dpiContext *context, - const char *userName, uint32_t userNameLength, const char *password, - uint32_t passwordLength, const char *connectString, - uint32_t connectStringLength, dpiPool *pool, - const dpiCommonCreateParams *commonParams, - dpiConnCreateParams *createParams, dpiError *error) -{ - void *envHandle = NULL; - - // allocate handle lists for statements, LOBs and objects - if (dpiHandleList__create(&conn->openStmts, error) < 0) - return DPI_FAILURE; - if (dpiHandleList__create(&conn->openLobs, error) < 0) - return DPI_FAILURE; - if (dpiHandleList__create(&conn->objects, error) < 0) - return DPI_FAILURE; - - // if an external service context handle is provided, acquire the - // environment handle from it; need a temporary environment handle in order - // to do so - if (createParams->externalHandle) { - error->env = conn->env; - if (dpiOci__envNlsCreate(&conn->env->handle, DPI_OCI_DEFAULT, 0, 0, - error) < 0) - return DPI_FAILURE; - if (dpiOci__handleAlloc(conn->env->handle, &error->handle, - DPI_OCI_HTYPE_ERROR, "allocate temp OCI error", error) < 0) - return DPI_FAILURE; - if (dpiOci__attrGet(createParams->externalHandle, DPI_OCI_HTYPE_SVCCTX, - &envHandle, NULL, DPI_OCI_ATTR_ENV, "get env handle", - error) < 0) - return DPI_FAILURE; - dpiOci__handleFree(conn->env->handle, DPI_OCI_HTYPE_ENV); - error->handle = NULL; - conn->env->handle = NULL; - } - - // initialize environment (for non-pooled connections) - if (!pool && dpiEnv__init(conn->env, context, commonParams, envHandle, - error) < 0) - return DPI_FAILURE; - - // if a handle is specified, use it - if (createParams->externalHandle) - return dpiConn__attachExternal(conn, createParams->externalHandle, - error); - - // connection class, sharding and the use of session pools require the use - // of the OCISessionGet() method; all other cases use the OCISessionBegin() - // method which is more capable - if (pool || (createParams->connectionClass && - createParams->connectionClassLength > 0) || - createParams->shardingKeyColumns || - createParams->superShardingKeyColumns) - return dpiConn__get(conn, userName, userNameLength, password, - passwordLength, connectString, connectStringLength, - createParams, pool, error); - return dpiConn__createStandalone(conn, userName, userNameLength, password, - passwordLength, connectString, connectStringLength, commonParams, - createParams, error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__createStandalone() [PRIVATE] -// Create a standalone connection to the database using the parameters -// specified. -//----------------------------------------------------------------------------- -static int dpiConn__createStandalone(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - const dpiCommonCreateParams *commonParams, - const dpiConnCreateParams *createParams, dpiError *error) -{ - uint32_t credentialType, authMode; - - // mark the connection as a standalone connection - conn->standalone = 1; - - // allocate the server handle - if (dpiOci__handleAlloc(conn->env->handle, &conn->serverHandle, - DPI_OCI_HTYPE_SERVER, "allocate server handle", error) < 0) - return DPI_FAILURE; - - // attach to the server - if (dpiOci__serverAttach(conn, connectString, connectStringLength, - error) < 0) - return DPI_FAILURE; - - // allocate the service context handle - if (dpiOci__handleAlloc(conn->env->handle, &conn->handle, - DPI_OCI_HTYPE_SVCCTX, "allocate service context handle", - error) < 0) - return DPI_FAILURE; - - // set attribute for server handle - if (dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, conn->serverHandle, - 0, DPI_OCI_ATTR_SERVER, "set server handle", error) < 0) - return DPI_FAILURE; - - // allocate the session handle - if (dpiOci__handleAlloc(conn->env->handle, &conn->sessionHandle, - DPI_OCI_HTYPE_SESSION, "allocate session handle", error) < 0) - return DPI_FAILURE; - - // driver name and edition are only relevant for standalone connections - if (dpiUtils__setAttributesFromCommonCreateParams(conn->sessionHandle, - DPI_OCI_HTYPE_SESSION, commonParams, error) < 0) - return DPI_FAILURE; - - // populate attributes on the session handle - if (dpiConn__setAttributesFromCreateParams(conn, conn->sessionHandle, - DPI_OCI_HTYPE_SESSION, userName, userNameLength, password, - passwordLength, createParams, error) < 0) - return DPI_FAILURE; - - // set the session handle on the service context handle - if (dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, - conn->sessionHandle, 0, DPI_OCI_ATTR_SESSION, "set session handle", - error) < 0) - return DPI_FAILURE; - - // if a new password is specified, change it (this also creates the session - // so a call to OCISessionBegin() is not needed) - if (createParams->newPassword && createParams->newPasswordLength > 0) { - authMode = DPI_OCI_AUTH; - if (createParams->authMode & DPI_MODE_AUTH_SYSDBA) - authMode |= DPI_OCI_CPW_SYSDBA; - if (createParams->authMode & DPI_MODE_AUTH_SYSOPER) - authMode |= DPI_OCI_CPW_SYSOPER; - if (createParams->authMode & DPI_MODE_AUTH_SYSASM) - authMode |= DPI_OCI_CPW_SYSASM; - if (createParams->authMode & DPI_MODE_AUTH_SYSBKP) - authMode |= DPI_OCI_CPW_SYSBKP; - if (createParams->authMode & DPI_MODE_AUTH_SYSDGD) - authMode |= DPI_OCI_CPW_SYSDGD; - if (createParams->authMode & DPI_MODE_AUTH_SYSKMT) - authMode |= DPI_OCI_CPW_SYSKMT; - return dpiOci__passwordChange(conn, userName, userNameLength, password, - passwordLength, createParams->newPassword, - createParams->newPasswordLength, authMode, error); - } - - // begin the session - credentialType = (createParams->externalAuth) ? DPI_OCI_CRED_EXT : - DPI_OCI_CRED_RDBMS; - authMode = createParams->authMode | DPI_OCI_STMT_CACHE; - if (dpiOci__sessionBegin(conn, credentialType, authMode, error) < 0) - return DPI_FAILURE; - return dpiConn__getServerCharset(conn, error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__free() [INTERNAL] -// Free the memory and any resources associated with the connection. -//----------------------------------------------------------------------------- -void dpiConn__free(dpiConn *conn, dpiError *error) -{ - if (conn->handle) - dpiConn__close(conn, DPI_MODE_CONN_CLOSE_DEFAULT, NULL, 0, 0, - error); - if (conn->pool) { - dpiGen__setRefCount(conn->pool, error, -1); - conn->pool = NULL; - conn->env = NULL; - } - if (conn->env) { - dpiEnv__free(conn->env, error); - conn->env = NULL; - } - if (conn->releaseString) { - dpiUtils__freeMemory((void*) conn->releaseString); - conn->releaseString = NULL; - } - if (conn->openStmts) { - dpiHandleList__free(conn->openStmts); - conn->openStmts = NULL; - } - if (conn->openLobs) { - dpiHandleList__free(conn->openLobs); - conn->openLobs = NULL; - } - if (conn->objects) { - dpiHandleList__free(conn->objects); - conn->objects = NULL; - } - dpiUtils__freeMemory(conn); -} - - -//----------------------------------------------------------------------------- -// dpiConn__get() [INTERNAL] -// Create a connection to the database using the parameters specified. This -// method uses the simplified OCI session creation protocol which is required -// when using pools and session tagging. -//----------------------------------------------------------------------------- -static int dpiConn__get(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - dpiConnCreateParams *createParams, dpiPool *pool, dpiError *error) -{ - int externalAuth, status; - void *authInfo; - uint32_t mode; - - // clear pointers if length is 0 - if (userNameLength == 0) - userName = NULL; - if (passwordLength == 0) - password = NULL; - - // set things up for the call to acquire a session - if (pool) { - dpiGen__setRefCount(pool, error, 1); - conn->pool = pool; - mode = DPI_OCI_SESSGET_SPOOL; - externalAuth = pool->externalAuth; - if (userName && pool->homogeneous) - return dpiError__set(error, "check proxy", DPI_ERR_INVALID_PROXY); - - // if the userName is provided but no password is provided and external - // authentication is not being used, proxy authentication is taking - // place - if (userName && !password && !externalAuth) - mode |= DPI_OCI_SESSGET_CREDPROXY; - if (createParams->matchAnyTag) - mode |= DPI_OCI_SESSGET_SPOOL_MATCHANY; - if (dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 2, - NULL) == DPI_SUCCESS && createParams->tag && - createParams->tagLength > 0) - mode |= DPI_OCI_SESSGET_MULTIPROPERTY_TAG; - } else { - mode = DPI_OCI_SESSGET_STMTCACHE; - externalAuth = createParams->externalAuth; - } - if (createParams->authMode & DPI_MODE_AUTH_SYSDBA) - mode |= DPI_OCI_SESSGET_SYSDBA; - if (externalAuth) - mode |= DPI_OCI_SESSGET_CREDEXT; - - // create authorization handle - if (dpiOci__handleAlloc(conn->env->handle, &authInfo, - DPI_OCI_HTYPE_AUTHINFO, "allocate authinfo handle", error) < 0) - return DPI_FAILURE; - - // set attributes for create parameters - if (dpiConn__setAttributesFromCreateParams(conn, authInfo, - DPI_OCI_HTYPE_AUTHINFO, userName, userNameLength, password, - passwordLength, createParams, error) < 0) { - dpiOci__handleFree(authInfo, DPI_OCI_HTYPE_AUTHINFO); - return DPI_FAILURE; - } - - // get a session from the pool - status = dpiConn__getSession(conn, mode, connectString, - connectStringLength, createParams, authInfo, error); - dpiOci__handleFree(authInfo, DPI_OCI_HTYPE_AUTHINFO); - if (status < 0) - return status; - return dpiConn__getServerCharset(conn, error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__getAttributeText() [INTERNAL] -// Get the value of the OCI attribute from a text string. -//----------------------------------------------------------------------------- -static int dpiConn__getAttributeText(dpiConn *conn, uint32_t attribute, - const char **value, uint32_t *valueLength, const char *fnName) -{ - dpiError error; - int status; - - // validate parameters - if (dpiConn__check(conn, fnName, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, value) - DPI_CHECK_PTR_NOT_NULL(conn, valueLength) - - // determine pointer to pass (OCI uses different sizes) - switch (attribute) { - case DPI_OCI_ATTR_CURRENT_SCHEMA: - case DPI_OCI_ATTR_LTXID: - case DPI_OCI_ATTR_EDITION: - status = dpiOci__attrGet(conn->sessionHandle, - DPI_OCI_HTYPE_SESSION, (void*) value, valueLength, - attribute, "get session value", &error); - break; - case DPI_OCI_ATTR_INTERNAL_NAME: - case DPI_OCI_ATTR_EXTERNAL_NAME: - status = dpiOci__attrGet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - (void*) value, valueLength, attribute, "get server value", - &error); - break; - default: - status = dpiError__set(&error, "get attribute text", - DPI_ERR_NOT_SUPPORTED); - break; - } - - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__getHandles() [INTERNAL] -// Get the server and session handle from the service context handle. -//----------------------------------------------------------------------------- -static int dpiConn__getHandles(dpiConn *conn, dpiError *error) -{ - if (dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, - (void*) &conn->sessionHandle, NULL, DPI_OCI_ATTR_SESSION, - "get session handle", error) < 0) - return DPI_FAILURE; - if (dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, - (void*) &conn->serverHandle, NULL, DPI_OCI_ATTR_SERVER, - "get server handle", error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__getRawTDO() [INTERNAL] -// Internal method used for ensuring that the RAW TDO has been cached on the -//connection. -//----------------------------------------------------------------------------- -int dpiConn__getRawTDO(dpiConn *conn, dpiError *error) -{ - if (conn->rawTDO) - return DPI_SUCCESS; - return dpiOci__typeByName(conn, "SYS", 3, "RAW", 3, &conn->rawTDO, error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__getServerCharset() [INTERNAL] -// Internal method used for retrieving the server character set. This is used -// to determine if any conversion is required when transferring strings between -// the client and the server. -//----------------------------------------------------------------------------- -static int dpiConn__getServerCharset(dpiConn *conn, dpiError *error) -{ - return dpiOci__attrGet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - &conn->charsetId, NULL, DPI_OCI_ATTR_CHARSET_ID, - "get server charset id", error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__getServerVersion() [INTERNAL] -// Internal method used for ensuring that the server version has been cached -// on the connection. -//----------------------------------------------------------------------------- -int dpiConn__getServerVersion(dpiConn *conn, dpiError *error) -{ - uint32_t serverRelease; - char buffer[512]; - - // nothing to do if the server version has been determined earlier - if (conn->releaseString) - return DPI_SUCCESS; - - // get server version - if (dpiOci__serverRelease(conn, buffer, sizeof(buffer), &serverRelease, - error) < 0) - return DPI_FAILURE; - conn->releaseStringLength = (uint32_t) strlen(buffer); - if (dpiUtils__allocateMemory(1, conn->releaseStringLength, 0, - "allocate release string", (void**) &conn->releaseString, - error) < 0) - return DPI_FAILURE; - strncpy( (char*) conn->releaseString, buffer, conn->releaseStringLength); - conn->versionInfo.versionNum = (int)((serverRelease >> 24) & 0xFF); - if (conn->versionInfo.versionNum >= 18) { - conn->versionInfo.releaseNum = (int)((serverRelease >> 16) & 0xFF); - conn->versionInfo.updateNum = (int)((serverRelease >> 12) & 0x0F); - conn->versionInfo.portReleaseNum = (int)((serverRelease >> 4) & 0xFF); - conn->versionInfo.portUpdateNum = (int)((serverRelease) & 0xF); - } else { - conn->versionInfo.releaseNum = (int)((serverRelease >> 20) & 0x0F); - conn->versionInfo.updateNum = (int)((serverRelease >> 12) & 0xFF); - conn->versionInfo.portReleaseNum = (int)((serverRelease >> 8) & 0x0F); - conn->versionInfo.portUpdateNum = (int)((serverRelease) & 0xFF); - } - conn->versionInfo.fullVersionNum = (uint32_t) - DPI_ORACLE_VERSION_TO_NUMBER(conn->versionInfo.versionNum, - conn->versionInfo.releaseNum, - conn->versionInfo.updateNum, - conn->versionInfo.portReleaseNum, - conn->versionInfo.portUpdateNum); - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__getSession() [INTERNAL] -// Ping and loop until we get a good session. When a database instance goes -// down, it can leave several bad connections that need to be flushed out -// before a good connection can be acquired. If the connection is brand new -// (ping time context value has not been set) there is no need to do a ping. -// This also ensures that the loop cannot run forever! -//----------------------------------------------------------------------------- -static int dpiConn__getSession(dpiConn *conn, uint32_t mode, - const char *connectString, uint32_t connectStringLength, - dpiConnCreateParams *params, void *authInfo, dpiError *error) -{ - uint8_t savedBreakOnTimeout, breakOnTimeout; - uint32_t savedTimeout; - time_t *lastTimeUsed; - - while (1) { - - // acquire the new session - params->outNewSession = 0; - if (dpiOci__sessionGet(conn->env->handle, &conn->handle, authInfo, - connectString, connectStringLength, params->tag, - params->tagLength, ¶ms->outTag, ¶ms->outTagLength, - ¶ms->outTagFound, mode, error) < 0) - return DPI_FAILURE; - - // get session and server handles - if (dpiConn__getHandles(conn, error) < 0) - return DPI_FAILURE; - - // get last time used from session context - lastTimeUsed = NULL; - if (dpiOci__contextGetValue(conn, DPI_CONTEXT_LAST_TIME_USED, - (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), - (void**) &lastTimeUsed, 1, error) < 0) - return DPI_FAILURE; - - // if value is not found, a new connection has been created and there - // is no need to perform a ping; nor if we are creating a standalone - // connection - if (!lastTimeUsed || !conn->pool) { - params->outNewSession = 1; - break; - } - - // if ping interval is negative or the ping interval (in seconds) - // has not been exceeded yet, there is also no need to perform a ping - if (conn->pool->pingInterval < 0 || - *lastTimeUsed + conn->pool->pingInterval > time(NULL)) - break; - - // ping needs to be done at this point; set parameters to ensure that - // the ping does not take too long to complete; keep original values - dpiOci__attrGet(conn->serverHandle, - DPI_OCI_HTYPE_SERVER, &savedTimeout, NULL, - DPI_OCI_ATTR_RECEIVE_TIMEOUT, NULL, error); - dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - &conn->pool->pingTimeout, 0, DPI_OCI_ATTR_RECEIVE_TIMEOUT, - NULL, error); - if (conn->env->versionInfo->versionNum >= 12) { - dpiOci__attrGet(conn->serverHandle, - DPI_OCI_HTYPE_SERVER, &savedBreakOnTimeout, NULL, - DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT, NULL, error); - breakOnTimeout = 0; - dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - &breakOnTimeout, 0, DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT, - NULL, error); - } - - // if ping is successful, the connection is valid and can be returned - // restore original network parameters - if (dpiOci__ping(conn, error) == 0) { - dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - &savedTimeout, 0, DPI_OCI_ATTR_RECEIVE_TIMEOUT, NULL, - error); - if (conn->env->versionInfo->versionNum >= 12) - dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - &savedBreakOnTimeout, 0, - DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT, NULL, error); - break; - } - - // session is bad, need to release and drop it - dpiOci__sessionRelease(conn, NULL, 0, DPI_OCI_SESSRLS_DROPSESS, 0, - error); - conn->handle = NULL; - conn->serverHandle = NULL; - conn->sessionHandle = NULL; - conn->deadSession = 0; - - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__setAppContext() [INTERNAL] -// Populate the session handle with the application context. -//----------------------------------------------------------------------------- -static int dpiConn__setAppContext(void *handle, uint32_t handleType, - const dpiConnCreateParams *params, dpiError *error) -{ - void *listHandle, *entryHandle; - dpiAppContext *entry; - uint32_t i; - - // set the number of application context entries - if (dpiOci__attrSet(handle, handleType, (void*) ¶ms->numAppContext, - sizeof(params->numAppContext), DPI_OCI_ATTR_APPCTX_SIZE, - "set app context size", error) < 0) - return DPI_FAILURE; - - // get the application context list handle - if (dpiOci__attrGet(handle, handleType, &listHandle, NULL, - DPI_OCI_ATTR_APPCTX_LIST, "get context list handle", error) < 0) - return DPI_FAILURE; - - // set each application context entry - for (i = 0; i < params->numAppContext; i++) { - entry = ¶ms->appContext[i]; - - // retrieve the context element descriptor - if (dpiOci__paramGet(listHandle, DPI_OCI_DTYPE_PARAM, - &entryHandle, i + 1, "get context entry handle", error) < 0) - return DPI_FAILURE; - - // set the namespace name - if (dpiOci__attrSet(entryHandle, DPI_OCI_DTYPE_PARAM, - (void*) entry->namespaceName, entry->namespaceNameLength, - DPI_OCI_ATTR_APPCTX_NAME, "set namespace name", error) < 0) - return DPI_FAILURE; - - // set the name - if (dpiOci__attrSet(entryHandle, DPI_OCI_DTYPE_PARAM, - (void*) entry->name, entry->nameLength, - DPI_OCI_ATTR_APPCTX_ATTR, "set name", error) < 0) - return DPI_FAILURE; - - // set the value - if (dpiOci__attrSet(entryHandle, DPI_OCI_DTYPE_PARAM, - (void*) entry->value, entry->valueLength, - DPI_OCI_ATTR_APPCTX_VALUE, "set value", error) < 0) - return DPI_FAILURE; - - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__setAttributesFromCreateParams() [INTERNAL] -// Populate the authorization info structure or session handle using the -// create parameters specified. -//----------------------------------------------------------------------------- -static int dpiConn__setAttributesFromCreateParams(dpiConn *conn, void *handle, - uint32_t handleType, const char *userName, uint32_t userNameLength, - const char *password, uint32_t passwordLength, - const dpiConnCreateParams *params, dpiError *error) -{ - uint32_t purity; - - // set credentials - if (userName && userNameLength > 0 && dpiOci__attrSet(handle, - handleType, (void*) userName, userNameLength, - DPI_OCI_ATTR_USERNAME, "set user name", error) < 0) - return DPI_FAILURE; - if (password && passwordLength > 0 && dpiOci__attrSet(handle, - handleType, (void*) password, passwordLength, - DPI_OCI_ATTR_PASSWORD, "set password", error) < 0) - return DPI_FAILURE; - - // set connection class and purity parameters - if (params->connectionClass && params->connectionClassLength > 0 && - dpiOci__attrSet(handle, handleType, - (void*) params->connectionClass, - params->connectionClassLength, - DPI_OCI_ATTR_CONNECTION_CLASS, "set connection class", - error) < 0) - return DPI_FAILURE; - if (params->purity != DPI_OCI_ATTR_PURITY_DEFAULT) { - purity = params->purity; - if (dpiOci__attrSet(handle, handleType, &purity, - sizeof(purity), DPI_OCI_ATTR_PURITY, "set purity", error) < 0) - return DPI_FAILURE; - } - - // set sharding key and super sharding key parameters - if (params->shardingKeyColumns && params->numShardingKeyColumns > 0) { - if (dpiConn__setShardingKey(conn, &conn->shardingKey, handle, - handleType, DPI_OCI_ATTR_SHARDING_KEY, "set sharding key", - params->shardingKeyColumns, params->numShardingKeyColumns, - error) < 0) - return DPI_FAILURE; - } - if (params->superShardingKeyColumns && - params->numSuperShardingKeyColumns > 0) { - if (params->numShardingKeyColumns == 0) - return dpiError__set(error, "ensure sharding key", - DPI_ERR_MISSING_SHARDING_KEY); - if (dpiConn__setShardingKey(conn, &conn->superShardingKey, handle, - handleType, DPI_OCI_ATTR_SUPER_SHARDING_KEY, - "set super sharding key", params->superShardingKeyColumns, - params->numSuperShardingKeyColumns, error) < 0) - return DPI_FAILURE; - } - - // set application context, if applicable - if (handleType == DPI_OCI_HTYPE_SESSION && params->numAppContext > 0) - return dpiConn__setAppContext(handle, handleType, params, error); - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__setAttributeText() [INTERNAL] -// Set the value of the OCI attribute from a text string. -//----------------------------------------------------------------------------- -static int dpiConn__setAttributeText(dpiConn *conn, uint32_t attribute, - const char *value, uint32_t valueLength, const char *fnName) -{ - dpiError error; - int status; - - // validate parameters - if (dpiConn__check(conn, fnName, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, value) - - // determine pointer to pass (OCI uses different sizes) - switch (attribute) { - case DPI_OCI_ATTR_ACTION: - case DPI_OCI_ATTR_CLIENT_IDENTIFIER: - case DPI_OCI_ATTR_CLIENT_INFO: - case DPI_OCI_ATTR_CURRENT_SCHEMA: - case DPI_OCI_ATTR_EDITION: - case DPI_OCI_ATTR_MODULE: - case DPI_OCI_ATTR_DBOP: - status = dpiOci__attrSet(conn->sessionHandle, - DPI_OCI_HTYPE_SESSION, (void*) value, valueLength, - attribute, "set session value", &error); - break; - case DPI_OCI_ATTR_INTERNAL_NAME: - case DPI_OCI_ATTR_EXTERNAL_NAME: - status = dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, - (void*) value, valueLength, attribute, "set server value", - &error); - break; - default: - status = dpiError__set(&error, "set attribute text", - DPI_ERR_NOT_SUPPORTED); - break; - } - - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn__setShardingKey() [INTERNAL] -// Using the specified columns, create a sharding key and set it on the given -// handle. -//----------------------------------------------------------------------------- -static int dpiConn__setShardingKey(dpiConn *conn, void **shardingKey, - void *handle, uint32_t handleType, uint32_t attribute, - const char *action, dpiShardingKeyColumn *columns, uint8_t numColumns, - dpiError *error) -{ - uint8_t i; - - // this is only supported on 12.2 and higher clients - if (dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 2, - error) < 0) - return DPI_FAILURE; - - // create sharding key descriptor, if necessary - if (dpiOci__descriptorAlloc(conn->env->handle, shardingKey, - DPI_OCI_DTYPE_SHARDING_KEY, "allocate sharding key", error) < 0) - return DPI_FAILURE; - - // add each column to the sharding key - for (i = 0; i < numColumns; i++) { - if (dpiConn__setShardingKeyValue(conn, *shardingKey, &columns[i], - error) < 0) - return DPI_FAILURE; - } - - // add the sharding key to the handle - if (dpiOci__attrSet(handle, handleType, *shardingKey, 0, attribute, action, - error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiConn__setShardingKeyValue() [INTERNAL] -// Using the specified columns, create a sharding key and set it on the given -// handle. -//----------------------------------------------------------------------------- -static int dpiConn__setShardingKeyValue(dpiConn *conn, void *shardingKey, - dpiShardingKeyColumn *column, dpiError *error) -{ - dpiShardingOciDate shardingDateValue; - uint32_t colLen = 0, descType = 0; - const dpiOracleType *oracleType; - dpiOciNumber numberValue; - int convertOk, status; - dpiOciDate dateValue; - void *col = NULL; - uint16_t colType; - - oracleType = dpiOracleType__getFromNum(column->oracleTypeNum, error); - if (!oracleType) - return DPI_FAILURE; - convertOk = 0; - colType = oracleType->oracleType; - switch (column->oracleTypeNum) { - case DPI_ORACLE_TYPE_VARCHAR: - case DPI_ORACLE_TYPE_CHAR: - case DPI_ORACLE_TYPE_RAW: - if (column->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - col = column->value.asBytes.ptr; - colLen = column->value.asBytes.length; - convertOk = 1; - } - break; - case DPI_ORACLE_TYPE_NUMBER: - col = &numberValue; - colLen = sizeof(numberValue); - if (column->nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - if (dpiDataBuffer__toOracleNumberFromDouble(&column->value, - error, &numberValue) < 0) - return DPI_FAILURE; - convertOk = 1; - } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_INT64) { - if (dpiDataBuffer__toOracleNumberFromInteger(&column->value, - error, &numberValue) < 0) - return DPI_FAILURE; - convertOk = 1; - } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_UINT64) { - if (dpiDataBuffer__toOracleNumberFromUnsignedInteger( - &column->value, error, &numberValue) < 0) - return DPI_FAILURE; - convertOk = 1; - } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - if (dpiDataBuffer__toOracleNumberFromText(&column->value, - conn->env, error, &numberValue) < 0) - return DPI_FAILURE; - convertOk = 1; - } - break; - case DPI_ORACLE_TYPE_DATE: - if (column->nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) { - if (dpiDataBuffer__toOracleDate(&column->value, - &dateValue) < 0) - return DPI_FAILURE; - convertOk = 1; - } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - if (dpiDataBuffer__toOracleDateFromDouble(&column->value, - conn->env, error, &dateValue) < 0) - return DPI_FAILURE; - convertOk = 1; - } - - // for sharding only, the type must be SQLT_DAT, which uses a - // different format for storing the date values - if (convertOk) { - col = &shardingDateValue; - colLen = sizeof(shardingDateValue); - colType = DPI_SQLT_DAT; - shardingDateValue.century = - ((uint8_t) (dateValue.year / 100)) + 100; - shardingDateValue.year = (dateValue.year % 100) + 100; - shardingDateValue.month = dateValue.month; - shardingDateValue.day = dateValue.day; - shardingDateValue.hour = dateValue.hour + 1; - shardingDateValue.minute = dateValue.minute + 1; - shardingDateValue.second = dateValue.second + 1; - } - break; - case DPI_ORACLE_TYPE_TIMESTAMP: - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - colLen = sizeof(void*); - colType = DPI_SQLT_TIMESTAMP; - if (column->nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) { - descType = DPI_OCI_DTYPE_TIMESTAMP; - if (dpiOci__descriptorAlloc(conn->env->handle, &col, descType, - "alloc timestamp", error) < 0) - return DPI_FAILURE; - if (dpiDataBuffer__toOracleTimestamp(&column->value, conn->env, - error, col, 0) < 0) { - dpiOci__descriptorFree(col, descType); - return DPI_FAILURE; - } - convertOk = 1; - } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - descType = DPI_OCI_DTYPE_TIMESTAMP_LTZ; - if (dpiOci__descriptorAlloc(conn->env->handle, &col, descType, - "alloc LTZ timestamp", error) < 0) - return DPI_FAILURE; - if (dpiDataBuffer__toOracleTimestampFromDouble(&column->value, - conn->env, error, col) < 0) { - dpiOci__descriptorFree(col, descType); - return DPI_FAILURE; - } - convertOk = 1; - } - break; - default: - break; - } - if (!convertOk) - return dpiError__set(error, "check type", DPI_ERR_NOT_SUPPORTED); - - status = dpiOci__shardingKeyColumnAdd(shardingKey, col, colLen, colType, - error); - if (descType) - dpiOci__descriptorFree(col, descType); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiConn_addRef() [PUBLIC] -// Add a reference to the connection. -//----------------------------------------------------------------------------- -int dpiConn_addRef(dpiConn *conn) -{ - return dpiGen__addRef(conn, DPI_HTYPE_CONN, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_beginDistribTrans() [PUBLIC] -// Begin a distributed transaction. -//----------------------------------------------------------------------------- -int dpiConn_beginDistribTrans(dpiConn *conn, long formatId, - const char *transactionId, uint32_t transactionIdLength, - const char *branchId, uint32_t branchIdLength) -{ - void *transactionHandle; - dpiError error; - dpiOciXID xid; - int status; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, transactionId) - DPI_CHECK_PTR_AND_LENGTH(conn, branchId) - if (transactionIdLength > DPI_XA_MAXGTRIDSIZE) { - dpiError__set(&error, "check size of transaction id", - DPI_ERR_TRANS_ID_TOO_LARGE, transactionIdLength, - DPI_XA_MAXGTRIDSIZE); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - if (branchIdLength > DPI_XA_MAXBQUALSIZE) { - dpiError__set(&error, "check size of branch id", - DPI_ERR_BRANCH_ID_TOO_LARGE, branchIdLength, - DPI_XA_MAXBQUALSIZE); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - // determine if a transaction handle was previously allocated - if (dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, - (void*) &transactionHandle, NULL, DPI_OCI_ATTR_TRANS, - "get transaction handle", &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - - // if one was not found, create one and associate it with the connection - if (!transactionHandle) { - - // create new handle - if (dpiOci__handleAlloc(conn->env->handle, &transactionHandle, - DPI_OCI_HTYPE_TRANS, "create transaction handle", &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - - // associate the transaction with the connection - if (dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, - transactionHandle, 0, DPI_OCI_ATTR_TRANS, - "associate transaction", &error) < 0) { - dpiOci__handleFree(transactionHandle, DPI_OCI_HTYPE_TRANS); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - } - - // set the XID for the transaction, if applicable - if (formatId != -1) { - xid.formatID = formatId; - xid.gtrid_length = transactionIdLength; - xid.bqual_length = branchIdLength; - if (transactionIdLength > 0) - strncpy(xid.data, transactionId, transactionIdLength); - if (branchIdLength > 0) - strncpy(&xid.data[transactionIdLength], branchId, branchIdLength); - if (dpiOci__attrSet(transactionHandle, DPI_OCI_HTYPE_TRANS, &xid, - sizeof(dpiOciXID), DPI_OCI_ATTR_XID, "set XID", &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - // start the transaction - status = dpiOci__transStart(conn, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_breakExecution() [PUBLIC] -// Break (interrupt) the currently executing operation. -//----------------------------------------------------------------------------- -int dpiConn_breakExecution(dpiConn *conn) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - status = dpiOci__break(conn, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_changePassword() [PUBLIC] -// Change the password for the specified user. -//----------------------------------------------------------------------------- -int dpiConn_changePassword(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *oldPassword, - uint32_t oldPasswordLength, const char *newPassword, - uint32_t newPasswordLength) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, userName) - DPI_CHECK_PTR_AND_LENGTH(conn, oldPassword) - DPI_CHECK_PTR_AND_LENGTH(conn, newPassword) - status = dpiOci__passwordChange(conn, userName, userNameLength, - oldPassword, oldPasswordLength, newPassword, newPasswordLength, - DPI_OCI_DEFAULT, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_close() [PUBLIC] -// Close the connection and ensure it can no longer be used. -//----------------------------------------------------------------------------- -int dpiConn_close(dpiConn *conn, dpiConnCloseMode mode, const char *tag, - uint32_t tagLength) -{ - int propagateErrors = !(mode & DPI_MODE_CONN_CLOSE_DROP); - dpiError error; - int closing; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, tag) - if (mode && !conn->pool) { - dpiError__set(&error, "check in pool", DPI_ERR_CONN_NOT_IN_POOL); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - if (conn->externalHandle) { - dpiError__set(&error, "check external", DPI_ERR_CONN_IS_EXTERNAL); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - // determine whether connection is already being closed and if not, mark - // connection as being closed; this MUST be done while holding the lock - // (if in threaded mode) to avoid race conditions! - if (conn->env->threaded) - dpiMutex__acquire(conn->env->mutex); - closing = conn->closing; - conn->closing = 1; - if (conn->env->threaded) - dpiMutex__release(conn->env->mutex); - - // if connection is already being closed, raise an exception - if (closing) { - dpiError__set(&error, "check closing", DPI_ERR_NOT_CONNECTED); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - // if actual close fails, reset closing flag; again, this must be done - // while holding the lock (if in threaded mode) in order to avoid race - // conditions! - if (dpiConn__close(conn, mode, tag, tagLength, propagateErrors, - &error) < 0) { - if (conn->env->threaded) - dpiMutex__acquire(conn->env->mutex); - conn->closing = 0; - if (conn->env->threaded) - dpiMutex__release(conn->env->mutex); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_commit() [PUBLIC] -// Commit the transaction associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_commit(dpiConn *conn) -{ - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiOci__transCommit(conn, conn->commitMode, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - conn->commitMode = DPI_OCI_DEFAULT; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_create() [PUBLIC] -// Create a standalone connection to the database using the parameters -// specified. -//----------------------------------------------------------------------------- -int dpiConn_create(const dpiContext *context, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - const dpiCommonCreateParams *commonParams, - dpiConnCreateParams *createParams, dpiConn **conn) -{ - dpiCommonCreateParams localCommonParams; - dpiConnCreateParams localCreateParams; - dpiConn *tempConn; - dpiError error; - int status; - - // validate parameters - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(context, conn) - DPI_CHECK_PTR_AND_LENGTH(context, userName) - DPI_CHECK_PTR_AND_LENGTH(context, password) - DPI_CHECK_PTR_AND_LENGTH(context, connectString) - - // use default parameters if none provided - if (!commonParams) { - dpiContext__initCommonCreateParams(&localCommonParams); - commonParams = &localCommonParams; - } - - // size changed in 3.1; must use local variable until version 4 released - if (!createParams || context->dpiMinorVersion < 1) { - dpiContext__initConnCreateParams(&localCreateParams); - if (createParams) - memcpy(&localCreateParams, createParams, - sizeof(dpiConnCreateParams__v30)); - createParams = &localCreateParams; - } - - // password must not be specified if external authentication is desired - if (createParams->externalAuth && password && passwordLength > 0) { - dpiError__set(&error, "verify no password with external auth", - DPI_ERR_EXT_AUTH_WITH_CREDENTIALS); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - } - - // the username must be enclosed within [] if external authentication - // with proxy is desired - if (createParams->externalAuth && userName && userNameLength > 0 && - (userName[0] != '[' || userName[userNameLength - 1] != ']')) { - dpiError__set(&error, "verify proxy user name with external auth", - DPI_ERR_EXT_AUTH_INVALID_PROXY); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error ); - } - - // connectionClass and edition cannot be specified at the same time - if (createParams->connectionClass && - createParams->connectionClassLength > 0 && - commonParams->edition && commonParams->editionLength > 0) { - dpiError__set(&error, "check edition/conn class", - DPI_ERR_NO_EDITION_WITH_CONN_CLASS); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - } - - // newPassword and edition cannot be specified at the same time - if (createParams->newPassword && createParams->newPasswordLength > 0 && - commonParams->edition && commonParams->editionLength > 0) { - dpiError__set(&error, "check edition/new password", - DPI_ERR_NO_EDITION_WITH_NEW_PASSWORD); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - } - - // handle case where pool is specified - if (createParams->pool) { - if (dpiGen__checkHandle(createParams->pool, DPI_HTYPE_POOL, - "verify pool", &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - if (!createParams->pool->handle) { - dpiError__set(&error, "check pool", DPI_ERR_NOT_CONNECTED); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - } - status = dpiPool__acquireConnection(createParams->pool, userName, - userNameLength, password, passwordLength, createParams, conn, - &error); - return dpiGen__endPublicFn(context, status, &error); - } - - // create connection - if (dpiGen__allocate(DPI_HTYPE_CONN, NULL, (void**) &tempConn, &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - if (dpiConn__create(tempConn, context, userName, userNameLength, - password, passwordLength, connectString, connectStringLength, - NULL, commonParams, createParams, &error) < 0) { - dpiConn__free(tempConn, &error); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - } - - *conn = tempConn; - dpiHandlePool__release(tempConn->env->errorHandles, &error.handle); - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getSodaDb() [PUBLIC] -// Create a new SODA collection with the given name and metadata. -//----------------------------------------------------------------------------- -int dpiConn_getSodaDb(dpiConn *conn, dpiSodaDb **db) -{ - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiUtils__checkClientVersion(conn->env->versionInfo, 18, 3, - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiUtils__checkDatabaseVersion(conn, 18, 0, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__allocate(DPI_HTYPE_SODA_DB, conn->env, (void**) db, - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - dpiGen__setRefCount(conn, &error, 1); - (*db)->conn = conn; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_deqObject() [PUBLIC] -// Dequeue a message from the specified queue. -//----------------------------------------------------------------------------- -int dpiConn_deqObject(dpiConn *conn, const char *queueName, - uint32_t queueNameLength, dpiDeqOptions *options, dpiMsgProps *props, - dpiObject *payload, const char **msgId, uint32_t *msgIdLength) -{ - dpiError error; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__checkHandle(options, DPI_HTYPE_DEQ_OPTIONS, "verify options", - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__checkHandle(props, DPI_HTYPE_MSG_PROPS, - "verify message properties", &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__checkHandle(payload, DPI_HTYPE_OBJECT, "verify payload", - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, queueName) - DPI_CHECK_PTR_NOT_NULL(conn, msgId) - DPI_CHECK_PTR_NOT_NULL(conn, msgIdLength) - - // dequeue message - if (dpiOci__aqDeq(conn, queueName, options->handle, props->handle, - payload->type->tdo, &payload->instance, &payload->indicator, - &props->msgIdRaw, &error) < 0) { - if (error.buffer->code == 25228) { - *msgId = NULL; - *msgIdLength = 0; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); - } - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - dpiMsgProps__extractMsgId(props, msgId, msgIdLength); - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_enqObject() [PUBLIC] -// Enqueue a message to the specified queue. -//----------------------------------------------------------------------------- -int dpiConn_enqObject(dpiConn *conn, const char *queueName, - uint32_t queueNameLength, dpiEnqOptions *options, dpiMsgProps *props, - dpiObject *payload, const char **msgId, uint32_t *msgIdLength) -{ - dpiError error; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__checkHandle(options, DPI_HTYPE_ENQ_OPTIONS, "verify options", - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__checkHandle(props, DPI_HTYPE_MSG_PROPS, - "verify message properties", &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__checkHandle(payload, DPI_HTYPE_OBJECT, "verify payload", - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, queueName) - DPI_CHECK_PTR_NOT_NULL(conn, msgId) - DPI_CHECK_PTR_NOT_NULL(conn, msgIdLength) - - // enqueue message - if (dpiOci__aqEnq(conn, queueName, options->handle, props->handle, - payload->type->tdo, &payload->instance, &payload->indicator, - &props->msgIdRaw, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - dpiMsgProps__extractMsgId(props, msgId, msgIdLength); - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getCallTimeout() [PUBLIC] -// Return the call timeout (in milliseconds) used for round-trips to the -// database. This is only valid in Oracle Client 18c and higher. -//----------------------------------------------------------------------------- -int dpiConn_getCallTimeout(dpiConn *conn, uint32_t *value) -{ - dpiError error; - int status; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, value) - if (dpiUtils__checkClientVersion(conn->env->versionInfo, 18, 1, - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - - // get call timeout - status = dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, - (void*) value, 0, DPI_OCI_ATTR_CALL_TIMEOUT, "get call timeout", - &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getCurrentSchema() [PUBLIC] -// Return the current schema associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_getCurrentSchema(dpiConn *conn, const char **value, - uint32_t *valueLength) -{ - return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_CURRENT_SCHEMA, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getEdition() [PUBLIC] -// Return the edition associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_getEdition(dpiConn *conn, const char **value, - uint32_t *valueLength) -{ - return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_EDITION, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getEncodingInfo() [PUBLIC] -// Get the encodings from the connection. -//----------------------------------------------------------------------------- -int dpiConn_getEncodingInfo(dpiConn *conn, dpiEncodingInfo *info) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - status = dpiEnv__getEncodingInfo(conn->env, info); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getExternalName() [PUBLIC] -// Return the external name associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_getExternalName(dpiConn *conn, const char **value, - uint32_t *valueLength) -{ - return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_EXTERNAL_NAME, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getHandle() [PUBLIC] -// Get the OCI service context handle associated with the connection. This is -// available in order to allow for extensions to the library using OCI -// directly. -//----------------------------------------------------------------------------- -int dpiConn_getHandle(dpiConn *conn, void **handle) -{ - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, handle) - *handle = conn->handle; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getInternalName() [PUBLIC] -// Return the internal name associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_getInternalName(dpiConn *conn, const char **value, - uint32_t *valueLength) -{ - return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_INTERNAL_NAME, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getLTXID() [PUBLIC] -// Return the logical transaction id associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_getLTXID(dpiConn *conn, const char **value, uint32_t *valueLength) -{ - return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_LTXID, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getObjectType() [PUBLIC] -// Look up an object type given its name and return it. -//----------------------------------------------------------------------------- -int dpiConn_getObjectType(dpiConn *conn, const char *name, uint32_t nameLength, - dpiObjectType **objType) -{ - void *describeHandle, *param, *tdo; - int status, useTypeByFullName; - dpiError error; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, name) - DPI_CHECK_PTR_NOT_NULL(conn, objType) - - // allocate describe handle - if (dpiOci__handleAlloc(conn->env->handle, &describeHandle, - DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - - // Oracle Client 12.1 is capable of using OCITypeByFullName() but will - // fail if accessing an Oracle 11.2 database - useTypeByFullName = 1; - if (conn->env->versionInfo->versionNum < 12) - useTypeByFullName = 0; - else if (dpiConn__getServerVersion(conn, &error) < 0) - return DPI_FAILURE; - else if (conn->versionInfo.versionNum < 12) - useTypeByFullName = 0; - - // new API is supported so use it - if (useTypeByFullName) { - if (dpiOci__typeByFullName(conn, name, nameLength, &tdo, &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - if (dpiOci__describeAny(conn, tdo, 0, DPI_OCI_OTYPE_PTR, - describeHandle, &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - // use older API - } else { - if (dpiOci__describeAny(conn, (void*) name, nameLength, - DPI_OCI_OTYPE_NAME, describeHandle, &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - } - - // get the parameter handle - if (dpiOci__attrGet(describeHandle, - DPI_OCI_HTYPE_DESCRIBE, ¶m, 0, DPI_OCI_ATTR_PARAM, - "get param", &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - // create object type - status = dpiObjectType__allocate(conn, param, DPI_OCI_ATTR_NAME, objType, - &error); - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getServerVersion() [PUBLIC] -// Get the server version string from the database. -//----------------------------------------------------------------------------- -int dpiConn_getServerVersion(dpiConn *conn, const char **releaseString, - uint32_t *releaseStringLength, dpiVersionInfo *versionInfo) -{ - dpiError error; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, versionInfo) - - // get server version - if (dpiConn__getServerVersion(conn, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (releaseString) - *releaseString = conn->releaseString; - if (releaseStringLength) - *releaseStringLength = conn->releaseStringLength; - memcpy(versionInfo, &conn->versionInfo, sizeof(dpiVersionInfo)); - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_getStmtCacheSize() [PUBLIC] -// Return the current size of the statement cache. -//----------------------------------------------------------------------------- -int dpiConn_getStmtCacheSize(dpiConn *conn, uint32_t *cacheSize) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, cacheSize) - status = dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, cacheSize, - NULL, DPI_OCI_ATTR_STMTCACHESIZE, "get stmt cache size", &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_newDeqOptions() [PUBLIC] -// Create a new dequeue options object and return it. -//----------------------------------------------------------------------------- -int dpiConn_newDeqOptions(dpiConn *conn, dpiDeqOptions **options) -{ - dpiDeqOptions *tempOptions; - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, options) - if (dpiGen__allocate(DPI_HTYPE_DEQ_OPTIONS, conn->env, - (void**) &tempOptions, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiDeqOptions__create(tempOptions, conn, &error) < 0) { - dpiDeqOptions__free(tempOptions, &error); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - *options = tempOptions; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_newEnqOptions() [PUBLIC] -// Create a new enqueue options object and return it. -//----------------------------------------------------------------------------- -int dpiConn_newEnqOptions(dpiConn *conn, dpiEnqOptions **options) -{ - dpiEnqOptions *tempOptions; - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, options) - if (dpiGen__allocate(DPI_HTYPE_ENQ_OPTIONS, conn->env, - (void**) &tempOptions, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiEnqOptions__create(tempOptions, conn, &error) < 0) { - dpiEnqOptions__free(tempOptions, &error); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - *options = tempOptions; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_newTempLob() [PUBLIC] -// Create a new temporary LOB and return it. -//----------------------------------------------------------------------------- -int dpiConn_newTempLob(dpiConn *conn, dpiOracleTypeNum lobType, dpiLob **lob) -{ - const dpiOracleType *type; - dpiLob *tempLob; - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, lob) - switch (lobType) { - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_NCLOB: - type = dpiOracleType__getFromNum(lobType, &error); - break; - default: - dpiError__set(&error, "check lob type", - DPI_ERR_INVALID_ORACLE_TYPE, lobType); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - if (dpiLob__allocate(conn, type, &tempLob, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiOci__lobCreateTemporary(tempLob, &error) < 0) { - dpiLob__free(tempLob, &error); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - *lob = tempLob; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_newMsgProps() [PUBLIC] -// Create a new message properties object and return it. -//----------------------------------------------------------------------------- -int dpiConn_newMsgProps(dpiConn *conn, dpiMsgProps **props) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, props) - status = dpiMsgProps__allocate(conn, props, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_newQueue() [PUBLIC] -// Create a new AQ queue object and return it. -//----------------------------------------------------------------------------- -int dpiConn_newQueue(dpiConn *conn, const char *name, uint32_t nameLength, - dpiObjectType *payloadType, dpiQueue **queue) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, name) - DPI_CHECK_PTR_NOT_NULL(conn, queue) - status = dpiQueue__allocate(conn, name, nameLength, payloadType, queue, - &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_newVar() [PUBLIC] -// Create a new variable and return it. -//----------------------------------------------------------------------------- -int dpiConn_newVar(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, - dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, - int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, - dpiData **data) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, var) - DPI_CHECK_PTR_NOT_NULL(conn, data) - status = dpiVar__allocate(conn, oracleTypeNum, nativeTypeNum, maxArraySize, - size, sizeIsBytes, isArray, objType, var, data, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_ping() [PUBLIC] -// Makes a round trip call to the server to confirm that the connection and -// server are still active. -//----------------------------------------------------------------------------- -int dpiConn_ping(dpiConn *conn) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - status = dpiOci__ping(conn, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_prepareDistribTrans() [PUBLIC] -// Prepare a distributed transaction for commit. A boolean is returned -// indicating if a commit is actually needed as an attempt to perform a commit -// when nothing is actually prepared results in ORA-24756 (transaction does not -// exist). This is determined by the return value from OCITransPrepare() which -// is OCI_SUCCESS_WITH_INFO if there is no transaction requiring commit. -//----------------------------------------------------------------------------- -int dpiConn_prepareDistribTrans(dpiConn *conn, int *commitNeeded) -{ - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, commitNeeded) - if (dpiOci__transPrepare(conn, commitNeeded, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (*commitNeeded) - conn->commitMode = DPI_OCI_TRANS_TWOPHASE; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_prepareStmt() [PUBLIC] -// Create a new statement and return it after preparing the specified SQL. -//----------------------------------------------------------------------------- -int dpiConn_prepareStmt(dpiConn *conn, int scrollable, const char *sql, - uint32_t sqlLength, const char *tag, uint32_t tagLength, - dpiStmt **stmt) -{ - dpiStmt *tempStmt; - dpiError error; - - *stmt = NULL; - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(conn, sql) - DPI_CHECK_PTR_AND_LENGTH(conn, tag) - DPI_CHECK_PTR_NOT_NULL(conn, stmt) - if (dpiStmt__allocate(conn, scrollable, &tempStmt, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiStmt__prepare(tempStmt, sql, sqlLength, tag, tagLength, - &error) < 0) { - dpiStmt__free(tempStmt, &error); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - *stmt = tempStmt; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_release() [PUBLIC] -// Release a reference to the connection. -//----------------------------------------------------------------------------- -int dpiConn_release(dpiConn *conn) -{ - return dpiGen__release(conn, DPI_HTYPE_CONN, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_rollback() [PUBLIC] -// Rollback the transaction associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_rollback(dpiConn *conn) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - status = dpiOci__transRollback(conn, 1, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setAction() [PUBLIC] -// Set the action associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setAction(dpiConn *conn, const char *value, uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_ACTION, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setCallTimeout() [PUBLIC] -// Set the call timeout (in milliseconds) used for round-trips to the -// database. This is only valid in Oracle Client 18c and higher. -//----------------------------------------------------------------------------- -int dpiConn_setCallTimeout(dpiConn *conn, uint32_t value) -{ - dpiError error; - int status; - - // validate parameters - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiUtils__checkClientVersion(conn->env->versionInfo, 18, 1, - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - - // set call timeout - status = dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, &value, - 0, DPI_OCI_ATTR_CALL_TIMEOUT, "set call timeout", &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setClientIdentifier() [PUBLIC] -// Set the client identifier associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setClientIdentifier(dpiConn *conn, const char *value, - uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_CLIENT_IDENTIFIER, - value, valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setClientInfo() [PUBLIC] -// Set the client info associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setClientInfo(dpiConn *conn, const char *value, - uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_CLIENT_INFO, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setCurrentSchema() [PUBLIC] -// Set the current schema associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setCurrentSchema(dpiConn *conn, const char *value, - uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_CURRENT_SCHEMA, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setDbOp() [PUBLIC] -// Set the database operation associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setDbOp(dpiConn *conn, const char *value, uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_DBOP, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setExternalName() [PUBLIC] -// Set the external name associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setExternalName(dpiConn *conn, const char *value, - uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_EXTERNAL_NAME, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setInternalName() [PUBLIC] -// Set the internal name associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setInternalName(dpiConn *conn, const char *value, - uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_INTERNAL_NAME, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setModule() [PUBLIC] -// Set the module associated with the connection. -//----------------------------------------------------------------------------- -int dpiConn_setModule(dpiConn *conn, const char *value, uint32_t valueLength) -{ - return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_MODULE, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiConn_setStmtCacheSize() [PUBLIC] -// Set the size of the statement cache. -//----------------------------------------------------------------------------- -int dpiConn_setStmtCacheSize(dpiConn *conn, uint32_t cacheSize) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - status = dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, &cacheSize, 0, - DPI_OCI_ATTR_STMTCACHESIZE, "set stmt cache size", &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_shutdownDatabase() [PUBLIC] -// Shutdown the database. Note that this must be done in two phases except in -// the situation where the instance is being aborted. -//----------------------------------------------------------------------------- -int dpiConn_shutdownDatabase(dpiConn *conn, dpiShutdownMode mode) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - status = dpiOci__dbShutdown(conn, mode, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_startupDatabase() [PUBLIC] -// Startup the database. This is equivalent to "startup nomount" in SQL*Plus. -//----------------------------------------------------------------------------- -int dpiConn_startupDatabase(dpiConn *conn, dpiStartupMode mode) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - status = dpiOci__dbStartup(conn, mode, &error); - return dpiGen__endPublicFn(conn, status, &error); -} - -//----------------------------------------------------------------------------- -// dpiConn_subscribe() [PUBLIC] -// Subscribe to events in the database. A subscription is created and -// returned. This replaces dpiConn_newSubscription(). -//----------------------------------------------------------------------------- -int dpiConn_subscribe(dpiConn *conn, dpiSubscrCreateParams *params, - dpiSubscr **subscr) -{ - dpiSubscr *tempSubscr; - dpiError error; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(conn, params) - DPI_CHECK_PTR_NOT_NULL(conn, subscr) - if (!conn->env->events) { - dpiError__set(&error, "subscribe", DPI_ERR_EVENTS_MODE_REQUIRED); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - if (dpiGen__allocate(DPI_HTYPE_SUBSCR, conn->env, (void**) &tempSubscr, - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiSubscr__create(tempSubscr, conn, params, &error) < 0) { - dpiSubscr__free(tempSubscr, &error); - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - } - - *subscr = tempSubscr; - return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiConn_unsubscribe() [PUBLIC] -// Unsubscribe from events in the database. Once this call completes -// successfully no further notifications will be sent. -//----------------------------------------------------------------------------- -int dpiConn_unsubscribe(dpiConn *conn, dpiSubscr *subscr) -{ - dpiError error; - int status; - - if (dpiConn__check(conn, __func__, &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (dpiGen__checkHandle(subscr, DPI_HTYPE_SUBSCR, "check subscription", - &error) < 0) - return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); - if (subscr->registered) { - dpiMutex__acquire(subscr->mutex); - status = dpiOci__subscriptionUnRegister(conn, subscr, &error); - if (status == DPI_SUCCESS) - subscr->registered = 0; - dpiMutex__release(subscr->mutex); - if (status < 0) - return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); - } - - dpiGen__setRefCount(subscr, &error, -1); - return dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiContext.c b/vendor/github.com/godror/godror/odpi/src/dpiContext.c deleted file mode 100644 index e9adb18a33e..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiContext.c +++ /dev/null @@ -1,329 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiContext.c -// Implementation of context. Each context uses a specific version of the -// ODPI-C library, which is checked for compatibility before allowing its use. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// maintain major and minor versions compiled into the library -static const unsigned int dpiMajorVersion = DPI_MAJOR_VERSION; -static const unsigned int dpiMinorVersion = DPI_MINOR_VERSION; - - -//----------------------------------------------------------------------------- -// dpiContext__create() [INTERNAL] -// Create a new context for interaction with the library. The major versions -// must match and the minor version of the caller must be less than or equal to -// the minor version compiled into the library. -//----------------------------------------------------------------------------- -static int dpiContext__create(const char *fnName, unsigned int majorVersion, - unsigned int minorVersion, dpiContext **context, dpiError *error) -{ - dpiContext *tempContext; - - // get error structure first (populates global environment if needed) - if (dpiGlobal__initError(fnName, error) < 0) - return DPI_FAILURE; - - // validate context handle - if (!context) - return dpiError__set(error, "check context handle", - DPI_ERR_NULL_POINTER_PARAMETER, "context"); - - // verify that the supplied version is supported by the library - if (dpiMajorVersion != majorVersion || minorVersion > dpiMinorVersion) - return dpiError__set(error, "check version", - DPI_ERR_VERSION_NOT_SUPPORTED, majorVersion, majorVersion, - minorVersion, dpiMajorVersion, dpiMinorVersion); - - // allocate context and initialize it - if (dpiGen__allocate(DPI_HTYPE_CONTEXT, NULL, (void**) &tempContext, - error) < 0) - return DPI_FAILURE; - tempContext->dpiMinorVersion = (uint8_t) minorVersion; - dpiOci__clientVersion(tempContext); - - *context = tempContext; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiContext__initCommonCreateParams() [INTERNAL] -// Initialize the common connection/pool creation parameters to default -// values. -//----------------------------------------------------------------------------- -void dpiContext__initCommonCreateParams(dpiCommonCreateParams *params) -{ - memset(params, 0, sizeof(dpiCommonCreateParams)); -} - - -//----------------------------------------------------------------------------- -// dpiContext__initConnCreateParams() [INTERNAL] -// Initialize the connection creation parameters to default values. Return -// the structure size as a convenience for calling functions which may have to -// differentiate between different ODPI-C application versions. -//----------------------------------------------------------------------------- -void dpiContext__initConnCreateParams(dpiConnCreateParams *params) -{ - memset(params, 0, sizeof(dpiConnCreateParams)); -} - - -//----------------------------------------------------------------------------- -// dpiContext__initPoolCreateParams() [INTERNAL] -// Initialize the pool creation parameters to default values. -//----------------------------------------------------------------------------- -void dpiContext__initPoolCreateParams(dpiPoolCreateParams *params) -{ - memset(params, 0, sizeof(dpiPoolCreateParams)); - params->minSessions = 1; - params->maxSessions = 1; - params->sessionIncrement = 0; - params->homogeneous = 1; - params->getMode = DPI_MODE_POOL_GET_NOWAIT; - params->pingInterval = DPI_DEFAULT_PING_INTERVAL; - params->pingTimeout = DPI_DEFAULT_PING_TIMEOUT; -} - - -//----------------------------------------------------------------------------- -// dpiContext__initSodaOperOptions() [INTERNAL] -// Initialize the SODA operation options to default values. -//----------------------------------------------------------------------------- -void dpiContext__initSodaOperOptions(dpiSodaOperOptions *options) -{ - memset(options, 0, sizeof(dpiSodaOperOptions)); -} - - -//----------------------------------------------------------------------------- -// dpiContext__initSubscrCreateParams() [INTERNAL] -// Initialize the subscription creation parameters to default values. -//----------------------------------------------------------------------------- -void dpiContext__initSubscrCreateParams(dpiSubscrCreateParams *params) -{ - memset(params, 0, sizeof(dpiSubscrCreateParams)); - params->subscrNamespace = DPI_SUBSCR_NAMESPACE_DBCHANGE; - params->groupingType = DPI_SUBSCR_GROUPING_TYPE_SUMMARY; -} - - -//----------------------------------------------------------------------------- -// dpiContext_create() [PUBLIC] -// Create a new context for interaction with the library. The major versions -// must match and the minor version of the caller must be less than or equal to -// the minor version compiled into the library. -//----------------------------------------------------------------------------- -int dpiContext_create(unsigned int majorVersion, unsigned int minorVersion, - dpiContext **context, dpiErrorInfo *errorInfo) -{ - dpiError error; - int status; - - if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) - dpiDebug__print("fn start %s\n", __func__); - status = dpiContext__create(__func__, majorVersion, minorVersion, context, - &error); - if (status < 0) - dpiError__getInfo(&error, errorInfo); - if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) - dpiDebug__print("fn end %s -> %d\n", __func__, status); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiContext_destroy() [PUBLIC] -// Destroy an existing context. The structure will be checked for validity -// first. -//----------------------------------------------------------------------------- -int dpiContext_destroy(dpiContext *context) -{ - char message[80]; - dpiError error; - - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - dpiUtils__clearMemory(&context->checkInt, sizeof(context->checkInt)); - if (dpiDebugLevel & DPI_DEBUG_LEVEL_REFS) - dpiDebug__print("ref %p (%s) -> 0\n", context, context->typeDef->name); - if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) - (void) sprintf(message, "fn end %s(%p) -> %d", __func__, context, - DPI_SUCCESS); - dpiUtils__freeMemory(context); - if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) - dpiDebug__print("%s\n", message); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiContext_getClientVersion() [PUBLIC] -// Return the version of the Oracle client that is in use. -//----------------------------------------------------------------------------- -int dpiContext_getClientVersion(const dpiContext *context, - dpiVersionInfo *versionInfo) -{ - dpiError error; - - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(context, versionInfo) - memcpy(versionInfo, context->versionInfo, sizeof(dpiVersionInfo)); - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiContext_getError() [PUBLIC] -// Return information about the error that was last populated. -//----------------------------------------------------------------------------- -void dpiContext_getError(const dpiContext *context, dpiErrorInfo *info) -{ - dpiError error; - - dpiGlobal__initError(NULL, &error); - dpiGen__checkHandle(context, DPI_HTYPE_CONTEXT, "check handle", &error); - dpiError__getInfo(&error, info); -} - - -//----------------------------------------------------------------------------- -// dpiContext_initCommonCreateParams() [PUBLIC] -// Initialize the common connection/pool creation parameters to default -// values. -//----------------------------------------------------------------------------- -int dpiContext_initCommonCreateParams(const dpiContext *context, - dpiCommonCreateParams *params) -{ - dpiError error; - - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(context, params) - dpiContext__initCommonCreateParams(params); - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiContext_initConnCreateParams() [PUBLIC] -// Initialize the connection creation parameters to default values. -//----------------------------------------------------------------------------- -int dpiContext_initConnCreateParams(const dpiContext *context, - dpiConnCreateParams *params) -{ - dpiConnCreateParams localParams; - dpiError error; - - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(context, params) - - // size changed in version 3.1; can be dropped once version 4 released - if (context->dpiMinorVersion > 0) - dpiContext__initConnCreateParams(params); - else { - dpiContext__initConnCreateParams(&localParams); - memcpy(params, &localParams, sizeof(dpiConnCreateParams__v30)); - } - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiContext_initPoolCreateParams() [PUBLIC] -// Initialize the pool creation parameters to default values. -//----------------------------------------------------------------------------- -int dpiContext_initPoolCreateParams(const dpiContext *context, - dpiPoolCreateParams *params) -{ - dpiPoolCreateParams localParams; - dpiError error; - - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(context, params) - - // size changed in versions 3.1 and 3.3 - // changes can be dropped once version 4 released - if (context->dpiMinorVersion > 2) { - dpiContext__initPoolCreateParams(params); - } else { - dpiContext__initPoolCreateParams(&localParams); - if (context->dpiMinorVersion > 0) { - memcpy(params, &localParams, sizeof(dpiPoolCreateParams__v32)); - } else { - memcpy(params, &localParams, sizeof(dpiPoolCreateParams__v30)); - } - } - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiContext_initSodaOperOptions() [PUBLIC] -// Initialize the SODA operation options to default values. -//----------------------------------------------------------------------------- -int dpiContext_initSodaOperOptions(const dpiContext *context, - dpiSodaOperOptions *options) -{ - dpiError error; - - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(context, options) - dpiContext__initSodaOperOptions(options); - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiContext_initSubscrCreateParams() [PUBLIC] -// Initialize the subscription creation parameters to default values. -//----------------------------------------------------------------------------- -int dpiContext_initSubscrCreateParams(const dpiContext *context, - dpiSubscrCreateParams *params) -{ - dpiSubscrCreateParams localParams; - dpiError error; - - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(context, params) - - // size changed in versions 3.2 and 3.3 - // changes can be dropped once version 4 released - if (context->dpiMinorVersion > 2) { - dpiContext__initSubscrCreateParams(params); - } else { - dpiContext__initSubscrCreateParams(&localParams); - if (context->dpiMinorVersion > 1) { - memcpy(params, &localParams, sizeof(dpiSubscrCreateParams__v32)); - } else { - memcpy(params, &localParams, sizeof(dpiSubscrCreateParams__v30)); - } - } - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiData.c b/vendor/github.com/godror/godror/odpi/src/dpiData.c deleted file mode 100644 index 57d3faac309..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiData.c +++ /dev/null @@ -1,899 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiData.c -// Implementation of transformation routines. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// constants used for converting timestamps to/from an interval -#define DPI_MS_DAY 86400000 // 24 * 60 * 60 * 1000 -#define DPI_MS_HOUR 3600000 // 60 * 60 * 1000 -#define DPI_MS_MINUTE 60000 // 60 * 1000 -#define DPI_MS_SECOND 1000 // ms per sec -#define DPI_MS_FSECOND 1000000 // 1000 * 1000 - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleDate() [INTERNAL] -// Populate the data from an dpiOciDate structure. -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleDate(dpiDataBuffer *data, - dpiOciDate *oracleValue) -{ - dpiTimestamp *timestamp = &data->asTimestamp; - - timestamp->year = oracleValue->year; - timestamp->month = oracleValue->month; - timestamp->day = oracleValue->day; - timestamp->hour = oracleValue->hour; - timestamp->minute = oracleValue->minute; - timestamp->second = oracleValue->second; - timestamp->fsecond = 0; - timestamp->tzHourOffset = 0; - timestamp->tzMinuteOffset = 0; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleDateAsDouble() [INTERNAL] -// Populate the data from an dpiOciDate structure as a double value (number -// of milliseconds since January 1, 1970). -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleDateAsDouble(dpiDataBuffer *data, - dpiEnv *env, dpiError *error, dpiOciDate *oracleValue) -{ - void *timestamp; - int status; - - // allocate and populate a timestamp with the value of the date - if (dpiOci__descriptorAlloc(env->handle, ×tamp, - DPI_OCI_DTYPE_TIMESTAMP_LTZ, "alloc timestamp", error) < 0) - return DPI_FAILURE; - if (dpiOci__dateTimeConstruct(env->handle, timestamp, oracleValue->year, - oracleValue->month, oracleValue->day, oracleValue->hour, - oracleValue->minute, oracleValue->second, 0, NULL, 0, error) < 0) { - dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP_LTZ); - return DPI_FAILURE; - } - - // now calculate the number of milliseconds since January 1, 1970 - status = dpiDataBuffer__fromOracleTimestampAsDouble(data, env, error, - timestamp); - dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP_LTZ); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleIntervalDS() [INTERNAL] -// Populate the data from an OCIInterval structure (days/seconds). -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue) -{ - dpiIntervalDS *interval = &data->asIntervalDS; - - return dpiOci__intervalGetDaySecond(env->handle, &interval->days, - &interval->hours, &interval->minutes, &interval->seconds, - &interval->fseconds, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleIntervalYM() [INTERNAL] -// Populate the data from an OCIInterval structure (years/months). -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue) -{ - dpiIntervalYM *interval = &data->asIntervalYM; - - return dpiOci__intervalGetYearMonth(env->handle, &interval->years, - &interval->months, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleNumberAsDouble() [INTERNAL] -// Populate the data from an OCINumber structure as a double. -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleNumberAsDouble(dpiDataBuffer *data, - dpiError *error, void *oracleValue) -{ - return dpiOci__numberToReal(&data->asDouble, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleNumberAsInteger() [INTERNAL] -// Populate the data from an OCINumber structure as an integer. -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleNumberAsInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue) -{ - return dpiOci__numberToInt(oracleValue, &data->asInt64, sizeof(int64_t), - DPI_OCI_NUMBER_SIGNED, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleNumberAsUnsignedInteger() [INTERNAL] -// Populate the data from an OCINumber structure as an unsigned integer. -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleNumberAsUnsignedInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue) -{ - return dpiOci__numberToInt(oracleValue, &data->asUint64, sizeof(uint64_t), - DPI_OCI_NUMBER_UNSIGNED, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleNumberAsText() [INTERNAL] -// Populate the data from an OCINumber structure as text. -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleNumberAsText(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue) -{ - uint8_t *target, numDigits, digits[DPI_NUMBER_MAX_DIGITS]; - int16_t decimalPointIndex, i; - uint16_t *targetUtf16; - uint32_t numBytes; - dpiBytes *bytes; - int isNegative; - - // parse the OCINumber structure - if (dpiUtils__parseOracleNumber(oracleValue, &isNegative, - &decimalPointIndex, &numDigits, digits, error) < 0) - return DPI_FAILURE; - - // calculate the number of bytes that will be required for the string - numBytes = numDigits; - if (isNegative) - numBytes++; - if (decimalPointIndex <= 0) - numBytes += -decimalPointIndex + 2; - else if (decimalPointIndex < numDigits) - numBytes++; - else if (decimalPointIndex > numDigits) - numBytes += decimalPointIndex - numDigits; - if (env->charsetId == DPI_CHARSET_ID_UTF16) - numBytes *= 2; - - // verify that the provided buffer is large enough - bytes = &data->asBytes; - if (numBytes > bytes->length) - return dpiError__set(error, "check number to text size", - DPI_ERR_BUFFER_SIZE_TOO_SMALL, bytes->length); - bytes->length = numBytes; - - // UTF-16 must be handled differently; the platform endianness is used in - // order to be compatible with OCI which has this restriction - if (env->charsetId == DPI_CHARSET_ID_UTF16) { - targetUtf16 = (uint16_t*) bytes->ptr; - - // if negative, include the sign - if (isNegative) - *targetUtf16++ = '-'; - - // if the decimal point index is 0 or less, add the decimal point and - // any leading zeroes that are needed - if (decimalPointIndex <= 0) { - *targetUtf16++ = '0'; - *targetUtf16++ = '.'; - for (; decimalPointIndex < 0; decimalPointIndex++) - *targetUtf16++ = '0'; - } - - // add each of the digits - for (i = 0; i < numDigits; i++) { - if (i > 0 && i == decimalPointIndex) - *targetUtf16++ = '.'; - *targetUtf16++ = '0' + digits[i]; - } - - // if the decimal point index exceeds the number of digits, add any - // trailing zeroes that are needed - if (decimalPointIndex > numDigits) { - for (i = numDigits; i < decimalPointIndex; i++) - *targetUtf16++ = '0'; - } - - // the following should be the same logic as the section above for UTF-16, - // simply with single byte encodings instead - } else { - target = (uint8_t*) bytes->ptr; - - // if negative, include the sign - if (isNegative) - *target++ = '-'; - - // if the decimal point index is 0 or less, add the decimal point and - // any leading zeroes that are needed - if (decimalPointIndex <= 0) { - *target++ = '0'; - *target++ = '.'; - for (; decimalPointIndex < 0; decimalPointIndex++) - *target++ = '0'; - } - - // add each of the digits - for (i = 0; i < numDigits; i++) { - if (i > 0 && i == decimalPointIndex) - *target++ = '.'; - *target++ = '0' + digits[i]; - } - - // if the decimal point index exceeds the number of digits, add any - // trailing zeroes that are needed - if (decimalPointIndex > numDigits) { - for (i = numDigits; i < decimalPointIndex; i++) - *target++ = '0'; - } - - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleTimestamp() [INTERNAL] -// Populate the data from an OCIDateTime structure. -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue, int withTZ) -{ - dpiTimestamp *timestamp = &data->asTimestamp; - - if (dpiOci__dateTimeGetDate(env->handle, oracleValue, ×tamp->year, - ×tamp->month, ×tamp->day, error) < 0) - return DPI_FAILURE; - if (dpiOci__dateTimeGetTime(env->handle, oracleValue, ×tamp->hour, - ×tamp->minute, ×tamp->second, ×tamp->fsecond, - error) < 0) - return DPI_FAILURE; - if (withTZ) { - if (dpiOci__dateTimeGetTimeZoneOffset(env->handle, oracleValue, - ×tamp->tzHourOffset, ×tamp->tzMinuteOffset, - error) < 0) - return DPI_FAILURE; - } else { - timestamp->tzHourOffset = 0; - timestamp->tzMinuteOffset = 0; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__fromOracleTimestampAsDouble() [INTERNAL] -// Populate the data from an OCIDateTime structure as a double value (number -// of milliseconds since January 1, 1970). -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleTimestampAsDouble(dpiDataBuffer *data, - dpiEnv *env, dpiError *error, void *oracleValue) -{ - int32_t day, hour, minute, second, fsecond; - void *interval; - int status; - - // allocate interval to use in calculation - if (dpiOci__descriptorAlloc(env->handle, &interval, - DPI_OCI_DTYPE_INTERVAL_DS, "alloc interval", error) < 0) - return DPI_FAILURE; - - // subtract dates to determine interval between date and base date - if (dpiOci__dateTimeSubtract(env->handle, oracleValue, env->baseDate, - interval, error) < 0) { - dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); - return DPI_FAILURE; - } - - // get the days, hours, minutes and seconds from the interval - status = dpiOci__intervalGetDaySecond(env->handle, &day, &hour, &minute, - &second, &fsecond, interval, error); - dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); - if (status < 0) - return DPI_FAILURE; - - // calculate milliseconds since January 1, 1970 - data->asDouble = ((double) day) * DPI_MS_DAY + hour * DPI_MS_HOUR + - minute * DPI_MS_MINUTE + second * DPI_MS_SECOND + - fsecond / DPI_MS_FSECOND; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleDate() [INTERNAL] -// Populate the data in an dpiOciDate structure. -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleDate(dpiDataBuffer *data, dpiOciDate *oracleValue) -{ - dpiTimestamp *timestamp = &data->asTimestamp; - - oracleValue->year = timestamp->year; - oracleValue->month = timestamp->month; - oracleValue->day = timestamp->day; - oracleValue->hour = timestamp->hour; - oracleValue->minute = timestamp->minute; - oracleValue->second = timestamp->second; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleDateFromDouble() [INTERNAL] -// Populate the data in an dpiOciDate structure given a double (number of -// milliseconds since January 1, 1970). -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleDateFromDouble(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, dpiOciDate *oracleValue) -{ - void *timestamp, *timestampLTZ; - uint32_t fsecond; - - // allocate a descriptor to acquire a timestamp - if (dpiOci__descriptorAlloc(env->handle, ×tampLTZ, - DPI_OCI_DTYPE_TIMESTAMP_LTZ, "alloc timestamp", error) < 0) - return DPI_FAILURE; - if (dpiDataBuffer__toOracleTimestampFromDouble(data, env, error, - timestampLTZ) < 0) { - dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); - return DPI_FAILURE; - } - - // allocate a plain timestamp and convert to it - if (dpiOci__descriptorAlloc(env->handle, ×tamp, - DPI_OCI_DTYPE_TIMESTAMP, "alloc plain timestamp", error) < 0) { - dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); - return DPI_FAILURE; - } - if (dpiOci__dateTimeConvert(env->handle, timestampLTZ, timestamp, - error) < 0) { - dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); - dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); - return DPI_FAILURE; - } - dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); - - // populate date structure - if (dpiOci__dateTimeGetDate(env->handle, timestamp, &oracleValue->year, - &oracleValue->month, &oracleValue->day, error) < 0) { - dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); - return DPI_FAILURE; - } - if (dpiOci__dateTimeGetTime(env->handle, timestamp, &oracleValue->hour, - &oracleValue->minute, &oracleValue->second, &fsecond, error) < 0) { - dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); - return DPI_FAILURE; - } - - dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleIntervalDS() [INTERNAL] -// Populate the data in an OCIInterval structure (days/seconds). -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue) -{ - dpiIntervalDS *interval = &data->asIntervalDS; - - return dpiOci__intervalSetDaySecond(env->handle, interval->days, - interval->hours, interval->minutes, interval->seconds, - interval->fseconds, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleIntervalYM() [INTERNAL] -// Populate the data in an OCIInterval structure (years/months). -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue) -{ - dpiIntervalYM *interval = &data->asIntervalYM; - - return dpiOci__intervalSetYearMonth(env->handle, interval->years, - interval->months, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleNumberFromDouble() [INTERNAL] -// Populate the data in an OCINumber structure from a double. -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleNumberFromDouble(dpiDataBuffer *data, - dpiError *error, void *oracleValue) -{ - if (isnan(data->asDouble)) - return dpiError__set(error, "convert double to Oracle number", - DPI_ERR_NAN); - return dpiOci__numberFromReal(data->asDouble, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleNumberFromInteger() [INTERNAL] -// Populate the data in an OCINumber structure from an integer. -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleNumberFromInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue) -{ - return dpiOci__numberFromInt(&data->asInt64, sizeof(int64_t), - DPI_OCI_NUMBER_SIGNED, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleNumberFromText() [INTERNAL] -// Populate the data in an OCINumber structure from text. -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleNumberFromText(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue) -{ - uint8_t numDigits, digits[DPI_NUMBER_AS_TEXT_CHARS], *source, *target, i; - int isNegative, prependZero, appendSentinel; - dpiBytes *value = &data->asBytes; - int16_t decimalPointIndex; - uint8_t byte, numPairs; - int8_t ociExponent; - - // parse the string into its constituent components - if (dpiUtils__parseNumberString(value->ptr, value->length, env->charsetId, - &isNegative, &decimalPointIndex, &numDigits, digits, error) < 0) - return DPI_FAILURE; - - // if the exponent is odd, prepend a zero - prependZero = (decimalPointIndex > 0 && decimalPointIndex % 2 == 1) || - (decimalPointIndex < 0 && decimalPointIndex % 2 == -1); - if (prependZero && numDigits != 0) { - digits[numDigits++] = 0; - decimalPointIndex++; - } - - // determine the number of digit pairs; if the number of digits is odd, - // append a zero to make the number of digits even - if (numDigits % 2 == 1) - digits[numDigits++] = 0; - numPairs = numDigits / 2; - - // append a sentinel 102 byte for negative numbers if there is room - appendSentinel = (isNegative && numDigits > 0 && - numDigits < DPI_NUMBER_MAX_DIGITS); - - // initialize the OCINumber value - // the length is the number of pairs, plus one for the exponent - // include an extra byte for the sentinel if applicable - target = (uint8_t*) oracleValue; - *target++ = (uint8_t) (numPairs + 1 + appendSentinel); - - // if the number of digits is zero, the value is itself zero since all - // leading and trailing zeroes are removed from the digits string; the OCI - // value for zero is a special case - if (numDigits == 0) { - *target = 128; - return DPI_SUCCESS; - } - - // calculate the exponent - ociExponent = (int8_t) ((decimalPointIndex - 2) / 2 + 193); - if (isNegative) - ociExponent = ~ociExponent; - *target++ = (uint8_t) ociExponent; - - // calculate the mantissa bytes - source = digits; - for (i = 0; i < numPairs; i++) { - if (i == 0 && prependZero) - byte = *source++; - else { - byte = *source++ * 10; - byte += *source++; - } - if (isNegative) - byte = 101 - byte; - else byte++; - *target++ = byte; - } - - // append 102 byte for negative numbers if the number of digits is less - // than the maximum allowable - if (appendSentinel) - *target = 102; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleNumberFromUnsignedInteger() [INTERNAL] -// Populate the data in an OCINumber structure from an integer. -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleNumberFromUnsignedInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue) -{ - return dpiOci__numberFromInt(&data->asUint64, sizeof(uint64_t), - DPI_OCI_NUMBER_UNSIGNED, oracleValue, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleTimestamp() [INTERNAL] -// Populate the data in an OCIDateTime structure. -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue, int withTZ) -{ - dpiTimestamp *timestamp = &data->asTimestamp; - char tzOffsetBuffer[10], *tzOffset = NULL; - size_t tzOffsetLength = 0; - char sign; - - if (withTZ) { - sign = (timestamp->tzHourOffset < 0 || timestamp->tzMinuteOffset < 0) ? - '-' : '+'; - tzOffsetLength = (size_t) sprintf(tzOffsetBuffer, "%c%.2d:%.2d", sign, - abs(timestamp->tzHourOffset), abs(timestamp->tzMinuteOffset)); - tzOffset = tzOffsetBuffer; - } - return dpiOci__dateTimeConstruct(env->handle, oracleValue, timestamp->year, - timestamp->month, timestamp->day, timestamp->hour, - timestamp->minute, timestamp->second, timestamp->fsecond, tzOffset, - tzOffsetLength, error); -} - - -//----------------------------------------------------------------------------- -// dpiDataBuffer__toOracleTimestampFromDouble() [INTERNAL] -// Populate the data in an OCIDateTime structure, given the number of -// milliseconds since January 1, 1970. -//----------------------------------------------------------------------------- -int dpiDataBuffer__toOracleTimestampFromDouble(dpiDataBuffer *data, - dpiEnv *env, dpiError *error, void *oracleValue) -{ - int32_t day, hour, minute, second, fsecond; - void *interval; - int status; - double ms; - - // allocate interval to use in calculation - if (dpiOci__descriptorAlloc(env->handle, &interval, - DPI_OCI_DTYPE_INTERVAL_DS, "alloc interval", error) < 0) - return DPI_FAILURE; - - // determine the interval - ms = data->asDouble; - day = (int32_t) (ms / DPI_MS_DAY); - ms = ms - ((double) day) * DPI_MS_DAY; - hour = (int32_t) (ms / DPI_MS_HOUR); - ms = ms - (hour * DPI_MS_HOUR); - minute = (int32_t) (ms / DPI_MS_MINUTE); - ms = ms - (minute * DPI_MS_MINUTE); - second = (int32_t) (ms / DPI_MS_SECOND); - ms = ms - (second * DPI_MS_SECOND); - fsecond = (int32_t)(ms * DPI_MS_FSECOND); - if (dpiOci__intervalSetDaySecond(env->handle, day, hour, minute, second, - fsecond, interval, error) < 0) { - dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); - return DPI_FAILURE; - } - - // add the interval to the base date - status = dpiOci__dateTimeIntervalAdd(env->handle, env->baseDate, interval, - oracleValue, error); - dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiData_getBool() [PUBLIC] -// Return the boolean portion of the data. -//----------------------------------------------------------------------------- -int dpiData_getBool(dpiData *data) -{ - return data->value.asBoolean; -} - - -//----------------------------------------------------------------------------- -// dpiData_getBytes() [PUBLIC] -// Return the bytes portion of the data. -//----------------------------------------------------------------------------- -dpiBytes *dpiData_getBytes(dpiData *data) -{ - return &data->value.asBytes; -} - - -//----------------------------------------------------------------------------- -// dpiData_getDouble() [PUBLIC] -// Return the double portion of the data. -//----------------------------------------------------------------------------- -double dpiData_getDouble(dpiData *data) -{ - return data->value.asDouble; -} - - -//----------------------------------------------------------------------------- -// dpiData_getFloat() [PUBLIC] -// Return the float portion of the data. -//----------------------------------------------------------------------------- -float dpiData_getFloat(dpiData *data) -{ - return data->value.asFloat; -} - - -//----------------------------------------------------------------------------- -// dpiData_getInt64() [PUBLIC] -// Return the integer portion of the data. -//----------------------------------------------------------------------------- -int64_t dpiData_getInt64(dpiData *data) -{ - return data->value.asInt64; -} - - -//----------------------------------------------------------------------------- -// dpiData_getIntervalDS() [PUBLIC] -// Return the interval (days/seconds) portion of the data. -//----------------------------------------------------------------------------- -dpiIntervalDS *dpiData_getIntervalDS(dpiData *data) -{ - return &data->value.asIntervalDS; -} - - -//----------------------------------------------------------------------------- -// dpiData_getIntervalYM() [PUBLIC] -// Return the interval (years/months) portion of the data. -//----------------------------------------------------------------------------- -dpiIntervalYM *dpiData_getIntervalYM(dpiData *data) -{ - return &data->value.asIntervalYM; -} - - -//----------------------------------------------------------------------------- -// dpiData_getIsNull() [PUBLIC] -// Return a boolean indicating if the value is null or not. -//----------------------------------------------------------------------------- -int dpiData_getIsNull(dpiData *data) -{ - return data->isNull; -} - - -//----------------------------------------------------------------------------- -// dpiData_getLOB() [PUBLIC] -// Return the LOB portion of the data. -//----------------------------------------------------------------------------- -dpiLob *dpiData_getLOB(dpiData *data) -{ - return data->value.asLOB; -} - - -//----------------------------------------------------------------------------- -// dpiData_getObject() [PUBLIC] -// Return the object portion of the data. -//----------------------------------------------------------------------------- -dpiObject *dpiData_getObject(dpiData *data) -{ - return data->value.asObject; -} - - -//----------------------------------------------------------------------------- -// dpiData_getStmt() [PUBLIC] -// Return the statement portion of the data. -//----------------------------------------------------------------------------- -dpiStmt *dpiData_getStmt(dpiData *data) -{ - return data->value.asStmt; -} - - -//----------------------------------------------------------------------------- -// dpiData_getTimestamp() [PUBLIC] -// Return the timestamp portion of the data. -//----------------------------------------------------------------------------- -dpiTimestamp *dpiData_getTimestamp(dpiData *data) -{ - return &data->value.asTimestamp; -} - - -//----------------------------------------------------------------------------- -// dpiData_getUint64() [PUBLIC] -// Return the unsigned integer portion of the data. -//----------------------------------------------------------------------------- -uint64_t dpiData_getUint64(dpiData *data) -{ - return data->value.asUint64; -} - - -//----------------------------------------------------------------------------- -// dpiData_setBool() [PUBLIC] -// Set the boolean portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setBool(dpiData *data, int value) -{ - data->isNull = 0; - data->value.asBoolean = value; -} - - -//----------------------------------------------------------------------------- -// dpiData_setBytes() [PUBLIC] -// Set the bytes portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setBytes(dpiData *data, char *ptr, uint32_t length) -{ - data->isNull = 0; - data->value.asBytes.ptr = ptr; - data->value.asBytes.length = length; -} - - -//----------------------------------------------------------------------------- -// dpiData_setDouble() [PUBLIC] -// Set the double portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setDouble(dpiData *data, double value) -{ - data->isNull = 0; - data->value.asDouble = value; -} - - -//----------------------------------------------------------------------------- -// dpiData_setFloat() [PUBLIC] -// Set the float portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setFloat(dpiData *data, float value) -{ - data->isNull = 0; - data->value.asFloat = value; -} - - -//----------------------------------------------------------------------------- -// dpiData_setInt64() [PUBLIC] -// Set the integer portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setInt64(dpiData *data, int64_t value) -{ - data->isNull = 0; - data->value.asInt64 = value; -} - - -//----------------------------------------------------------------------------- -// dpiData_setIntervalDS() [PUBLIC] -// Set the interval (days/seconds) portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setIntervalDS(dpiData *data, int32_t days, int32_t hours, - int32_t minutes, int32_t seconds, int32_t fseconds) -{ - dpiIntervalDS *interval = &data->value.asIntervalDS; - - data->isNull = 0; - interval->days = days; - interval->hours = hours; - interval->minutes = minutes; - interval->seconds = seconds; - interval->fseconds = fseconds; -} - - -//----------------------------------------------------------------------------- -// dpiData_setIntervalYM() [PUBLIC] -// Set the interval (years/months) portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setIntervalYM(dpiData *data, int32_t years, int32_t months) -{ - dpiIntervalYM *interval = &data->value.asIntervalYM; - - data->isNull = 0; - interval->years = years; - interval->months = months; -} - - -//----------------------------------------------------------------------------- -// dpiData_setLOB() [PUBLIC] -// Set the LOB portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setLOB(dpiData *data, dpiLob *lob) -{ - data->isNull = 0; - data->value.asLOB = lob; -} - - -//----------------------------------------------------------------------------- -// dpiData_setNull() [PUBLIC] -// Set the data to be treated as a null value. -//----------------------------------------------------------------------------- -void dpiData_setNull(dpiData *data) -{ - data->isNull = 1; -} - - -//----------------------------------------------------------------------------- -// dpiData_setObject() [PUBLIC] -// Set the object portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setObject(dpiData *data, dpiObject *obj) -{ - data->isNull = 0; - data->value.asObject = obj; -} - - -//----------------------------------------------------------------------------- -// dpiData_setStmt() [PUBLIC] -// Set the statement portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setStmt(dpiData *data, dpiStmt *obj) -{ - data->isNull = 0; - data->value.asStmt = obj; -} - - -//----------------------------------------------------------------------------- -// dpiData_setTimestamp() [PUBLIC] -// Set the timestamp portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setTimestamp(dpiData *data, int16_t year, uint8_t month, - uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, - uint32_t fsecond, int8_t tzHourOffset, int8_t tzMinuteOffset) -{ - dpiTimestamp *timestamp = &data->value.asTimestamp; - - data->isNull = 0; - timestamp->year = year; - timestamp->month = month; - timestamp->day = day; - timestamp->hour = hour; - timestamp->minute = minute; - timestamp->second = second; - timestamp->fsecond = fsecond; - timestamp->tzHourOffset = tzHourOffset; - timestamp->tzMinuteOffset = tzMinuteOffset; -} - - -//----------------------------------------------------------------------------- -// dpiData_setUint64() [PUBLIC] -// Set the unsigned integer portion of the data. -//----------------------------------------------------------------------------- -void dpiData_setUint64(dpiData *data, uint64_t value) -{ - data->isNull = 0; - data->value.asUint64 = value; -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiDebug.c b/vendor/github.com/godror/godror/odpi/src/dpiDebug.c deleted file mode 100644 index 28b8776475f..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiDebug.c +++ /dev/null @@ -1,183 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiDebug.c -// Methods used for debugging ODPI-C. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -#define DPI_DEBUG_THREAD_FORMAT "%.5" PRIu64 -#define DPI_DEBUG_DATE_FORMAT "%.4d-%.2d-%.2d" -#define DPI_DEBUG_TIME_FORMAT "%.2d:%.2d:%.2d.%.3d" - -// debug level (populated by environment variable DPI_DEBUG_LEVEL) -unsigned long dpiDebugLevel = 0; - -// debug prefix format (populated by environment variable DPI_DEBUG_PREFIX) -static char dpiDebugPrefixFormat[64] = "ODPI [%i] %d %t: "; - -// debug file for printing (currently unchangeable) -static FILE *dpiDebugStream = NULL; - - -//----------------------------------------------------------------------------- -// dpiDebug__getFormatWithPrefix() [INTERNAL] -// Adjust the provided format to include the prefix requested by the user. -// This method is not permitted to fail, so if there is not enough space, the -// prefix is truncated as needed -- although this is a very unlikely scenario. -//----------------------------------------------------------------------------- -static void dpiDebug__getFormatWithPrefix(const char *format, - char *formatWithPrefix, size_t maxFormatWithPrefixSize) -{ - char *sourcePtr, *targetPtr; - int gotTime, tempSize; - uint64_t threadId; - size_t size; -#ifdef _WIN32 - SYSTEMTIME time; -#else - struct timeval timeOfDay; - struct tm time; -#endif - - gotTime = 0; - sourcePtr = dpiDebugPrefixFormat; - targetPtr = formatWithPrefix; - size = maxFormatWithPrefixSize - strlen(format); - while (*sourcePtr && size > 20) { - - // all characters except '%' are copied verbatim to the target - if (*sourcePtr != '%') { - *targetPtr++ = *sourcePtr++; - maxFormatWithPrefixSize--; - continue; - } - - // handle the different directives - sourcePtr++; - switch (*sourcePtr) { - case 'i': -#ifdef _WIN32 - threadId = (uint64_t) GetCurrentThreadId(); -#elif defined __linux - threadId = (uint64_t) syscall(SYS_gettid); -#elif defined __APPLE__ - pthread_threadid_np(NULL, &threadId); -#else - threadId = (uint64_t) pthread_self(); -#endif - tempSize = sprintf(targetPtr, DPI_DEBUG_THREAD_FORMAT, - threadId); - size -= tempSize; - targetPtr += tempSize; - sourcePtr++; - break; - case 'd': - case 't': - if (!gotTime) { - gotTime = 1; -#ifdef _WIN32 - GetLocalTime(&time); -#else - gettimeofday(&timeOfDay, NULL); - localtime_r(&timeOfDay.tv_sec, &time); -#endif - } -#ifdef _WIN32 - if (*sourcePtr == 'd') - tempSize = sprintf(targetPtr, DPI_DEBUG_DATE_FORMAT, - time.wYear, time.wMonth, time.wDay); - else tempSize = sprintf(targetPtr, DPI_DEBUG_TIME_FORMAT, - time.wHour, time.wMinute, time.wSecond, - time.wMilliseconds); -#else - if (*sourcePtr == 'd') - tempSize = sprintf(targetPtr, DPI_DEBUG_DATE_FORMAT, - time.tm_year + 1900, time.tm_mon + 1, - time.tm_mday); - else tempSize = sprintf(targetPtr, DPI_DEBUG_TIME_FORMAT, - time.tm_hour, time.tm_min, time.tm_sec, - (int) (timeOfDay.tv_usec / 1000)); -#endif - size -= tempSize; - targetPtr += tempSize; - sourcePtr++; - break; - case '\0': - break; - default: - *targetPtr++ = '%'; - *targetPtr++ = *sourcePtr++; - break; - } - } - - // append original format - strcpy(targetPtr, format); -} - - -//----------------------------------------------------------------------------- -// dpiDebug__initialize() [INTERNAL] -// Initialize debugging infrastructure. This reads the environment variables -// and populates the global variables used for determining which messages to -// print and what prefix should be placed in front of each message. -//----------------------------------------------------------------------------- -void dpiDebug__initialize(void) -{ - char *envValue; - - // determine the value of the environment variable DPI_DEBUG_LEVEL and - // convert to an integer; if the value in the environment variable is not a - // valid integer, it is ignored - envValue = getenv("DPI_DEBUG_LEVEL"); - if (envValue) - dpiDebugLevel = (unsigned long) strtol(envValue, NULL, 10); - - // determine the value of the environment variable DPI_DEBUG_PREFIX and - // store it in the static buffer available for it; a static buffer is used - // since this runs during startup and may not fail; if the value of the - // environment variable is too large for the buffer, the value is ignored - // and the default value is used instead - envValue = getenv("DPI_DEBUG_PREFIX"); - if (envValue && strlen(envValue) < sizeof(dpiDebugPrefixFormat)) - strcpy(dpiDebugPrefixFormat, envValue); - - // messages are written to stderr - dpiDebugStream = stderr; - - // for any debugging level > 0 print a message indicating that tracing - // has started - if (dpiDebugLevel) { - dpiDebug__print("ODPI-C %s\n", DPI_VERSION_STRING); - dpiDebug__print("debugging messages initialized at level %lu\n", - dpiDebugLevel); - } -} - - -//----------------------------------------------------------------------------- -// dpiDebug__print() [INTERNAL] -// Print the specified debugging message with a newly calculated prefix. -//----------------------------------------------------------------------------- -void dpiDebug__print(const char *format, ...) -{ - char formatWithPrefix[512]; - va_list varArgs; - - dpiDebug__getFormatWithPrefix(format, formatWithPrefix, - sizeof(formatWithPrefix)); - va_start(varArgs, format); - (void) vfprintf(dpiDebugStream, formatWithPrefix, varArgs); - va_end(varArgs); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c b/vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c deleted file mode 100644 index 35cb84727ae..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c +++ /dev/null @@ -1,369 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiDeqOptions.c -// Implementation of AQ dequeue options. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiDeqOptions__create() [INTERNAL] -// Create a new subscription structure and return it. In case of error NULL -// is returned. -//----------------------------------------------------------------------------- -int dpiDeqOptions__create(dpiDeqOptions *options, dpiConn *conn, - dpiError *error) -{ - dpiGen__setRefCount(conn, error, 1); - options->conn = conn; - return dpiOci__descriptorAlloc(conn->env->handle, &options->handle, - DPI_OCI_DTYPE_AQDEQ_OPTIONS, "allocate descriptor", error); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions__free() [INTERNAL] -// Free the memory for a dequeue options structure. -//----------------------------------------------------------------------------- -void dpiDeqOptions__free(dpiDeqOptions *options, dpiError *error) -{ - if (options->handle) { - dpiOci__descriptorFree(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS); - options->handle = NULL; - } - if (options->conn) { - dpiGen__setRefCount(options->conn, error, -1); - options->conn = NULL; - } - dpiUtils__freeMemory(options); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions__getAttrValue() [INTERNAL] -// Get the attribute value in OCI. -//----------------------------------------------------------------------------- -static int dpiDeqOptions__getAttrValue(dpiDeqOptions *options, - uint32_t attribute, const char *fnName, void *value, - uint32_t *valueLength) -{ - dpiError error; - int status; - - if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, fnName, - &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(options, value) - DPI_CHECK_PTR_NOT_NULL(options, valueLength) - status = dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, - value, valueLength, attribute, "get attribute value", &error); - return dpiGen__endPublicFn(options, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions__setAttrValue() [INTERNAL] -// Set the attribute value in OCI. -//----------------------------------------------------------------------------- -static int dpiDeqOptions__setAttrValue(dpiDeqOptions *options, - uint32_t attribute, const char *fnName, const void *value, - uint32_t valueLength) -{ - dpiError error; - int status; - - if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, fnName, - &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(options, value) - status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, - (void*) value, valueLength, attribute, "set attribute value", - &error); - return dpiGen__endPublicFn(options, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_addRef() [PUBLIC] -// Add a reference to the dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_addRef(dpiDeqOptions *options) -{ - return dpiGen__addRef(options, DPI_HTYPE_DEQ_OPTIONS, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getCondition() [PUBLIC] -// Return condition associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getCondition(dpiDeqOptions *options, const char **value, - uint32_t *valueLength) -{ - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_DEQCOND, __func__, - (void*) value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getConsumerName() [PUBLIC] -// Return consumer name associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getConsumerName(dpiDeqOptions *options, const char **value, - uint32_t *valueLength) -{ - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_CONSUMER_NAME, - __func__, (void*) value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getCorrelation() [PUBLIC] -// Return correlation associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getCorrelation(dpiDeqOptions *options, const char **value, - uint32_t *valueLength) -{ - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_CORRELATION, - __func__, (void*) value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getMode() [PUBLIC] -// Return mode associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getMode(dpiDeqOptions *options, dpiDeqMode *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_DEQ_MODE, - __func__, value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getMsgId() [PUBLIC] -// Return message id associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getMsgId(dpiDeqOptions *options, const char **value, - uint32_t *valueLength) -{ - dpiError error; - void *rawValue; - - if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, __func__, - &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(options, value) - DPI_CHECK_PTR_NOT_NULL(options, valueLength) - if (dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, - &rawValue, NULL, DPI_OCI_ATTR_DEQ_MSGID, "get attribute value", - &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - dpiOci__rawPtr(options->env->handle, rawValue, (void**) value); - dpiOci__rawSize(options->env->handle, rawValue, valueLength); - return dpiGen__endPublicFn(options, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getNavigation() [PUBLIC] -// Return navigation associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getNavigation(dpiDeqOptions *options, - dpiDeqNavigation *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_NAVIGATION, - __func__, value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getTransformation() [PUBLIC] -// Return transformation associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getTransformation(dpiDeqOptions *options, const char **value, - uint32_t *valueLength) -{ - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, - __func__, (void*) value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getVisibility() [PUBLIC] -// Return visibility associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getVisibility(dpiDeqOptions *options, dpiVisibility *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_VISIBILITY, - __func__, value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_getWait() [PUBLIC] -// Return the number of seconds to wait for a message when dequeuing. -//----------------------------------------------------------------------------- -int dpiDeqOptions_getWait(dpiDeqOptions *options, uint32_t *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_WAIT, __func__, - value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_release() [PUBLIC] -// Release a reference to the dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_release(dpiDeqOptions *options) -{ - return dpiGen__release(options, DPI_HTYPE_DEQ_OPTIONS, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setCondition() [PUBLIC] -// Set condition associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setCondition(dpiDeqOptions *options, const char *value, - uint32_t valueLength) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_DEQCOND, __func__, - value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setConsumerName() [PUBLIC] -// Set consumer name associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setConsumerName(dpiDeqOptions *options, const char *value, - uint32_t valueLength) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_CONSUMER_NAME, - __func__, value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setCorrelation() [PUBLIC] -// Set correlation associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setCorrelation(dpiDeqOptions *options, const char *value, - uint32_t valueLength) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_CORRELATION, - __func__, value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setDeliveryMode() [PUBLIC] -// Set the delivery mode associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setDeliveryMode(dpiDeqOptions *options, - dpiMessageDeliveryMode value) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_MSG_DELIVERY_MODE, - __func__, &value, 0); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setMode() [PUBLIC] -// Set the mode associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setMode(dpiDeqOptions *options, dpiDeqMode value) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_DEQ_MODE, - __func__, &value, 0); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setMsgId() [PUBLIC] -// Set the message id associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setMsgId(dpiDeqOptions *options, const char *value, - uint32_t valueLength) -{ - void *rawValue = NULL; - dpiError error; - int status; - - if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, __func__, - &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(options, value) - if (dpiOci__rawAssignBytes(options->env->handle, value, valueLength, - &rawValue, &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, - (void*) &rawValue, valueLength, DPI_OCI_ATTR_DEQ_MSGID, - "set value", &error); - dpiOci__rawResize(options->env->handle, &rawValue, 0, &error); - return dpiGen__endPublicFn(options, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setNavigation() [PUBLIC] -// Set navigation associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setNavigation(dpiDeqOptions *options, dpiDeqNavigation value) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_NAVIGATION, - __func__, &value, 0); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setTransformation() [PUBLIC] -// Set transformation associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setTransformation(dpiDeqOptions *options, const char *value, - uint32_t valueLength) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, - __func__, value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setVisibility() [PUBLIC] -// Set visibility associated with dequeue options. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setVisibility(dpiDeqOptions *options, dpiVisibility value) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_VISIBILITY, - __func__, &value, 0); -} - - -//----------------------------------------------------------------------------- -// dpiDeqOptions_setWait() [PUBLIC] -// Set the number of seconds to wait for a message when dequeuing. -//----------------------------------------------------------------------------- -int dpiDeqOptions_setWait(dpiDeqOptions *options, uint32_t value) -{ - return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_WAIT, __func__, - &value, 0); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c b/vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c deleted file mode 100644 index 24bf60a3229..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c +++ /dev/null @@ -1,173 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiEnqOptions.c -// Implementation of AQ enqueue options. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiEnqOptions__create() [INTERNAL] -// Create a new subscription structure and return it. In case of error NULL -// is returned. -//----------------------------------------------------------------------------- -int dpiEnqOptions__create(dpiEnqOptions *options, dpiConn *conn, - dpiError *error) -{ - dpiGen__setRefCount(conn, error, 1); - options->conn = conn; - return dpiOci__descriptorAlloc(conn->env->handle, &options->handle, - DPI_OCI_DTYPE_AQENQ_OPTIONS, "allocate descriptor", error); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions__free() [INTERNAL] -// Free the memory for a enqueue options structure. -//----------------------------------------------------------------------------- -void dpiEnqOptions__free(dpiEnqOptions *options, dpiError *error) -{ - if (options->handle) { - dpiOci__descriptorFree(options->handle, DPI_OCI_DTYPE_AQENQ_OPTIONS); - options->handle = NULL; - } - if (options->conn) { - dpiGen__setRefCount(options->conn, error, -1); - options->conn = NULL; - } - dpiUtils__freeMemory(options); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions__getAttrValue() [INTERNAL] -// Get the attribute value in OCI. -//----------------------------------------------------------------------------- -static int dpiEnqOptions__getAttrValue(dpiEnqOptions *options, - uint32_t attribute, const char *fnName, void *value, - uint32_t *valueLength) -{ - dpiError error; - int status; - - if (dpiGen__startPublicFn(options, DPI_HTYPE_ENQ_OPTIONS, fnName, - &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(options, value) - DPI_CHECK_PTR_NOT_NULL(options, valueLength) - status = dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQENQ_OPTIONS, - value, valueLength, attribute, "get attribute value", &error); - return dpiGen__endPublicFn(options, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions__setAttrValue() [INTERNAL] -// Set the attribute value in OCI. -//----------------------------------------------------------------------------- -static int dpiEnqOptions__setAttrValue(dpiEnqOptions *options, - uint32_t attribute, const char *fnName, const void *value, - uint32_t valueLength) -{ - dpiError error; - int status; - - if (dpiGen__startPublicFn(options, DPI_HTYPE_ENQ_OPTIONS, fnName, - &error) < 0) - return dpiGen__endPublicFn(options, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(options, value) - status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQENQ_OPTIONS, - (void*) value, valueLength, attribute, "set attribute value", - &error); - return dpiGen__endPublicFn(options, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions_addRef() [PUBLIC] -// Add a reference to the enqueue options. -//----------------------------------------------------------------------------- -int dpiEnqOptions_addRef(dpiEnqOptions *options) -{ - return dpiGen__addRef(options, DPI_HTYPE_ENQ_OPTIONS, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions_getTransformation() [PUBLIC] -// Return transformation associated with enqueue options. -//----------------------------------------------------------------------------- -int dpiEnqOptions_getTransformation(dpiEnqOptions *options, const char **value, - uint32_t *valueLength) -{ - return dpiEnqOptions__getAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, - __func__, (void*) value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions_getVisibility() [PUBLIC] -// Return visibility associated with enqueue options. -//----------------------------------------------------------------------------- -int dpiEnqOptions_getVisibility(dpiEnqOptions *options, dpiVisibility *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiEnqOptions__getAttrValue(options, DPI_OCI_ATTR_VISIBILITY, - __func__, value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions_release() [PUBLIC] -// Release a reference to the enqueue options. -//----------------------------------------------------------------------------- -int dpiEnqOptions_release(dpiEnqOptions *options) -{ - return dpiGen__release(options, DPI_HTYPE_ENQ_OPTIONS, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions_setDeliveryMode() [PUBLIC] -// Set the delivery mode associated with enqueue options. -//----------------------------------------------------------------------------- -int dpiEnqOptions_setDeliveryMode(dpiEnqOptions *options, - dpiMessageDeliveryMode value) -{ - return dpiEnqOptions__setAttrValue(options, DPI_OCI_ATTR_MSG_DELIVERY_MODE, - __func__, &value, 0); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions_setTransformation() [PUBLIC] -// Set transformation associated with enqueue options. -//----------------------------------------------------------------------------- -int dpiEnqOptions_setTransformation(dpiEnqOptions *options, const char *value, - uint32_t valueLength) -{ - return dpiEnqOptions__setAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, - __func__, value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiEnqOptions_setVisibility() [PUBLIC] -// Set visibility associated with enqueue options. -//----------------------------------------------------------------------------- -int dpiEnqOptions_setVisibility(dpiEnqOptions *options, dpiVisibility value) -{ - return dpiEnqOptions__setAttrValue(options, DPI_OCI_ATTR_VISIBILITY, - __func__, &value, 0); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiEnv.c b/vendor/github.com/godror/godror/odpi/src/dpiEnv.c deleted file mode 100644 index c1a2c3f7d61..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiEnv.c +++ /dev/null @@ -1,180 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiEnv.c -// Implementation of environment. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiEnv__free() [INTERNAL] -// Free the memory associated with the environment. -//----------------------------------------------------------------------------- -void dpiEnv__free(dpiEnv *env, dpiError *error) -{ - if (env->threaded) - dpiMutex__destroy(env->mutex); - if (env->handle && !env->externalHandle) { - dpiOci__handleFree(env->handle, DPI_OCI_HTYPE_ENV); - env->handle = NULL; - } - if (env->errorHandles) { - dpiHandlePool__free(env->errorHandles); - env->errorHandles = NULL; - error->handle = NULL; - } - dpiUtils__freeMemory(env); -} - - -//----------------------------------------------------------------------------- -// dpiEnv__getCharacterSetIdAndName() [INTERNAL] -// Retrieve and store the IANA character set name for the attribute. -//----------------------------------------------------------------------------- -static int dpiEnv__getCharacterSetIdAndName(dpiEnv *env, uint16_t attribute, - uint16_t *charsetId, char *encoding, dpiError *error) -{ - *charsetId = 0; - dpiOci__attrGet(env->handle, DPI_OCI_HTYPE_ENV, charsetId, NULL, attribute, - "get environment", error); - return dpiGlobal__lookupEncoding(*charsetId, encoding, error); -} - - -//----------------------------------------------------------------------------- -// dpiEnv__getEncodingInfo() [INTERNAL] -// Populate the structure with the encoding info. -//----------------------------------------------------------------------------- -int dpiEnv__getEncodingInfo(dpiEnv *env, dpiEncodingInfo *info) -{ - info->encoding = env->encoding; - info->maxBytesPerCharacter = env->maxBytesPerCharacter; - info->nencoding = env->nencoding; - info->nmaxBytesPerCharacter = env->nmaxBytesPerCharacter; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiEnv__init() [INTERNAL] -// Initialize the environment structure. If an external handle is provided it -// is used directly; otherwise, a new OCI environment handle is created. In -// either case, information about the environment is stored for later use. -//----------------------------------------------------------------------------- -int dpiEnv__init(dpiEnv *env, const dpiContext *context, - const dpiCommonCreateParams *params, void *externalHandle, - dpiError *error) -{ - char timezoneBuffer[20]; - size_t timezoneLength; - - // store context and version information - env->context = context; - env->versionInfo = context->versionInfo; - - // an external handle is available, use it directly - if (externalHandle) { - env->handle = externalHandle; - env->externalHandle = 1; - - // otherwise, lookup encodings - } else { - - // lookup encoding - if (params->encoding && dpiGlobal__lookupCharSet(params->encoding, - &env->charsetId, error) < 0) - return DPI_FAILURE; - - // check for identical encoding before performing lookup of national - // character set encoding - if (params->nencoding && params->encoding && - strcmp(params->nencoding, params->encoding) == 0) - env->ncharsetId = env->charsetId; - else if (params->nencoding && - dpiGlobal__lookupCharSet(params->nencoding, - &env->ncharsetId, error) < 0) - return DPI_FAILURE; - - // both charsetId and ncharsetId must be zero or both must be non-zero - // use NLS routine to look up missing value, if needed - if (env->charsetId && !env->ncharsetId) { - if (dpiOci__nlsEnvironmentVariableGet(DPI_OCI_NLS_NCHARSET_ID, - &env->ncharsetId, error) < 0) - return DPI_FAILURE; - } else if (!env->charsetId && env->ncharsetId) { - if (dpiOci__nlsEnvironmentVariableGet(DPI_OCI_NLS_CHARSET_ID, - &env->charsetId, error) < 0) - return DPI_FAILURE; - } - - // create new environment handle - if (dpiOci__envNlsCreate(&env->handle, - params->createMode | DPI_OCI_OBJECT, - env->charsetId, env->ncharsetId, error) < 0) - return DPI_FAILURE; - - } - - // create the error handle pool - if (dpiHandlePool__create(&env->errorHandles, error) < 0) - return DPI_FAILURE; - error->env = env; - - // if threaded, create mutex for reference counts - if (params->createMode & DPI_OCI_THREADED) - dpiMutex__initialize(env->mutex); - - // determine encodings in use - if (dpiEnv__getCharacterSetIdAndName(env, DPI_OCI_ATTR_CHARSET_ID, - &env->charsetId, env->encoding, error) < 0) - return DPI_FAILURE; - if (dpiEnv__getCharacterSetIdAndName(env, DPI_OCI_ATTR_NCHARSET_ID, - &env->ncharsetId, env->nencoding, error) < 0) - return DPI_FAILURE; - - // acquire max bytes per character - if (dpiOci__nlsNumericInfoGet(env->handle, &env->maxBytesPerCharacter, - DPI_OCI_NLS_CHARSET_MAXBYTESZ, error) < 0) - return DPI_FAILURE; - - // for NCHAR we have no idea of how many so we simply take the worst case - // unless the charsets are identical - if (env->ncharsetId == env->charsetId) - env->nmaxBytesPerCharacter = env->maxBytesPerCharacter; - else env->nmaxBytesPerCharacter = 4; - - // allocate base date descriptor (for converting to/from time_t) - if (dpiOci__descriptorAlloc(env->handle, &env->baseDate, - DPI_OCI_DTYPE_TIMESTAMP_LTZ, "alloc base date descriptor", - error) < 0) - return DPI_FAILURE; - - // populate base date with January 1, 1970 - if (dpiOci__nlsCharSetConvert(env->handle, env->charsetId, timezoneBuffer, - sizeof(timezoneBuffer), DPI_CHARSET_ID_ASCII, "+00:00", 6, - &timezoneLength, error) < 0) - return DPI_FAILURE; - if (dpiOci__dateTimeConstruct(env->handle, env->baseDate, 1970, 1, 1, 0, 0, - 0, 0, timezoneBuffer, timezoneLength, error) < 0) - return DPI_FAILURE; - - // set whether or not we are threaded - if (params->createMode & DPI_MODE_CREATE_THREADED) - env->threaded = 1; - - // set whether or not events mode has been set - if (params->createMode & DPI_MODE_CREATE_EVENTS) - env->events = 1; - - return DPI_SUCCESS; -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiError.c b/vendor/github.com/godror/godror/odpi/src/dpiError.c deleted file mode 100644 index aac57b92f18..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiError.c +++ /dev/null @@ -1,222 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiError.c -// Implementation of error. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" -#include "dpiErrorMessages.h" - -//----------------------------------------------------------------------------- -// dpiError__getInfo() [INTERNAL] -// Get the error state from the error structure. Returns DPI_FAILURE as a -// convenience to the caller. -//----------------------------------------------------------------------------- -int dpiError__getInfo(dpiError *error, dpiErrorInfo *info) -{ - if (!info) - return DPI_FAILURE; - info->code = error->buffer->code; - info->offset = error->buffer->offset; - info->message = error->buffer->message; - info->messageLength = error->buffer->messageLength; - info->fnName = error->buffer->fnName; - info->action = error->buffer->action; - info->isRecoverable = error->buffer->isRecoverable; - info->encoding = error->buffer->encoding; - switch(info->code) { - case 12154: // TNS:could not resolve the connect identifier specified - info->sqlState = "42S02"; - break; - case 22: // invalid session ID; access denied - case 378: // buffer pools cannot be created as specified - case 602: // Internal programming exception - case 603: // ORACLE server session terminated by fatal error - case 604: // error occurred at recursive SQL level - case 609: // could not attach to incoming connection - case 1012: // not logged on - case 1033: // ORACLE initialization or shutdown in progress - case 1041: // internal error. hostdef extension doesn't exist - case 1043: // user side memory corruption - case 1089: // immediate shutdown or close in progress - case 1090: // shutdown in progress - case 1092: // ORACLE instance terminated. Disconnection forced - case 3113: // end-of-file on communication channel - case 3114: // not connected to ORACLE - case 3122: // attempt to close ORACLE-side window on user side - case 3135: // connection lost contact - case 12153: // TNS:not connected - case 27146: // post/wait initialization failed - case 28511: // lost RPC connection to heterogeneous remote agent - info->sqlState = "01002"; - break; - default: - if (error->buffer->code == 0 && - error->buffer->errorNum == (dpiErrorNum) 0) - info->sqlState = "00000"; - else info->sqlState = "HY000"; - break; - } - return DPI_FAILURE; -} - - -//----------------------------------------------------------------------------- -// dpiError__initHandle() [INTERNAL] -// Retrieve the OCI error handle to use for error handling, from a pool of -// error handles common to the environment handle stored on the error. This -// environment also controls the encoding of OCI errors (which uses the CHAR -// encoding of the environment). -//----------------------------------------------------------------------------- -int dpiError__initHandle(dpiError *error) -{ - if (dpiHandlePool__acquire(error->env->errorHandles, &error->handle, - error) < 0) - return DPI_FAILURE; - if (!error->handle) { - if (dpiOci__handleAlloc(error->env->handle, &error->handle, - DPI_OCI_HTYPE_ERROR, "allocate OCI error", error) < 0) - return DPI_FAILURE; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiError__set() [INTERNAL] -// Set the error buffer to the specified DPI error. Returns DPI_FAILURE as a -// convenience to the caller. -//----------------------------------------------------------------------------- -int dpiError__set(dpiError *error, const char *action, dpiErrorNum errorNum, - ...) -{ - va_list varArgs; - - if (error) { - error->buffer->code = 0; - error->buffer->isRecoverable = 0; - error->buffer->offset = 0; - strcpy(error->buffer->encoding, DPI_CHARSET_NAME_UTF8); - error->buffer->action = action; - error->buffer->errorNum = errorNum; - va_start(varArgs, errorNum); - error->buffer->messageLength = - (uint32_t) vsnprintf(error->buffer->message, - sizeof(error->buffer->message), - dpiErrorMessages[errorNum - DPI_ERR_NO_ERR], varArgs); - va_end(varArgs); - if (dpiDebugLevel & DPI_DEBUG_LEVEL_ERRORS) - dpiDebug__print("internal error %.*s (%s / %s)\n", - error->buffer->messageLength, error->buffer->message, - error->buffer->fnName, action); - } - return DPI_FAILURE; -} - - -//----------------------------------------------------------------------------- -// dpiError__setFromOCI() [INTERNAL] -// Called when an OCI error has occurred and sets the error structure with -// the contents of that error. Note that trailing newlines and spaces are -// truncated from the message if they exist. If the connection is not NULL a -// check is made to see if the connection is no longer viable. The value -// DPI_FAILURE is returned as a convenience to the caller. -//----------------------------------------------------------------------------- -int dpiError__setFromOCI(dpiError *error, int status, dpiConn *conn, - const char *action) -{ - uint32_t callTimeout; - - // special error cases - if (status == DPI_OCI_INVALID_HANDLE) - return dpiError__set(error, action, DPI_ERR_INVALID_HANDLE, "OCI"); - else if (!error) - return DPI_FAILURE; - else if (!error->handle) - return dpiError__set(error, action, DPI_ERR_ERR_NOT_INITIALIZED); - else if (status != DPI_OCI_ERROR && status != DPI_OCI_NO_DATA) - return dpiError__set(error, action, - DPI_ERR_UNEXPECTED_OCI_RETURN_VALUE, status, - error->buffer->fnName); - - // fetch OCI error - error->buffer->action = action; - strcpy(error->buffer->encoding, error->env->encoding); - if (dpiOci__errorGet(error->handle, DPI_OCI_HTYPE_ERROR, - error->env->charsetId, action, error) < 0) - return DPI_FAILURE; - if (dpiDebugLevel & DPI_DEBUG_LEVEL_ERRORS) - dpiDebug__print("OCI error %.*s (%s / %s)\n", - error->buffer->messageLength, error->buffer->message, - error->buffer->fnName, action); - - // determine if error is recoverable (Transaction Guard) - // if the attribute cannot be read properly, simply leave it as false; - // otherwise, that error will mask the one that we really want to see - error->buffer->isRecoverable = 0; - dpiOci__attrGet(error->handle, DPI_OCI_HTYPE_ERROR, - (void*) &error->buffer->isRecoverable, 0, - DPI_OCI_ATTR_ERROR_IS_RECOVERABLE, NULL, error); - - // check for certain errors which indicate that the session is dead and - // should be dropped from the session pool (if a session pool was used) - // also check for call timeout and raise unified message instead - if (conn && !conn->deadSession) { - switch (error->buffer->code) { - case 22: // invalid session ID; access denied - case 28: // your session has been killed - case 31: // your session has been marked for kill - case 45: // your session has been terminated with no replay - case 378: // buffer pools cannot be created as specified - case 602: // internal programming exception - case 603: // ORACLE server session terminated by fatal error - case 609: // could not attach to incoming connection - case 1012: // not logged on - case 1041: // internal error. hostdef extension doesn't exist - case 1043: // user side memory corruption - case 1089: // immediate shutdown or close in progress - case 1092: // ORACLE instance terminated. Disconnection forced - case 2396: // exceeded maximum idle time, please connect again - case 3113: // end-of-file on communication channel - case 3114: // not connected to ORACLE - case 3122: // attempt to close ORACLE-side window on user side - case 3135: // connection lost contact - case 12153: // TNS:not connected - case 12537: // TNS:connection closed - case 12547: // TNS:lost contact - case 12570: // TNS:packet reader failure - case 12583: // TNS:no reader - case 27146: // post/wait initialization failed - case 28511: // lost RPC connection - case 56600: // an illegal OCI function call was issued - conn->deadSession = 1; - break; - case 3136: // inbound connection timed out - case 3156: // OCI call timed out - case 12161: // TNS:internal error: partial data received - callTimeout = 0; - if (conn->env->versionInfo->versionNum >= 18) - dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, - (void*) &callTimeout, 0, DPI_OCI_ATTR_CALL_TIMEOUT, - NULL, error); - if (callTimeout > 0) { - dpiError__set(error, action, DPI_ERR_CALL_TIMEOUT, - callTimeout, error->buffer->code); - error->buffer->code = 0; - } - break; - } - } - - return DPI_FAILURE; -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h b/vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h deleted file mode 100644 index 1de52a2b17b..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h +++ /dev/null @@ -1,90 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiErrorMessages.h -// Definition of error messages used in ODPI-C. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -static const char* const dpiErrorMessages[DPI_ERR_MAX - DPI_ERR_NO_ERR] = { - "DPI-1000: no error", // DPI_ERR_NO_ERR - "DPI-1001: out of memory", // DPI_ERR_NO_MEMORY - "DPI-1002: invalid %s handle", // DPI_ERR_INVALID_HANDLE - "DPI-1003: OCI error handle is not initialized", // DPI_ERR_ERR_NOT_INITIALIZED - "DPI-1004: unable to get error message", // DPI_ERR_GET_FAILED - "DPI-1005: unable to acquire Oracle environment handle", // DPI_ERR_CREATE_ENV - "DPI-1006: unable to convert text to session character set", // DPI_ERR_CONVERT_TEXT - "DPI-1007: no query has been executed", // DPI_ERR_QUERY_NOT_EXECUTED - "DPI-1008: data type %d is not supported", // DPI_ERR_UNHANDLED_DATA_TYPE - "DPI-1009: zero-based position %u is not valid with max array size of %u", // DPI_ERR_INVALID_ARRAY_POSITION - "DPI-1010: not connected", // DPI_ERR_NOT_CONNECTED - "DPI-1011: connection was not acquired from a session pool", // DPI_ERR_CONN_NOT_IN_POOL - "DPI-1012: proxy authentication is not possible with homogeneous pools", // DPI_ERR_INVALID_PROXY - "DPI-1013: not supported", // DPI_ERR_NOT_SUPPORTED - "DPI-1014: conversion between Oracle type %d and native type %d is not implemented", // DPI_ERR_UNHANDLED_CONVERSION - "DPI-1015: array size of %u is too large", // DPI_ERR_ARRAY_SIZE_TOO_BIG - "DPI-1016: invalid date", // DPI_ERR_INVALID_DATE - "DPI-1017: value is null", // DPI_ERR_VALUE_IS_NULL - "DPI-1018: array size of %u is too small", // DPI_ERR_ARRAY_SIZE_TOO_SMALL - "DPI-1019: buffer size of %u is too small", // DPI_ERR_BUFFER_SIZE_TOO_SMALL - "DPI-1020: application requires ODPI-C %d (min %d.%d) but is using a shared library at version %d.%d", // DPI_ERR_VERSION_NOT_SUPPORTED - "DPI-1021: Oracle type %u is invalid", // DPI_ERR_INVALID_ORACLE_TYPE - "DPI-1022: attribute %.*s is not part of object type %.*s.%.*s", // DPI_ERR_WRONG_ATTR - "DPI-1023: object %.*s.%.*s is not a collection", // DPI_ERR_NOT_COLLECTION - "DPI-1024: element at index %d does not exist", // DPI_ERR_INVALID_INDEX - "DPI-1025: no object type specified for object variable", // DPI_ERR_NO_OBJECT_TYPE - "DPI-1026: invalid character set %s", // DPI_ERR_INVALID_CHARSET - "DPI-1027: scroll operation would go out of the result set", // DPI_ERR_SCROLL_OUT_OF_RS - "DPI-1028: query position %u is invalid", // DPI_ERR_QUERY_POSITION_INVALID - "DPI-1029: no row currently fetched", // DPI_ERR_NO_ROW_FETCHED - "DPI-1030: unable to get or set error structure for thread local storage", // DPI_ERR_TLS_ERROR - "DPI-1031: array size cannot be zero", // DPI_ERR_ARRAY_SIZE_ZERO - "DPI-1032: user name and password cannot be set when using external authentication", // DPI_ERR_EXT_AUTH_WITH_CREDENTIALS - "DPI-1033: unable to get row offset", // DPI_ERR_CANNOT_GET_ROW_OFFSET - "DPI-1034: connection created from external handle cannot be closed", // DPI_ERR_CONN_IS_EXTERNAL - "DPI-1035: size of the transaction ID is %u and cannot exceed %u", // DPI_ERR_TRANS_ID_TOO_LARGE - "DPI-1036: size of the branch ID is %u and cannot exceed %u", // DPI_ERR_BRANCH_ID_TOO_LARGE - "DPI-1037: column at array position %u fetched with error %u", // DPI_ERR_COLUMN_FETCH - "DPI-1039: statement was already closed", // DPI_ERR_STMT_CLOSED - "DPI-1040: LOB was already closed", // DPI_ERR_LOB_CLOSED - "DPI-1041: invalid character set id %d", // DPI_ERR_INVALID_CHARSET_ID - "DPI-1042: invalid OCI number", // DPI_ERR_INVALID_OCI_NUMBER - "DPI-1043: invalid number", // DPI_ERR_INVALID_NUMBER - "DPI-1044: value cannot be represented as an Oracle number", // DPI_ERR_NUMBER_NO_REPR - "DPI-1045: strings converted to numbers can only be up to 172 characters long", // DPI_ERR_NUMBER_STRING_TOO_LONG - "DPI-1046: parameter %s cannot be a NULL pointer", // DPI_ERR_NULL_POINTER_PARAMETER - "DPI-1047: Cannot locate a %s-bit Oracle Client library: \"%s\". See https://oracle.github.io/odpi/doc/installation.html#%s for help", // DPI_ERR_LOAD_LIBRARY - "DPI-1049: symbol %s not found in OCI library", // DPI_ERR_LOAD_SYMBOL - "DPI-1050: Oracle Client library is at version %d.%d but version %d.%d or higher is needed", // DPI_ERR_ORACLE_CLIENT_TOO_OLD - "DPI-1052: unable to get NLS environment variable", // DPI_ERR_NLS_ENV_VAR_GET, - "DPI-1053: parameter %s cannot be a NULL pointer while corresponding length parameter is non-zero", // DPI_ERR_PTR_LENGTH_MISMATCH - "DPI-1055: value is not a number (NaN) and cannot be used in Oracle numbers", // DPI_ERR_NAN - "DPI-1056: found object of type %.*s.%.*s when expecting object of type %.*s.%.*s", // DPI_ERR_WRONG_TYPE - "DPI-1057: buffer size of %u is too large (max %u)", // DPI_ERR_BUFFER_SIZE_TOO_LARGE - "DPI-1058: edition not supported with connection class", // DPI_ERR_NO_EDITION_WITH_CONN_CLASS - "DPI-1059: bind variables are not supported in DDL statements", // DPI_ERR_NO_BIND_VARS_IN_DDL - "DPI-1060: subscription was already closed", // DPI_ERR_SUBSCR_CLOSED - "DPI-1061: edition is not supported when a new password is specified", // DPI_ERR_NO_EDITION_WITH_NEW_PASSWORD - "DPI-1062: unexpected OCI return value %d in function %s", // DPI_ERR_UNEXPECTED_OCI_RETURN_VALUE - "DPI-1063: modes DPI_MODE_EXEC_BATCH_ERRORS and DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS can only be used with insert, update, delete and merge statements", // DPI_ERR_EXEC_MODE_ONLY_FOR_DML - "DPI-1064: array variables are not supported with dpiStmt_executeMany()", // DPI_ERR_ARRAY_VAR_NOT_SUPPORTED - "DPI-1065: events mode is required to subscribe to events in the database", // DPI_ERR_EVENTS_MODE_REQUIRED - "DPI-1066: Oracle Database is at version %d.%d but version %d.%d or higher is needed", // DPI_ERR_ORACLE_DB_TOO_OLD - "DPI-1067: call timeout of %u ms exceeded with ORA-%d", // DPI_ERR_CALL_TIMEOUT - "DPI-1068: SODA cursor was already closed", // DPI_ERR_SODA_CURSOR_CLOSED - "DPI-1069: proxy user name must be enclosed in [] when using external authentication", // DPI_ERR_EXT_AUTH_INVALID_PROXY - "DPI-1070: no payload provided in message properties", // DPI_ERR_QUEUE_NO_PAYLOAD - "DPI-1071: payload type in message properties must match the payload type of the queue", // DPI_ERR_QUEUE_WRONG_PAYLOAD_TYPE - "DPI-1072: the Oracle Client library version is unsupported", // DPI_ERR_ORACLE_CLIENT_UNSUPPORTED - "DPI-1073: sharding key is required when specifying a super sharding key", // DPI_ERR_MISSING_SHARDING_KEY -}; diff --git a/vendor/github.com/godror/godror/odpi/src/dpiGen.c b/vendor/github.com/godror/godror/odpi/src/dpiGen.c deleted file mode 100644 index f671adf2a21..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiGen.c +++ /dev/null @@ -1,307 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiGen.c -// Generic routines for managing the types available through public APIs. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// definition of handle types -//----------------------------------------------------------------------------- -static const dpiTypeDef dpiAllTypeDefs[DPI_HTYPE_MAX - DPI_HTYPE_NONE - 1] = { - { - "dpiConn", // name - sizeof(dpiConn), // size of structure - 0x49DC600C, // check integer - (dpiTypeFreeProc) dpiConn__free - }, - { - "dpiPool", // name - sizeof(dpiPool), // size of structure - 0x18E1AA4B, // check integer - (dpiTypeFreeProc) dpiPool__free - }, - { - "dpiStmt", // name - sizeof(dpiStmt), // size of structure - 0x31B02B2E, // check integer - (dpiTypeFreeProc) dpiStmt__free - }, - { - "dpiVar", // name - sizeof(dpiVar), // size of structure - 0x2AE8C6DC, // check integer - (dpiTypeFreeProc) dpiVar__free - }, - { - "dpiLob", // name - sizeof(dpiLob), // size of structure - 0xD8F31746, // check integer - (dpiTypeFreeProc) dpiLob__free - }, - { - "dpiObject", // name - sizeof(dpiObject), // size of structure - 0x38616080, // check integer - (dpiTypeFreeProc) dpiObject__free - }, - { - "dpiObjectType", // name - sizeof(dpiObjectType), // size of structure - 0x86036059, // check integer - (dpiTypeFreeProc) dpiObjectType__free - }, - { - "dpiObjectAttr", // name - sizeof(dpiObjectAttr), // size of structure - 0xea6d5dde, // check integer - (dpiTypeFreeProc) dpiObjectAttr__free - }, - { - "dpiSubscr", // name - sizeof(dpiSubscr), // size of structure - 0xa415a1c0, // check integer - (dpiTypeFreeProc) dpiSubscr__free - }, - { - "dpiDeqOptions", // name - sizeof(dpiDeqOptions), // size of structure - 0x70ee498d, // check integer - (dpiTypeFreeProc) dpiDeqOptions__free - }, - { - "dpiEnqOptions", // name - sizeof(dpiEnqOptions), // size of structure - 0x682f3946, // check integer - (dpiTypeFreeProc) dpiEnqOptions__free - }, - { - "dpiMsgProps", // name - sizeof(dpiMsgProps), // size of structure - 0xa2b75506, // check integer - (dpiTypeFreeProc) dpiMsgProps__free - }, - { - "dpiRowid", // name - sizeof(dpiRowid), // size of structure - 0x6204fa04, // check integer - (dpiTypeFreeProc) dpiRowid__free - }, - { - "dpiContext", // name - sizeof(dpiContext), // size of structure - 0xd81b9181, // check integer - NULL - }, - { - "dpiSodaColl", // name - sizeof(dpiSodaColl), // size of structure - 0x3684db22, // check integer - (dpiTypeFreeProc) dpiSodaColl__free - }, - { - "dpiSodaCollCursor", // name - sizeof(dpiSodaCollCursor), // size of structure - 0xcdc73b86, // check integer - (dpiTypeFreeProc) dpiSodaCollCursor__free - }, - { - "dpiSodaDb", // name - sizeof(dpiSodaDb), // size of structure - 0x1f386121, // check integer - (dpiTypeFreeProc) dpiSodaDb__free - }, - { - "dpiSodaDoc", // name - sizeof(dpiSodaDoc), // size of structure - 0xaffd950a, // check integer - (dpiTypeFreeProc) dpiSodaDoc__free - }, - { - "dpiSodaDocCursor", // name - sizeof(dpiSodaDocCursor), // size of structure - 0x80ceb83b, // check integer - (dpiTypeFreeProc) dpiSodaDocCursor__free - }, - { - "dpiQueue", // name - sizeof(dpiQueue), // size of structure - 0x54904ba2, // check integer - (dpiTypeFreeProc) dpiQueue__free - } -}; - - -//----------------------------------------------------------------------------- -// dpiGen__addRef() [INTERNAL] -// Add a reference to the specified handle. -//----------------------------------------------------------------------------- -int dpiGen__addRef(void *ptr, dpiHandleTypeNum typeNum, const char *fnName) -{ - dpiError error; - - if (dpiGen__startPublicFn(ptr, typeNum, fnName, &error) < 0) - return dpiGen__endPublicFn(ptr, DPI_FAILURE, &error); - dpiGen__setRefCount(ptr, &error, 1); - return dpiGen__endPublicFn(ptr, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiGen__allocate() [INTERNAL] -// Allocate memory for the specified type and initialize the base fields. The -// type specified is assumed to be valid. If the environment is specified, use -// it; otherwise, create a new one. No additional initialization is performed. -//----------------------------------------------------------------------------- -int dpiGen__allocate(dpiHandleTypeNum typeNum, dpiEnv *env, void **handle, - dpiError *error) -{ - const dpiTypeDef *typeDef; - dpiBaseType *value; - - typeDef = &dpiAllTypeDefs[typeNum - DPI_HTYPE_NONE - 1]; - if (dpiUtils__allocateMemory(1, typeDef->size, 1, "allocate handle", - (void**) &value, error) < 0) - return DPI_FAILURE; - value->typeDef = typeDef; - value->checkInt = typeDef->checkInt; - value->refCount = 1; - if (!env && typeNum != DPI_HTYPE_CONTEXT) { - if (dpiUtils__allocateMemory(1, sizeof(dpiEnv), 1, "allocate env", - (void**) &env, error) < 0) { - dpiUtils__freeMemory(value); - return DPI_FAILURE; - } - } - value->env = env; - if (dpiDebugLevel & DPI_DEBUG_LEVEL_REFS) - dpiDebug__print("ref %p (%s) -> 1 [NEW]\n", value, typeDef->name); - - *handle = value; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiGen__checkHandle() [INTERNAL] -// Check that the specific handle is valid, that it matches the type -// requested and that the check integer is still in place. -//----------------------------------------------------------------------------- -int dpiGen__checkHandle(const void *ptr, dpiHandleTypeNum typeNum, - const char *action, dpiError *error) -{ - dpiBaseType *value = (dpiBaseType*) ptr; - const dpiTypeDef *typeDef; - - typeDef = &dpiAllTypeDefs[typeNum - DPI_HTYPE_NONE - 1]; - if (!ptr || value->typeDef != typeDef || - value->checkInt != typeDef->checkInt) - return dpiError__set(error, action, DPI_ERR_INVALID_HANDLE, - typeDef->name); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiGen__endPublicFn() [INTERNAL] -// This method should be the last call made in any public method using an -// ODPI-C handle (other than dpiContext which is handled differently). -//----------------------------------------------------------------------------- -int dpiGen__endPublicFn(const void *ptr, int returnValue, dpiError *error) -{ - if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) - dpiDebug__print("fn end %s(%p) -> %d\n", error->buffer->fnName, ptr, - returnValue); - if (error->handle) - dpiHandlePool__release(error->env->errorHandles, &error->handle); - - return returnValue; -} - - -//----------------------------------------------------------------------------- -// dpiGen__release() [INTERNAL] -// Release a reference to the specified handle. If the reference count -// reaches zero, the resources associated with the handle are released and -// the memory associated with the handle is freed. Any internal references -// held to other handles are also released. -//----------------------------------------------------------------------------- -int dpiGen__release(void *ptr, dpiHandleTypeNum typeNum, const char *fnName) -{ - dpiError error; - - if (dpiGen__startPublicFn(ptr, typeNum, fnName, &error) < 0) - return dpiGen__endPublicFn(ptr, DPI_FAILURE, &error); - dpiGen__setRefCount(ptr, &error, -1); - return dpiGen__endPublicFn(ptr, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiGen__setRefCount() [INTERNAL] -// Increase or decrease the reference count by the given amount. The handle -// is assumed to be valid at this point. If the environment is in threaded -// mode, acquire the mutex first before making any adjustments to the reference -// count. If the operation sets the reference count to zero, release all -// resources and free the memory associated with the structure. -//----------------------------------------------------------------------------- -void dpiGen__setRefCount(void *ptr, dpiError *error, int increment) -{ - dpiBaseType *value = (dpiBaseType*) ptr; - unsigned localRefCount; - - // if threaded need to protect modification of the refCount with a mutex; - // also ensure that if the reference count reaches zero that it is - // immediately marked invalid in order to avoid race conditions - if (value->env->threaded) - dpiMutex__acquire(value->env->mutex); - value->refCount += increment; - localRefCount = value->refCount; - if (localRefCount == 0) - dpiUtils__clearMemory(&value->checkInt, sizeof(value->checkInt)); - if (value->env->threaded) - dpiMutex__release(value->env->mutex); - - // reference count debugging - if (dpiDebugLevel & DPI_DEBUG_LEVEL_REFS) - dpiDebug__print("ref %p (%s) -> %d\n", ptr, value->typeDef->name, - localRefCount); - - // if the refCount has reached zero, call the free routine - if (localRefCount == 0) - (*value->typeDef->freeProc)(value, error); -} - - -//----------------------------------------------------------------------------- -// dpiGen__startPublicFn() [INTERNAL] -// This method should be the first call made in any public method using an -// ODPI-C handle (other than dpiContext which is handled differently). The -// handle is checked for validity and an error handle is acquired for use in -// all subsequent calls. -//----------------------------------------------------------------------------- -int dpiGen__startPublicFn(const void *ptr, dpiHandleTypeNum typeNum, - const char *fnName, dpiError *error) -{ - dpiBaseType *value = (dpiBaseType*) ptr; - - if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) - dpiDebug__print("fn start %s(%p)\n", fnName, ptr); - if (dpiGlobal__initError(fnName, error) < 0) - return DPI_FAILURE; - if (dpiGen__checkHandle(ptr, typeNum, "check main handle", error) < 0) - return DPI_FAILURE; - error->env = value->env; - return DPI_SUCCESS; -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiGlobal.c b/vendor/github.com/godror/godror/odpi/src/dpiGlobal.c deleted file mode 100644 index 6599d870421..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiGlobal.c +++ /dev/null @@ -1,291 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiGlobal.c -// Global environment used for managing errors in a thread safe manner as -// well as for looking up encodings. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// cross platform way of defining an initializer that runs at application -// startup (similar to what is done for the constructor calls for static C++ -// objects) -#if defined(_MSC_VER) - #pragma section(".CRT$XCU", read) - #define DPI_INITIALIZER_HELPER(f, p) \ - static void f(void); \ - __declspec(allocate(".CRT$XCU")) void (*f##_)(void) = f; \ - __pragma(comment(linker,"/include:" p #f "_")) \ - static void f(void) - #ifdef _WIN64 - #define DPI_INITIALIZER(f) DPI_INITIALIZER_HELPER(f, "") - #else - #define DPI_INITIALIZER(f) DPI_INITIALIZER_HELPER(f, "_") - #endif -#else - #define DPI_INITIALIZER(f) \ - static void f(void) __attribute__((constructor)); \ - static void f(void) -#endif - -// a global OCI environment is used for managing error buffers in a thread-safe -// manner; each thread is given its own error buffer; OCI error handles, -// though, must be created within the OCI environment created for use by -// standalone connections and session pools -static void *dpiGlobalEnvHandle = NULL; -static void *dpiGlobalErrorHandle = NULL; -static void *dpiGlobalThreadKey = NULL; -static dpiErrorBuffer dpiGlobalErrorBuffer; -static int dpiGlobalInitialized = 0; - -// a global mutex is used to ensure that only one thread is used to perform -// initialization of ODPI-C -static dpiMutexType dpiGlobalMutex; - -//----------------------------------------------------------------------------- -// dpiGlobal__extendedInitialize() [INTERNAL] -// Create the global environment used for managing error buffers in a -// thread-safe manner. This environment is solely used for implementing thread -// local storage for the error buffers and for looking up encodings given an -// IANA or Oracle character set name. -//----------------------------------------------------------------------------- -static int dpiGlobal__extendedInitialize(dpiError *error) -{ - int status; - - // create threaded OCI environment for storing error buffers and for - // looking up character sets; use character set AL32UTF8 solely to avoid - // the overhead of processing the environment variables; no error messages - // from this environment are ever used (ODPI-C specific error messages are - // used) - if (dpiOci__envNlsCreate(&dpiGlobalEnvHandle, DPI_OCI_THREADED, - DPI_CHARSET_ID_UTF8, DPI_CHARSET_ID_UTF8, error) < 0) - return DPI_FAILURE; - - // create global error handle - if (dpiOci__handleAlloc(dpiGlobalEnvHandle, &dpiGlobalErrorHandle, - DPI_OCI_HTYPE_ERROR, "create global error", error) < 0) { - dpiOci__handleFree(dpiGlobalEnvHandle, DPI_OCI_HTYPE_ENV); - return DPI_FAILURE; - } - - // create global thread key - status = dpiOci__threadKeyInit(dpiGlobalEnvHandle, dpiGlobalErrorHandle, - &dpiGlobalThreadKey, (void*) dpiUtils__freeMemory, error); - if (status < 0) { - dpiOci__handleFree(dpiGlobalEnvHandle, DPI_OCI_HTYPE_ENV); - return DPI_FAILURE; - } - - // mark library as fully initialized - dpiGlobalInitialized = 1; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiGlobal__finalize() [INTERNAL] -// Called when the process terminates and ensures that everything is cleaned -// up. -//----------------------------------------------------------------------------- -static void dpiGlobal__finalize(void) -{ - void *errorBuffer = NULL; - dpiError error; - - dpiMutex__acquire(dpiGlobalMutex); - dpiGlobalInitialized = 0; - error.buffer = &dpiGlobalErrorBuffer; - if (dpiGlobalThreadKey) { - dpiOci__threadKeyGet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, - dpiGlobalThreadKey, &errorBuffer, &error); - if (errorBuffer) { - dpiOci__threadKeySet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, - dpiGlobalThreadKey, NULL, &error); - dpiUtils__freeMemory(errorBuffer); - } - dpiOci__threadKeyDestroy(dpiGlobalEnvHandle, dpiGlobalErrorHandle, - &dpiGlobalThreadKey, &error); - dpiGlobalThreadKey = NULL; - } - if (dpiGlobalEnvHandle) { - dpiOci__handleFree(dpiGlobalEnvHandle, DPI_OCI_HTYPE_ENV); - dpiGlobalEnvHandle = NULL; - } - dpiMutex__release(dpiGlobalMutex); -} - - -//----------------------------------------------------------------------------- -// dpiGlobal__initError() [INTERNAL] -// Get the thread local error structure for use in all other functions. If -// an error structure cannot be determined for some reason, the global error -// buffer structure is returned instead. -//----------------------------------------------------------------------------- -int dpiGlobal__initError(const char *fnName, dpiError *error) -{ - dpiErrorBuffer *tempErrorBuffer; - - // initialize error buffer output to global error buffer structure; this is - // the value that is used if an error takes place before the thread local - // error structure can be returned - error->handle = NULL; - error->buffer = &dpiGlobalErrorBuffer; - if (fnName) - error->buffer->fnName = fnName; - - // initialize global environment, if necessary - // this should only ever be done once by the first thread to execute this - if (!dpiGlobalInitialized) { - dpiMutex__acquire(dpiGlobalMutex); - if (!dpiGlobalInitialized) - dpiGlobal__extendedInitialize(error); - dpiMutex__release(dpiGlobalMutex); - if (!dpiGlobalInitialized) - return DPI_FAILURE; - } - - // look up the error buffer specific to this thread - if (dpiOci__threadKeyGet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, - dpiGlobalThreadKey, (void**) &tempErrorBuffer, error) < 0) - return DPI_FAILURE; - - // if NULL, key has never been set for this thread, allocate new error - // and set it - if (!tempErrorBuffer) { - if (dpiUtils__allocateMemory(1, sizeof(dpiErrorBuffer), 1, - "allocate error buffer", (void**) &tempErrorBuffer, error) < 0) - return DPI_FAILURE; - if (dpiOci__threadKeySet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, - dpiGlobalThreadKey, tempErrorBuffer, error) < 0) { - dpiUtils__freeMemory(tempErrorBuffer); - return DPI_FAILURE; - } - } - - // if a function name has been specified, clear error - // the only time a function name is not specified is for - // dpiContext_getError() when the error information is being retrieved - if (fnName) { - tempErrorBuffer->code = 0; - tempErrorBuffer->offset = 0; - tempErrorBuffer->errorNum = (dpiErrorNum) 0; - tempErrorBuffer->isRecoverable = 0; - tempErrorBuffer->messageLength = 0; - tempErrorBuffer->fnName = fnName; - tempErrorBuffer->action = "start"; - strcpy(tempErrorBuffer->encoding, DPI_CHARSET_NAME_UTF8); - } - - error->buffer = tempErrorBuffer; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiGlobal__initialize() [INTERNAL] -// Initialization function that runs at process startup or when the library -// is first loaded. Some operating systems have limits on what can be run in -// this function, so most work is done in the dpiGlobal__extendedInitialize() -// function that runs when the first call to dpiContext_create() is made. -//----------------------------------------------------------------------------- -DPI_INITIALIZER(dpiGlobal__initialize) -{ - memset(&dpiGlobalErrorBuffer, 0, sizeof(dpiGlobalErrorBuffer)); - strcpy(dpiGlobalErrorBuffer.encoding, DPI_CHARSET_NAME_UTF8); - dpiMutex__initialize(dpiGlobalMutex); - dpiDebug__initialize(); - atexit(dpiGlobal__finalize); -} - - -//----------------------------------------------------------------------------- -// dpiGlobal__lookupCharSet() [INTERNAL] -// Lookup the character set id that can be used in the call to -// OCINlsEnvCreate(). -//----------------------------------------------------------------------------- -int dpiGlobal__lookupCharSet(const char *name, uint16_t *charsetId, - dpiError *error) -{ - char oraCharsetName[DPI_OCI_NLS_MAXBUFSZ]; - - // check for well-known encodings first - if (strcmp(name, DPI_CHARSET_NAME_UTF8) == 0) - *charsetId = DPI_CHARSET_ID_UTF8; - else if (strcmp(name, DPI_CHARSET_NAME_UTF16) == 0) - *charsetId = DPI_CHARSET_ID_UTF16; - else if (strcmp(name, DPI_CHARSET_NAME_ASCII) == 0) - *charsetId = DPI_CHARSET_ID_ASCII; - else if (strcmp(name, DPI_CHARSET_NAME_UTF16LE) == 0 || - strcmp(name, DPI_CHARSET_NAME_UTF16BE) == 0) - return dpiError__set(error, "check encoding", DPI_ERR_NOT_SUPPORTED); - - // perform lookup; check for the Oracle character set name first and if - // that fails, lookup using the IANA character set name - else { - if (dpiOci__nlsCharSetNameToId(dpiGlobalEnvHandle, name, charsetId, - error) < 0) - return DPI_FAILURE; - if (!*charsetId) { - if (dpiOci__nlsNameMap(dpiGlobalEnvHandle, oraCharsetName, - sizeof(oraCharsetName), name, DPI_OCI_NLS_CS_IANA_TO_ORA, - error) < 0) - return dpiError__set(error, "lookup charset", - DPI_ERR_INVALID_CHARSET, name); - dpiOci__nlsCharSetNameToId(dpiGlobalEnvHandle, oraCharsetName, - charsetId, error); - } - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiGlobal__lookupEncoding() [INTERNAL] -// Get the IANA character set name (encoding) given the Oracle character set -// id. -//----------------------------------------------------------------------------- -int dpiGlobal__lookupEncoding(uint16_t charsetId, char *encoding, - dpiError *error) -{ - char oracleName[DPI_OCI_NLS_MAXBUFSZ]; - - // check for well-known encodings first - switch (charsetId) { - case DPI_CHARSET_ID_UTF8: - strcpy(encoding, DPI_CHARSET_NAME_UTF8); - return DPI_SUCCESS; - case DPI_CHARSET_ID_UTF16: - strcpy(encoding, DPI_CHARSET_NAME_UTF16); - return DPI_SUCCESS; - case DPI_CHARSET_ID_ASCII: - strcpy(encoding, DPI_CHARSET_NAME_ASCII); - return DPI_SUCCESS; - } - - // get character set name - if (dpiOci__nlsCharSetIdToName(dpiGlobalEnvHandle, oracleName, - sizeof(oracleName), charsetId, error) < 0) - return dpiError__set(error, "lookup Oracle character set name", - DPI_ERR_INVALID_CHARSET_ID, charsetId); - - // get IANA character set name - if (dpiOci__nlsNameMap(dpiGlobalEnvHandle, encoding, DPI_OCI_NLS_MAXBUFSZ, - oracleName, DPI_OCI_NLS_CS_ORA_TO_IANA, error) < 0) - return dpiError__set(error, "lookup IANA name", - DPI_ERR_INVALID_CHARSET_ID, charsetId); - - return DPI_SUCCESS; -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiHandleList.c b/vendor/github.com/godror/godror/odpi/src/dpiHandleList.c deleted file mode 100644 index 2f3864067bb..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiHandleList.c +++ /dev/null @@ -1,116 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiHandleList.c -// Implementation of a list of handles which are managed in a thread-safe -// manner. The references to these handles are assumed to be held by other -// structures. No references are held by the list of handles defined here. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiHandleList__addHandle() [INTERNAL] -// Add a handle to the list. The list is expanded in sets of 8 handles as -// needed. A current position is maintained to reduce the number of scans of -// the list are required. An empty slot is designated by a NULL pointer. -//----------------------------------------------------------------------------- -int dpiHandleList__addHandle(dpiHandleList *list, void *handle, - uint32_t *slotNum, dpiError *error) -{ - uint32_t numSlots, i; - void **tempHandles; - - dpiMutex__acquire(list->mutex); - if (list->numUsedSlots == list->numSlots) { - numSlots = list->numSlots + 8; - if (dpiUtils__allocateMemory(numSlots, sizeof(void*), 1, - "allocate slots", (void**) &tempHandles, error) < 0) { - dpiMutex__release(list->mutex); - return DPI_FAILURE; - } - memcpy(tempHandles, list->handles, list->numSlots * sizeof(void*)); - dpiUtils__freeMemory(list->handles); - list->handles = tempHandles; - list->numSlots = numSlots; - *slotNum = list->numUsedSlots++; - list->currentPos = list->numUsedSlots; - } else { - for (i = 0; i < list->numSlots; i++) { - if (!list->handles[list->currentPos]) - break; - list->currentPos++; - if (list->currentPos == list->numSlots) - list->currentPos = 0; - } - list->numUsedSlots++; - *slotNum = list->currentPos++; - if (list->currentPos == list->numSlots) - list->currentPos = 0; - } - list->handles[*slotNum] = handle; - dpiMutex__release(list->mutex); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiHandleList__create() [INTERNAL] -// Create a new (empty) list of handles. -//----------------------------------------------------------------------------- -int dpiHandleList__create(dpiHandleList **list, dpiError *error) -{ - dpiHandleList *tempList; - - if (dpiUtils__allocateMemory(1, sizeof(dpiHandleList), 0, - "allocate handle list", (void**) &tempList, error) < 0) - return DPI_FAILURE; - tempList->numSlots = 8; - tempList->numUsedSlots = 0; - if (dpiUtils__allocateMemory(tempList->numSlots, sizeof(void*), 1, - "allocate handle list slots", (void**) &tempList->handles, - error) < 0) { - dpiUtils__freeMemory(tempList); - return DPI_FAILURE; - } - dpiMutex__initialize(tempList->mutex); - tempList->currentPos = 0; - *list = tempList; - return DPI_SUCCESS; -} - -//----------------------------------------------------------------------------- -// dpiHandleList__free() [INTERNAL] -// Free the memory associated with the handle list. -//----------------------------------------------------------------------------- -void dpiHandleList__free(dpiHandleList *list) -{ - if (list->handles) { - dpiUtils__freeMemory(list->handles); - list->handles = NULL; - } - dpiMutex__destroy(list->mutex); - dpiUtils__freeMemory(list); -} - - -//----------------------------------------------------------------------------- -// dpiHandleList__removeHandle() [INTERNAL] -// Remove the handle at the specified location from the list. -//----------------------------------------------------------------------------- -void dpiHandleList__removeHandle(dpiHandleList *list, uint32_t slotNum) -{ - dpiMutex__acquire(list->mutex); - list->handles[slotNum] = NULL; - list->numUsedSlots--; - dpiMutex__release(list->mutex); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c b/vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c deleted file mode 100644 index 456f094f136..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c +++ /dev/null @@ -1,119 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiHandlePool.c -// Implementation of a pool of handles which can be acquired and released in -// a thread-safe manner. The pool is a circular queue where handles are -// acquired from the front and released to the back. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiHandlePool__acquire() [INTERNAL] -// Acquire a handle from the pool. If a handle is available, it will be -// cleared out of the pool and returned to the caller. It is the caller's -// responsibility to return the handle back to the pool when it is finished -// with it. If no handle is available, a NULL value is returned. The caller is -// expected to create a new handle and return it to the pool when it is -// finished with it. -//----------------------------------------------------------------------------- -int dpiHandlePool__acquire(dpiHandlePool *pool, void **handle, dpiError *error) -{ - void **tempHandles; - uint32_t numSlots; - - dpiMutex__acquire(pool->mutex); - if (pool->acquirePos != pool->releasePos) { - *handle = pool->handles[pool->acquirePos]; - pool->handles[pool->acquirePos++] = NULL; - if (pool->acquirePos == pool->numSlots) - pool->acquirePos = 0; - } else { - *handle = NULL; - pool->numUsedSlots++; - if (pool->numUsedSlots > pool->numSlots) { - numSlots = pool->numSlots + 8; - if (dpiUtils__allocateMemory(numSlots, sizeof(void*), 1, - "allocate slots", (void**) &tempHandles, error) < 0) { - dpiMutex__release(pool->mutex); - return DPI_FAILURE; - } - memcpy(tempHandles, pool->handles, pool->numSlots * sizeof(void*)); - dpiUtils__freeMemory(pool->handles); - pool->handles = tempHandles; - pool->numSlots = numSlots; - } - } - dpiMutex__release(pool->mutex); - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiHandlePool__create() [INTERNAL] -// Create a new handle pool. -//----------------------------------------------------------------------------- -int dpiHandlePool__create(dpiHandlePool **pool, dpiError *error) -{ - dpiHandlePool *tempPool; - - if (dpiUtils__allocateMemory(1, sizeof(dpiHandlePool), 0, - "allocate handle pool", (void**) &tempPool, error) < 0) - return DPI_FAILURE; - tempPool->numSlots = 8; - tempPool->numUsedSlots = 0; - if (dpiUtils__allocateMemory(tempPool->numSlots, sizeof(void*), 1, - "allocate handle pool slots", (void**) &tempPool->handles, - error) < 0) { - dpiUtils__freeMemory(tempPool); - return DPI_FAILURE; - } - dpiMutex__initialize(tempPool->mutex); - tempPool->acquirePos = 0; - tempPool->releasePos = 0; - *pool = tempPool; - return DPI_SUCCESS; -} - -//----------------------------------------------------------------------------- -// dpiHandlePool__free() [INTERNAL] -// Free the memory associated with the error pool. -//----------------------------------------------------------------------------- -void dpiHandlePool__free(dpiHandlePool *pool) -{ - if (pool->handles) { - dpiUtils__freeMemory(pool->handles); - pool->handles = NULL; - } - dpiMutex__destroy(pool->mutex); - dpiUtils__freeMemory(pool); -} - - -//----------------------------------------------------------------------------- -// dpiHandlePool__release() [INTERNAL] -// Release a handle back to the pool. No checks are performed on the handle -// that is being returned to the pool; It will simply be placed back in the -// pool. The handle is then NULLed in order to avoid multiple attempts to -// release the handle back to the pool. -//----------------------------------------------------------------------------- -void dpiHandlePool__release(dpiHandlePool *pool, void **handle) -{ - dpiMutex__acquire(pool->mutex); - pool->handles[pool->releasePos++] = *handle; - *handle = NULL; - if (pool->releasePos == pool->numSlots) - pool->releasePos = 0; - dpiMutex__release(pool->mutex); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiImpl.h b/vendor/github.com/godror/godror/odpi/src/dpiImpl.h deleted file mode 100644 index ec2ede13955..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiImpl.h +++ /dev/null @@ -1,1905 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiImpl.h -// Master include file for implementation of ODPI-C library. The definitions -// in this file are subject to change without warning. Only the definitions in -// the file dpi.h are intended to be used publicly. -//----------------------------------------------------------------------------- - -#ifndef DPI_IMPL -#define DPI_IMPL - -// Visual Studio 2005 introduced deprecation warnings for "insecure" and POSIX -// functions; silence these warnings -#ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS 1 -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include "dpi.h" - -#ifdef _WIN32 -#include -#ifndef isnan -#define isnan _isnan -#endif -#else -#include -#include -#include -#endif -#ifdef __linux -#include -#include -#endif - -#ifdef _MSC_VER -#if _MSC_VER < 1900 -#define PRId64 "I64d" -#define PRIu64 "I64u" -#define snprintf _snprintf -#endif -#endif - -#ifndef PRIu64 -#include -#endif - -#ifdef __GNUC__ -#define UNUSED __attribute((unused)) -#else -#define UNUSED -#endif - -// define debugging level (defined in dpiGlobal.c) -extern unsigned long dpiDebugLevel; - -// define max error size -#define DPI_MAX_ERROR_SIZE 3072 - -// define context name for ping interval -#define DPI_CONTEXT_LAST_TIME_USED "DPI_LAST_TIME_USED" - -// define size of buffer used for numbers transferred to/from Oracle as text -#define DPI_NUMBER_AS_TEXT_CHARS 172 - -// define maximum number of digits possible in an Oracle number -#define DPI_NUMBER_MAX_DIGITS 38 - -// define maximum size in bytes supported by basic string handling -#define DPI_MAX_BASIC_BUFFER_SIZE 32767 - -// define internal chunk size used for dynamic binding/fetching -#define DPI_DYNAMIC_BYTES_CHUNK_SIZE 65536 - -// define maximum buffer size permitted in variables -#define DPI_MAX_VAR_BUFFER_SIZE (1024 * 1024 * 1024 - 2) - -// define subscription grouping repeat count -#define DPI_SUBSCR_GROUPING_FOREVER -1 - -// define number of rows to prefetch -#define DPI_PREFETCH_ROWS_DEFAULT 2 - -// define well-known character sets -#define DPI_CHARSET_ID_ASCII 1 -#define DPI_CHARSET_ID_UTF8 873 -#define DPI_CHARSET_ID_UTF16 1000 -#define DPI_CHARSET_ID_UTF16BE 2000 -#define DPI_CHARSET_ID_UTF16LE 2002 -#define DPI_CHARSET_NAME_ASCII "ASCII" -#define DPI_CHARSET_NAME_UTF8 "UTF-8" -#define DPI_CHARSET_NAME_UTF16 "UTF-16" -#define DPI_CHARSET_NAME_UTF16BE "UTF-16BE" -#define DPI_CHARSET_NAME_UTF16LE "UTF-16LE" - -// define handle types used for allocating OCI handles -#define DPI_OCI_HTYPE_ENV 1 -#define DPI_OCI_HTYPE_ERROR 2 -#define DPI_OCI_HTYPE_SVCCTX 3 -#define DPI_OCI_HTYPE_STMT 4 -#define DPI_OCI_HTYPE_BIND 5 -#define DPI_OCI_HTYPE_DEFINE 6 -#define DPI_OCI_HTYPE_DESCRIBE 7 -#define DPI_OCI_HTYPE_SERVER 8 -#define DPI_OCI_HTYPE_SESSION 9 -#define DPI_OCI_HTYPE_AUTHINFO 9 -#define DPI_OCI_HTYPE_TRANS 10 -#define DPI_OCI_HTYPE_SUBSCRIPTION 13 -#define DPI_OCI_HTYPE_SPOOL 27 -#define DPI_OCI_HTYPE_SODA_COLLECTION 30 -#define DPI_OCI_HTYPE_SODA_DOCUMENT 31 -#define DPI_OCI_HTYPE_SODA_COLL_CURSOR 32 -#define DPI_OCI_HTYPE_SODA_OPER_OPTIONS 33 -#define DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS 34 -#define DPI_OCI_HTYPE_SODA_DOC_CURSOR 36 - -// define OCI descriptor types -#define DPI_OCI_DTYPE_LOB 50 -#define DPI_OCI_DTYPE_PARAM 53 -#define DPI_OCI_DTYPE_ROWID 54 -#define DPI_OCI_DTYPE_AQENQ_OPTIONS 57 -#define DPI_OCI_DTYPE_AQDEQ_OPTIONS 58 -#define DPI_OCI_DTYPE_AQMSG_PROPERTIES 59 -#define DPI_OCI_DTYPE_INTERVAL_YM 62 -#define DPI_OCI_DTYPE_INTERVAL_DS 63 -#define DPI_OCI_DTYPE_AQNFY_DESCRIPTOR 64 -#define DPI_OCI_DTYPE_TIMESTAMP 68 -#define DPI_OCI_DTYPE_TIMESTAMP_TZ 69 -#define DPI_OCI_DTYPE_TIMESTAMP_LTZ 70 -#define DPI_OCI_DTYPE_CHDES 77 -#define DPI_OCI_DTYPE_TABLE_CHDES 78 -#define DPI_OCI_DTYPE_ROW_CHDES 79 -#define DPI_OCI_DTYPE_CQDES 80 -#define DPI_OCI_DTYPE_SHARDING_KEY 83 - -// define values used for getting/setting OCI attributes -#define DPI_OCI_ATTR_DATA_SIZE 1 -#define DPI_OCI_ATTR_DATA_TYPE 2 -#define DPI_OCI_ATTR_ENV 5 -#define DPI_OCI_ATTR_PRECISION 5 -#define DPI_OCI_ATTR_SCALE 6 -#define DPI_OCI_ATTR_NAME 4 -#define DPI_OCI_ATTR_SERVER 6 -#define DPI_OCI_ATTR_SESSION 7 -#define DPI_OCI_ATTR_IS_NULL 7 -#define DPI_OCI_ATTR_TRANS 8 -#define DPI_OCI_ATTR_TYPE_NAME 8 -#define DPI_OCI_ATTR_SCHEMA_NAME 9 -#define DPI_OCI_ATTR_ROW_COUNT 9 -#define DPI_OCI_ATTR_PREFETCH_ROWS 11 -#define DPI_OCI_ATTR_PARAM_COUNT 18 -#define DPI_OCI_ATTR_ROWID 19 -#define DPI_OCI_ATTR_USERNAME 22 -#define DPI_OCI_ATTR_PASSWORD 23 -#define DPI_OCI_ATTR_STMT_TYPE 24 -#define DPI_OCI_ATTR_INTERNAL_NAME 25 -#define DPI_OCI_ATTR_EXTERNAL_NAME 26 -#define DPI_OCI_ATTR_XID 27 -#define DPI_OCI_ATTR_CHARSET_ID 31 -#define DPI_OCI_ATTR_CHARSET_FORM 32 -#define DPI_OCI_ATTR_MAXDATA_SIZE 33 -#define DPI_OCI_ATTR_ROWS_RETURNED 42 -#define DPI_OCI_ATTR_VISIBILITY 47 -#define DPI_OCI_ATTR_CONSUMER_NAME 50 -#define DPI_OCI_ATTR_DEQ_MODE 51 -#define DPI_OCI_ATTR_NAVIGATION 52 -#define DPI_OCI_ATTR_WAIT 53 -#define DPI_OCI_ATTR_DEQ_MSGID 54 -#define DPI_OCI_ATTR_PRIORITY 55 -#define DPI_OCI_ATTR_DELAY 56 -#define DPI_OCI_ATTR_EXPIRATION 57 -#define DPI_OCI_ATTR_CORRELATION 58 -#define DPI_OCI_ATTR_ATTEMPTS 59 -#define DPI_OCI_ATTR_EXCEPTION_QUEUE 61 -#define DPI_OCI_ATTR_ENQ_TIME 62 -#define DPI_OCI_ATTR_MSG_STATE 63 -#define DPI_OCI_ATTR_ORIGINAL_MSGID 69 -#define DPI_OCI_ATTR_QUEUE_NAME 70 -#define DPI_OCI_ATTR_NUM_DML_ERRORS 73 -#define DPI_OCI_ATTR_DML_ROW_OFFSET 74 -#define DPI_OCI_ATTR_SUBSCR_NAME 94 -#define DPI_OCI_ATTR_SUBSCR_CALLBACK 95 -#define DPI_OCI_ATTR_SUBSCR_CTX 96 -#define DPI_OCI_ATTR_SUBSCR_NAMESPACE 98 -#define DPI_OCI_ATTR_REF_TDO 110 -#define DPI_OCI_ATTR_PARAM 124 -#define DPI_OCI_ATTR_PARSE_ERROR_OFFSET 129 -#define DPI_OCI_ATTR_SERVER_STATUS 143 -#define DPI_OCI_ATTR_STATEMENT 144 -#define DPI_OCI_ATTR_DEQCOND 146 -#define DPI_OCI_ATTR_SUBSCR_RECPTPROTO 149 -#define DPI_OCI_ATTR_CURRENT_POSITION 164 -#define DPI_OCI_ATTR_STMTCACHESIZE 176 -#define DPI_OCI_ATTR_BIND_COUNT 190 -#define DPI_OCI_ATTR_TRANSFORMATION 196 -#define DPI_OCI_ATTR_ROWS_FETCHED 197 -#define DPI_OCI_ATTR_SPOOL_STMTCACHESIZE 208 -#define DPI_OCI_ATTR_TYPECODE 216 -#define DPI_OCI_ATTR_STMT_IS_RETURNING 218 -#define DPI_OCI_ATTR_CURRENT_SCHEMA 224 -#define DPI_OCI_ATTR_SUBSCR_QOSFLAGS 225 -#define DPI_OCI_ATTR_COLLECTION_ELEMENT 227 -#define DPI_OCI_ATTR_SUBSCR_TIMEOUT 227 -#define DPI_OCI_ATTR_NUM_TYPE_ATTRS 228 -#define DPI_OCI_ATTR_SUBSCR_CQ_QOSFLAGS 229 -#define DPI_OCI_ATTR_LIST_TYPE_ATTRS 229 -#define DPI_OCI_ATTR_SUBSCR_CQ_REGID 230 -#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_CLASS 231 -#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_VALUE 232 -#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_TYPE 233 -#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_REPEAT_COUNT 235 -#define DPI_OCI_ATTR_NCHARSET_ID 262 -#define DPI_OCI_ATTR_APPCTX_SIZE 273 -#define DPI_OCI_ATTR_APPCTX_LIST 274 -#define DPI_OCI_ATTR_APPCTX_NAME 275 -#define DPI_OCI_ATTR_APPCTX_ATTR 276 -#define DPI_OCI_ATTR_APPCTX_VALUE 277 -#define DPI_OCI_ATTR_CLIENT_IDENTIFIER 278 -#define DPI_OCI_ATTR_CHAR_SIZE 286 -#define DPI_OCI_ATTR_EDITION 288 -#define DPI_OCI_ATTR_CQ_QUERYID 304 -#define DPI_OCI_ATTR_SPOOL_TIMEOUT 308 -#define DPI_OCI_ATTR_SPOOL_GETMODE 309 -#define DPI_OCI_ATTR_SPOOL_BUSY_COUNT 310 -#define DPI_OCI_ATTR_SPOOL_OPEN_COUNT 311 -#define DPI_OCI_ATTR_MODULE 366 -#define DPI_OCI_ATTR_ACTION 367 -#define DPI_OCI_ATTR_CLIENT_INFO 368 -#define DPI_OCI_ATTR_SUBSCR_PORTNO 390 -#define DPI_OCI_ATTR_CHNF_ROWIDS 402 -#define DPI_OCI_ATTR_CHNF_OPERATIONS 403 -#define DPI_OCI_ATTR_CHDES_DBNAME 405 -#define DPI_OCI_ATTR_CHDES_NFYTYPE 406 -#define DPI_OCI_ATTR_NFY_FLAGS 406 -#define DPI_OCI_ATTR_CHDES_XID 407 -#define DPI_OCI_ATTR_MSG_DELIVERY_MODE 407 -#define DPI_OCI_ATTR_CHDES_TABLE_CHANGES 408 -#define DPI_OCI_ATTR_CHDES_TABLE_NAME 409 -#define DPI_OCI_ATTR_CHDES_TABLE_OPFLAGS 410 -#define DPI_OCI_ATTR_CHDES_TABLE_ROW_CHANGES 411 -#define DPI_OCI_ATTR_CHDES_ROW_ROWID 412 -#define DPI_OCI_ATTR_CHDES_ROW_OPFLAGS 413 -#define DPI_OCI_ATTR_CHNF_REGHANDLE 414 -#define DPI_OCI_ATTR_CQDES_OPERATION 422 -#define DPI_OCI_ATTR_CQDES_TABLE_CHANGES 423 -#define DPI_OCI_ATTR_CQDES_QUERYID 424 -#define DPI_OCI_ATTR_DRIVER_NAME 424 -#define DPI_OCI_ATTR_CHDES_QUERIES 425 -#define DPI_OCI_ATTR_CONNECTION_CLASS 425 -#define DPI_OCI_ATTR_PURITY 426 -#define DPI_OCI_ATTR_RECEIVE_TIMEOUT 436 -#define DPI_OCI_ATTR_LOBPREFETCH_LENGTH 440 -#define DPI_OCI_ATTR_SUBSCR_IPADDR 452 -#define DPI_OCI_ATTR_UB8_ROW_COUNT 457 -#define DPI_OCI_ATTR_SPOOL_AUTH 460 -#define DPI_OCI_ATTR_LTXID 462 -#define DPI_OCI_ATTR_DML_ROW_COUNT_ARRAY 469 -#define DPI_OCI_ATTR_ERROR_IS_RECOVERABLE 472 -#define DPI_OCI_ATTR_TRANSACTION_IN_PROGRESS 484 -#define DPI_OCI_ATTR_DBOP 485 -#define DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION 490 -#define DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT 495 -#define DPI_OCI_ATTR_SHARDING_KEY 496 -#define DPI_OCI_ATTR_SUPER_SHARDING_KEY 497 -#define DPI_OCI_ATTR_FIXUP_CALLBACK 501 -#define DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT 506 -#define DPI_OCI_ATTR_CALL_TIMEOUT 531 -#define DPI_OCI_ATTR_SODA_COLL_NAME 535 -#define DPI_OCI_ATTR_SODA_COLL_DESCRIPTOR 536 -#define DPI_OCI_ATTR_SODA_CTNT_SQL_TYPE 549 -#define DPI_OCI_ATTR_SODA_KEY 563 -#define DPI_OCI_ATTR_SODA_LASTMOD_TIMESTAMP 564 -#define DPI_OCI_ATTR_SODA_CREATE_TIMESTAMP 565 -#define DPI_OCI_ATTR_SODA_VERSION 566 -#define DPI_OCI_ATTR_SODA_CONTENT 567 -#define DPI_OCI_ATTR_SODA_JSON_CHARSET_ID 568 -#define DPI_OCI_ATTR_SODA_DETECT_JSON_ENC 569 -#define DPI_OCI_ATTR_SODA_MEDIA_TYPE 571 -#define DPI_OCI_ATTR_SODA_CTNT_FORMAT 572 -#define DPI_OCI_ATTR_SODA_FILTER 576 -#define DPI_OCI_ATTR_SODA_SKIP 577 -#define DPI_OCI_ATTR_SODA_LIMIT 578 -#define DPI_OCI_ATTR_SODA_DOC_COUNT 593 -#define DPI_OCI_ATTR_SPOOL_MAX_PER_SHARD 602 - -// define OCI object type constants -#define DPI_OCI_OTYPE_NAME 1 -#define DPI_OCI_OTYPE_PTR 3 - -// define OCI data type constants -#define DPI_SQLT_CHR 1 -#define DPI_SQLT_NUM 2 -#define DPI_SQLT_INT 3 -#define DPI_SQLT_FLT 4 -#define DPI_SQLT_VNU 6 -#define DPI_SQLT_PDN 7 -#define DPI_SQLT_LNG 8 -#define DPI_SQLT_VCS 9 -#define DPI_SQLT_DAT 12 -#define DPI_SQLT_BFLOAT 21 -#define DPI_SQLT_BDOUBLE 22 -#define DPI_SQLT_BIN 23 -#define DPI_SQLT_LBI 24 -#define DPI_SQLT_UIN 68 -#define DPI_SQLT_LVB 95 -#define DPI_SQLT_AFC 96 -#define DPI_SQLT_IBFLOAT 100 -#define DPI_SQLT_IBDOUBLE 101 -#define DPI_SQLT_RDD 104 -#define DPI_SQLT_NTY 108 -#define DPI_SQLT_CLOB 112 -#define DPI_SQLT_BLOB 113 -#define DPI_SQLT_BFILE 114 -#define DPI_SQLT_RSET 116 -#define DPI_SQLT_NCO 122 -#define DPI_SQLT_ODT 156 -#define DPI_SQLT_DATE 184 -#define DPI_SQLT_TIMESTAMP 187 -#define DPI_SQLT_TIMESTAMP_TZ 188 -#define DPI_SQLT_INTERVAL_YM 189 -#define DPI_SQLT_INTERVAL_DS 190 -#define DPI_SQLT_TIMESTAMP_LTZ 232 -#define DPI_OCI_TYPECODE_SMALLINT 246 -#define DPI_SQLT_REC 250 -#define DPI_SQLT_BOL 252 -#define DPI_OCI_TYPECODE_ROWID 262 -#define DPI_OCI_TYPECODE_LONG 263 -#define DPI_OCI_TYPECODE_LONG_RAW 264 -#define DPI_OCI_TYPECODE_BINARY_INTEGER 265 -#define DPI_OCI_TYPECODE_PLS_INTEGER 266 - -// define session pool constants -#define DPI_OCI_SPD_FORCE 0x0001 -#define DPI_OCI_SPC_HOMOGENEOUS 0x0002 -#define DPI_OCI_SPC_STMTCACHE 0x0004 - -// define OCI session pool get constants -#define DPI_OCI_SESSGET_SPOOL 0x0001 -#define DPI_OCI_SESSGET_STMTCACHE 0x0004 -#define DPI_OCI_SESSGET_CREDPROXY 0x0008 -#define DPI_OCI_SESSGET_CREDEXT 0x0010 -#define DPI_OCI_SESSGET_SPOOL_MATCHANY 0x0020 -#define DPI_OCI_SESSGET_SYSDBA 0x0100 -#define DPI_OCI_SESSGET_MULTIPROPERTY_TAG 0x0400 - -// define OCI authentication constants -#define DPI_OCI_CPW_SYSDBA 0x00000010 -#define DPI_OCI_CPW_SYSOPER 0x00000020 -#define DPI_OCI_CPW_SYSASM 0x00800040 -#define DPI_OCI_CPW_SYSBKP 0x00000080 -#define DPI_OCI_CPW_SYSDGD 0x00000100 -#define DPI_OCI_CPW_SYSKMT 0x00000200 - -// define NLS constants -#define DPI_OCI_NLS_CS_IANA_TO_ORA 0 -#define DPI_OCI_NLS_CS_ORA_TO_IANA 1 -#define DPI_OCI_NLS_CHARSET_MAXBYTESZ 91 -#define DPI_OCI_NLS_CHARSET_ID 93 -#define DPI_OCI_NLS_NCHARSET_ID 94 -#define DPI_OCI_NLS_MAXBUFSZ 100 -#define DPI_SQLCS_IMPLICIT 1 -#define DPI_SQLCS_NCHAR 2 - -// define XA constants -#define DPI_XA_MAXGTRIDSIZE 64 -#define DPI_XA_MAXBQUALSIZE 64 -#define DPI_XA_XIDDATASIZE 128 - -// define null indicator values -#define DPI_OCI_IND_NULL -1 -#define DPI_OCI_IND_NOTNULL 0 - -// define subscription QOS values -#define DPI_OCI_SUBSCR_QOS_RELIABLE 0x01 -#define DPI_OCI_SUBSCR_QOS_PURGE_ON_NTFN 0x10 -#define DPI_OCI_SUBSCR_CQ_QOS_QUERY 0x01 -#define DPI_OCI_SUBSCR_CQ_QOS_BEST_EFFORT 0x02 - -// define miscellaneous OCI constants -#define DPI_OCI_CONTINUE -24200 -#define DPI_OCI_INVALID_HANDLE -2 -#define DPI_OCI_ERROR -1 -#define DPI_OCI_DEFAULT 0 -#define DPI_OCI_SUCCESS 0 -#define DPI_OCI_ONE_PIECE 0 -#define DPI_OCI_ATTR_PURITY_DEFAULT 0 -#define DPI_OCI_NUMBER_UNSIGNED 0 -#define DPI_OCI_SUCCESS_WITH_INFO 1 -#define DPI_OCI_NTV_SYNTAX 1 -#define DPI_OCI_MEMORY_CLEARED 1 -#define DPI_OCI_SESSRLS_DROPSESS 1 -#define DPI_OCI_SESSRLS_MULTIPROPERTY_TAG 4 -#define DPI_OCI_SERVER_NORMAL 1 -#define DPI_OCI_TYPEGET_ALL 1 -#define DPI_OCI_TRANS_NEW 1 -#define DPI_OCI_LOCK_NONE 1 -#define DPI_OCI_TEMP_BLOB 1 -#define DPI_OCI_CRED_RDBMS 1 -#define DPI_OCI_LOB_READONLY 1 -#define DPI_OCI_JSON_FORMAT_OSON 1 -#define DPI_OCI_TEMP_CLOB 2 -#define DPI_OCI_CRED_EXT 2 -#define DPI_OCI_LOB_READWRITE 2 -#define DPI_OCI_DATA_AT_EXEC 2 -#define DPI_OCI_DYNAMIC_FETCH 2 -#define DPI_OCI_NUMBER_SIGNED 2 -#define DPI_OCI_PIN_ANY 3 -#define DPI_OCI_PTYPE_TYPE 6 -#define DPI_OCI_AUTH 8 -#define DPI_OCI_DURATION_SESSION 10 -#define DPI_OCI_NUMBER_SIZE 22 -#define DPI_OCI_NO_DATA 100 -#define DPI_OCI_STRLS_CACHE_DELETE 0x0010 -#define DPI_OCI_THREADED 0x00000001 -#define DPI_OCI_OBJECT 0x00000002 -#define DPI_OCI_SODA_ATOMIC_COMMIT 0x00000001 -#define DPI_OCI_SODA_AS_STORED 0x00000002 -#define DPI_OCI_SODA_AS_AL32UTF8 0x00000004 -#define DPI_OCI_STMT_SCROLLABLE_READONLY 0x00000008 -#define DPI_OCI_STMT_CACHE 0x00000040 -#define DPI_OCI_SODA_COLL_CREATE_MAP 0x00010000 -#define DPI_OCI_SODA_INDEX_DROP_FORCE 0x00010000 -#define DPI_OCI_TRANS_TWOPHASE 0x01000000 -#define DPI_OCI_SECURE_NOTIFICATION 0x20000000 - -//----------------------------------------------------------------------------- -// Macros -//----------------------------------------------------------------------------- -#define DPI_CHECK_PTR_NOT_NULL(handle, parameter) \ - if (!parameter) { \ - dpiError__set(&error, "check parameter " #parameter, \ - DPI_ERR_NULL_POINTER_PARAMETER, #parameter); \ - return dpiGen__endPublicFn(handle, DPI_FAILURE, &error); \ - } - -#define DPI_CHECK_PTR_AND_LENGTH(handle, parameter) \ - if (!parameter && parameter ## Length > 0) { \ - dpiError__set(&error, "check parameter " #parameter, \ - DPI_ERR_PTR_LENGTH_MISMATCH, #parameter); \ - return dpiGen__endPublicFn(handle, DPI_FAILURE, &error); \ - } - - -//----------------------------------------------------------------------------- -// Enumerations -//----------------------------------------------------------------------------- - -// error numbers -typedef enum { - DPI_ERR_NO_ERR = 1000, - DPI_ERR_NO_MEMORY, - DPI_ERR_INVALID_HANDLE, - DPI_ERR_ERR_NOT_INITIALIZED, - DPI_ERR_GET_FAILED, - DPI_ERR_CREATE_ENV, - DPI_ERR_CONVERT_TEXT, - DPI_ERR_QUERY_NOT_EXECUTED, - DPI_ERR_UNHANDLED_DATA_TYPE, - DPI_ERR_INVALID_ARRAY_POSITION, - DPI_ERR_NOT_CONNECTED, - DPI_ERR_CONN_NOT_IN_POOL, - DPI_ERR_INVALID_PROXY, - DPI_ERR_NOT_SUPPORTED, - DPI_ERR_UNHANDLED_CONVERSION, - DPI_ERR_ARRAY_SIZE_TOO_BIG, - DPI_ERR_INVALID_DATE, - DPI_ERR_VALUE_IS_NULL, - DPI_ERR_ARRAY_SIZE_TOO_SMALL, - DPI_ERR_BUFFER_SIZE_TOO_SMALL, - DPI_ERR_VERSION_NOT_SUPPORTED, - DPI_ERR_INVALID_ORACLE_TYPE, - DPI_ERR_WRONG_ATTR, - DPI_ERR_NOT_COLLECTION, - DPI_ERR_INVALID_INDEX, - DPI_ERR_NO_OBJECT_TYPE, - DPI_ERR_INVALID_CHARSET, - DPI_ERR_SCROLL_OUT_OF_RS, - DPI_ERR_QUERY_POSITION_INVALID, - DPI_ERR_NO_ROW_FETCHED, - DPI_ERR_TLS_ERROR, - DPI_ERR_ARRAY_SIZE_ZERO, - DPI_ERR_EXT_AUTH_WITH_CREDENTIALS, - DPI_ERR_CANNOT_GET_ROW_OFFSET, - DPI_ERR_CONN_IS_EXTERNAL, - DPI_ERR_TRANS_ID_TOO_LARGE, - DPI_ERR_BRANCH_ID_TOO_LARGE, - DPI_ERR_COLUMN_FETCH, - DPI_ERR_STMT_CLOSED, - DPI_ERR_LOB_CLOSED, - DPI_ERR_INVALID_CHARSET_ID, - DPI_ERR_INVALID_OCI_NUMBER, - DPI_ERR_INVALID_NUMBER, - DPI_ERR_NUMBER_NO_REPR, - DPI_ERR_NUMBER_STRING_TOO_LONG, - DPI_ERR_NULL_POINTER_PARAMETER, - DPI_ERR_LOAD_LIBRARY, - DPI_ERR_LOAD_SYMBOL, - DPI_ERR_ORACLE_CLIENT_TOO_OLD, - DPI_ERR_NLS_ENV_VAR_GET, - DPI_ERR_PTR_LENGTH_MISMATCH, - DPI_ERR_NAN, - DPI_ERR_WRONG_TYPE, - DPI_ERR_BUFFER_SIZE_TOO_LARGE, - DPI_ERR_NO_EDITION_WITH_CONN_CLASS, - DPI_ERR_NO_BIND_VARS_IN_DDL, - DPI_ERR_SUBSCR_CLOSED, - DPI_ERR_NO_EDITION_WITH_NEW_PASSWORD, - DPI_ERR_UNEXPECTED_OCI_RETURN_VALUE, - DPI_ERR_EXEC_MODE_ONLY_FOR_DML, - DPI_ERR_ARRAY_VAR_NOT_SUPPORTED, - DPI_ERR_EVENTS_MODE_REQUIRED, - DPI_ERR_ORACLE_DB_TOO_OLD, - DPI_ERR_CALL_TIMEOUT, - DPI_ERR_SODA_CURSOR_CLOSED, - DPI_ERR_EXT_AUTH_INVALID_PROXY, - DPI_ERR_QUEUE_NO_PAYLOAD, - DPI_ERR_QUEUE_WRONG_PAYLOAD_TYPE, - DPI_ERR_ORACLE_CLIENT_UNSUPPORTED, - DPI_ERR_MISSING_SHARDING_KEY, - DPI_ERR_MAX -} dpiErrorNum; - -// handle types -typedef enum { - DPI_HTYPE_NONE = 4000, - DPI_HTYPE_CONN, - DPI_HTYPE_POOL, - DPI_HTYPE_STMT, - DPI_HTYPE_VAR, - DPI_HTYPE_LOB, - DPI_HTYPE_OBJECT, - DPI_HTYPE_OBJECT_TYPE, - DPI_HTYPE_OBJECT_ATTR, - DPI_HTYPE_SUBSCR, - DPI_HTYPE_DEQ_OPTIONS, - DPI_HTYPE_ENQ_OPTIONS, - DPI_HTYPE_MSG_PROPS, - DPI_HTYPE_ROWID, - DPI_HTYPE_CONTEXT, - DPI_HTYPE_SODA_COLL, - DPI_HTYPE_SODA_COLL_CURSOR, - DPI_HTYPE_SODA_DB, - DPI_HTYPE_SODA_DOC, - DPI_HTYPE_SODA_DOC_CURSOR, - DPI_HTYPE_QUEUE, - DPI_HTYPE_MAX -} dpiHandleTypeNum; - - -//----------------------------------------------------------------------------- -// Mutex definitions -//----------------------------------------------------------------------------- -#ifdef _WIN32 - typedef CRITICAL_SECTION dpiMutexType; - #define dpiMutex__initialize(m) InitializeCriticalSection(&m) - #define dpiMutex__destroy(m) DeleteCriticalSection(&m) - #define dpiMutex__acquire(m) EnterCriticalSection(&m) - #define dpiMutex__release(m) LeaveCriticalSection(&m) -#else - typedef pthread_mutex_t dpiMutexType; - #define dpiMutex__initialize(m) pthread_mutex_init(&m, NULL) - #define dpiMutex__destroy(m) pthread_mutex_destroy(&m) - #define dpiMutex__acquire(m) pthread_mutex_lock(&m) - #define dpiMutex__release(m) pthread_mutex_unlock(&m) -#endif - - -//----------------------------------------------------------------------------- -// old type definitions (to be dropped) -//----------------------------------------------------------------------------- - -// structure used for creating pools (3.0) -typedef struct { - uint32_t minSessions; - uint32_t maxSessions; - uint32_t sessionIncrement; - int pingInterval; - int pingTimeout; - int homogeneous; - int externalAuth; - dpiPoolGetMode getMode; - const char *outPoolName; - uint32_t outPoolNameLength; - uint32_t timeout; - uint32_t waitTimeout; - uint32_t maxLifetimeSession; -} dpiPoolCreateParams__v30; - -// structure used for creating pools (3.2) -typedef struct { - uint32_t minSessions; - uint32_t maxSessions; - uint32_t sessionIncrement; - int pingInterval; - int pingTimeout; - int homogeneous; - int externalAuth; - dpiPoolGetMode getMode; - const char *outPoolName; - uint32_t outPoolNameLength; - uint32_t timeout; - uint32_t waitTimeout; - uint32_t maxLifetimeSession; - const char *plsqlFixupCallback; - uint32_t plsqlFixupCallbackLength; -} dpiPoolCreateParams__v32; - -// structure used for creating connections (3.0) -typedef struct { - dpiAuthMode authMode; - const char *connectionClass; - uint32_t connectionClassLength; - dpiPurity purity; - const char *newPassword; - uint32_t newPasswordLength; - dpiAppContext *appContext; - uint32_t numAppContext; - int externalAuth; - void *externalHandle; - dpiPool *pool; - const char *tag; - uint32_t tagLength; - int matchAnyTag; - const char *outTag; - uint32_t outTagLength; - int outTagFound; - dpiShardingKeyColumn *shardingKeyColumns; - uint8_t numShardingKeyColumns; - dpiShardingKeyColumn *superShardingKeyColumns; - uint8_t numSuperShardingKeyColumns; -} dpiConnCreateParams__v30; - -// structure used for creating subscriptions (3.0 and 3.1) -typedef struct { - dpiSubscrNamespace subscrNamespace; - dpiSubscrProtocol protocol; - dpiSubscrQOS qos; - dpiOpCode operations; - uint32_t portNumber; - uint32_t timeout; - const char *name; - uint32_t nameLength; - dpiSubscrCallback callback; - void *callbackContext; - const char *recipientName; - uint32_t recipientNameLength; - const char *ipAddress; - uint32_t ipAddressLength; - uint8_t groupingClass; - uint32_t groupingValue; - uint8_t groupingType; -} dpiSubscrCreateParams__v30; - -// structure used for creating subscriptions (3.2) -typedef struct { - dpiSubscrNamespace subscrNamespace; - dpiSubscrProtocol protocol; - dpiSubscrQOS qos; - dpiOpCode operations; - uint32_t portNumber; - uint32_t timeout; - const char *name; - uint32_t nameLength; - dpiSubscrCallback callback; - void *callbackContext; - const char *recipientName; - uint32_t recipientNameLength; - const char *ipAddress; - uint32_t ipAddressLength; - uint8_t groupingClass; - uint32_t groupingValue; - uint8_t groupingType; - uint64_t outRegId; -} dpiSubscrCreateParams__v32; - - -//----------------------------------------------------------------------------- -// OCI type definitions -//----------------------------------------------------------------------------- - -// representation of OCI Number type -typedef struct { - unsigned char value[DPI_OCI_NUMBER_SIZE]; -} dpiOciNumber; - -// representation of OCI Date type -typedef struct { - int16_t year; - uint8_t month; - uint8_t day; - uint8_t hour; - uint8_t minute; - uint8_t second; -} dpiOciDate; - -// alternative representation of OCI Date type used for sharding -typedef struct { - uint8_t century; - uint8_t year; - uint8_t month; - uint8_t day; - uint8_t hour; - uint8_t minute; - uint8_t second; -} dpiShardingOciDate; - -// representation of OCI XID type (two-phase commit) -typedef struct { - long formatID; - long gtrid_length; - long bqual_length; - char data[DPI_XA_XIDDATASIZE]; -} dpiOciXID; - - -//----------------------------------------------------------------------------- -// Internal implementation type definitions -//----------------------------------------------------------------------------- - -// used to manage a list of shared handles in a thread-safe manner; currently -// used for managing the list of open statements, LOBs and created objects for -// a connection (so that they can be closed before the connection itself is -// closed); the functions for managing this structure can be found in the file -// dpiHandleList.c; empty slots in the array are represented by a NULL handle -typedef struct { - void **handles; // array of handles managed by list - uint32_t numSlots; // length of handles array - uint32_t numUsedSlots; // actual number of managed handles - uint32_t currentPos; // next position to search - dpiMutexType mutex; // enables thread safety -} dpiHandleList; - -// used to manage a pool of shared handles in a thread-safe manner; currently -// used for managing the pool of error handles in the dpiEnv structure; the -// functions for managing this structure are found in the file dpiHandlePool.c -typedef struct { - void **handles; // array of handles managed by pool - uint32_t numSlots; // length of handles array - uint32_t numUsedSlots; // actual number of managed handles - uint32_t acquirePos; // position from which to acquire - uint32_t releasePos; // position to place released handles - dpiMutexType mutex; // enables thread safety -} dpiHandlePool; - -// used to save error information internally; one of these is stored for each -// thread using OCIThreadKeyGet() and OCIThreadKeySet() with a globally created -// OCI environment handle; it is also used when getting batch error information -// with the function dpiStmt_getBatchErrors() -typedef struct { - int32_t code; // Oracle error code or 0 - uint16_t offset; // parse error offset or row offset - dpiErrorNum errorNum; // OCPI-C error number - const char *fnName; // ODPI-C function name - const char *action; // internal action - char encoding[DPI_OCI_NLS_MAXBUFSZ]; // encoding (IANA name) - char message[DPI_MAX_ERROR_SIZE]; // buffer for storing messages - uint32_t messageLength; // length of message in buffer - int isRecoverable; // is recoverable? -} dpiErrorBuffer; - -// represents an OCI environment; a pointer to this structure is stored on each -// handle exposed publicly but it is created only when a pool is created or -// when a standalone connection is created; connections acquired from a pool -// shared the same environment as the pool; the functions for manipulating the -// environment are found in the file dpiEnv.c; all values are read-only after -// initialization of environment is complete -typedef struct { - const dpiContext *context; // context used to create environment - void *handle; // OCI environment handle - dpiMutexType mutex; // for reference count (threaded mode) - char encoding[DPI_OCI_NLS_MAXBUFSZ]; // CHAR encoding (IANA name) - int32_t maxBytesPerCharacter; // max bytes per CHAR character - uint16_t charsetId; // CHAR encoding (Oracle charset ID) - char nencoding[DPI_OCI_NLS_MAXBUFSZ]; // NCHAR encoding (IANA name) - int32_t nmaxBytesPerCharacter; // max bytes per NCHAR character - uint16_t ncharsetId; // NCHAR encoding (Oracle charset ID) - dpiHandlePool *errorHandles; // pool of OCI error handles - dpiVersionInfo *versionInfo; // OCI client version info - void *baseDate; // midnight, January 1, 1970 - int threaded; // threaded mode enabled? - int events; // events mode enabled? - int externalHandle; // external handle? -} dpiEnv; - -// used to manage all errors that take place in the library; the implementation -// for the functions that use this structure are found in dpiError.c; a pointer -// to this structure is passed to all internal functions and the first thing -// that takes place in every public function is a call to this this error -// structure -typedef struct { - dpiErrorBuffer *buffer; // buffer to store error information - void *handle; // OCI error handle or NULL - dpiEnv *env; // env which created OCI error handle -} dpiError; - -// function signature for all methods that free publicly exposed handles -typedef void (*dpiTypeFreeProc)(void*, dpiError*); - -// strcture used to provide metadata for the different types of handles exposed -// publicly; a list of these structures (defined as constants) can be found in -// the file dpiGen.c; the enumeration dpiHandleTypeNum is used to identify the -// structures instead of being used directly -typedef struct { - const char *name; // name (used in error messages) - size_t size; // size of structure, in bytes - uint32_t checkInt; // check integer (unique) - dpiTypeFreeProc freeProc; // procedure to call to free handle -} dpiTypeDef; - -// all structures exposed publicly by handle have these members -#define dpiType_HEAD \ - const dpiTypeDef *typeDef; \ - uint32_t checkInt; \ - unsigned refCount; \ - dpiEnv *env; - -// contains the base attributes that all handles exposed publicly have; generic -// functions for checking and manipulating handles are found in the file -// dpiGen.c; the check integer is used to verify the validity of the handle and -// is reset to zero when the handle is freed; the reference count is used to -// manage how many references (either publicly or internally) are held; when -// the reference count reaches zero the handle is freed -typedef struct { - dpiType_HEAD -} dpiBaseType; - -// represents the different types of Oracle data that the library supports; an -// array of these structures (defined as constants) can be found in the file -// dpiOracleType.c; the enumeration dpiOracleTypeNum is used to identify the -// structures -typedef struct dpiOracleType { - dpiOracleTypeNum oracleTypeNum; // enumeration value identifying type - dpiNativeTypeNum defaultNativeTypeNum; // default native (C) type - uint16_t oracleType; // OCI type code - uint8_t charsetForm; // specifies CHAR or NCHAR encoding - uint32_t sizeInBytes; // buffer size (fixed) or 0 (variable) - int isCharacterData; // is type character data? - int canBeInArray; // can type be in an index-by table? - int requiresPreFetch; // prefetch processing required? -} dpiOracleType; - -// represents a chunk of data that has been allocated dynamically for use in -// dynamic fetching of LONG or LONG RAW columns, or when the calling -// application wishes to use strings or raw byte strings instead of LOBs; an -// array of these chunks is found in the structure dpiDynamicBytes -typedef struct { - char *ptr; // pointer to buffer - uint32_t length; // actual length of buffer - uint32_t allocatedLength; // allocated length of buffer -} dpiDynamicBytesChunk; - -// represents a set of chunks allocated dynamically for use in dynamic fetching -// of LONG or LONG RAW columns, or when the calling application wishes to use -// strings or raw byte strings instead of LOBS -typedef struct { - uint32_t numChunks; // actual number of chunks - uint32_t allocatedChunks; // allocated number of chunks - dpiDynamicBytesChunk *chunks; // array of chunks -} dpiDynamicBytes; - -// represents a single bound variable; an array of these is retained in the -// dpiStmt structure in order to retain references to the variables that were -// bound to the statement, which ensures that the values remain valid while the -// statement is executed; the position is populated for bind by position -// (otherwise it is 0) and the name/nameLength are populated for bind by name -// (otherwise they are NULL/0) -typedef struct { - dpiVar *var; - uint32_t pos; - const char *name; - uint32_t nameLength; -} dpiBindVar; - -// intended to avoid the need for casts; contains references to LOBs, objects -// and statements (as part of dpiVar) -typedef union { - void *asHandle; - dpiObject *asObject; - dpiStmt *asStmt; - dpiLob *asLOB; - dpiRowid *asRowid; -} dpiReferenceBuffer; - -// intended to avoid the need for casts; contains the actual values that are -// bound or fetched (as part of dpiVar); it is also used for getting data into -// and out of Oracle object instances -typedef union { - void *asRaw; - char *asBytes; - float *asFloat; - double *asDouble; - int32_t *asInt32; - int64_t *asInt64; - uint64_t *asUint64; - dpiOciNumber *asNumber; - dpiOciDate *asDate; - void **asTimestamp; - void **asInterval; - void **asLobLocator; - void **asString; - void **asRawData; - void **asStmt; - void **asRowid; - int *asBoolean; - void **asObject; - void **asCollection; -} dpiOracleData; - -// intended to avoid the need for casts; contains the memory needed to supply -// buffers to Oracle when values are being transferred to or from the Oracle -// database -typedef union { - int32_t asInt32; - int64_t asInt64; - uint64_t asUint64; - float asFloat; - double asDouble; - dpiOciNumber asNumber; - dpiOciDate asDate; - int asBoolean; - void *asString; - void *asRawData; - void *asTimestamp; - void *asLobLocator; - void *asRaw; -} dpiOracleDataBuffer; - -// represents memory areas used for transferring data to and from the database -// and is used by the dpiVar structure; most statements only use one buffer, -// but DML returning statements can use multiple buffers since multiple rows -// can be returned for each execution of the statement -typedef struct { - uint32_t maxArraySize; // max number of rows in arrays - uint32_t actualArraySize; // actual number of rows in arrays - int16_t *indicator; // array of indicator values - uint16_t *returnCode; // array of return code values - uint16_t *actualLength16; // array of actual lengths (11.2 only) - uint32_t *actualLength32; // array of actual lengths (12.1+) - void **objectIndicator; // array of object indicator values - dpiReferenceBuffer *references; // array of references (specific types) - dpiDynamicBytes *dynamicBytes; // array of dynamically alloced chunks - char *tempBuffer; // buffer for numeric conversion - dpiData *externalData; // array of buffers (externally used) - dpiOracleData data; // Oracle data buffers (internal only) -} dpiVarBuffer; - -// represents memory areas used for enqueuing and dequeuing messages from -// queues -typedef struct { - uint32_t numElements; // number of elements in next arrays - dpiMsgProps **props; // array of dpiMsgProps handles - void **handles; // array of OCI msg prop handles - void **instances; // array of instances - void **indicators; // array of indicators - int16_t *rawIndicators; // array of indicators (RAW queues) - void **msgIds; // array of OCI message ids -} dpiQueueBuffer; - - -//----------------------------------------------------------------------------- -// External implementation type definitions -//----------------------------------------------------------------------------- - -// represents session pools and is exposed publicly as a handle of type -// DPI_HTYPE_POOL; the implementation for this is found in the file -// dpiPool.c -struct dpiPool { - dpiType_HEAD - void *handle; // OCI session pool handle - const char *name; // pool name (CHAR encoding) - uint32_t nameLength; // length of pool name - int pingInterval; // interval (seconds) between pings - int pingTimeout; // timeout (milliseconds) for ping - int homogeneous; // homogeneous pool? - int externalAuth; // use external authentication? -}; - -// represents connections to the database and is exposed publicly as a handle -// of type DPI_HTYPE_CONN; the implementation for this is found in the file -// dpiConn.c; the list of statement, LOB and object handles created by this -// connection is maintained and all of these are automatically closed when the -// connection itself is closed (in order to avoid memory leaks and segfaults if -// the correct order is not observed) -struct dpiConn { - dpiType_HEAD - dpiPool *pool; // pool acquired from or NULL - void *handle; // OCI service context handle - void *serverHandle; // OCI server handle - void *sessionHandle; // OCI session handle - void *shardingKey; // OCI sharding key descriptor - void *superShardingKey; // OCI supper sharding key descriptor - const char *releaseString; // cached release string or NULL - uint32_t releaseStringLength; // cached release string length or 0 - void *rawTDO; // cached RAW TDO - dpiVersionInfo versionInfo; // Oracle database version info - uint32_t commitMode; // commit mode (for two-phase commits) - uint16_t charsetId; // database character set ID - dpiHandleList *openStmts; // list of statements created - dpiHandleList *openLobs; // list of LOBs created - dpiHandleList *objects; // list of objects created - int externalHandle; // OCI handle provided directly? - int deadSession; // dead session (drop from pool)? - int standalone; // standalone connection (not pooled)? - int closing; // connection is being closed? -}; - -// represents the context in which all activity in the library takes place; the -// implementation for this is found in the file dpiContext.c; the minor -// version of the calling application is retained in order to adjust as needed -// for differing sizes of public structures -struct dpiContext { - dpiType_HEAD - dpiVersionInfo *versionInfo; // OCI client version info - uint8_t dpiMinorVersion; // ODPI-C minor version of application -}; - -// represents statements of all types (queries, DML, DDL, PL/SQL) and is -// exposed publicly as a handle of type DPI_HTYPE_STMT; the implementation for -// this is found in the file dpiStmt.c -struct dpiStmt { - dpiType_HEAD - dpiConn *conn; // connection which created this - uint32_t openSlotNum; // slot in connection handle list - void *handle; // OCI statement handle - dpiStmt *parentStmt; // parent statement (implicit results) - uint32_t fetchArraySize; // rows to fetch each time - uint32_t bufferRowCount; // number of rows in fetch buffers - uint32_t bufferRowIndex; // index into buffers for current row - uint32_t numQueryVars; // number of query variables - dpiVar **queryVars; // array of query variables - dpiQueryInfo *queryInfo; // array of query metadata - uint32_t allocatedBindVars; // number of allocated bind variables - uint32_t numBindVars; // actual nubmer of bind variables - dpiBindVar *bindVars; // array of bind variables - uint32_t numBatchErrors; // number of batch errors - dpiErrorBuffer *batchErrors; // array of batch errors - uint64_t rowCount; // rows affected or rows fetched so far - uint64_t bufferMinRow; // row num of first row in buffers - uint16_t statementType; // type of statement - dpiRowid *lastRowid; // rowid of last affected row - int isOwned; // owned by structure? - int hasRowsToFetch; // potentially more rows to fetch? - int scrollable; // scrollable cursor? - int isReturning; // statement has RETURNING clause? - int deleteFromCache; // drop from statement cache on close? - int closing; // statement is being closed? -}; - -// represents memory areas used for transferring data to and from the database -// and is exposed publicly as a handle of type DPI_HTYPE_VAR; the -// implementation for this is found in the file dpiVar.c; variables can be -// bound to a statement or fetched into by a statement -struct dpiVar { - dpiType_HEAD - dpiConn *conn; // connection which created this - const dpiOracleType *type; // type of data contained in variable - dpiNativeTypeNum nativeTypeNum; // native (C) type of data - int requiresPreFetch; // requires prefetch processing? - int isArray; // is an index-by table (array)? - uint32_t sizeInBytes; // size in bytes of each row - int isDynamic; // dynamically bound or defined? - dpiObjectType *objectType; // object type (or NULL) - dpiVarBuffer buffer; // main buffer for data - dpiVarBuffer *dynBindBuffers; // array of buffers (DML returning) - dpiError *error; // error (only for dynamic bind/define) -}; - -// represents large objects (CLOB, BLOB, NCLOB and BFILE) and is exposed -// publicly as a handle of type DPI_HTYPE_LOB; the implementation for this is -// found in the file dpiLob.c -struct dpiLob { - dpiType_HEAD - dpiConn *conn; // connection which created this - uint32_t openSlotNum; // slot in connection handle list - const dpiOracleType *type; // type of LOB - void *locator; // OCI LOB locator descriptor - char *buffer; // stores dir alias/name for BFILE - int closing; // is LOB being closed? -}; - -// represents object attributes of the types created by the SQL command CREATE -// OR REPLACE TYPE and is exposed publicly as a handle of type -// DPI_HTYPE_OBJECT_ATTR; the implementation for this is found in the file -// dpiObjectAttr.c -struct dpiObjectAttr { - dpiType_HEAD - dpiObjectType *belongsToType; // type attribute belongs to - const char *name; // name of attribute (CHAR encoding) - uint32_t nameLength; // length of name of attribute - dpiDataTypeInfo typeInfo; // attribute data type info -}; - -// represents types created by the SQL command CREATE OR REPLACE TYPE and is -// exposed publicly as a handle of type DPI_HTYPE_OBJECT_TYPE; the -// implementation for this is found in the file dpiObjectType.c -struct dpiObjectType { - dpiType_HEAD - dpiConn *conn; // connection which created this - void *tdo; // OCI type descriptor object - uint16_t typeCode; // OCI type code - const char *schema; // schema owning type (CHAR encoding) - uint32_t schemaLength; // length of schema owning type - const char *name; // name of type (CHAR encoding) - uint32_t nameLength; // length of name of type - dpiDataTypeInfo elementTypeInfo; // type info of elements of collection - int isCollection; // is type a collection? - uint16_t numAttributes; // number of attributes type has -}; - -// represents objects of the types created by the SQL command CREATE OR REPLACE -// TYPE and is exposed publicly as a handle of type DPI_HTYPE_OBJECT; the -// implementation for this is found in the file dpiObject.c -struct dpiObject { - dpiType_HEAD - dpiObjectType *type; // type of object - uint32_t openSlotNum; // slot in connection handle list - void *instance; // OCI instance - void *indicator; // OCI indicator - dpiObject *dependsOnObj; // extracted from parent obj, or NULL - int freeIndicator; // should indicator be freed? - int closing; // is object being closed? -}; - -// represents the unique identifier of a row in Oracle Database and is exposed -// publicly as a handle of type DPI_HTYPE_ROWID; the implementation for this is -// found in the file dpiRowid.c -struct dpiRowid { - dpiType_HEAD - void *handle; // OCI rowid descriptor - char *buffer; // cached string rep (or NULL) - uint16_t bufferLength; // length of string rep (or 0) -}; - -// represents a subscription to events such as continuous query notification -// (CQN) and object change notification and is exposed publicly as a handle of -// type DPI_HTYPE_SUBSCR; the implementation for this is found in the file -// dpiSubscr.c -struct dpiSubscr { - dpiType_HEAD - dpiConn *conn; // connection which created this - void *handle; // OCI subscription handle - dpiMutexType mutex; // enables thread safety - dpiSubscrNamespace subscrNamespace; // OCI namespace - dpiSubscrQOS qos; // quality of service flags - dpiSubscrCallback callback; // callback when event is propagated - void *callbackContext; // context pointer for callback - int clientInitiated; // client initiated? - int registered; // registered with database? -}; - -// represents the available options for dequeueing messages when using advanced -// queueing and is exposed publicly as a handle of type DPI_HTYPE_DEQ_OPTIONS; -// the implementation for this is found in dpiDeqOptions.c -struct dpiDeqOptions { - dpiType_HEAD - dpiConn *conn; // connection which created this - void *handle; // OCI dequeue options handle -}; - -// represents the available options for enqueueing messages when using advanced -// queueing and is exposed publicly as a handle of type DPI_HTYPE_ENQ_OPTIONS; -// the implementation for this is found in dpiEnqOptions.c -struct dpiEnqOptions { - dpiType_HEAD - dpiConn *conn; // connection which created this - void *handle; // OCI enqueue options handle -}; - -// represents the available properties for messages when using advanced queuing -// and is exposed publicly as a handle of type DPI_HTYPE_MSG_PROPS; the -// implementation for this is found in the file dpiMsgProps.c -struct dpiMsgProps { - dpiType_HEAD - dpiConn *conn; // connection which created this - void *handle; // OCI message properties handle - dpiObject *payloadObj; // payload (object) - void *payloadRaw; // payload (RAW) - void *msgIdRaw; // message ID (RAW) -}; - -// represents SODA collections and is exposed publicly as a handle of type -// DPI_HTYPE_SODA_COLL; the implementation for this is found in the file -// dpiSodaColl.c -struct dpiSodaColl { - dpiType_HEAD - dpiSodaDb *db; // database which created this - void *handle; // OCI SODA collection handle - int binaryContent; // content stored in BLOB? -}; - -// represents cursors that iterate over SODA collections and is exposed -// publicly as a handle of type DPI_HTYPE_SODA_COLL_CURSOR; the implementation -// for this is found in the file dpiSodaCollCursor.c -struct dpiSodaCollCursor { - dpiType_HEAD - dpiSodaDb *db; // database which created this - void *handle; // OCI SODA collection cursor handle -}; - -// represents a SODA database (contains SODA collections) and is exposed -// publicly as a handle of type DPI_HTYPE_SODA_DB; the implementation for this -// is found in the file dpiSodaDb.c -struct dpiSodaDb { - dpiType_HEAD - dpiConn *conn; // connection which created this -}; - -// represents a SODA document and is exposed publicly as a handle of type -// DPI_HTYPE_SODA_DOC; the implementation for this is found in the file -// dpiSodaDoc.c -struct dpiSodaDoc { - dpiType_HEAD - dpiSodaDb *db; // database which created this - void *handle; // OCI SODA document handle - int binaryContent; // binary content? -}; - -// represents a SODA document cursor and is exposed publicly as a handle of -// type DPI_HTYPE_SODA_DOC_CURSOR; the implementation for this is found in the -// file dpiSodaDocCursor.c -struct dpiSodaDocCursor { - dpiType_HEAD - dpiSodaColl *coll; // collection which created this - void *handle; // OCI SODA document cursor handle -}; - -// represents a queue used in AQ (advanced queuing) and is exposed publicly as -// a handle of type DPI_HTYPE_QUEUE; the implementation for this is found in -// the file dpiQueue.c -struct dpiQueue { - dpiType_HEAD - dpiConn *conn; // connection which created this - const char *name; // name of the queue (NULL-terminated) - dpiObjectType *payloadType; // object type (for object payloads) - dpiDeqOptions *deqOptions; // dequeue options - dpiEnqOptions *enqOptions; // enqueue options - dpiQueueBuffer buffer; // buffer area -}; - - -//----------------------------------------------------------------------------- -// definition of internal dpiContext methods -//----------------------------------------------------------------------------- -void dpiContext__initCommonCreateParams(dpiCommonCreateParams *params); -void dpiContext__initConnCreateParams(dpiConnCreateParams *params); -void dpiContext__initPoolCreateParams(dpiPoolCreateParams *params); -void dpiContext__initSodaOperOptions(dpiSodaOperOptions *options); -void dpiContext__initSubscrCreateParams(dpiSubscrCreateParams *params); - - -//----------------------------------------------------------------------------- -// definition of internal dpiDataBuffer methods -//----------------------------------------------------------------------------- -int dpiDataBuffer__fromOracleDate(dpiDataBuffer *data, - dpiOciDate *oracleValue); -int dpiDataBuffer__fromOracleDateAsDouble(dpiDataBuffer *data, - dpiEnv *env, dpiError *error, dpiOciDate *oracleValue); -int dpiDataBuffer__fromOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue); -int dpiDataBuffer__fromOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue); -int dpiDataBuffer__fromOracleNumberAsDouble(dpiDataBuffer *data, - dpiError *error, void *oracleValue); -int dpiDataBuffer__fromOracleNumberAsInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue); -int dpiDataBuffer__fromOracleNumberAsText(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue); -int dpiDataBuffer__fromOracleNumberAsUnsignedInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue); -int dpiDataBuffer__fromOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue, int withTZ); -int dpiDataBuffer__fromOracleTimestampAsDouble(dpiDataBuffer *data, - dpiEnv *env, dpiError *error, void *oracleValue); -int dpiDataBuffer__toOracleDate(dpiDataBuffer *data, dpiOciDate *oracleValue); -int dpiDataBuffer__toOracleDateFromDouble(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, dpiOciDate *oracleValue); -int dpiDataBuffer__toOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue); -int dpiDataBuffer__toOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue); -int dpiDataBuffer__toOracleNumberFromDouble(dpiDataBuffer *data, - dpiError *error, void *oracleValue); -int dpiDataBuffer__toOracleNumberFromInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue); -int dpiDataBuffer__toOracleNumberFromText(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue); -int dpiDataBuffer__toOracleNumberFromUnsignedInteger(dpiDataBuffer *data, - dpiError *error, void *oracleValue); -int dpiDataBuffer__toOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, - dpiError *error, void *oracleValue, int withTZ); -int dpiDataBuffer__toOracleTimestampFromDouble(dpiDataBuffer *data, - dpiEnv *env, dpiError *error, void *oracleValue); - - -//----------------------------------------------------------------------------- -// definition of internal dpiEnv methods -//----------------------------------------------------------------------------- -void dpiEnv__free(dpiEnv *env, dpiError *error); -int dpiEnv__init(dpiEnv *env, const dpiContext *context, - const dpiCommonCreateParams *params, void *externalHandle, - dpiError *error); -int dpiEnv__getEncodingInfo(dpiEnv *env, dpiEncodingInfo *info); - - -//----------------------------------------------------------------------------- -// definition of internal dpiError methods -//----------------------------------------------------------------------------- -int dpiError__getInfo(dpiError *error, dpiErrorInfo *info); -int dpiError__initHandle(dpiError *error); -int dpiError__set(dpiError *error, const char *context, dpiErrorNum errorNum, - ...); -int dpiError__setFromOCI(dpiError *error, int status, dpiConn *conn, - const char *action); - - -//----------------------------------------------------------------------------- -// definition of internal dpiGen methods -//----------------------------------------------------------------------------- -int dpiGen__addRef(void *ptr, dpiHandleTypeNum typeNum, const char *fnName); -int dpiGen__allocate(dpiHandleTypeNum typeNum, dpiEnv *env, void **handle, - dpiError *error); -int dpiGen__checkHandle(const void *ptr, dpiHandleTypeNum typeNum, - const char *context, dpiError *error); -int dpiGen__endPublicFn(const void *ptr, int returnValue, dpiError *error); -int dpiGen__release(void *ptr, dpiHandleTypeNum typeNum, const char *fnName); -void dpiGen__setRefCount(void *ptr, dpiError *error, int increment); -int dpiGen__startPublicFn(const void *ptr, dpiHandleTypeNum typeNum, - const char *fnName, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiGlobal methods -//----------------------------------------------------------------------------- -int dpiGlobal__initError(const char *fnName, dpiError *error); -int dpiGlobal__lookupCharSet(const char *name, uint16_t *charsetId, - dpiError *error); -int dpiGlobal__lookupEncoding(uint16_t charsetId, char *encoding, - dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiOracleType methods -//----------------------------------------------------------------------------- -const dpiOracleType *dpiOracleType__getFromNum(dpiOracleTypeNum oracleTypeNum, - dpiError *error); -int dpiOracleType__populateTypeInfo(dpiConn *conn, void *handle, - uint32_t handleType, dpiDataTypeInfo *info, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiConn methods -//----------------------------------------------------------------------------- -int dpiConn__checkConnected(dpiConn *conn, dpiError *error); -int dpiConn__create(dpiConn *conn, const dpiContext *context, - const char *userName, uint32_t userNameLength, const char *password, - uint32_t passwordLength, const char *connectString, - uint32_t connectStringLength, dpiPool *pool, - const dpiCommonCreateParams *commonParams, - dpiConnCreateParams *createParams, dpiError *error); -void dpiConn__free(dpiConn *conn, dpiError *error); -int dpiConn__getRawTDO(dpiConn *conn, dpiError *error); -int dpiConn__getServerVersion(dpiConn *conn, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiPool methods -//----------------------------------------------------------------------------- -int dpiPool__acquireConnection(dpiPool *pool, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - dpiConnCreateParams *params, dpiConn **conn, dpiError *error); -void dpiPool__free(dpiPool *pool, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiStmt methods -//----------------------------------------------------------------------------- -int dpiStmt__allocate(dpiConn *conn, int scrollable, dpiStmt **stmt, - dpiError *error); -int dpiStmt__close(dpiStmt *stmt, const char *tag, uint32_t tagLength, - int propagateErrors, dpiError *error); -void dpiStmt__free(dpiStmt *stmt, dpiError *error); -int dpiStmt__init(dpiStmt *stmt, dpiError *error); -int dpiStmt__prepare(dpiStmt *stmt, const char *sql, uint32_t sqlLength, - const char *tag, uint32_t tagLength, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiVar methods -//----------------------------------------------------------------------------- -int dpiVar__allocate(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, - dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, - int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, - dpiData **data, dpiError *error); -int dpiVar__convertToLob(dpiVar *var, dpiError *error); -int dpiVar__copyData(dpiVar *var, uint32_t pos, dpiData *sourceData, - dpiError *error); -int32_t dpiVar__defineCallback(dpiVar *var, void *defnp, uint32_t iter, - void **bufpp, uint32_t **alenpp, uint8_t *piecep, void **indpp, - uint16_t **rcodepp); -int dpiVar__extendedPreFetch(dpiVar *var, dpiVarBuffer *buffer, - dpiError *error); -void dpiVar__free(dpiVar *var, dpiError *error); -int32_t dpiVar__inBindCallback(dpiVar *var, void *bindp, uint32_t iter, - uint32_t index, void **bufpp, uint32_t *alenp, uint8_t *piecep, - void **indpp); -int dpiVar__getValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, - int inFetch, dpiError *error); -int dpiVar__setValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, - dpiData *data, dpiError *error); -int32_t dpiVar__outBindCallback(dpiVar *var, void *bindp, uint32_t iter, - uint32_t index, void **bufpp, uint32_t **alenpp, uint8_t *piecep, - void **indpp, uint16_t **rcodepp); - - -//----------------------------------------------------------------------------- -// definition of internal dpiLob methods -//----------------------------------------------------------------------------- -int dpiLob__allocate(dpiConn *conn, const dpiOracleType *type, dpiLob **lob, - dpiError *error); -int dpiLob__close(dpiLob *lob, int propagateErrors, dpiError *error); -void dpiLob__free(dpiLob *lob, dpiError *error); -int dpiLob__readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, - char *value, uint64_t *valueLength, dpiError *error); -int dpiLob__setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength, - dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiObject methods -//----------------------------------------------------------------------------- -int dpiObject__allocate(dpiObjectType *objType, void *instance, - void *indicator, dpiObject *dependsOnObj, dpiObject **obj, - dpiError *error); -int dpiObject__close(dpiObject *obj, int propagateErrors, dpiError *error); -void dpiObject__free(dpiObject *obj, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiObjectType methods -//----------------------------------------------------------------------------- -int dpiObjectType__allocate(dpiConn *conn, void *param, - uint32_t nameAttribute, dpiObjectType **objType, dpiError *error); -void dpiObjectType__free(dpiObjectType *objType, dpiError *error); -int dpiObjectType__isXmlType(dpiObjectType *objType); - - -//----------------------------------------------------------------------------- -// definition of internal dpiObjectAttr methods -//----------------------------------------------------------------------------- -int dpiObjectAttr__allocate(dpiObjectType *objType, void *param, - dpiObjectAttr **attr, dpiError *error); -int dpiObjectAttr__check(dpiObjectAttr *attr, dpiError *error); -void dpiObjectAttr__free(dpiObjectAttr *attr, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiRowid methods -//----------------------------------------------------------------------------- -int dpiRowid__allocate(dpiConn *conn, dpiRowid **rowid, dpiError *error); -void dpiRowid__free(dpiRowid *rowid, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiSubscr methods -//----------------------------------------------------------------------------- -void dpiSubscr__free(dpiSubscr *subscr, dpiError *error); -int dpiSubscr__create(dpiSubscr *subscr, dpiConn *conn, - dpiSubscrCreateParams *params, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiDeqOptions methods -//----------------------------------------------------------------------------- -int dpiDeqOptions__create(dpiDeqOptions *options, dpiConn *conn, - dpiError *error); -void dpiDeqOptions__free(dpiDeqOptions *options, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiEnqOptions methods -//----------------------------------------------------------------------------- -int dpiEnqOptions__create(dpiEnqOptions *options, dpiConn *conn, - dpiError *error); -void dpiEnqOptions__free(dpiEnqOptions *options, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiSodaColl methods -//----------------------------------------------------------------------------- -int dpiSodaColl__allocate(dpiSodaDb *db, void *handle, dpiSodaColl **coll, - dpiError *error); -void dpiSodaColl__free(dpiSodaColl *coll, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiSodaCollCursor methods -//----------------------------------------------------------------------------- -int dpiSodaCollCursor__allocate(dpiSodaDb *db, void *handle, - dpiSodaCollCursor **cursor, dpiError *error); -void dpiSodaCollCursor__free(dpiSodaCollCursor *cursor, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiSodaDb methods -//----------------------------------------------------------------------------- -void dpiSodaDb__free(dpiSodaDb *db, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiSodaDoc methods -//----------------------------------------------------------------------------- -int dpiSodaDoc__allocate(dpiSodaDb *db, void *handle, dpiSodaDoc **doc, - dpiError *error); -void dpiSodaDoc__free(dpiSodaDoc *doc, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiSodaDocCursor methods -//----------------------------------------------------------------------------- -int dpiSodaDocCursor__allocate(dpiSodaColl *coll, void *handle, - dpiSodaDocCursor **cursor, dpiError *error); -void dpiSodaDocCursor__free(dpiSodaDocCursor *cursor, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiQueue methods -//----------------------------------------------------------------------------- -int dpiQueue__allocate(dpiConn *conn, const char *name, uint32_t nameLength, - dpiObjectType *payloadType, dpiQueue **queue, dpiError *error); -void dpiQueue__free(dpiQueue *queue, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiOci methods -//----------------------------------------------------------------------------- -int dpiOci__aqDeq(dpiConn *conn, const char *queueName, void *options, - void *msgProps, void *payloadType, void **payload, void **payloadInd, - void **msgId, dpiError *error); -int dpiOci__aqDeqArray(dpiConn *conn, const char *queueName, void *options, - uint32_t *numIters, void **msgProps, void *payloadType, void **payload, void **payloadInd, void **msgId, dpiError *error); -int dpiOci__aqEnq(dpiConn *conn, const char *queueName, void *options, - void *msgProps, void *payloadType, void **payload, void **payloadInd, - void **msgId, dpiError *error); -int dpiOci__aqEnqArray(dpiConn *conn, const char *queueName, void *options, - uint32_t *numIters, void **msgProps, void *payloadType, void **payload, - void **payloadInd, void **msgId, dpiError *error); -int dpiOci__arrayDescriptorAlloc(void *envHandle, void **handle, - uint32_t handleType, uint32_t arraySize, dpiError *error); -int dpiOci__arrayDescriptorFree(void **handle, uint32_t handleType); -int dpiOci__attrGet(const void *handle, uint32_t handleType, void *ptr, - uint32_t *size, uint32_t attribute, const char *action, - dpiError *error); -int dpiOci__attrSet(void *handle, uint32_t handleType, void *ptr, - uint32_t size, uint32_t attribute, const char *action, - dpiError *error); -int dpiOci__bindByName(dpiStmt *stmt, void **bindHandle, const char *name, - int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error); -int dpiOci__bindByName2(dpiStmt *stmt, void **bindHandle, const char *name, - int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error); -int dpiOci__bindByPos(dpiStmt *stmt, void **bindHandle, uint32_t pos, - int dynamicBind, dpiVar *var, dpiError *error); -int dpiOci__bindByPos2(dpiStmt *stmt, void **bindHandle, uint32_t pos, - int dynamicBind, dpiVar *var, dpiError *error); -int dpiOci__bindDynamic(dpiVar *var, void *bindHandle, dpiError *error); -int dpiOci__bindObject(dpiVar *var, void *bindHandle, dpiError *error); -int dpiOci__break(dpiConn *conn, dpiError *error); -void dpiOci__clientVersion(dpiContext *context); -int dpiOci__collAppend(dpiConn *conn, const void *elem, const void *elemInd, - void *coll, dpiError *error); -int dpiOci__collAssignElem(dpiConn *conn, int32_t index, const void *elem, - const void *elemInd, void *coll, dpiError *error); -int dpiOci__collGetElem(dpiConn *conn, void *coll, int32_t index, int *exists, - void **elem, void **elemInd, dpiError *error); -int dpiOci__collSize(dpiConn *conn, void *coll, int32_t *size, - dpiError *error); -int dpiOci__collTrim(dpiConn *conn, uint32_t numToTrim, void *coll, - dpiError *error); -int dpiOci__contextGetValue(dpiConn *conn, const char *key, uint32_t keyLength, - void **value, int checkError, dpiError *error); -int dpiOci__contextSetValue(dpiConn *conn, const char *key, uint32_t keyLength, - void *value, int checkError, dpiError *error); -int dpiOci__dateTimeConstruct(void *envHandle, void *handle, int16_t year, - uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, - uint8_t second, uint32_t fsecond, const char *tz, size_t tzLength, - dpiError *error); -int dpiOci__dateTimeConvert(void *envHandle, void *inDate, void *outDate, - dpiError *error); -int dpiOci__dateTimeGetDate(void *envHandle, void *handle, int16_t *year, - uint8_t *month, uint8_t *day, dpiError *error); -int dpiOci__dateTimeGetTime(void *envHandle, void *handle, uint8_t *hour, - uint8_t *minute, uint8_t *second, uint32_t *fsecond, dpiError *error); -int dpiOci__dateTimeGetTimeZoneOffset(void *envHandle, void *handle, - int8_t *tzHourOffset, int8_t *tzMinuteOffset, dpiError *error); -int dpiOci__dateTimeIntervalAdd(void *envHandle, void *handle, void *interval, - void *outHandle, dpiError *error); -int dpiOci__dateTimeSubtract(void *envHandle, void *handle1, void *handle2, - void *interval, dpiError *error); -int dpiOci__dbShutdown(dpiConn *conn, uint32_t mode, dpiError *error); -int dpiOci__dbStartup(dpiConn *conn, uint32_t mode, dpiError *error); -int dpiOci__defineByPos(dpiStmt *stmt, void **defineHandle, uint32_t pos, - dpiVar *var, dpiError *error); -int dpiOci__defineByPos2(dpiStmt *stmt, void **defineHandle, uint32_t pos, - dpiVar *var, dpiError *error); -int dpiOci__defineDynamic(dpiVar *var, void *defineHandle, dpiError *error); -int dpiOci__defineObject(dpiVar *var, void *defineHandle, dpiError *error); -int dpiOci__describeAny(dpiConn *conn, void *obj, uint32_t objLength, - uint8_t objType, void *describeHandle, dpiError *error); -int dpiOci__descriptorAlloc(void *envHandle, void **handle, - const uint32_t handleType, const char *action, dpiError *error); -int dpiOci__descriptorFree(void *handle, uint32_t handleType); -int dpiOci__envNlsCreate(void **envHandle, uint32_t mode, uint16_t charsetId, - uint16_t ncharsetId, dpiError *error); -int dpiOci__errorGet(void *handle, uint32_t handleType, uint16_t charsetId, - const char *action, dpiError *error); -int dpiOci__handleAlloc(void *envHandle, void **handle, uint32_t handleType, - const char *action, dpiError *error); -int dpiOci__handleFree(void *handle, uint32_t handleType); -int dpiOci__intervalGetDaySecond(void *envHandle, int32_t *day, int32_t *hour, - int32_t *minute, int32_t *second, int32_t *fsecond, - const void *interval, dpiError *error); -int dpiOci__intervalGetYearMonth(void *envHandle, int32_t *year, - int32_t *month, const void *interval, dpiError *error); -int dpiOci__intervalSetDaySecond(void *envHandle, int32_t day, int32_t hour, - int32_t minute, int32_t second, int32_t fsecond, void *interval, - dpiError *error); -int dpiOci__intervalSetYearMonth(void *envHandle, int32_t year, int32_t month, - void *interval, dpiError *error); -int dpiOci__lobClose(dpiLob *lob, dpiError *error); -int dpiOci__lobCreateTemporary(dpiLob *lob, dpiError *error); -int dpiOci__lobFileExists(dpiLob *lob, int *exists, dpiError *error); -int dpiOci__lobFileGetName(dpiLob *lob, char *dirAlias, - uint16_t *dirAliasLength, char *name, uint16_t *nameLength, - dpiError *error); -int dpiOci__lobFileSetName(dpiLob *lob, const char *dirAlias, - uint16_t dirAliasLength, const char *name, uint16_t nameLength, - dpiError *error); -int dpiOci__lobFreeTemporary(dpiConn *conn, void *lobLocator, int checkError, - dpiError *error); -int dpiOci__lobGetChunkSize(dpiLob *lob, uint32_t *size, dpiError *error); -int dpiOci__lobGetLength2(dpiLob *lob, uint64_t *size, dpiError *error); -int dpiOci__lobIsOpen(dpiLob *lob, int *isOpen, dpiError *error); -int dpiOci__lobIsTemporary(dpiLob *lob, int *isTemporary, int checkError, - dpiError *error); -int dpiOci__lobLocatorAssign(dpiLob *lob, void **copiedHandle, - dpiError *error); -int dpiOci__lobOpen(dpiLob *lob, dpiError *error); -int dpiOci__lobRead2(dpiLob *lob, uint64_t offset, uint64_t *amountInBytes, - uint64_t *amountInChars, char *buffer, uint64_t bufferLength, - dpiError *error); -int dpiOci__lobTrim2(dpiLob *lob, uint64_t newLength, dpiError *error); -int dpiOci__lobWrite2(dpiLob *lob, uint64_t offset, const char *value, - uint64_t valueLength, dpiError *error); -int dpiOci__memoryAlloc(dpiConn *conn, void **ptr, uint32_t size, - int checkError, dpiError *error); -int dpiOci__memoryFree(dpiConn *conn, void *ptr, dpiError *error); -int dpiOci__nlsCharSetConvert(void *envHandle, uint16_t destCharsetId, - char *dest, size_t destLength, uint16_t sourceCharsetId, - const char *source, size_t sourceLength, size_t *resultSize, - dpiError *error); -int dpiOci__nlsCharSetIdToName(void *envHandle, char *buf, size_t bufLength, - uint16_t charsetId, dpiError *error); -int dpiOci__nlsCharSetNameToId(void *envHandle, const char *name, - uint16_t *charsetId, dpiError *error); -int dpiOci__nlsEnvironmentVariableGet(uint16_t item, void *value, - dpiError *error); -int dpiOci__nlsNameMap(void *envHandle, char *buf, size_t bufLength, - const char *source, uint32_t flag, dpiError *error); -int dpiOci__nlsNumericInfoGet(void *envHandle, int32_t *value, uint16_t item, - dpiError *error); -int dpiOci__numberFromInt(const void *value, unsigned int valueLength, - unsigned int flags, void *number, dpiError *error); -int dpiOci__numberFromReal(const double value, void *number, dpiError *error); -int dpiOci__numberToInt(void *number, void *value, unsigned int valueLength, - unsigned int flags, dpiError *error); -int dpiOci__numberToReal(double *value, void *number, dpiError *error); -int dpiOci__objectCopy(dpiObject *obj, void *sourceInstance, - void *sourceIndicator, dpiError *error); -int dpiOci__objectFree(void *envHandle, void *data, int checkError, - dpiError *error); -int dpiOci__objectGetAttr(dpiObject *obj, dpiObjectAttr *attr, - int16_t *scalarValueIndicator, void **valueIndicator, void **value, - void **tdo, dpiError *error); -int dpiOci__objectGetInd(dpiObject *obj, dpiError *error); -int dpiOci__objectNew(dpiObject *obj, dpiError *error); -int dpiOci__objectPin(void *envHandle, void *objRef, void **obj, - dpiError *error); -int dpiOci__objectSetAttr(dpiObject *obj, dpiObjectAttr *attr, - int16_t scalarValueIndicator, void *valueIndicator, const void *value, - dpiError *error); -int dpiOci__paramGet(const void *handle, uint32_t handleType, void **parameter, - uint32_t pos, const char *action, dpiError *error); -int dpiOci__passwordChange(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *oldPassword, - uint32_t oldPasswordLength, const char *newPassword, - uint32_t newPasswordLength, uint32_t mode, dpiError *error); -int dpiOci__ping(dpiConn *conn, dpiError *error); -int dpiOci__rawAssignBytes(void *envHandle, const char *value, - uint32_t valueLength, void **handle, dpiError *error); -int dpiOci__rawPtr(void *envHandle, void *handle, void **ptr); -int dpiOci__rawResize(void *envHandle, void **handle, uint32_t newSize, - dpiError *error); -int dpiOci__rawSize(void *envHandle, void *handle, uint32_t *size); -int dpiOci__rowidToChar(dpiRowid *rowid, char *buffer, uint16_t *bufferSize, - dpiError *error); -int dpiOci__serverAttach(dpiConn *conn, const char *connectString, - uint32_t connectStringLength, dpiError *error); -int dpiOci__serverDetach(dpiConn *conn, int checkError, dpiError *error); -int dpiOci__serverRelease(dpiConn *conn, char *buffer, uint32_t bufferSize, - uint32_t *version, dpiError *error); -int dpiOci__sessionBegin(dpiConn *conn, uint32_t credentialType, - uint32_t mode, dpiError *error); -int dpiOci__sessionEnd(dpiConn *conn, int checkError, dpiError *error); -int dpiOci__sessionGet(void *envHandle, void **handle, void *authInfo, - const char *connectString, uint32_t connectStringLength, - const char *tag, uint32_t tagLength, const char **outTag, - uint32_t *outTagLength, int *found, uint32_t mode, dpiError *error); -int dpiOci__sessionPoolCreate(dpiPool *pool, const char *connectString, - uint32_t connectStringLength, uint32_t minSessions, - uint32_t maxSessions, uint32_t sessionIncrement, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - uint32_t mode, dpiError *error); -int dpiOci__sessionPoolDestroy(dpiPool *pool, uint32_t mode, int checkError, - dpiError *error); -int dpiOci__sessionRelease(dpiConn *conn, const char *tag, uint32_t tagLength, - uint32_t mode, int checkError, dpiError *error); -int dpiOci__shardingKeyColumnAdd(void *shardingKey, void *col, uint32_t colLen, - uint16_t colType, dpiError *error); -int dpiOci__sodaBulkInsert(dpiSodaColl *coll, void **documents, - uint32_t numDocuments, void *outputOptions, uint32_t mode, - dpiError *error); -int dpiOci__sodaBulkInsertAndGet(dpiSodaColl *coll, void **documents, - uint32_t numDocuments, void *outputOptions, uint32_t mode, - dpiError *error); -int dpiOci__sodaCollCreateWithMetadata(dpiSodaDb *db, const char *name, - uint32_t nameLength, const char *metadata, uint32_t metadataLength, - uint32_t mode, void **handle, dpiError *error); -int dpiOci__sodaCollDrop(dpiSodaColl *coll, int *isDropped, uint32_t mode, - dpiError *error); -int dpiOci__sodaCollGetNext(dpiConn *conn, void *cursorHandle, - void **collectionHandle, uint32_t mode, dpiError *error); -int dpiOci__sodaCollList(dpiSodaDb *db, const char *startingName, - uint32_t startingNameLength, void **handle, uint32_t mode, - dpiError *error); -int dpiOci__sodaCollOpen(dpiSodaDb *db, const char *name, uint32_t nameLength, - uint32_t mode, void **handle, dpiError *error); -int dpiOci__sodaDataGuideGet(dpiSodaColl *coll, void **handle, uint32_t mode, - dpiError *error); -int dpiOci__sodaDocCount(dpiSodaColl *coll, void *options, uint32_t mode, - uint64_t *count, dpiError *error); -int dpiOci__sodaDocGetNext(dpiSodaDocCursor *cursor, void **handle, - uint32_t mode, dpiError *error); -int dpiOci__sodaFind(dpiSodaColl *coll, const void *options, uint32_t flags, - uint32_t mode, void **handle, dpiError *error); -int dpiOci__sodaFindOne(dpiSodaColl *coll, const void *options, uint32_t flags, - uint32_t mode, void **handle, dpiError *error); -int dpiOci__sodaIndexCreate(dpiSodaColl *coll, const char *indexSpec, - uint32_t indexSpecLength, uint32_t mode, dpiError *error); -int dpiOci__sodaIndexDrop(dpiSodaColl *coll, const char *name, - uint32_t nameLength, uint32_t mode, int *isDropped, dpiError *error); -int dpiOci__sodaInsert(dpiSodaColl *coll, void *handle, uint32_t mode, - dpiError *error); -int dpiOci__sodaInsertAndGet(dpiSodaColl *coll, void **handle, uint32_t mode, - dpiError *error); -int dpiOci__sodaOperKeysSet(const dpiSodaOperOptions *options, void *handle, - dpiError *error); -int dpiOci__sodaRemove(dpiSodaColl *coll, void *options, uint32_t mode, - uint64_t *count, dpiError *error); -int dpiOci__sodaReplOne(dpiSodaColl *coll, const void *options, void *handle, - uint32_t mode, int *isReplaced, dpiError *error); -int dpiOci__sodaReplOneAndGet(dpiSodaColl *coll, const void *options, - void **handle, uint32_t mode, int *isReplaced, dpiError *error); -int dpiOci__sodaSave(dpiSodaColl *coll, void *handle, uint32_t mode, - dpiError *error); -int dpiOci__sodaSaveAndGet(dpiSodaColl *coll, void **handle, uint32_t mode, - dpiError *error); -int dpiOci__stmtExecute(dpiStmt *stmt, uint32_t numIters, uint32_t mode, - dpiError *error); -int dpiOci__stmtFetch2(dpiStmt *stmt, uint32_t numRows, uint16_t fetchMode, - int32_t offset, dpiError *error); -int dpiOci__stmtGetBindInfo(dpiStmt *stmt, uint32_t size, uint32_t startLoc, - int32_t *numFound, char *names[], uint8_t nameLengths[], - char *indNames[], uint8_t indNameLengths[], uint8_t isDuplicate[], - void *bindHandles[], dpiError *error); -int dpiOci__stmtGetNextResult(dpiStmt *stmt, void **handle, dpiError *error); -int dpiOci__stmtPrepare2(dpiStmt *stmt, const char *sql, uint32_t sqlLength, - const char *tag, uint32_t tagLength, dpiError *error); -int dpiOci__stmtRelease(dpiStmt *stmt, const char *tag, uint32_t tagLength, - int checkError, dpiError *error); -int dpiOci__stringAssignText(void *envHandle, const char *value, - uint32_t valueLength, void **handle, dpiError *error); -int dpiOci__stringPtr(void *envHandle, void *handle, char **ptr); -int dpiOci__stringResize(void *envHandle, void **handle, uint32_t newSize, - dpiError *error); -int dpiOci__stringSize(void *envHandle, void *handle, uint32_t *size); -int dpiOci__subscriptionRegister(dpiConn *conn, void **handle, uint32_t mode, - dpiError *error); -int dpiOci__subscriptionUnRegister(dpiConn *conn, dpiSubscr *subscr, - dpiError *error); -int dpiOci__tableDelete(dpiObject *obj, int32_t index, dpiError *error); -int dpiOci__tableExists(dpiObject *obj, int32_t index, int *exists, - dpiError *error); -int dpiOci__tableFirst(dpiObject *obj, int32_t *index, dpiError *error); -int dpiOci__tableLast(dpiObject *obj, int32_t *index, dpiError *error); -int dpiOci__tableNext(dpiObject *obj, int32_t index, int32_t *nextIndex, - int *exists, dpiError *error); -int dpiOci__tablePrev(dpiObject *obj, int32_t index, int32_t *prevIndex, - int *exists, dpiError *error); -int dpiOci__tableSize(dpiObject *obj, int32_t *size, dpiError *error); -int dpiOci__threadKeyDestroy(void *envHandle, void *errorHandle, void **key, - dpiError *error); -int dpiOci__threadKeyGet(void *envHandle, void *errorHandle, void *key, - void **value, dpiError *error); -int dpiOci__threadKeyInit(void *envHandle, void *errorHandle, void **key, - void *destroyFunc, dpiError *error); -int dpiOci__threadKeySet(void *envHandle, void *errorHandle, void *key, - void *value, dpiError *error); -int dpiOci__transCommit(dpiConn *conn, uint32_t flags, dpiError *error); -int dpiOci__transPrepare(dpiConn *conn, int *commitNeeded, dpiError *error); -int dpiOci__transRollback(dpiConn *conn, int checkError, dpiError *error); -int dpiOci__transStart(dpiConn *conn, dpiError *error); -int dpiOci__typeByFullName(dpiConn *conn, const char *name, - uint32_t nameLength, void **tdo, dpiError *error); -int dpiOci__typeByName(dpiConn *conn, const char *schema, - uint32_t schemaLength, const char *name, uint32_t nameLength, - void **tdo, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiMsgProps methods -//----------------------------------------------------------------------------- -int dpiMsgProps__allocate(dpiConn *conn, dpiMsgProps **props, dpiError *error); -void dpiMsgProps__extractMsgId(dpiMsgProps *props, const char **msgId, - uint32_t *msgIdLength); -void dpiMsgProps__free(dpiMsgProps *props, dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiHandlePool methods -//----------------------------------------------------------------------------- -int dpiHandlePool__acquire(dpiHandlePool *pool, void **handle, - dpiError *error); -int dpiHandlePool__create(dpiHandlePool **pool, dpiError *error); -void dpiHandlePool__free(dpiHandlePool *pool); -void dpiHandlePool__release(dpiHandlePool *pool, void **handle); - - -//----------------------------------------------------------------------------- -// definition of internal dpiHandleList methods -//----------------------------------------------------------------------------- -int dpiHandleList__addHandle(dpiHandleList *list, void *handle, - uint32_t *slotNum, dpiError *error); -int dpiHandleList__create(dpiHandleList **list, dpiError *error); -void dpiHandleList__free(dpiHandleList *list); -void dpiHandleList__removeHandle(dpiHandleList *list, uint32_t slotNum); - - -//----------------------------------------------------------------------------- -// definition of internal dpiUtils methods -//----------------------------------------------------------------------------- -int dpiUtils__allocateMemory(size_t numMembers, size_t memberSize, - int clearMemory, const char *action, void **ptr, dpiError *error); -int dpiUtils__checkClientVersion(dpiVersionInfo *versionInfo, - int minVersionNum, int minReleaseNum, dpiError *error); -int dpiUtils__checkDatabaseVersion(dpiConn *conn, int minVersionNum, - int minReleaseNum, dpiError *error); -void dpiUtils__clearMemory(void *ptr, size_t length); -void dpiUtils__freeMemory(void *ptr); -int dpiUtils__getAttrStringWithDup(const char *action, const void *ociHandle, - uint32_t ociHandleType, uint32_t ociAttribute, const char **value, - uint32_t *valueLength, dpiError *error); -int dpiUtils__parseNumberString(const char *value, uint32_t valueLength, - uint16_t charsetId, int *isNegative, int16_t *decimalPointIndex, - uint8_t *numDigits, uint8_t *digits, dpiError *error); -int dpiUtils__parseOracleNumber(void *oracleValue, int *isNegative, - int16_t *decimalPointIndex, uint8_t *numDigits, uint8_t *digits, - dpiError *error); -int dpiUtils__setAttributesFromCommonCreateParams(void *handle, - uint32_t handleType, const dpiCommonCreateParams *params, - dpiError *error); - - -//----------------------------------------------------------------------------- -// definition of internal dpiDebug methods -//----------------------------------------------------------------------------- -void dpiDebug__initialize(void); -void dpiDebug__print(const char *format, ...); - -#endif diff --git a/vendor/github.com/godror/godror/odpi/src/dpiLob.c b/vendor/github.com/godror/godror/odpi/src/dpiLob.c deleted file mode 100644 index 55dfcebad6e..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiLob.c +++ /dev/null @@ -1,504 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiLob.c -// Implementation of LOB data. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiLob__allocate() [INTERNAL] -// Allocate and initialize LOB object. -//----------------------------------------------------------------------------- -int dpiLob__allocate(dpiConn *conn, const dpiOracleType *type, dpiLob **lob, - dpiError *error) -{ - dpiLob *tempLob; - - if (dpiGen__allocate(DPI_HTYPE_LOB, conn->env, (void**) &tempLob, - error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(conn, error, 1); - tempLob->conn = conn; - tempLob->type = type; - if (dpiOci__descriptorAlloc(conn->env->handle, &tempLob->locator, - DPI_OCI_DTYPE_LOB, "allocate descriptor", error) < 0) { - dpiLob__free(tempLob, error); - return DPI_FAILURE; - } - if (dpiHandleList__addHandle(conn->openLobs, tempLob, - &tempLob->openSlotNum, error) < 0) { - dpiOci__descriptorFree(tempLob->locator, DPI_OCI_DTYPE_LOB); - tempLob->locator = NULL; - dpiLob__free(tempLob, error); - return DPI_FAILURE; - } - - *lob = tempLob; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiLob__check() [INTERNAL] -// Check that the LOB is valid and get an error handle for subsequent calls. -//----------------------------------------------------------------------------- -static int dpiLob__check(dpiLob *lob, const char *fnName, dpiError *error) -{ - if (dpiGen__startPublicFn(lob, DPI_HTYPE_LOB, fnName, error) < 0) - return DPI_FAILURE; - if (!lob->locator) - return dpiError__set(error, "check closed", DPI_ERR_LOB_CLOSED); - return dpiConn__checkConnected(lob->conn, error); -} - - -//----------------------------------------------------------------------------- -// dpiLob__close() [INTERNAL] -// Internal method used for closing the LOB. -//----------------------------------------------------------------------------- -int dpiLob__close(dpiLob *lob, int propagateErrors, dpiError *error) -{ - int isTemporary, closing, status = DPI_SUCCESS; - - // determine whether LOB is already being closed and if not, mark LOB as - // being closed; this MUST be done while holding the lock (if in threaded - // mode) to avoid race conditions! - if (lob->env->threaded) - dpiMutex__acquire(lob->env->mutex); - closing = lob->closing; - lob->closing = 1; - if (lob->env->threaded) - dpiMutex__release(lob->env->mutex); - - // if LOB is already being closed, nothing needs to be done - if (closing) - return DPI_SUCCESS; - - // perform actual work of closing LOB - if (lob->locator) { - if (!lob->conn->deadSession && lob->conn->handle) { - status = dpiOci__lobIsTemporary(lob, &isTemporary, propagateErrors, - error); - if (isTemporary && status == DPI_SUCCESS) - status = dpiOci__lobFreeTemporary(lob->conn, - lob->locator, propagateErrors, error); - } - dpiOci__descriptorFree(lob->locator, DPI_OCI_DTYPE_LOB); - if (!lob->conn->closing) - dpiHandleList__removeHandle(lob->conn->openLobs, lob->openSlotNum); - lob->locator = NULL; - } - if (lob->buffer) { - dpiUtils__freeMemory(lob->buffer); - lob->buffer = NULL; - } - - // if actual close fails, reset closing flag; again, this must be done - // while holding the lock (if in threaded mode) in order to avoid race - // conditions! - if (status < 0) { - if (lob->env->threaded) - dpiMutex__acquire(lob->env->mutex); - lob->closing = 0; - if (lob->env->threaded) - dpiMutex__release(lob->env->mutex); - } - - return status; -} - - -//----------------------------------------------------------------------------- -// dpiLob__free() [INTERNAL] -// Free the memory for a LOB. -//----------------------------------------------------------------------------- -void dpiLob__free(dpiLob *lob, dpiError *error) -{ - dpiLob__close(lob, 0, error); - if (lob->conn) { - dpiGen__setRefCount(lob->conn, error, -1); - lob->conn = NULL; - } - dpiUtils__freeMemory(lob); -} - - -//----------------------------------------------------------------------------- -// dpiLob__readBytes() [INTERNAL] -// Return a portion (or all) of the data in the LOB. -//----------------------------------------------------------------------------- -int dpiLob__readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, - char *value, uint64_t *valueLength, dpiError *error) -{ - uint64_t lengthInBytes = 0, lengthInChars = 0; - int isOpen = 0; - - // amount is in characters for character LOBs and bytes for binary LOBs - if (lob->type->isCharacterData) - lengthInChars = amount; - else lengthInBytes = amount; - - // for files, open the file if needed - if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BFILE) { - if (dpiOci__lobIsOpen(lob, &isOpen, error) < 0) - return DPI_FAILURE; - if (!isOpen) { - if (dpiOci__lobOpen(lob, error) < 0) - return DPI_FAILURE; - } - } - - // read the bytes from the LOB - if (dpiOci__lobRead2(lob, offset, &lengthInBytes, &lengthInChars, - value, *valueLength, error) < 0) - return DPI_FAILURE; - *valueLength = lengthInBytes; - - // if file was opened in this routine, close it again - if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BFILE && !isOpen) { - if (dpiOci__lobClose(lob, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiLob__setFromBytes() [INTERNAL] -// Clear the LOB completely and then write the specified bytes to it. -//----------------------------------------------------------------------------- -int dpiLob__setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength, - dpiError *error) -{ - if (dpiOci__lobTrim2(lob, 0, error) < 0) - return DPI_FAILURE; - if (valueLength == 0) - return DPI_SUCCESS; - return dpiOci__lobWrite2(lob, 1, value, valueLength, error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_addRef() [PUBLIC] -// Add a reference to the LOB. -//----------------------------------------------------------------------------- -int dpiLob_addRef(dpiLob *lob) -{ - return dpiGen__addRef(lob, DPI_HTYPE_LOB, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiLob_close() [PUBLIC] -// Close the LOB and make it unusable for further operations. -//----------------------------------------------------------------------------- -int dpiLob_close(dpiLob *lob) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - status = dpiLob__close(lob, 1, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_closeResource() [PUBLIC] -// Close the LOB's resources. -//----------------------------------------------------------------------------- -int dpiLob_closeResource(dpiLob *lob) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - status = dpiOci__lobClose(lob, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_copy() [PUBLIC] -// Create a copy of the LOB and return it. -//----------------------------------------------------------------------------- -int dpiLob_copy(dpiLob *lob, dpiLob **copiedLob) -{ - dpiLob *tempLob; - dpiError error; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, copiedLob) - if (dpiLob__allocate(lob->conn, lob->type, &tempLob, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - if (dpiOci__lobLocatorAssign(lob, &tempLob->locator, &error) < 0) { - dpiLob__free(tempLob, &error); - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - } - *copiedLob = tempLob; - return dpiGen__endPublicFn(lob, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_getBufferSize() [PUBLIC] -// Get the required size of a buffer given the number of characters. If the -// LOB does not refer to a character LOB the value is returned unchanged. -//----------------------------------------------------------------------------- -int dpiLob_getBufferSize(dpiLob *lob, uint64_t sizeInChars, - uint64_t *sizeInBytes) -{ - dpiError error; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, sizeInBytes) - if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_CLOB) - *sizeInBytes = sizeInChars * lob->env->maxBytesPerCharacter; - else if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_NCLOB) - *sizeInBytes = sizeInChars * lob->env->nmaxBytesPerCharacter; - else *sizeInBytes = sizeInChars; - return dpiGen__endPublicFn(lob, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_getChunkSize() [PUBLIC] -// Return the chunk size associated with the LOB. -//----------------------------------------------------------------------------- -int dpiLob_getChunkSize(dpiLob *lob, uint32_t *size) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, size) - status = dpiOci__lobGetChunkSize(lob, size, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_getDirectoryAndFileName() [PUBLIC] -// Return the directory alias and file name for the BFILE lob. -//----------------------------------------------------------------------------- -int dpiLob_getDirectoryAndFileName(dpiLob *lob, const char **directoryAlias, - uint32_t *directoryAliasLength, const char **fileName, - uint32_t *fileNameLength) -{ - uint16_t ociDirectoryAliasLength, ociFileNameLength; - dpiError error; - - // validate parameters - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, directoryAlias) - DPI_CHECK_PTR_NOT_NULL(lob, directoryAliasLength) - DPI_CHECK_PTR_NOT_NULL(lob, fileName) - DPI_CHECK_PTR_NOT_NULL(lob, fileNameLength) - - // get directory and file name - ociDirectoryAliasLength = 30; - ociFileNameLength = 255; - if (!lob->buffer) { - if (dpiUtils__allocateMemory(1, - ociDirectoryAliasLength + ociFileNameLength, 0, - "allocate name buffer", (void**) &lob->buffer, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - } - *directoryAlias = lob->buffer; - *fileName = lob->buffer + ociDirectoryAliasLength; - if (dpiOci__lobFileGetName(lob, (char*) *directoryAlias, - &ociDirectoryAliasLength, (char*) *fileName, &ociFileNameLength, - &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - *directoryAliasLength = ociDirectoryAliasLength; - *fileNameLength = ociFileNameLength; - return dpiGen__endPublicFn(lob, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_getFileExists() [PUBLIC] -// Return whether or not the file pointed to by the locator exists. -//----------------------------------------------------------------------------- -int dpiLob_getFileExists(dpiLob *lob, int *exists) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, exists) - status = dpiOci__lobFileExists(lob, exists, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_getIsResourceOpen() [PUBLIC] -// Return whether or not the LOB' resources are open. -//----------------------------------------------------------------------------- -int dpiLob_getIsResourceOpen(dpiLob *lob, int *isOpen) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, isOpen) - status = dpiOci__lobIsOpen(lob, isOpen, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_getSize() [PUBLIC] -// Returns the size of the LOB. -//----------------------------------------------------------------------------- -int dpiLob_getSize(dpiLob *lob, uint64_t *size) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, size) - status = dpiOci__lobGetLength2(lob, size, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_openResource() [PUBLIC] -// Open the LOB's resources to speed further accesses. -//----------------------------------------------------------------------------- -int dpiLob_openResource(dpiLob *lob) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - status = dpiOci__lobOpen(lob, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_readBytes() [PUBLIC] -// Return a portion (or all) of the data in the LOB. -//----------------------------------------------------------------------------- -int dpiLob_readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, - char *value, uint64_t *valueLength) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, value) - DPI_CHECK_PTR_NOT_NULL(lob, valueLength) - status = dpiLob__readBytes(lob, offset, amount, value, valueLength, - &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_release() [PUBLIC] -// Release a reference to the LOB. -//----------------------------------------------------------------------------- -int dpiLob_release(dpiLob *lob) -{ - return dpiGen__release(lob, DPI_HTYPE_LOB, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiLob_setDirectoryAndFileName() [PUBLIC] -// Set the directory alias and file name for the BFILE LOB. -//----------------------------------------------------------------------------- -int dpiLob_setDirectoryAndFileName(dpiLob *lob, const char *directoryAlias, - uint32_t directoryAliasLength, const char *fileName, - uint32_t fileNameLength) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, directoryAlias) - DPI_CHECK_PTR_NOT_NULL(lob, fileName) - status = dpiOci__lobFileSetName(lob, directoryAlias, - (uint16_t) directoryAliasLength, fileName, - (uint16_t) fileNameLength, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_setFromBytes() [PUBLIC] -// Clear the LOB completely and then write the specified bytes to it. -//----------------------------------------------------------------------------- -int dpiLob_setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(lob, value) - status = dpiLob__setFromBytes(lob, value, valueLength, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_trim() [PUBLIC] -// Trim the LOB to the specified length. -//----------------------------------------------------------------------------- -int dpiLob_trim(dpiLob *lob, uint64_t newSize) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - status = dpiOci__lobTrim2(lob, newSize, &error); - return dpiGen__endPublicFn(lob, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiLob_writeBytes() [PUBLIC] -// Write the data to the LOB at the offset specified. -//----------------------------------------------------------------------------- -int dpiLob_writeBytes(dpiLob *lob, uint64_t offset, const char *value, - uint64_t valueLength) -{ - dpiError error; - int status; - - if (dpiLob__check(lob, __func__, &error) < 0) - return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(lob, value) - status = dpiOci__lobWrite2(lob, offset, value, valueLength, &error); - return dpiGen__endPublicFn(lob, status, &error); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c b/vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c deleted file mode 100644 index 518d2e7d20b..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c +++ /dev/null @@ -1,487 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiMsgProps.c -// Implementation of AQ message properties. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiMsgProps__allocate() [INTERNAL] -// Create a new message properties structure and return it. In case of error -// NULL is returned. -//----------------------------------------------------------------------------- -int dpiMsgProps__allocate(dpiConn *conn, dpiMsgProps **props, dpiError *error) -{ - dpiMsgProps *tempProps; - - if (dpiGen__allocate(DPI_HTYPE_MSG_PROPS, conn->env, (void**) &tempProps, - error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(conn, error, 1); - tempProps->conn = conn; - if (dpiOci__descriptorAlloc(conn->env->handle, &tempProps->handle, - DPI_OCI_DTYPE_AQMSG_PROPERTIES, "allocate descriptor", - error) < 0) { - dpiMsgProps__free(tempProps, error); - return DPI_FAILURE; - } - - *props = tempProps; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps__extractMsgId() [INTERNAL] -// Extract bytes from the OCIRaw value containing the message id. -//----------------------------------------------------------------------------- -void dpiMsgProps__extractMsgId(dpiMsgProps *props, const char **msgId, - uint32_t *msgIdLength) -{ - dpiOci__rawPtr(props->env->handle, props->msgIdRaw, (void**) msgId); - dpiOci__rawSize(props->env->handle, props->msgIdRaw, msgIdLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps__free() [INTERNAL] -// Free the memory for a message properties structure. -//----------------------------------------------------------------------------- -void dpiMsgProps__free(dpiMsgProps *props, dpiError *error) -{ - if (props->handle) { - dpiOci__descriptorFree(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES); - props->handle = NULL; - } - if (props->payloadObj) { - dpiGen__setRefCount(props->payloadObj, error, -1); - props->payloadObj = NULL; - } - if (props->payloadRaw) { - dpiOci__rawResize(props->env->handle, &props->payloadRaw, 0, error); - props->payloadRaw = NULL; - } - if (props->msgIdRaw) { - dpiOci__rawResize(props->env->handle, &props->msgIdRaw, 0, error); - props->msgIdRaw = NULL; - } - if (props->conn) { - dpiGen__setRefCount(props->conn, error, -1); - props->conn = NULL; - } - dpiUtils__freeMemory(props); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps__getAttrValue() [INTERNAL] -// Get the attribute value in OCI. -//----------------------------------------------------------------------------- -static int dpiMsgProps__getAttrValue(dpiMsgProps *props, uint32_t attribute, - const char *fnName, void *value, uint32_t *valueLength) -{ - dpiError error; - int status; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, fnName, &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(props, value) - DPI_CHECK_PTR_NOT_NULL(props, valueLength) - status = dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, - value, valueLength, attribute, "get attribute value", &error); - return dpiGen__endPublicFn(props, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps__setAttrValue() [INTERNAL] -// Set the attribute value in OCI. -//----------------------------------------------------------------------------- -static int dpiMsgProps__setAttrValue(dpiMsgProps *props, uint32_t attribute, - const char *fnName, const void *value, uint32_t valueLength) -{ - dpiError error; - int status; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, fnName, &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(props, value) - status = dpiOci__attrSet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, - (void*) value, valueLength, attribute, "set attribute value", - &error); - return dpiGen__endPublicFn(props, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_addRef() [PUBLIC] -// Add a reference to the message properties. -//----------------------------------------------------------------------------- -int dpiMsgProps_addRef(dpiMsgProps *props) -{ - return dpiGen__addRef(props, DPI_HTYPE_MSG_PROPS, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getCorrelation() [PUBLIC] -// Return correlation associated with the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_getCorrelation(dpiMsgProps *props, const char **value, - uint32_t *valueLength) -{ - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_CORRELATION, __func__, - (void*) value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getDelay() [PUBLIC] -// Return the number of seconds the message was delayed. -//----------------------------------------------------------------------------- -int dpiMsgProps_getDelay(dpiMsgProps *props, int32_t *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_DELAY, __func__, - value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getDeliveryMode() [PUBLIC] -// Return the mode used for delivering the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_getDeliveryMode(dpiMsgProps *props, - dpiMessageDeliveryMode *value) -{ - uint32_t valueLength = sizeof(uint16_t); - - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_MSG_DELIVERY_MODE, - __func__, value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getEnqTime() [PUBLIC] -// Return the time the message was enqueued. -//----------------------------------------------------------------------------- -int dpiMsgProps_getEnqTime(dpiMsgProps *props, dpiTimestamp *value) -{ - dpiOciDate ociValue; - dpiError error; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(props, value) - if (dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, - &ociValue, NULL, DPI_OCI_ATTR_ENQ_TIME, "get attribute value", - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - value->year = ociValue.year; - value->month = ociValue.month; - value->day = ociValue.day; - value->hour = ociValue.hour; - value->minute = ociValue.minute; - value->second = ociValue.second; - value->fsecond = 0; - value->tzHourOffset = 0; - value->tzMinuteOffset = 0; - return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getExceptionQ() [PUBLIC] -// Return the name of the exception queue associated with the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_getExceptionQ(dpiMsgProps *props, const char **value, - uint32_t *valueLength) -{ - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_EXCEPTION_QUEUE, - __func__, (void*) value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getExpiration() [PUBLIC] -// Return the number of seconds until the message expires. -//----------------------------------------------------------------------------- -int dpiMsgProps_getExpiration(dpiMsgProps *props, int32_t *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_EXPIRATION, __func__, - value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getNumAttempts() [PUBLIC] -// Return the number of attempts made to deliver the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_getNumAttempts(dpiMsgProps *props, int32_t *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_ATTEMPTS, __func__, - value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getMsgId() [PUBLIC] -// Return the message id for the message (available after enqueuing or -// dequeuing a message). -//----------------------------------------------------------------------------- -int dpiMsgProps_getMsgId(dpiMsgProps *props, const char **value, - uint32_t *valueLength) -{ - dpiError error; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(props, value) - DPI_CHECK_PTR_NOT_NULL(props, valueLength) - if (!props->msgIdRaw) { - *value = NULL; - *valueLength = 0; - } else { - dpiOci__rawPtr(props->env->handle, props->msgIdRaw, (void**) value); - dpiOci__rawSize(props->env->handle, props->msgIdRaw, valueLength); - } - return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getOriginalMsgId() [PUBLIC] -// Return the original message id for the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_getOriginalMsgId(dpiMsgProps *props, const char **value, - uint32_t *valueLength) -{ - dpiError error; - void *rawValue; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(props, value) - DPI_CHECK_PTR_NOT_NULL(props, valueLength) - if (dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, - &rawValue, NULL, DPI_OCI_ATTR_ORIGINAL_MSGID, - "get attribute value", &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - dpiOci__rawPtr(props->env->handle, rawValue, (void**) value); - dpiOci__rawSize(props->env->handle, rawValue, valueLength); - return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getPayload() [PUBLIC] -// Get the payload for the message (as an object or a series of bytes). -//----------------------------------------------------------------------------- -int dpiMsgProps_getPayload(dpiMsgProps *props, dpiObject **obj, - const char **value, uint32_t *valueLength) -{ - dpiError error; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - if (obj) - *obj = props->payloadObj; - if (value && valueLength) { - if (props->payloadRaw) { - dpiOci__rawPtr(props->env->handle, props->payloadRaw, - (void**) value); - dpiOci__rawSize(props->env->handle, props->payloadRaw, - valueLength); - } else { - *value = NULL; - *valueLength = 0; - } - } - - return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getPriority() [PUBLIC] -// Return the priority of the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_getPriority(dpiMsgProps *props, int32_t *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_PRIORITY, __func__, - value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_getState() [PUBLIC] -// Return the state of the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_getState(dpiMsgProps *props, dpiMessageState *value) -{ - uint32_t valueLength = sizeof(uint32_t); - - - return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_MSG_STATE, __func__, - value, &valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_release() [PUBLIC] -// Release a reference to the message properties. -//----------------------------------------------------------------------------- -int dpiMsgProps_release(dpiMsgProps *props) -{ - return dpiGen__release(props, DPI_HTYPE_MSG_PROPS, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setCorrelation() [PUBLIC] -// Set correlation associated with the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_setCorrelation(dpiMsgProps *props, const char *value, - uint32_t valueLength) -{ - return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_CORRELATION, __func__, - value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setDelay() [PUBLIC] -// Set the number of seconds to delay the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_setDelay(dpiMsgProps *props, int32_t value) -{ - return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_DELAY, __func__, - &value, 0); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setExceptionQ() [PUBLIC] -// Set the name of the exception queue associated with the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_setExceptionQ(dpiMsgProps *props, const char *value, - uint32_t valueLength) -{ - return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_EXCEPTION_QUEUE, - __func__, value, valueLength); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setExpiration() [PUBLIC] -// Set the number of seconds until the message expires. -//----------------------------------------------------------------------------- -int dpiMsgProps_setExpiration(dpiMsgProps *props, int32_t value) -{ - return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_EXPIRATION, __func__, - &value, 0); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setOriginalMsgId() [PUBLIC] -// Set the original message id for the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_setOriginalMsgId(dpiMsgProps *props, const char *value, - uint32_t valueLength) -{ - void *rawValue = NULL; - dpiError error; - int status; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(props, value) - if (dpiOci__rawAssignBytes(props->env->handle, value, valueLength, - &rawValue, &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - status = dpiOci__attrSet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, - (void*) rawValue, 0, DPI_OCI_ATTR_ORIGINAL_MSGID, "set value", - &error); - dpiOci__rawResize(props->env->handle, &rawValue, 0, &error); - return dpiGen__endPublicFn(props, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setPayloadBytes() [PUBLIC] -// Set the payload for the message (as a series of bytes). -//----------------------------------------------------------------------------- -int dpiMsgProps_setPayloadBytes(dpiMsgProps *props, const char *value, - uint32_t valueLength) -{ - dpiError error; - int status; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(props, value) - if (props->payloadRaw) { - dpiOci__rawResize(props->env->handle, &props->payloadRaw, 0, &error); - props->payloadRaw = NULL; - } - status = dpiOci__rawAssignBytes(props->env->handle, value, valueLength, - &props->payloadRaw, &error); - return dpiGen__endPublicFn(props, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setPayloadObject() [PUBLIC] -// Set the payload for the message (as an object). -//----------------------------------------------------------------------------- -int dpiMsgProps_setPayloadObject(dpiMsgProps *props, dpiObject *obj) -{ - dpiError error; - - if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, - &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - if (dpiGen__checkHandle(obj, DPI_HTYPE_OBJECT, "check object", &error) < 0) - return dpiGen__endPublicFn(props, DPI_FAILURE, &error); - if (props->payloadObj) - dpiGen__setRefCount(props->payloadObj, &error, -1); - dpiGen__setRefCount(obj, &error, 1); - props->payloadObj = obj; - return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiMsgProps_setPriority() [PUBLIC] -// Set the priority of the message. -//----------------------------------------------------------------------------- -int dpiMsgProps_setPriority(dpiMsgProps *props, int32_t value) -{ - return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_PRIORITY, __func__, - &value, 0); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiObject.c b/vendor/github.com/godror/godror/odpi/src/dpiObject.c deleted file mode 100644 index 338c68aeeda..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiObject.c +++ /dev/null @@ -1,966 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiObject.c -// Implementation of objects. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// forward declarations of internal functions only used in this file -int dpiObject__closeHelper(dpiObject *obj, int checkError, dpiError *error); - - -//----------------------------------------------------------------------------- -// dpiObject__allocate() [INTERNAL] -// Allocate and initialize an object structure. -//----------------------------------------------------------------------------- -int dpiObject__allocate(dpiObjectType *objType, void *instance, - void *indicator, dpiObject *dependsOnObj, dpiObject **obj, - dpiError *error) -{ - dpiObject *tempObj; - - if (dpiGen__allocate(DPI_HTYPE_OBJECT, objType->env, (void**) &tempObj, - error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(objType, error, 1); - tempObj->type = objType; - tempObj->instance = instance; - tempObj->indicator = indicator; - if (dependsOnObj) { - dpiGen__setRefCount(dependsOnObj, error, 1); - tempObj->dependsOnObj = dependsOnObj; - } - if (!instance) { - if (dpiOci__objectNew(tempObj, error) < 0) { - dpiObject__free(tempObj, error); - return DPI_FAILURE; - } - if (dpiOci__objectGetInd(tempObj, error) < 0) { - dpiObject__free(tempObj, error); - return DPI_FAILURE; - } - } - if (tempObj->instance && !dependsOnObj) { - if (dpiHandleList__addHandle(objType->conn->objects, tempObj, - &tempObj->openSlotNum, error) < 0) { - dpiObject__free(tempObj, error); - return DPI_FAILURE; - } - } - *obj = tempObj; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObject__check() [INTERNAL] -// Determine if the object handle provided is available for use. -//----------------------------------------------------------------------------- -static int dpiObject__check(dpiObject *obj, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(obj, DPI_HTYPE_OBJECT, fnName, error) < 0) - return DPI_FAILURE; - return dpiConn__checkConnected(obj->type->conn, error); -} - - -//----------------------------------------------------------------------------- -// dpiObject__checkIsCollection() [INTERNAL] -// Check if the object is a collection, and if not, raise an exception. -//----------------------------------------------------------------------------- -static int dpiObject__checkIsCollection(dpiObject *obj, const char *fnName, - dpiError *error) -{ - if (dpiObject__check(obj, fnName, error) < 0) - return DPI_FAILURE; - if (!obj->type->isCollection) - return dpiError__set(error, "check collection", DPI_ERR_NOT_COLLECTION, - obj->type->schemaLength, obj->type->schema, - obj->type->nameLength, obj->type->name); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObject__clearOracleValue() [INTERNAL] -// Clear the Oracle value after use. -//----------------------------------------------------------------------------- -static void dpiObject__clearOracleValue(dpiObject *obj, dpiError *error, - dpiOracleDataBuffer *buffer, dpiLob *lob, - dpiOracleTypeNum oracleTypeNum) -{ - switch (oracleTypeNum) { - case DPI_ORACLE_TYPE_CHAR: - case DPI_ORACLE_TYPE_NCHAR: - case DPI_ORACLE_TYPE_VARCHAR: - case DPI_ORACLE_TYPE_NVARCHAR: - if (buffer->asString) - dpiOci__stringResize(obj->env->handle, &buffer->asString, 0, - error); - break; - case DPI_ORACLE_TYPE_RAW: - if (buffer->asRawData) - dpiOci__rawResize(obj->env->handle, &buffer->asRawData, 0, - error); - break; - case DPI_ORACLE_TYPE_TIMESTAMP: - if (buffer->asTimestamp) - dpiOci__descriptorFree(buffer->asTimestamp, - DPI_OCI_DTYPE_TIMESTAMP); - break; - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - if (buffer->asTimestamp) - dpiOci__descriptorFree(buffer->asTimestamp, - DPI_OCI_DTYPE_TIMESTAMP_TZ); - break; - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - if (buffer->asTimestamp) - dpiOci__descriptorFree(buffer->asTimestamp, - DPI_OCI_DTYPE_TIMESTAMP_LTZ); - break; - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_NCLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_BFILE: - if (lob) - dpiGen__setRefCount(lob, error, -1); - break; - default: - break; - }; -} - - -//----------------------------------------------------------------------------- -// dpiObject__close() [INTERNAL] -// Close the object (frees the memory for the instance). This is needed to -// avoid trying to do so after the connection which created the object is -// closed. In some future release of the Oracle Client libraries this may not -// be needed, at which point this code and all of the code for managing the -// list of objects created by a collection can be removed. -//----------------------------------------------------------------------------- -int dpiObject__close(dpiObject *obj, int checkError, dpiError *error) -{ - int closing; - - // determine whether object is already being closed and if not, mark - // object as being closed; this MUST be done while holding the lock (if - // in threaded mode) to avoid race conditions! - if (obj->env->threaded) - dpiMutex__acquire(obj->env->mutex); - closing = obj->closing; - obj->closing = 1; - if (obj->env->threaded) - dpiMutex__release(obj->env->mutex); - - // if object is already being closed, nothing needs to be done - if (closing) - return DPI_SUCCESS; - - // perform actual work of closing object; if this fails, reset closing - // flag; again, this must be done while holding the lock (if in threaded - // mode) in order to avoid race conditions! - if (obj->instance && !obj->dependsOnObj) { - if (dpiObject__closeHelper(obj, checkError, error) < 0) { - if (obj->env->threaded) - dpiMutex__acquire(obj->env->mutex); - obj->closing = 0; - if (obj->env->threaded) - dpiMutex__release(obj->env->mutex); - return DPI_FAILURE; - } - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObject__closeHelper() [INTERNAL] -// Helper function for closing an object. -//----------------------------------------------------------------------------- -int dpiObject__closeHelper(dpiObject *obj, int checkError, dpiError *error) -{ - if (dpiOci__objectFree(obj->env->handle, obj->instance, checkError, - error) < 0) - return DPI_FAILURE; - obj->instance = NULL; - if (obj->freeIndicator && dpiOci__objectFree(obj->env->handle, - obj->indicator, checkError, error) < 0) - return DPI_FAILURE; - obj->indicator = NULL; - if (!obj->type->conn->closing) - dpiHandleList__removeHandle(obj->type->conn->objects, - obj->openSlotNum); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObject__free() [INTERNAL] -// Free the memory for an object. -//----------------------------------------------------------------------------- -void dpiObject__free(dpiObject *obj, dpiError *error) -{ - dpiObject__close(obj, 0, error); - if (obj->type) { - dpiGen__setRefCount(obj->type, error, -1); - obj->type = NULL; - } - if (obj->dependsOnObj) { - dpiGen__setRefCount(obj->dependsOnObj, error, -1); - obj->dependsOnObj = NULL; - } - dpiUtils__freeMemory(obj); -} - - -//----------------------------------------------------------------------------- -// dpiObject__fromOracleValue() [INTERNAL] -// Populate data from the Oracle value or return an error if this is not -// possible. -//----------------------------------------------------------------------------- -static int dpiObject__fromOracleValue(dpiObject *obj, dpiError *error, - const dpiDataTypeInfo *typeInfo, dpiOracleData *value, - int16_t *indicator, dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - dpiOracleTypeNum valueOracleTypeNum; - dpiBytes *asBytes; - - // null values are immediately returned (type is irrelevant) - if (*indicator == DPI_OCI_IND_NULL) { - data->isNull = 1; - return DPI_SUCCESS; - } - - // convert all other values - data->isNull = 0; - valueOracleTypeNum = typeInfo->oracleTypeNum; - switch (valueOracleTypeNum) { - case DPI_ORACLE_TYPE_CHAR: - case DPI_ORACLE_TYPE_NCHAR: - case DPI_ORACLE_TYPE_VARCHAR: - case DPI_ORACLE_TYPE_NVARCHAR: - if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - asBytes = &data->value.asBytes; - dpiOci__stringPtr(obj->env->handle, *value->asString, - &asBytes->ptr); - dpiOci__stringSize(obj->env->handle, *value->asString, - &asBytes->length); - if (valueOracleTypeNum == DPI_ORACLE_TYPE_NCHAR || - valueOracleTypeNum == DPI_ORACLE_TYPE_NVARCHAR) - asBytes->encoding = obj->env->nencoding; - else asBytes->encoding = obj->env->encoding; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_RAW: - if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - asBytes = &data->value.asBytes; - dpiOci__rawPtr(obj->env->handle, *value->asRawData, - (void**) &asBytes->ptr); - dpiOci__rawSize(obj->env->handle, *value->asRawData, - &asBytes->length); - asBytes->encoding = NULL; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_NATIVE_INT: - if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) { - data->value.asInt64 = *value->asInt32; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_NATIVE_FLOAT: - if (nativeTypeNum == DPI_NATIVE_TYPE_FLOAT) { - data->value.asFloat = *value->asFloat; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_NATIVE_DOUBLE: - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - data->value.asDouble = *value->asDouble; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_NUMBER: - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) - return dpiDataBuffer__fromOracleNumberAsDouble(&data->value, - error, value->asNumber); - else if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) - return dpiDataBuffer__fromOracleNumberAsInteger(&data->value, - error, value->asNumber); - else if (nativeTypeNum == DPI_NATIVE_TYPE_UINT64) - return dpiDataBuffer__fromOracleNumberAsUnsignedInteger( - &data->value, error, value->asNumber); - else if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) - return dpiDataBuffer__fromOracleNumberAsText(&data->value, - obj->env, error, value->asNumber); - break; - case DPI_ORACLE_TYPE_DATE: - if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) - return dpiDataBuffer__fromOracleDate(&data->value, - value->asDate); - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) - return dpiDataBuffer__fromOracleDateAsDouble(&data->value, - obj->env, error, value->asDate); - break; - case DPI_ORACLE_TYPE_TIMESTAMP: - if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) - return dpiDataBuffer__fromOracleTimestamp(&data->value, - obj->env, error, *value->asTimestamp, 0); - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) - return dpiDataBuffer__fromOracleTimestampAsDouble(&data->value, - obj->env, error, *value->asTimestamp); - break; - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) - return dpiDataBuffer__fromOracleTimestamp(&data->value, - obj->env, error, *value->asTimestamp, 1); - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) - return dpiDataBuffer__fromOracleTimestampAsDouble(&data->value, - obj->env, error, *value->asTimestamp); - break; - case DPI_ORACLE_TYPE_OBJECT: - if (typeInfo->objectType && - nativeTypeNum == DPI_NATIVE_TYPE_OBJECT) { - void *instance = (typeInfo->objectType->isCollection) ? - *value->asCollection : value->asRaw; - dpiObject *tempObj; - if (dpiObject__allocate(typeInfo->objectType, instance, - indicator, obj, &tempObj, error) < 0) - return DPI_FAILURE; - data->value.asObject = tempObj; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_BOOLEAN: - if (nativeTypeNum == DPI_NATIVE_TYPE_BOOLEAN) { - data->value.asBoolean = *(value->asBoolean); - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_NCLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_BFILE: - if (nativeTypeNum == DPI_NATIVE_TYPE_LOB) { - const dpiOracleType *lobType; - void *tempLocator; - dpiLob *tempLob; - lobType = dpiOracleType__getFromNum(typeInfo->oracleTypeNum, - error); - if (dpiLob__allocate(obj->type->conn, lobType, &tempLob, - error) < 0) - return DPI_FAILURE; - tempLocator = tempLob->locator; - tempLob->locator = *(value->asLobLocator); - if (dpiOci__lobLocatorAssign(tempLob, &tempLocator, - error) < 0) { - tempLob->locator = tempLocator; - dpiLob__free(tempLob, error); - return DPI_FAILURE; - } - tempLob->locator = tempLocator; - data->value.asLOB = tempLob; - return DPI_SUCCESS; - } - break; - default: - break; - }; - - return dpiError__set(error, "from Oracle value", - DPI_ERR_UNHANDLED_CONVERSION, valueOracleTypeNum, nativeTypeNum); -} - - -//----------------------------------------------------------------------------- -// dpiObject__toOracleValue() [INTERNAL] -// Convert value from external type to the OCI data type required. -//----------------------------------------------------------------------------- -static int dpiObject__toOracleValue(dpiObject *obj, dpiError *error, - const dpiDataTypeInfo *dataTypeInfo, dpiOracleDataBuffer *buffer, - dpiLob **lob, void **ociValue, int16_t *valueIndicator, - void **objectIndicator, dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - dpiOracleTypeNum valueOracleTypeNum; - uint32_t handleType; - dpiObject *otherObj; - dpiBytes *bytes; - - // nulls are handled easily - *objectIndicator = NULL; - if (data->isNull) { - *ociValue = NULL; - *valueIndicator = DPI_OCI_IND_NULL; - buffer->asRaw = NULL; - return DPI_SUCCESS; - } - - // convert all other values - *valueIndicator = DPI_OCI_IND_NOTNULL; - valueOracleTypeNum = dataTypeInfo->oracleTypeNum; - switch (valueOracleTypeNum) { - case DPI_ORACLE_TYPE_CHAR: - case DPI_ORACLE_TYPE_NCHAR: - case DPI_ORACLE_TYPE_VARCHAR: - case DPI_ORACLE_TYPE_NVARCHAR: - buffer->asString = NULL; - if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - bytes = &data->value.asBytes; - if (dpiOci__stringAssignText(obj->env->handle, bytes->ptr, - bytes->length, &buffer->asString, error) < 0) - return DPI_FAILURE; - *ociValue = buffer->asString; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_RAW: - buffer->asRawData = NULL; - if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - bytes = &data->value.asBytes; - if (dpiOci__rawAssignBytes(obj->env->handle, bytes->ptr, - bytes->length, &buffer->asRawData, error) < 0) - return DPI_FAILURE; - *ociValue = buffer->asRawData; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_NATIVE_INT: - if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) { - buffer->asInt32 = (int32_t) data->value.asInt64; - *ociValue = &buffer->asInt32; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_NUMBER: - *ociValue = &buffer->asNumber; - if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) - return dpiDataBuffer__toOracleNumberFromInteger(&data->value, - error, &buffer->asNumber); - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) - return dpiDataBuffer__toOracleNumberFromDouble(&data->value, - error, &buffer->asNumber); - if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) - return dpiDataBuffer__toOracleNumberFromText(&data->value, - obj->env, error, &buffer->asNumber); - break; - case DPI_ORACLE_TYPE_NATIVE_FLOAT: - if (nativeTypeNum == DPI_NATIVE_TYPE_FLOAT) { - buffer->asFloat = data->value.asFloat; - *ociValue = &buffer->asFloat; - return DPI_SUCCESS; - } else if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - buffer->asFloat = (float) data->value.asDouble; - *ociValue = &buffer->asFloat; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_NATIVE_DOUBLE: - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - buffer->asDouble = data->value.asDouble; - *ociValue = &buffer->asDouble; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_DATE: - *ociValue = &buffer->asDate; - if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) - return dpiDataBuffer__toOracleDate(&data->value, - &buffer->asDate); - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) - return dpiDataBuffer__toOracleDateFromDouble(&data->value, - obj->env, error, &buffer->asDate); - break; - case DPI_ORACLE_TYPE_TIMESTAMP: - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - buffer->asTimestamp = NULL; - if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP || - nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - if (valueOracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP_LTZ || - nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { - handleType = DPI_OCI_DTYPE_TIMESTAMP_LTZ; - } else if (valueOracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP) { - handleType = DPI_OCI_DTYPE_TIMESTAMP; - } else { - handleType = DPI_OCI_DTYPE_TIMESTAMP_TZ; - } - if (dpiOci__descriptorAlloc(obj->env->handle, - &buffer->asTimestamp, handleType, "allocate timestamp", - error) < 0) - return DPI_FAILURE; - *ociValue = buffer->asTimestamp; - if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) - return dpiDataBuffer__toOracleTimestamp(&data->value, - obj->env, error, buffer->asTimestamp, - (valueOracleTypeNum != DPI_ORACLE_TYPE_TIMESTAMP)); - return dpiDataBuffer__toOracleTimestampFromDouble(&data->value, - obj->env, error, buffer->asTimestamp); - } - break; - case DPI_ORACLE_TYPE_OBJECT: - otherObj = data->value.asObject; - if (nativeTypeNum == DPI_NATIVE_TYPE_OBJECT) { - if (otherObj->type->tdo != dataTypeInfo->objectType->tdo) - return dpiError__set(error, "check type", - DPI_ERR_WRONG_TYPE, otherObj->type->schemaLength, - otherObj->type->schema, otherObj->type->nameLength, - otherObj->type->name, - dataTypeInfo->objectType->schemaLength, - dataTypeInfo->objectType->schema, - dataTypeInfo->objectType->nameLength, - dataTypeInfo->objectType->name); - *ociValue = otherObj->instance; - *objectIndicator = otherObj->indicator; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_BOOLEAN: - if (nativeTypeNum == DPI_NATIVE_TYPE_BOOLEAN) { - buffer->asBoolean = data->value.asBoolean; - *ociValue = &buffer->asBoolean; - return DPI_SUCCESS; - } - break; - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_NCLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_BFILE: - buffer->asLobLocator = NULL; - if (nativeTypeNum == DPI_NATIVE_TYPE_LOB) { - *ociValue = data->value.asLOB->locator; - return DPI_SUCCESS; - } else if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - const dpiOracleType *lobType; - lobType = dpiOracleType__getFromNum(valueOracleTypeNum, error); - if (dpiLob__allocate(obj->type->conn, lobType, lob, error) < 0) - return DPI_FAILURE; - bytes = &data->value.asBytes; - if (dpiLob__setFromBytes(*lob, bytes->ptr, bytes->length, - error) < 0) - return DPI_FAILURE; - buffer->asLobLocator = (*lob)->locator; - *ociValue = (*lob)->locator; - return DPI_SUCCESS; - } - break; - - default: - break; - } - - return dpiError__set(error, "to Oracle value", - DPI_ERR_UNHANDLED_CONVERSION, valueOracleTypeNum, nativeTypeNum); -} - - -//----------------------------------------------------------------------------- -// dpiObject_addRef() [PUBLIC] -// Add a reference to the object. -//----------------------------------------------------------------------------- -int dpiObject_addRef(dpiObject *obj) -{ - return dpiGen__addRef(obj, DPI_HTYPE_OBJECT, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiObject_appendElement() [PUBLIC] -// Append an element to the collection. -//----------------------------------------------------------------------------- -int dpiObject_appendElement(dpiObject *obj, dpiNativeTypeNum nativeTypeNum, - dpiData *data) -{ - dpiOracleDataBuffer valueBuffer; - int16_t scalarValueIndicator; - dpiLob *lob = NULL; - void *indicator; - dpiError error; - void *ociValue; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, data) - status = dpiObject__toOracleValue(obj, &error, &obj->type->elementTypeInfo, - &valueBuffer, &lob, &ociValue, &scalarValueIndicator, - (void**) &indicator, nativeTypeNum, data); - if (status == DPI_SUCCESS) { - if (!indicator) - indicator = &scalarValueIndicator; - status = dpiOci__collAppend(obj->type->conn, ociValue, indicator, - obj->instance, &error); - } - dpiObject__clearOracleValue(obj, &error, &valueBuffer, lob, - obj->type->elementTypeInfo.oracleTypeNum); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_copy() [PUBLIC] -// Create a copy of the object and return it. Return NULL upon error. -//----------------------------------------------------------------------------- -int dpiObject_copy(dpiObject *obj, dpiObject **copiedObj) -{ - dpiObject *tempObj; - dpiError error; - - if (dpiObject__check(obj, __func__, &error) < 0) - return DPI_FAILURE; - DPI_CHECK_PTR_NOT_NULL(obj, copiedObj) - if (dpiObject__allocate(obj->type, NULL, NULL, NULL, &tempObj, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - if (dpiOci__objectCopy(tempObj, obj->instance, obj->indicator, - &error) < 0) { - dpiObject__free(tempObj, &error); - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - } - *copiedObj = tempObj; - return dpiGen__endPublicFn(obj, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_deleteElementByIndex() [PUBLIC] -// Delete the element at the specified index in the collection. -//----------------------------------------------------------------------------- -int dpiObject_deleteElementByIndex(dpiObject *obj, int32_t index) -{ - dpiError error; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - status = dpiOci__tableDelete(obj, index, &error); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getAttributeValue() [PUBLIC] -// Get the value of the given attribute from the object. -//----------------------------------------------------------------------------- -int dpiObject_getAttributeValue(dpiObject *obj, dpiObjectAttr *attr, - dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - int16_t scalarValueIndicator; - void *valueIndicator, *tdo; - dpiOracleData value; - dpiError error; - int status; - - // validate parameters - if (dpiObject__check(obj, __func__, &error) < 0) - return DPI_FAILURE; - DPI_CHECK_PTR_NOT_NULL(obj, data) - if (dpiGen__checkHandle(attr, DPI_HTYPE_OBJECT_ATTR, "get attribute value", - &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - if (attr->belongsToType->tdo != obj->type->tdo) { - dpiError__set(&error, "get attribute value", DPI_ERR_WRONG_ATTR, - attr->nameLength, attr->name, obj->type->schemaLength, - obj->type->schema, obj->type->nameLength, obj->type->name); - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - } - - // get attribute value - if (dpiOci__objectGetAttr(obj, attr, &scalarValueIndicator, - &valueIndicator, &value.asRaw, &tdo, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - - // determine the proper null indicator - if (!valueIndicator) - valueIndicator = &scalarValueIndicator; - - // check to see if type is supported - if (!attr->typeInfo.oracleTypeNum) { - dpiError__set(&error, "get attribute value", - DPI_ERR_UNHANDLED_DATA_TYPE, attr->typeInfo.ociTypeCode); - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - } - - // convert to output data format - status = dpiObject__fromOracleValue(obj, &error, &attr->typeInfo, &value, - (int16_t*) valueIndicator, nativeTypeNum, data); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getElementExistsByIndex() [PUBLIC] -// Return boolean indicating if an element exists in the collection at the -// specified index. -//----------------------------------------------------------------------------- -int dpiObject_getElementExistsByIndex(dpiObject *obj, int32_t index, - int *exists) -{ - dpiError error; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, exists) - status = dpiOci__tableExists(obj, index, exists, &error); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getElementValueByIndex() [PUBLIC] -// Return the element at the given index in the collection. -//----------------------------------------------------------------------------- -int dpiObject_getElementValueByIndex(dpiObject *obj, int32_t index, - dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - dpiOracleData value; - int exists, status; - void *indicator; - dpiError error; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, data) - if (dpiOci__collGetElem(obj->type->conn, obj->instance, index, &exists, - &value.asRaw, &indicator, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - if (!exists) { - dpiError__set(&error, "get element value", DPI_ERR_INVALID_INDEX, - index); - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - } - status = dpiObject__fromOracleValue(obj, &error, - &obj->type->elementTypeInfo, &value, (int16_t*) indicator, - nativeTypeNum, data); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getFirstIndex() [PUBLIC] -// Return the index of the first entry in the collection. -//----------------------------------------------------------------------------- -int dpiObject_getFirstIndex(dpiObject *obj, int32_t *index, int *exists) -{ - dpiError error; - int32_t size; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, index) - DPI_CHECK_PTR_NOT_NULL(obj, exists) - if (dpiOci__tableSize(obj, &size, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - *exists = (size != 0); - if (*exists) - status = dpiOci__tableFirst(obj, index, &error); - else status = DPI_SUCCESS; - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getLastIndex() [PUBLIC] -// Return the index of the last entry in the collection. -//----------------------------------------------------------------------------- -int dpiObject_getLastIndex(dpiObject *obj, int32_t *index, int *exists) -{ - dpiError error; - int32_t size; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, index) - DPI_CHECK_PTR_NOT_NULL(obj, exists) - if (dpiOci__tableSize(obj, &size, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - *exists = (size != 0); - if (*exists) - status = dpiOci__tableLast(obj, index, &error); - else status = DPI_SUCCESS; - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getNextIndex() [PUBLIC] -// Return the index of the next entry in the collection following the index -// specified. If there is no next entry, exists is set to 0. -//----------------------------------------------------------------------------- -int dpiObject_getNextIndex(dpiObject *obj, int32_t index, int32_t *nextIndex, - int *exists) -{ - dpiError error; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, nextIndex) - DPI_CHECK_PTR_NOT_NULL(obj, exists) - status = dpiOci__tableNext(obj, index, nextIndex, exists, &error); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getPrevIndex() [PUBLIC] -// Return the index of the previous entry in the collection preceding the -// index specified. If there is no previous entry, exists is set to 0. -//----------------------------------------------------------------------------- -int dpiObject_getPrevIndex(dpiObject *obj, int32_t index, int32_t *prevIndex, - int *exists) -{ - dpiError error; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, prevIndex) - DPI_CHECK_PTR_NOT_NULL(obj, exists) - status = dpiOci__tablePrev(obj, index, prevIndex, exists, &error); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_getSize() [PUBLIC] -// Return the size of the collection. -//----------------------------------------------------------------------------- -int dpiObject_getSize(dpiObject *obj, int32_t *size) -{ - dpiError error; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, size) - status = dpiOci__collSize(obj->type->conn, obj->instance, size, &error); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_release() [PUBLIC] -// Release a reference to the object. -//----------------------------------------------------------------------------- -int dpiObject_release(dpiObject *obj) -{ - return dpiGen__release(obj, DPI_HTYPE_OBJECT, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiObject_setAttributeValue() [PUBLIC] -// Create a copy of the object and return it. Return NULL upon error. -//----------------------------------------------------------------------------- -int dpiObject_setAttributeValue(dpiObject *obj, dpiObjectAttr *attr, - dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - void *valueIndicator, *ociValue; - dpiOracleDataBuffer valueBuffer; - int16_t scalarValueIndicator; - dpiLob *lob = NULL; - dpiError error; - int status; - - // validate parameters - if (dpiObject__check(obj, __func__, &error) < 0) - return DPI_FAILURE; - DPI_CHECK_PTR_NOT_NULL(obj, data) - if (dpiGen__checkHandle(attr, DPI_HTYPE_OBJECT_ATTR, "set attribute value", - &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - if (attr->belongsToType->tdo != obj->type->tdo) { - dpiError__set(&error, "set attribute value", DPI_ERR_WRONG_ATTR, - attr->nameLength, attr->name, obj->type->schemaLength, - obj->type->schema, obj->type->nameLength, obj->type->name); - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - } - - // check to see if type is supported - if (!attr->typeInfo.oracleTypeNum) { - dpiError__set(&error, "get attribute value", - DPI_ERR_UNHANDLED_DATA_TYPE, attr->typeInfo.ociTypeCode); - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - } - - // convert to input data format - status = dpiObject__toOracleValue(obj, &error, &attr->typeInfo, - &valueBuffer, &lob, &ociValue, &scalarValueIndicator, - &valueIndicator, nativeTypeNum, data); - - // set attribute value - if (status == DPI_SUCCESS) - status = dpiOci__objectSetAttr(obj, attr, scalarValueIndicator, - valueIndicator, ociValue, &error); - dpiObject__clearOracleValue(obj, &error, &valueBuffer, lob, - attr->typeInfo.oracleTypeNum); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_setElementValueByIndex() [PUBLIC] -// Set the element at the specified index to the given value. -//----------------------------------------------------------------------------- -int dpiObject_setElementValueByIndex(dpiObject *obj, int32_t index, - dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - dpiOracleDataBuffer valueBuffer; - int16_t scalarValueIndicator; - dpiLob *lob = NULL; - void *indicator; - dpiError error; - void *ociValue; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(obj, data) - status = dpiObject__toOracleValue(obj, &error, &obj->type->elementTypeInfo, - &valueBuffer, &lob, &ociValue, &scalarValueIndicator, - (void**) &indicator, nativeTypeNum, data); - if (status == DPI_SUCCESS) { - if (!indicator) - indicator = &scalarValueIndicator; - status = dpiOci__collAssignElem(obj->type->conn, index, ociValue, - indicator, obj->instance, &error); - } - dpiObject__clearOracleValue(obj, &error, &valueBuffer, lob, - obj->type->elementTypeInfo.oracleTypeNum); - return dpiGen__endPublicFn(obj, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObject_trim() [PUBLIC] -// Trim a number of elements from the end of the collection. -//----------------------------------------------------------------------------- -int dpiObject_trim(dpiObject *obj, uint32_t numToTrim) -{ - dpiError error; - int status; - - if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) - return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); - status = dpiOci__collTrim(obj->type->conn, numToTrim, obj->instance, - &error); - return dpiGen__endPublicFn(obj, status, &error); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c b/vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c deleted file mode 100644 index 45d623ef573..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c +++ /dev/null @@ -1,114 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiObjectAttr.c -// Implementation of object attributes. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiObjectAttr__allocate() [INTERNAL] -// Allocate and initialize an object attribute structure. -//----------------------------------------------------------------------------- -int dpiObjectAttr__allocate(dpiObjectType *objType, void *param, - dpiObjectAttr **attr, dpiError *error) -{ - dpiObjectAttr *tempAttr; - - // allocate and assign main reference to the type this attribute belongs to - *attr = NULL; - if (dpiGen__allocate(DPI_HTYPE_OBJECT_ATTR, objType->env, - (void**) &tempAttr, error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(objType, error, 1); - tempAttr->belongsToType = objType; - - // determine the name of the attribute - if (dpiUtils__getAttrStringWithDup("get name", param, DPI_OCI_DTYPE_PARAM, - DPI_OCI_ATTR_NAME, &tempAttr->name, &tempAttr->nameLength, - error) < 0) { - dpiObjectAttr__free(tempAttr, error); - return DPI_FAILURE; - } - - // determine type information of the attribute - if (dpiOracleType__populateTypeInfo(objType->conn, param, - DPI_OCI_DTYPE_PARAM, &tempAttr->typeInfo, error) < 0) { - dpiObjectAttr__free(tempAttr, error); - return DPI_FAILURE; - } - - *attr = tempAttr; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObjectAttr__free() [INTERNAL] -// Free the memory for an object attribute. -//----------------------------------------------------------------------------- -void dpiObjectAttr__free(dpiObjectAttr *attr, dpiError *error) -{ - if (attr->belongsToType) { - dpiGen__setRefCount(attr->belongsToType, error, -1); - attr->belongsToType = NULL; - } - if (attr->typeInfo.objectType) { - dpiGen__setRefCount(attr->typeInfo.objectType, error, -1); - attr->typeInfo.objectType = NULL; - } - if (attr->name) { - dpiUtils__freeMemory((void*) attr->name); - attr->name = NULL; - } - dpiUtils__freeMemory(attr); -} - - -//----------------------------------------------------------------------------- -// dpiObjectAttr_addRef() [PUBLIC] -// Add a reference to the object attribute. -//----------------------------------------------------------------------------- -int dpiObjectAttr_addRef(dpiObjectAttr *attr) -{ - return dpiGen__addRef(attr, DPI_HTYPE_OBJECT_ATTR, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiObjectAttr_getInfo() [PUBLIC] -// Return information about the attribute to the caller. -//----------------------------------------------------------------------------- -int dpiObjectAttr_getInfo(dpiObjectAttr *attr, dpiObjectAttrInfo *info) -{ - dpiError error; - - if (dpiGen__startPublicFn(attr, DPI_HTYPE_OBJECT_ATTR, __func__, - &error) < 0) - return dpiGen__endPublicFn(attr, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(attr, info) - info->name = attr->name; - info->nameLength = attr->nameLength; - info->typeInfo = attr->typeInfo; - return dpiGen__endPublicFn(attr, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObjectAttr_release() [PUBLIC] -// Release a reference to the object attribute. -//----------------------------------------------------------------------------- -int dpiObjectAttr_release(dpiObjectAttr *attr) -{ - return dpiGen__release(attr, DPI_HTYPE_OBJECT_ATTR, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiObjectType.c b/vendor/github.com/godror/godror/odpi/src/dpiObjectType.c deleted file mode 100644 index fbb2cf240c8..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiObjectType.c +++ /dev/null @@ -1,344 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiObjectType.c -// Implementation of object types. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// forward declarations of internal functions only used in this file -static int dpiObjectType__init(dpiObjectType *objType, void *param, - uint32_t nameAttribute, dpiError *error); - - -//----------------------------------------------------------------------------- -// dpiObjectType__allocate() [INTERNAL] -// Allocate and initialize an object type structure. -//----------------------------------------------------------------------------- -int dpiObjectType__allocate(dpiConn *conn, void *param, - uint32_t nameAttribute, dpiObjectType **objType, dpiError *error) -{ - dpiObjectType *tempObjType; - - // create structure and retain reference to connection - *objType = NULL; - if (dpiGen__allocate(DPI_HTYPE_OBJECT_TYPE, conn->env, - (void**) &tempObjType, error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(conn, error, 1); - tempObjType->conn = conn; - - // perform initialization - if (dpiObjectType__init(tempObjType, param, nameAttribute, error) < 0) { - dpiObjectType__free(tempObjType, error); - return DPI_FAILURE; - } - - *objType = tempObjType; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObjectType__check() [INTERNAL] -// Validate that the connection from which the object type was created is -// still connected and issue an error if it is not. -//----------------------------------------------------------------------------- -static int dpiObjectType__check(dpiObjectType *objType, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(objType, DPI_HTYPE_OBJECT_TYPE, fnName, - error) < 0) - return DPI_FAILURE; - return dpiConn__checkConnected(objType->conn, error); -} - - -//----------------------------------------------------------------------------- -// dpiObjectType__describe() [INTERNAL] -// Describe the object type and store information about it. Note that a -// separate call to OCIDescribeAny() is made in order to support nested types; -// an illegal attribute value is returned if this is not done. -//----------------------------------------------------------------------------- -static int dpiObjectType__describe(dpiObjectType *objType, - void *describeHandle, dpiError *error) -{ - void *collectionParam, *param; - uint16_t typeCode; - - // describe the type - if (dpiOci__describeAny(objType->conn, objType->tdo, 0, DPI_OCI_OTYPE_PTR, - describeHandle, error) < 0) - return DPI_FAILURE; - - // get top level parameter descriptor - if (dpiOci__attrGet(describeHandle, DPI_OCI_HTYPE_DESCRIBE, ¶m, 0, - DPI_OCI_ATTR_PARAM, "get top level parameter", error) < 0) - return DPI_FAILURE; - - // determine type code - if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, &typeCode, 0, - DPI_OCI_ATTR_TYPECODE, "get type code", error) < 0) - return DPI_FAILURE; - objType->typeCode = typeCode; - - // determine the number of attributes - if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, - (void*) &objType->numAttributes, 0, DPI_OCI_ATTR_NUM_TYPE_ATTRS, - "get number of attributes", error) < 0) - return DPI_FAILURE; - - // if a collection, need to determine the element type - if (typeCode == DPI_SQLT_NCO) { - objType->isCollection = 1; - - // acquire collection parameter descriptor - if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, &collectionParam, 0, - DPI_OCI_ATTR_COLLECTION_ELEMENT, "get collection descriptor", - error) < 0) - return DPI_FAILURE; - - // determine type of element - if (dpiOracleType__populateTypeInfo(objType->conn, collectionParam, - DPI_OCI_DTYPE_PARAM, &objType->elementTypeInfo, error) < 0) - return DPI_FAILURE; - - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObjectType__free() [INTERNAL] -// Free the memory for an object type. -//----------------------------------------------------------------------------- -void dpiObjectType__free(dpiObjectType *objType, dpiError *error) -{ - if (objType->conn) { - dpiGen__setRefCount(objType->conn, error, -1); - objType->conn = NULL; - } - if (objType->elementTypeInfo.objectType) { - dpiGen__setRefCount(objType->elementTypeInfo.objectType, error, -1); - objType->elementTypeInfo.objectType = NULL; - } - if (objType->schema) { - dpiUtils__freeMemory((void*) objType->schema); - objType->schema = NULL; - } - if (objType->name) { - dpiUtils__freeMemory((void*) objType->name); - objType->name = NULL; - } - dpiUtils__freeMemory(objType); -} - - -//----------------------------------------------------------------------------- -// dpiObjectType__init() [INTERNAL] -// Initialize the object type. -//----------------------------------------------------------------------------- -static int dpiObjectType__init(dpiObjectType *objType, void *param, - uint32_t nameAttribute, dpiError *error) -{ - void *describeHandle; - void *tdoReference; - - // determine the schema of the type - if (dpiUtils__getAttrStringWithDup("get schema", param, - DPI_OCI_DTYPE_PARAM, DPI_OCI_ATTR_SCHEMA_NAME, &objType->schema, - &objType->schemaLength, error) < 0) - return DPI_FAILURE; - - // determine the name of the type - if (dpiUtils__getAttrStringWithDup("get name", param, DPI_OCI_DTYPE_PARAM, - nameAttribute, &objType->name, &objType->nameLength, error) < 0) - return DPI_FAILURE; - - // retrieve TDO of the parameter and pin it in the cache - if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, (void*) &tdoReference, 0, - DPI_OCI_ATTR_REF_TDO, "get TDO reference", error) < 0) - return DPI_FAILURE; - if (dpiOci__objectPin(objType->env->handle, tdoReference, &objType->tdo, - error) < 0) - return DPI_FAILURE; - - // acquire a describe handle - if (dpiOci__handleAlloc(objType->env->handle, &describeHandle, - DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", error) < 0) - return DPI_FAILURE; - - // describe the type - if (dpiObjectType__describe(objType, describeHandle, error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return DPI_FAILURE; - } - - // free the describe handle - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiObjectType__isXmlType() [INTERNAL] -// Returns a boolean indicating if the object type in question refers to the -// type SYS.XMLTYPE. -//----------------------------------------------------------------------------- -int dpiObjectType__isXmlType(dpiObjectType *objType) -{ - static const char *schema = "SYS", *name = "XMLTYPE"; - size_t schemaLength, nameLength; - - schemaLength = strlen(schema); - nameLength = strlen(name); - return (objType->schemaLength == schemaLength && - strncmp(objType->schema, schema, schemaLength) == 0 && - objType->nameLength == nameLength && - strncmp(objType->name, name, nameLength) == 0); -} - - -//----------------------------------------------------------------------------- -// dpiObjectType_addRef() [PUBLIC] -// Add a reference to the object type. -//----------------------------------------------------------------------------- -int dpiObjectType_addRef(dpiObjectType *objType) -{ - return dpiGen__addRef(objType, DPI_HTYPE_OBJECT_TYPE, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiObjectType_createObject() [PUBLIC] -// Create a new object of the specified type and return it. Return NULL on -// error. -//----------------------------------------------------------------------------- -int dpiObjectType_createObject(dpiObjectType *objType, dpiObject **obj) -{ - dpiError error; - int status; - - // validate parameters - if (dpiObjectType__check(objType, __func__, &error) < 0) - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(objType, obj) - status = dpiObject__allocate(objType, NULL, NULL, NULL, obj, &error); - return dpiGen__endPublicFn(objType, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObjectType_getAttributes() [PUBLIC] -// Get the attributes for the object type in the provided array. -//----------------------------------------------------------------------------- -int dpiObjectType_getAttributes(dpiObjectType *objType, uint16_t numAttributes, - dpiObjectAttr **attributes) -{ - void *topLevelParam, *attrListParam, *attrParam, *describeHandle; - dpiError error; - uint16_t i; - - // validate object type and the number of attributes - if (dpiObjectType__check(objType, __func__, &error) < 0) - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(objType, attributes) - if (numAttributes < objType->numAttributes) { - dpiError__set(&error, "get attributes", DPI_ERR_ARRAY_SIZE_TOO_SMALL, - numAttributes); - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - } - if (numAttributes == 0) - return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error); - - // acquire a describe handle - if (dpiOci__handleAlloc(objType->env->handle, &describeHandle, - DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", &error) < 0) - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - - // describe the type - if (dpiOci__describeAny(objType->conn, objType->tdo, 0, DPI_OCI_OTYPE_PTR, - describeHandle, &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - } - - // get the top level parameter descriptor - if (dpiOci__attrGet(describeHandle, DPI_OCI_HTYPE_DESCRIBE, &topLevelParam, - 0, DPI_OCI_ATTR_PARAM, "get top level param", &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - } - - // get the attribute list parameter descriptor - if (dpiOci__attrGet(topLevelParam, DPI_OCI_DTYPE_PARAM, - (void*) &attrListParam, 0, DPI_OCI_ATTR_LIST_TYPE_ATTRS, - "get attr list param", &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - } - - // create attribute structure for each attribute - for (i = 0; i < objType->numAttributes; i++) { - if (dpiOci__paramGet(attrListParam, DPI_OCI_DTYPE_PARAM, &attrParam, - (uint32_t) i + 1, "get attribute param", &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - } - if (dpiObjectAttr__allocate(objType, attrParam, &attributes[i], - &error) < 0) { - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - } - } - - // free the describe handle - dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); - - return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObjectType_getInfo() [PUBLIC] -// Return information about the object type. -//----------------------------------------------------------------------------- -int dpiObjectType_getInfo(dpiObjectType *objType, dpiObjectTypeInfo *info) -{ - dpiError error; - - if (dpiGen__startPublicFn(objType, DPI_HTYPE_OBJECT_TYPE, __func__, - &error) < 0) - return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(objType, info) - info->name = objType->name; - info->nameLength = objType->nameLength; - info->schema = objType->schema; - info->schemaLength = objType->schemaLength; - info->isCollection = objType->isCollection; - info->elementTypeInfo = objType->elementTypeInfo; - info->numAttributes = objType->numAttributes; - return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiObjectType_release() [PUBLIC] -// Release a reference to the object type. -//----------------------------------------------------------------------------- -int dpiObjectType_release(dpiObjectType *objType) -{ - return dpiGen__release(objType, DPI_HTYPE_OBJECT_TYPE, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiOci.c b/vendor/github.com/godror/godror/odpi/src/dpiOci.c deleted file mode 100644 index c731324cb48..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiOci.c +++ /dev/null @@ -1,3823 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiOci.c -// Link to OCI using dynamic linking. The OCI library (11.2+) is loaded -// dynamically and a function table kept for the functions that are used by -// DPI. This function table is populated as functions are used and permits use -// of all versions of OCI from one driver. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// forward declarations of internal functions only used in this file -static void *dpiOci__allocateMem(void *unused, size_t size); -static void dpiOci__freeMem(void *unused, void *ptr); -static int dpiOci__loadLib(dpiError *error); -static int dpiOci__loadLibValidate(dpiError *error); -static int dpiOci__loadSymbol(const char *symbolName, void **symbol, - dpiError *error); -static void *dpiOci__reallocMem(void *unused, void *ptr, size_t newSize); - - -// macro to simplify code for loading each symbol -#define DPI_OCI_LOAD_SYMBOL(symbolName, symbol) \ - if (!symbol && dpiOci__loadSymbol(symbolName, (void**) &symbol, \ - error) < 0) \ - return DPI_FAILURE; - -// macro to ensure that an error handle is available -#define DPI_OCI_ENSURE_ERROR_HANDLE(error) \ - if (!error->handle && dpiError__initHandle(error) < 0) \ - return DPI_FAILURE; - -// macros to simplify code for checking results of OCI calls -#define DPI_OCI_ERROR_OCCURRED(status) \ - (status != DPI_OCI_SUCCESS && status != DPI_OCI_SUCCESS_WITH_INFO) -#define DPI_OCI_CHECK_AND_RETURN(error, status, conn, action) \ - if (DPI_OCI_ERROR_OCCURRED(status)) \ - return dpiError__setFromOCI(error, status, conn, action); \ - return DPI_SUCCESS; - - -// typedefs for all OCI functions used by ODPI-C -typedef int (*dpiOciFnType__aqDeq)(void *svchp, void *errhp, - const char *queue_name, void *deqopt, void *msgprop, void *payload_tdo, - void **payload, void **payload_ind, void **msgid, uint32_t flags); -typedef int (*dpiOciFnType__aqDeqArray)(void *svchp, void *errhp, - const char *queue_name, void *deqopt, uint32_t *iters, void **msgprop, - void *payload_tdo, void **payload, void **payload_ind, void **msgid, - void *ctxp, void *deqcbfp, uint32_t flags); -typedef int (*dpiOciFnType__aqEnq)(void *svchp, void *errhp, - const char *queue_name, void *enqopt, void *msgprop, void *payload_tdo, - void **payload, void **payload_ind, void **msgid, uint32_t flags); -typedef int (*dpiOciFnType__aqEnqArray)(void *svchp, void *errhp, - const char *queue_name, void *enqopt, uint32_t *iters, void **msgprop, - void *payload_tdo, void **payload, void **payload_ind, void **msgid, - void *ctxp, void *enqcbfp, uint32_t flags); -typedef int (*dpiOciFnType__arrayDescriptorAlloc)(const void *parenth, - void **descpp, const uint32_t type, uint32_t array_size, - const size_t xtramem_sz, void **usrmempp); -typedef int (*dpiOciFnType__arrayDescriptorFree)(void **descp, - const uint32_t type); -typedef int (*dpiOciFnType__attrGet)(const void *trgthndlp, - uint32_t trghndltyp, void *attributep, uint32_t *sizep, - uint32_t attrtype, void *errhp); -typedef int (*dpiOciFnType__attrSet)(void *trgthndlp, uint32_t trghndltyp, - void *attributep, uint32_t size, uint32_t attrtype, void *errhp); -typedef int (*dpiOciFnType__bindByName)(void *stmtp, void **bindp, void *errhp, - const char *placeholder, int32_t placeh_len, void *valuep, - int32_t value_sz, uint16_t dty, void *indp, uint16_t *alenp, - uint16_t *rcodep, uint32_t maxarr_len, uint32_t *curelep, - uint32_t mode); -typedef int (*dpiOciFnType__bindByName2)(void *stmtp, void **bindp, - void *errhp, const char *placeholder, int32_t placeh_len, void *valuep, - int64_t value_sz, uint16_t dty, void *indp, uint32_t *alenp, - uint16_t *rcodep, uint32_t maxarr_len, uint32_t *curelep, - uint32_t mode); -typedef int (*dpiOciFnType__bindByPos)(void *stmtp, void **bindp, void *errhp, - uint32_t position, void *valuep, int32_t value_sz, uint16_t dty, - void *indp, uint16_t *alenp, uint16_t *rcodep, uint32_t maxarr_len, - uint32_t *curelep, uint32_t mode); -typedef int (*dpiOciFnType__bindByPos2)(void *stmtp, void **bindp, void *errhp, - uint32_t position, void *valuep, int64_t value_sz, uint16_t dty, - void *indp, uint32_t *alenp, uint16_t *rcodep, uint32_t maxarr_len, - uint32_t *curelep, uint32_t mode); -typedef int (*dpiOciFnType__bindDynamic)(void *bindp, void *errhp, void *ictxp, - void *icbfp, void *octxp, void *ocbfp); -typedef int (*dpiOciFnType__bindObject)(void *bindp, void *errhp, - const void *type, void **pgvpp, uint32_t *pvszsp, void **indpp, - uint32_t *indszp); -typedef int (*dpiOciFnType__break)(void *hndlp, void *errhp); -typedef void (*dpiOciFnType__clientVersion)(int *major_version, - int *minor_version, int *update_num, int *patch_num, - int *port_update_num); -typedef int (*dpiOciFnType__collAppend)(void *env, void *err, const void *elem, - const void *elemind, void *coll); -typedef int (*dpiOciFnType__collAssignElem)(void *env, void *err, - int32_t index, const void *elem, const void *elemind, void *coll); -typedef int (*dpiOciFnType__collGetElem)(void *env, void *err, - const void *coll, int32_t index, int *exists, void **elem, - void **elemind); -typedef int (*dpiOciFnType__collSize)(void *env, void *err, const void *coll, - int32_t *size); -typedef int (*dpiOciFnType__collTrim)(void *env, void *err, int32_t trim_num, - void *coll); -typedef int (*dpiOciFnType__contextGetValue)(void *hdl, void *err, - const char *key, uint8_t keylen, void **ctx_value); -typedef int (*dpiOciFnType__contextSetValue)(void *hdl, void *err, - uint16_t duration, const char *key, uint8_t keylen, void *ctx_value); -typedef int (*dpiOciFnType__dateTimeConstruct)(void *hndl, void *err, - void *datetime, int16_t yr, uint8_t mnth, uint8_t dy, uint8_t hr, - uint8_t mm, uint8_t ss, uint32_t fsec, const char *tz, - size_t tzLength); -typedef int (*dpiOciFnType__dateTimeConvert)(void *hndl, void *err, - void *indate, void *outdate); -typedef int (*dpiOciFnType__dateTimeGetDate)(void *hndl, void *err, - const void *date, int16_t *yr, uint8_t *mnth, uint8_t *dy); -typedef int (*dpiOciFnType__dateTimeGetTime)(void *hndl, void *err, - void *datetime, uint8_t *hr, uint8_t *mm, uint8_t *ss, uint32_t *fsec); -typedef int (*dpiOciFnType__dateTimeGetTimeZoneOffset)(void *hndl, void *err, - const void *datetime, int8_t *hr, int8_t *mm); -typedef int (*dpiOciFnType__dateTimeIntervalAdd)(void *hndl, void *err, - void *datetime, void *inter, void *outdatetime); -typedef int (*dpiOciFnType__dateTimeSubtract)(void *hndl, void *err, - void *indate1, void *indate2, void *inter); -typedef int (*dpiOciFnType__dbShutdown)(void *svchp, void *errhp, void *admhp, - uint32_t mode); -typedef int (*dpiOciFnType__dbStartup)(void *svchp, void *errhp, void *admhp, - uint32_t mode, uint32_t flags); -typedef int (*dpiOciFnType__defineByPos)(void *stmtp, void **defnp, - void *errhp, uint32_t position, void *valuep, int32_t value_sz, - uint16_t dty, void *indp, uint16_t *rlenp, uint16_t *rcodep, - uint32_t mode); -typedef int (*dpiOciFnType__defineByPos2)(void *stmtp, void **defnp, - void *errhp, uint32_t position, void *valuep, uint64_t value_sz, - uint16_t dty, void *indp, uint32_t *rlenp, uint16_t *rcodep, - uint32_t mode); -typedef int (*dpiOciFnType__defineDynamic)(void *defnp, void *errhp, - void *octxp, void *ocbfp); -typedef int (*dpiOciFnType__defineObject)(void *defnp, void *errhp, - const void *type, void **pgvpp, uint32_t *pvszsp, void **indpp, - uint32_t *indszp); -typedef int (*dpiOciFnType__describeAny)(void *svchp, void *errhp, - void *objptr, uint32_t objnm_len, uint8_t objptr_typ, - uint8_t info_level, uint8_t objtyp, void *dschp); -typedef int (*dpiOciFnType__descriptorAlloc)(const void *parenth, - void **descpp, const uint32_t type, const size_t xtramem_sz, - void **usrmempp); -typedef int (*dpiOciFnType__descriptorFree)(void *descp, const uint32_t type); -typedef int (*dpiOciFnType__envNlsCreate)(void **envp, uint32_t mode, - void *ctxp, void *malocfp, void *ralocfp, void *mfreefp, - size_t xtramem_sz, void **usrmempp, uint16_t charset, - uint16_t ncharset); -typedef int (*dpiOciFnType__errorGet)(void *hndlp, uint32_t recordno, - char *sqlstate, int32_t *errcodep, char *bufp, uint32_t bufsiz, - uint32_t type); -typedef int (*dpiOciFnType__handleAlloc)(const void *parenth, void **hndlpp, - const uint32_t type, const size_t xtramem_sz, void **usrmempp); -typedef int (*dpiOciFnType__handleFree)(void *hndlp, const uint32_t type); -typedef int (*dpiOciFnType__intervalGetDaySecond)(void *hndl, void *err, - int32_t *dy, int32_t *hr, int32_t *mm, int32_t *ss, int32_t *fsec, - const void *result); -typedef int (*dpiOciFnType__intervalGetYearMonth)(void *hndl, void *err, - int32_t *yr, int32_t *mnth, const void *result); -typedef int (*dpiOciFnType__intervalSetDaySecond)(void *hndl, void *err, - int32_t dy, int32_t hr, int32_t mm, int32_t ss, int32_t fsec, - void *result); -typedef int (*dpiOciFnType__intervalSetYearMonth)(void *hndl, void *err, - int32_t yr, int32_t mnth, void *result); -typedef int (*dpiOciFnType__lobClose)(void *svchp, void *errhp, void *locp); -typedef int (*dpiOciFnType__lobCreateTemporary)(void *svchp, void *errhp, - void *locp, uint16_t csid, uint8_t csfrm, uint8_t lobtype, int cache, - uint16_t duration); -typedef int (*dpiOciFnType__lobFileExists)(void *svchp, void *errhp, - void *filep, int *flag); -typedef int (*dpiOciFnType__lobFileGetName)(void *envhp, void *errhp, - const void *filep, char *dir_alias, uint16_t *d_length, char *filename, - uint16_t *f_length); -typedef int (*dpiOciFnType__lobFileSetName)(void *envhp, void *errhp, - void **filepp, const char *dir_alias, uint16_t d_length, - const char *filename, uint16_t f_length); -typedef int (*dpiOciFnType__lobFreeTemporary)(void *svchp, void *errhp, - void *locp); -typedef int (*dpiOciFnType__lobGetChunkSize)(void *svchp, void *errhp, - void *locp, uint32_t *chunksizep); -typedef int (*dpiOciFnType__lobGetLength2)(void *svchp, void *errhp, - void *locp, uint64_t *lenp); -typedef int (*dpiOciFnType__lobIsOpen)(void *svchp, void *errhp, void *locp, - int *flag); -typedef int (*dpiOciFnType__lobIsTemporary)(void *envp, void *errhp, - void *locp, int *is_temporary); -typedef int (*dpiOciFnType__lobLocatorAssign)(void *svchp, void *errhp, - const void *src_locp, void **dst_locpp); -typedef int (*dpiOciFnType__lobOpen)(void *svchp, void *errhp, void *locp, - uint8_t mode); -typedef int (*dpiOciFnType__lobRead2)(void *svchp, void *errhp, void *locp, - uint64_t *byte_amtp, uint64_t *char_amtp, uint64_t offset, void *bufp, - uint64_t bufl, uint8_t piece, void *ctxp, void *cbfp, uint16_t csid, - uint8_t csfrm); -typedef int (*dpiOciFnType__lobTrim2)(void *svchp, void *errhp, void *locp, - uint64_t newlen); -typedef int (*dpiOciFnType__lobWrite2)(void *svchp, void *errhp, void *locp, - uint64_t *byte_amtp, uint64_t *char_amtp, uint64_t offset, void *bufp, - uint64_t buflen, uint8_t piece, void *ctxp, void *cbfp, uint16_t csid, - uint8_t csfrm); -typedef int (*dpiOciFnType__memoryAlloc)(void *hdl, void *err, void **mem, - uint16_t dur, uint32_t size, uint32_t flags); -typedef int (*dpiOciFnType__memoryFree)(void *hdl, void *err, void *mem); -typedef int (*dpiOciFnType__nlsCharSetConvert)(void *envhp, void *errhp, - uint16_t dstid, void *dstp, size_t dstlen, uint16_t srcid, - const void *srcp, size_t srclen, size_t *rsize); -typedef int (*dpiOciFnType__nlsCharSetIdToName)(void *envhp, char *buf, - size_t buflen, uint16_t id); -typedef uint16_t (*dpiOciFnType__nlsCharSetNameToId)(void *envhp, - const char *name); -typedef int (*dpiOciFnType__nlsEnvironmentVariableGet)(void *val, size_t size, - uint16_t item, uint16_t charset, size_t *rsize); -typedef int (*dpiOciFnType__nlsNameMap)(void *envhp, char *buf, size_t buflen, - const char *srcbuf, uint32_t flag); -typedef int (*dpiOciFnType__nlsNumericInfoGet)(void *envhp, void *errhp, - int32_t *val, uint16_t item); -typedef int (*dpiOciFnType__numberFromInt)(void *err, const void *inum, - unsigned int inum_length, unsigned int inum_s_flag, void *number); -typedef int (*dpiOciFnType__numberFromReal)(void *err, const void *number, - unsigned int rsl_length, void *rsl); -typedef int (*dpiOciFnType__numberToInt)(void *err, const void *number, - unsigned int rsl_length, unsigned int rsl_flag, void *rsl); -typedef int (*dpiOciFnType__numberToReal)(void *err, const void *number, - unsigned int rsl_length, void *rsl); -typedef int (*dpiOciFnType__objectCopy)(void *env, void *err, const void *svc, - void *source, void *null_source, void *target, void *null_target, - void *tdo, uint16_t duration, uint8_t option); -typedef int (*dpiOciFnType__objectFree)(void *env, void *err, void *instance, - uint16_t flags); -typedef int (*dpiOciFnType__objectGetAttr)(void *env, void *err, - void *instance, void *null_struct, void *tdo, const char **names, - const uint32_t *lengths, const uint32_t name_count, - const uint32_t *indexes, const uint32_t index_count, - int16_t *attr_null_status, void **attr_null_struct, void **attr_value, - void **attr_tdo); -typedef int (*dpiOciFnType__objectGetInd)(void *env, void *err, void *instance, - void **null_struct); -typedef int (*dpiOciFnType__objectNew)(void *env, void *err, const void *svc, - uint16_t typecode, void *tdo, void *table, uint16_t duration, - int value, void **instance); -typedef int (*dpiOciFnType__objectPin)(void *env, void *err, void *object_ref, - void *corhdl, int pin_option, uint16_t pin_duration, int lock_option, - void **object); -typedef int (*dpiOciFnType__objectSetAttr)(void *env, void *err, - void *instance, void *null_struct, void *tdo, const char **names, - const uint32_t *lengths, const uint32_t name_count, - const uint32_t *indexes, const uint32_t index_count, - const int16_t null_status, const void *attr_null_struct, - const void *attr_value); -typedef int (*dpiOciFnType__paramGet)(const void *hndlp, uint32_t htype, - void *errhp, void **parmdpp, uint32_t pos); -typedef int (*dpiOciFnType__passwordChange)(void *svchp, void *errhp, - const char *user_name, uint32_t usernm_len, const char *opasswd, - uint32_t opasswd_len, const char *npasswd, uint32_t npasswd_len, - uint32_t mode); -typedef int (*dpiOciFnType__ping)(void *svchp, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__rawAssignBytes)(void *env, void *err, - const char *rhs, uint32_t rhs_len, void **lhs); -typedef void *(*dpiOciFnType__rawPtr)(void *env, const void *raw); -typedef int (*dpiOciFnType__rawResize)(void *env, void *err, uint32_t new_size, - void **raw); -typedef uint32_t (*dpiOciFnType__rawSize)(void * env, const void *raw); -typedef int (*dpiOciFnType__rowidToChar)(void *rowidDesc, char *outbfp, - uint16_t *outbflp, void *errhp); -typedef int (*dpiOciFnType__serverAttach)(void *srvhp, void *errhp, - const char *dblink, int32_t dblink_len, uint32_t mode); -typedef int (*dpiOciFnType__serverDetach)(void *srvhp, void *errhp, - uint32_t mode); -typedef int (*dpiOciFnType__serverRelease)(void *hndlp, void *errhp, - char *bufp, uint32_t bufsz, uint8_t hndltype, uint32_t *version); -typedef int (*dpiOciFnType__serverRelease2)(void *hndlp, void *errhp, - char *bufp, uint32_t bufsz, uint8_t hndltype, uint32_t *version, - uint32_t mode); -typedef int (*dpiOciFnType__sessionBegin)(void *svchp, void *errhp, - void *usrhp, uint32_t credt, uint32_t mode); -typedef int (*dpiOciFnType__sessionEnd)(void *svchp, void *errhp, void *usrhp, - uint32_t mode); -typedef int (*dpiOciFnType__sessionGet)(void *envhp, void *errhp, void **svchp, - void *authhp, const char *poolName, uint32_t poolName_len, - const char *tagInfo, uint32_t tagInfo_len, const char **retTagInfo, - uint32_t *retTagInfo_len, int *found, uint32_t mode); -typedef int (*dpiOciFnType__sessionPoolCreate)(void *envhp, void *errhp, - void *spoolhp, char **poolName, uint32_t *poolNameLen, - const char *connStr, uint32_t connStrLen, uint32_t sessMin, - uint32_t sessMax, uint32_t sessIncr, const char *userid, - uint32_t useridLen, const char *password, uint32_t passwordLen, - uint32_t mode); -typedef int (*dpiOciFnType__sessionPoolDestroy)(void *spoolhp, void *errhp, - uint32_t mode); -typedef int (*dpiOciFnType__sessionRelease)(void *svchp, void *errhp, - const char *tag, uint32_t tag_len, uint32_t mode); -typedef int (*dpiOciFnType__shardingKeyColumnAdd)(void *shardingKey, - void *errhp, void *col, uint32_t colLen, uint16_t colType, - uint32_t mode); -typedef int (*dpiOciFnType__sodaBulkInsert)(void *svchp, - void *collection, void **documentarray, uint32_t arraylen, - void *opoptns, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaBulkInsertAndGet)(void *svchp, - void *collection, void **documentarray, uint32_t arraylen, - void *opoptns, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaCollCreateWithMetadata)(void *svchp, - const char *collname, uint32_t collnamelen, const char *metadata, - uint32_t metadatalen, void **collection, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaCollDrop)(void *svchp, void *coll, - int *isDropped, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaCollGetNext)(void *svchp, const void *cur, - void **coll, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaCollList)(void *svchp, const char *startname, - uint32_t stnamelen, void **cur, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaCollOpen)(void *svchp, const char *collname, - uint32_t collnamelen, void **coll, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaDataGuideGet)(void *svchp, - const void *collection, uint32_t docFlags, void **doc, void *errhp, - uint32_t mode); -typedef int (*dpiOciFnType__sodaDocCount)(void *svchp, const void *coll, - const void *optns, uint64_t *numdocs, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaDocGetNext)(void *svchp, const void *cur, - void **doc, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaFind)(void *svchp, const void *coll, - const void *findOptions, uint32_t docFlags, void **cursor, - void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaFindOne)(void *svchp, const void *coll, - const void *findOptions, uint32_t docFlags, void **doc, void *errhp, - uint32_t mode); -typedef int (*dpiOciFnType__sodaIndexCreate)(void *svchp, const void *coll, - const char *indexspec, uint32_t speclen, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaIndexDrop)(void *svchp, const char *indexname, - uint32_t indexnamelen, int *isDropped, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaInsert)(void *svchp, void *collection, - void *document, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaInsertAndGet)(void *svchp, void *collection, - void **document, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaOperKeysSet)(const void *operhp, - const char **keysArray, uint32_t *lengthsArray, uint32_t count, - void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaRemove)(void *svchp, const void *coll, - const void *optns, uint64_t *removeCount, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__sodaReplOne)(void *svchp, const void *coll, - const void *optns, void *document, int *isReplaced, void *errhp, - uint32_t mode); -typedef int (*dpiOciFnType__sodaReplOneAndGet)(void *svchp, const void *coll, - const void *optns, void **document, int *isReplaced, void *errhp, - uint32_t mode); -typedef int (*dpiOciFnType__stmtExecute)(void *svchp, void *stmtp, void *errhp, - uint32_t iters, uint32_t rowoff, const void *snap_in, void *snap_out, - uint32_t mode); -typedef int (*dpiOciFnType__stmtFetch2)(void *stmtp, void *errhp, - uint32_t nrows, uint16_t orientation, int32_t scrollOffset, - uint32_t mode); -typedef int (*dpiOciFnType__stmtGetBindInfo)(void *stmtp, void *errhp, - uint32_t size, uint32_t startloc, int32_t *found, char *bvnp[], - uint8_t bvnl[], char *invp[], uint8_t inpl[], uint8_t dupl[], - void **hndl); -typedef int (*dpiOciFnType__stmtGetNextResult)(void *stmthp, void *errhp, - void **result, uint32_t *rtype, uint32_t mode); -typedef int (*dpiOciFnType__stmtPrepare2)(void *svchp, void **stmtp, - void *errhp, const char *stmt, uint32_t stmt_len, const char *key, - uint32_t key_len, uint32_t language, uint32_t mode); -typedef int (*dpiOciFnType__stmtRelease)(void *stmtp, void *errhp, - const char *key, uint32_t key_len, uint32_t mode); -typedef int (*dpiOciFnType__stringAssignText)(void *env, void *err, - const char *rhs, uint32_t rhs_len, void **lhs); -typedef char *(*dpiOciFnType__stringPtr)(void *env, const void *vs); -typedef int (*dpiOciFnType__stringResize)(void *env, void *err, - uint32_t new_size, void **str); -typedef uint32_t (*dpiOciFnType__stringSize)(void *env, const void *vs); -typedef int (*dpiOciFnType__subscriptionRegister)(void *svchp, - void **subscrhpp, uint16_t count, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__subscriptionUnRegister)(void *svchp, - void *subscrhp, void *errhp, uint32_t mode); -typedef int (*dpiOciFnType__tableDelete)(void *env, void *err, int32_t index, - void *tbl); -typedef int (*dpiOciFnType__tableExists)(void *env, void *err, const void *tbl, - int32_t index, int *exists); -typedef int (*dpiOciFnType__tableFirst)(void *env, void *err, const void *tbl, - int32_t *index); -typedef int (*dpiOciFnType__tableLast)(void *env, void *err, const void *tbl, - int32_t *index); -typedef int (*dpiOciFnType__tableNext)(void *env, void *err, int32_t index, - const void *tbl, int32_t *next_index, int *exists); -typedef int (*dpiOciFnType__tablePrev)(void *env, void *err, int32_t index, - const void *tbl, int32_t *prev_index, int *exists); -typedef int (*dpiOciFnType__tableSize)(void *env, void *err, const void *tbl, - int32_t *size); -typedef int (*dpiOciFnType__threadKeyDestroy)(void *hndl, void *err, - void **key); -typedef int (*dpiOciFnType__threadKeyGet)(void *hndl, void *err, void *key, - void **pValue); -typedef int (*dpiOciFnType__threadKeyInit)(void *hndl, void *err, void **key, - void *destFn); -typedef int (*dpiOciFnType__threadKeySet)(void *hndl, void *err, void *key, - void *value); -typedef void (*dpiOciFnType__threadProcessInit)(void); -typedef int (*dpiOciFnType__transCommit)(void *svchp, void *errhp, - uint32_t flags); -typedef int (*dpiOciFnType__transPrepare)(void *svchp, void *errhp, - uint32_t flags); -typedef int (*dpiOciFnType__transRollback)(void *svchp, void *errhp, - uint32_t flags); -typedef int (*dpiOciFnType__transStart)(void *svchp, void *errhp, - unsigned int timeout, uint32_t flags); -typedef int (*dpiOciFnType__typeByFullName)(void *env, void *err, - const void *svc, const char *full_type_name, - uint32_t full_type_name_length, const char *version_name, - uint32_t version_name_length, uint16_t pin_duration, int get_option, - void **tdo); -typedef int (*dpiOciFnType__typeByName)(void *env, void *err, const void *svc, - const char *schema_name, uint32_t s_length, const char *type_name, - uint32_t t_length, const char *version_name, uint32_t v_length, - uint16_t pin_duration, int get_option, void **tdo); - - -// library handle for dynamically loaded OCI library -static void *dpiOciLibHandle = NULL; - -// library names to search -static const char *dpiOciLibNames[] = { -#if defined _WIN32 || defined __CYGWIN__ - "oci.dll", -#elif __APPLE__ - "libclntsh.dylib", - "libclntsh.dylib.19.1", - "libclntsh.dylib.18.1", - "libclntsh.dylib.12.1", - "libclntsh.dylib.11.1", - "libclntsh.dylib.20.1", -#else - "libclntsh.so", - "libclntsh.so.19.1", - "libclntsh.so.18.1", - "libclntsh.so.12.1", - "libclntsh.so.11.1", - "libclntsh.so.20.1", -#endif - NULL -}; - -// URL fragment to use in load library exception -#if defined _WIN32 || defined __CYGWIN__ - #define DPI_ERR_LOAD_URL_FRAGMENT "windows" -#elif __APPLE__ - #define DPI_ERR_LOAD_URL_FRAGMENT "macos" -#else - #define DPI_ERR_LOAD_URL_FRAGMENT "linux" -#endif - -// version information for loaded OCI library -static dpiVersionInfo dpiOciLibVersionInfo; - -// all OCI symbols used by ODPI-C -static struct { - dpiOciFnType__aqDeq fnAqDeq; - dpiOciFnType__aqDeqArray fnAqDeqArray; - dpiOciFnType__aqEnq fnAqEnq; - dpiOciFnType__aqEnqArray fnAqEnqArray; - dpiOciFnType__arrayDescriptorAlloc fnArrayDescriptorAlloc; - dpiOciFnType__arrayDescriptorFree fnArrayDescriptorFree; - dpiOciFnType__attrGet fnAttrGet; - dpiOciFnType__attrSet fnAttrSet; - dpiOciFnType__bindByName fnBindByName; - dpiOciFnType__bindByName2 fnBindByName2; - dpiOciFnType__bindByPos fnBindByPos; - dpiOciFnType__bindByPos2 fnBindByPos2; - dpiOciFnType__bindDynamic fnBindDynamic; - dpiOciFnType__bindObject fnBindObject; - dpiOciFnType__break fnBreak; - dpiOciFnType__clientVersion fnClientVersion; - dpiOciFnType__collAppend fnCollAppend; - dpiOciFnType__collAssignElem fnCollAssignElem; - dpiOciFnType__collGetElem fnCollGetElem; - dpiOciFnType__collSize fnCollSize; - dpiOciFnType__collTrim fnCollTrim; - dpiOciFnType__contextGetValue fnContextGetValue; - dpiOciFnType__contextSetValue fnContextSetValue; - dpiOciFnType__dateTimeConstruct fnDateTimeConstruct; - dpiOciFnType__dateTimeConvert fnDateTimeConvert; - dpiOciFnType__dateTimeGetDate fnDateTimeGetDate; - dpiOciFnType__dateTimeGetTime fnDateTimeGetTime; - dpiOciFnType__dateTimeGetTimeZoneOffset fnDateTimeGetTimeZoneOffset; - dpiOciFnType__dateTimeIntervalAdd fnDateTimeIntervalAdd; - dpiOciFnType__dateTimeSubtract fnDateTimeSubtract; - dpiOciFnType__dbShutdown fnDbShutdown; - dpiOciFnType__dbStartup fnDbStartup; - dpiOciFnType__defineByPos fnDefineByPos; - dpiOciFnType__defineByPos2 fnDefineByPos2; - dpiOciFnType__defineDynamic fnDefineDynamic; - dpiOciFnType__defineObject fnDefineObject; - dpiOciFnType__describeAny fnDescribeAny; - dpiOciFnType__descriptorAlloc fnDescriptorAlloc; - dpiOciFnType__descriptorFree fnDescriptorFree; - dpiOciFnType__envNlsCreate fnEnvNlsCreate; - dpiOciFnType__errorGet fnErrorGet; - dpiOciFnType__handleAlloc fnHandleAlloc; - dpiOciFnType__handleFree fnHandleFree; - dpiOciFnType__intervalGetDaySecond fnIntervalGetDaySecond; - dpiOciFnType__intervalGetYearMonth fnIntervalGetYearMonth; - dpiOciFnType__intervalSetDaySecond fnIntervalSetDaySecond; - dpiOciFnType__intervalSetYearMonth fnIntervalSetYearMonth; - dpiOciFnType__lobClose fnLobClose; - dpiOciFnType__lobCreateTemporary fnLobCreateTemporary; - dpiOciFnType__lobFileExists fnLobFileExists; - dpiOciFnType__lobFileGetName fnLobFileGetName; - dpiOciFnType__lobFileSetName fnLobFileSetName; - dpiOciFnType__lobFreeTemporary fnLobFreeTemporary; - dpiOciFnType__lobGetChunkSize fnLobGetChunkSize; - dpiOciFnType__lobGetLength2 fnLobGetLength2; - dpiOciFnType__lobIsOpen fnLobIsOpen; - dpiOciFnType__lobIsTemporary fnLobIsTemporary; - dpiOciFnType__lobLocatorAssign fnLobLocatorAssign; - dpiOciFnType__lobOpen fnLobOpen; - dpiOciFnType__lobRead2 fnLobRead2; - dpiOciFnType__lobTrim2 fnLobTrim2; - dpiOciFnType__lobWrite2 fnLobWrite2; - dpiOciFnType__memoryAlloc fnMemoryAlloc; - dpiOciFnType__memoryFree fnMemoryFree; - dpiOciFnType__nlsCharSetConvert fnNlsCharSetConvert; - dpiOciFnType__nlsCharSetIdToName fnNlsCharSetIdToName; - dpiOciFnType__nlsCharSetNameToId fnNlsCharSetNameToId; - dpiOciFnType__nlsEnvironmentVariableGet fnNlsEnvironmentVariableGet; - dpiOciFnType__nlsNameMap fnNlsNameMap; - dpiOciFnType__nlsNumericInfoGet fnNlsNumericInfoGet; - dpiOciFnType__numberFromInt fnNumberFromInt; - dpiOciFnType__numberFromReal fnNumberFromReal; - dpiOciFnType__numberToInt fnNumberToInt; - dpiOciFnType__numberToReal fnNumberToReal; - dpiOciFnType__objectCopy fnObjectCopy; - dpiOciFnType__objectFree fnObjectFree; - dpiOciFnType__objectGetAttr fnObjectGetAttr; - dpiOciFnType__objectGetInd fnObjectGetInd; - dpiOciFnType__objectNew fnObjectNew; - dpiOciFnType__objectPin fnObjectPin; - dpiOciFnType__objectSetAttr fnObjectSetAttr; - dpiOciFnType__paramGet fnParamGet; - dpiOciFnType__passwordChange fnPasswordChange; - dpiOciFnType__ping fnPing; - dpiOciFnType__rawAssignBytes fnRawAssignBytes; - dpiOciFnType__rawPtr fnRawPtr; - dpiOciFnType__rawResize fnRawResize; - dpiOciFnType__rawSize fnRawSize; - dpiOciFnType__rowidToChar fnRowidToChar; - dpiOciFnType__serverAttach fnServerAttach; - dpiOciFnType__serverDetach fnServerDetach; - dpiOciFnType__serverRelease fnServerRelease; - dpiOciFnType__serverRelease2 fnServerRelease2; - dpiOciFnType__sessionBegin fnSessionBegin; - dpiOciFnType__sessionEnd fnSessionEnd; - dpiOciFnType__sessionGet fnSessionGet; - dpiOciFnType__sessionPoolCreate fnSessionPoolCreate; - dpiOciFnType__sessionPoolDestroy fnSessionPoolDestroy; - dpiOciFnType__sessionRelease fnSessionRelease; - dpiOciFnType__shardingKeyColumnAdd fnShardingKeyColumnAdd; - dpiOciFnType__stmtExecute fnStmtExecute; - dpiOciFnType__sodaBulkInsert fnSodaBulkInsert; - dpiOciFnType__sodaBulkInsertAndGet fnSodaBulkInsertAndGet; - dpiOciFnType__sodaCollCreateWithMetadata fnSodaCollCreateWithMetadata; - dpiOciFnType__sodaCollDrop fnSodaCollDrop; - dpiOciFnType__sodaCollGetNext fnSodaCollGetNext; - dpiOciFnType__sodaCollList fnSodaCollList; - dpiOciFnType__sodaCollOpen fnSodaCollOpen; - dpiOciFnType__sodaDataGuideGet fnSodaDataGuideGet; - dpiOciFnType__sodaDocCount fnSodaDocCount; - dpiOciFnType__sodaDocGetNext fnSodaDocGetNext; - dpiOciFnType__sodaFind fnSodaFind; - dpiOciFnType__sodaFindOne fnSodaFindOne; - dpiOciFnType__sodaIndexCreate fnSodaIndexCreate; - dpiOciFnType__sodaIndexDrop fnSodaIndexDrop; - dpiOciFnType__sodaInsert fnSodaInsert; - dpiOciFnType__sodaInsertAndGet fnSodaInsertAndGet; - dpiOciFnType__sodaOperKeysSet fnSodaOperKeysSet; - dpiOciFnType__sodaRemove fnSodaRemove; - dpiOciFnType__sodaReplOne fnSodaReplOne; - dpiOciFnType__sodaReplOneAndGet fnSodaReplOneAndGet; - dpiOciFnType__stmtFetch2 fnStmtFetch2; - dpiOciFnType__stmtGetBindInfo fnStmtGetBindInfo; - dpiOciFnType__stmtGetNextResult fnStmtGetNextResult; - dpiOciFnType__stmtPrepare2 fnStmtPrepare2; - dpiOciFnType__stmtRelease fnStmtRelease; - dpiOciFnType__stringAssignText fnStringAssignText; - dpiOciFnType__stringPtr fnStringPtr; - dpiOciFnType__stringResize fnStringResize; - dpiOciFnType__stringSize fnStringSize; - dpiOciFnType__subscriptionRegister fnSubscriptionRegister; - dpiOciFnType__subscriptionUnRegister fnSubscriptionUnRegister; - dpiOciFnType__tableDelete fnTableDelete; - dpiOciFnType__tableExists fnTableExists; - dpiOciFnType__tableFirst fnTableFirst; - dpiOciFnType__tableLast fnTableLast; - dpiOciFnType__tableNext fnTableNext; - dpiOciFnType__tablePrev fnTablePrev; - dpiOciFnType__tableSize fnTableSize; - dpiOciFnType__threadKeyDestroy fnThreadKeyDestroy; - dpiOciFnType__threadKeyGet fnThreadKeyGet; - dpiOciFnType__threadKeyInit fnThreadKeyInit; - dpiOciFnType__threadKeySet fnThreadKeySet; - dpiOciFnType__threadProcessInit fnThreadProcessInit; - dpiOciFnType__transCommit fnTransCommit; - dpiOciFnType__transPrepare fnTransPrepare; - dpiOciFnType__transRollback fnTransRollback; - dpiOciFnType__transStart fnTransStart; - dpiOciFnType__typeByFullName fnTypeByFullName; - dpiOciFnType__typeByName fnTypeByName; -} dpiOciSymbols; - - -//----------------------------------------------------------------------------- -// dpiOci__allocateMem() [INTERNAL] -// Wrapper for OCI allocation of memory, only used when debugging memory -// allocation. -//----------------------------------------------------------------------------- -static void *dpiOci__allocateMem(UNUSED void *unused, size_t size) -{ - void *ptr; - - ptr = malloc(size); - dpiDebug__print("OCI allocated %u bytes at %p\n", size, ptr); - return ptr; -} - - -//----------------------------------------------------------------------------- -// dpiOci__aqDeq() [INTERNAL] -// Wrapper for OCIAQDeq(). -//----------------------------------------------------------------------------- -int dpiOci__aqDeq(dpiConn *conn, const char *queueName, void *options, - void *msgProps, void *payloadType, void **payload, void **payloadInd, - void **msgId, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIAQDeq", dpiOciSymbols.fnAqDeq) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnAqDeq)(conn->handle, error->handle, queueName, - options, msgProps, payloadType, payload, payloadInd, msgId, - DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "dequeue message"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__aqDeqArray() [INTERNAL] -// Wrapper for OCIAQDeqArray(). -//----------------------------------------------------------------------------- -int dpiOci__aqDeqArray(dpiConn *conn, const char *queueName, void *options, - uint32_t *numIters, void **msgProps, void *payloadType, void **payload, - void **payloadInd, void **msgId, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIAQDeqArray", dpiOciSymbols.fnAqDeqArray) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnAqDeqArray)(conn->handle, error->handle, - queueName, options, numIters, msgProps, payloadType, payload, - payloadInd, msgId, NULL, NULL, DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "dequeue messages"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__aqEnq() [INTERNAL] -// Wrapper for OCIAQEnq(). -//----------------------------------------------------------------------------- -int dpiOci__aqEnq(dpiConn *conn, const char *queueName, void *options, - void *msgProps, void *payloadType, void **payload, void **payloadInd, - void **msgId, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIAQEnq", dpiOciSymbols.fnAqEnq) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnAqEnq)(conn->handle, error->handle, queueName, - options, msgProps, payloadType, payload, payloadInd, msgId, - DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "enqueue message"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__aqEnqArray() [INTERNAL] -// Wrapper for OCIAQEnqArray(). -//----------------------------------------------------------------------------- -int dpiOci__aqEnqArray(dpiConn *conn, const char *queueName, void *options, - uint32_t *numIters, void **msgProps, void *payloadType, void **payload, - void **payloadInd, void **msgId, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIAQEnqArray", dpiOciSymbols.fnAqEnqArray) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnAqEnqArray)(conn->handle, error->handle, - queueName, options, numIters, msgProps, payloadType, payload, - payloadInd, msgId, NULL, NULL, DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "enqueue messages"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__arrayDescriptorAlloc() [INTERNAL] -// Wrapper for OCIArrayDescriptorAlloc(). -//----------------------------------------------------------------------------- -int dpiOci__arrayDescriptorAlloc(void *envHandle, void **handle, - uint32_t handleType, uint32_t arraySize, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIArrayDescriptorAlloc", - dpiOciSymbols.fnArrayDescriptorAlloc) - status = (*dpiOciSymbols.fnArrayDescriptorAlloc)(envHandle, handle, - handleType, arraySize, 0, NULL); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "allocate descriptors"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__arrayDescriptorFree() [INTERNAL] -// Wrapper for OCIArrayDescriptorFree(). -//----------------------------------------------------------------------------- -int dpiOci__arrayDescriptorFree(void **handle, uint32_t handleType) -{ - dpiError *error = NULL; - int status; - - DPI_OCI_LOAD_SYMBOL("OCIArrayDescriptorFree", - dpiOciSymbols.fnArrayDescriptorFree) - status = (*dpiOciSymbols.fnArrayDescriptorFree)(handle, handleType); - if (status != DPI_OCI_SUCCESS && dpiDebugLevel & DPI_DEBUG_LEVEL_FREES) - dpiDebug__print("free array descriptors %p, handleType %d failed\n", - handle, handleType); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__attrGet() [INTERNAL] -// Wrapper for OCIAttrGet(). -//----------------------------------------------------------------------------- -int dpiOci__attrGet(const void *handle, uint32_t handleType, void *ptr, - uint32_t *size, uint32_t attribute, const char *action, - dpiError *error) -{ - int status; - - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnAttrGet)(handle, handleType, ptr, size, - attribute, error->handle); - if (!action) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); -} - - -//----------------------------------------------------------------------------- -// dpiOci__attrSet() [INTERNAL] -// Wrapper for OCIAttrSet(). -//----------------------------------------------------------------------------- -int dpiOci__attrSet(void *handle, uint32_t handleType, void *ptr, - uint32_t size, uint32_t attribute, const char *action, dpiError *error) -{ - int status; - - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnAttrSet)(handle, handleType, ptr, size, - attribute, error->handle); - if (!action) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); -} - - -//----------------------------------------------------------------------------- -// dpiOci__bindByName() [INTERNAL] -// Wrapper for OCIBindByName(). -//----------------------------------------------------------------------------- -int dpiOci__bindByName(dpiStmt *stmt, void **bindHandle, const char *name, - int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIBindByName", dpiOciSymbols.fnBindByName) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnBindByName)(stmt->handle, bindHandle, - error->handle, name, nameLength, - (dynamicBind) ? NULL : var->buffer.data.asRaw, - (var->isDynamic) ? INT_MAX : (int32_t) var->sizeInBytes, - var->type->oracleType, (dynamicBind) ? NULL : - var->buffer.indicator, - (dynamicBind || var->type->sizeInBytes) ? NULL : - var->buffer.actualLength16, - (dynamicBind) ? NULL : var->buffer.returnCode, - (var->isArray) ? var->buffer.maxArraySize : 0, - (var->isArray) ? &var->buffer.actualArraySize : NULL, - (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by name"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__bindByName2() [INTERNAL] -// Wrapper for OCIBindByName2(). -//----------------------------------------------------------------------------- -int dpiOci__bindByName2(dpiStmt *stmt, void **bindHandle, const char *name, - int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIBindByName2", dpiOciSymbols.fnBindByName2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnBindByName2)(stmt->handle, bindHandle, - error->handle, name, nameLength, - (dynamicBind) ? NULL : var->buffer.data.asRaw, - (var->isDynamic) ? INT_MAX : var->sizeInBytes, - var->type->oracleType, (dynamicBind) ? NULL : - var->buffer.indicator, - (dynamicBind || var->type->sizeInBytes) ? NULL : - var->buffer.actualLength32, - (dynamicBind) ? NULL : var->buffer.returnCode, - (var->isArray) ? var->buffer.maxArraySize : 0, - (var->isArray) ? &var->buffer.actualArraySize : NULL, - (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by name"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__bindByPos() [INTERNAL] -// Wrapper for OCIBindByPos(). -//----------------------------------------------------------------------------- -int dpiOci__bindByPos(dpiStmt *stmt, void **bindHandle, uint32_t pos, - int dynamicBind, dpiVar *var, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIBindByPos", dpiOciSymbols.fnBindByPos) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnBindByPos)(stmt->handle, bindHandle, - error->handle, pos, (dynamicBind) ? NULL : var->buffer.data.asRaw, - (var->isDynamic) ? INT_MAX : (int32_t) var->sizeInBytes, - var->type->oracleType, (dynamicBind) ? NULL : - var->buffer.indicator, - (dynamicBind || var->type->sizeInBytes) ? NULL : - var->buffer.actualLength16, - (dynamicBind) ? NULL : var->buffer.returnCode, - (var->isArray) ? var->buffer.maxArraySize : 0, - (var->isArray) ? &var->buffer.actualArraySize : NULL, - (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by position"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__bindByPos2() [INTERNAL] -// Wrapper for OCIBindByPos2(). -//----------------------------------------------------------------------------- -int dpiOci__bindByPos2(dpiStmt *stmt, void **bindHandle, uint32_t pos, - int dynamicBind, dpiVar *var, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIBindByPos2", dpiOciSymbols.fnBindByPos2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnBindByPos2)(stmt->handle, bindHandle, - error->handle, pos, (dynamicBind) ? NULL : var->buffer.data.asRaw, - (var->isDynamic) ? INT_MAX : var->sizeInBytes, - var->type->oracleType, (dynamicBind) ? NULL : - var->buffer.indicator, - (dynamicBind || var->type->sizeInBytes) ? NULL : - var->buffer.actualLength32, - (dynamicBind) ? NULL : var->buffer.returnCode, - (var->isArray) ? var->buffer.maxArraySize : 0, - (var->isArray) ? &var->buffer.actualArraySize : NULL, - (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by position"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__bindDynamic() [INTERNAL] -// Wrapper for OCIBindDynamic(). -//----------------------------------------------------------------------------- -int dpiOci__bindDynamic(dpiVar *var, void *bindHandle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIBindDynamic", dpiOciSymbols.fnBindDynamic) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnBindDynamic)(bindHandle, error->handle, var, - (void*) dpiVar__inBindCallback, var, - (void*) dpiVar__outBindCallback); - DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "bind dynamic"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__bindObject() [INTERNAL] -// Wrapper for OCIBindObject(). -//----------------------------------------------------------------------------- -int dpiOci__bindObject(dpiVar *var, void *bindHandle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIBindObject", dpiOciSymbols.fnBindObject) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnBindObject)(bindHandle, error->handle, - var->objectType->tdo, (void**) var->buffer.data.asRaw, 0, - var->buffer.objectIndicator, 0); - DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "bind object"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__break() [INTERNAL] -// Wrapper for OCIBreak(). -//----------------------------------------------------------------------------- -int dpiOci__break(dpiConn *conn, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIBreak", dpiOciSymbols.fnBreak) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnBreak)(conn->handle, error->handle); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "break execution"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__clientVersion() [INTERNAL] -// Set the version information in the context to the OCI client version -// information that was discovered when the OCI library was loaded. -//----------------------------------------------------------------------------- -void dpiOci__clientVersion(dpiContext *context) -{ - context->versionInfo = &dpiOciLibVersionInfo; -} - - -//----------------------------------------------------------------------------- -// dpiOci__collAppend() [INTERNAL] -// Wrapper for OCICollAppend(). -//----------------------------------------------------------------------------- -int dpiOci__collAppend(dpiConn *conn, const void *elem, const void *elemInd, - void *coll, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCICollAppend", dpiOciSymbols.fnCollAppend) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnCollAppend)(conn->env->handle, error->handle, - elem, elemInd, coll); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "append element"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__collAssignElem() [INTERNAL] -// Wrapper for OCICollAssignElem(). -//----------------------------------------------------------------------------- -int dpiOci__collAssignElem(dpiConn *conn, int32_t index, const void *elem, - const void *elemInd, void *coll, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCICollAssignElem", dpiOciSymbols.fnCollAssignElem) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnCollAssignElem)(conn->env->handle, - error->handle, index, elem, elemInd, coll); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "assign element"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__collGetElem() [INTERNAL] -// Wrapper for OCICollGetElem(). -//----------------------------------------------------------------------------- -int dpiOci__collGetElem(dpiConn *conn, void *coll, int32_t index, int *exists, - void **elem, void **elemInd, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCICollGetElem", dpiOciSymbols.fnCollGetElem) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnCollGetElem)(conn->env->handle, error->handle, - coll, index, exists, elem, elemInd); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get element"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__collSize() [INTERNAL] -// Wrapper for OCICollSize(). -//----------------------------------------------------------------------------- -int dpiOci__collSize(dpiConn *conn, void *coll, int32_t *size, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCICollSize", dpiOciSymbols.fnCollSize) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnCollSize)(conn->env->handle, error->handle, - coll, size); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get size"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__collTrim() [INTERNAL] -// Wrapper for OCICollTrim(). -//----------------------------------------------------------------------------- -int dpiOci__collTrim(dpiConn *conn, uint32_t numToTrim, void *coll, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCICollTrim", dpiOciSymbols.fnCollTrim) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnCollTrim)(conn->env->handle, error->handle, - (int32_t) numToTrim, coll); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "trim"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__contextGetValue() [INTERNAL] -// Wrapper for OCIContextGetValue(). -//----------------------------------------------------------------------------- -int dpiOci__contextGetValue(dpiConn *conn, const char *key, uint32_t keyLength, - void **value, int checkError, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIContextGetValue", dpiOciSymbols.fnContextGetValue) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnContextGetValue)(conn->sessionHandle, - error->handle, key, (uint8_t) keyLength, value); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get context value"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__contextSetValue() [INTERNAL] -// Wrapper for OCIContextSetValue(). -//----------------------------------------------------------------------------- -int dpiOci__contextSetValue(dpiConn *conn, const char *key, uint32_t keyLength, - void *value, int checkError, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIContextSetValue", dpiOciSymbols.fnContextSetValue) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnContextSetValue)(conn->sessionHandle, - error->handle, DPI_OCI_DURATION_SESSION, key, (uint8_t) keyLength, - value); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "set context value"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dateTimeConstruct() [INTERNAL] -// Wrapper for OCIDateTimeConstruct(). -//----------------------------------------------------------------------------- -int dpiOci__dateTimeConstruct(void *envHandle, void *handle, int16_t year, - uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, - uint8_t second, uint32_t fsecond, const char *tz, size_t tzLength, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDateTimeConstruct", - dpiOciSymbols.fnDateTimeConstruct) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDateTimeConstruct)(envHandle, error->handle, - handle, year, month, day, hour, minute, second, fsecond, tz, - tzLength); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "construct date"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dateTimeConvert() [INTERNAL] -// Wrapper for OCIDateTimeConvert(). -//----------------------------------------------------------------------------- -int dpiOci__dateTimeConvert(void *envHandle, void *inDate, void *outDate, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDateTimeConvert", dpiOciSymbols.fnDateTimeConvert) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDateTimeConvert)(envHandle, error->handle, - inDate, outDate); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "convert date"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dateTimeGetDate() [INTERNAL] -// Wrapper for OCIDateTimeGetDate(). -//----------------------------------------------------------------------------- -int dpiOci__dateTimeGetDate(void *envHandle, void *handle, int16_t *year, - uint8_t *month, uint8_t *day, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDateTimeGetDate", dpiOciSymbols.fnDateTimeGetDate) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDateTimeGetDate)(envHandle, error->handle, - handle, year, month, day); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get date portion"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dateTimeGetTime() [INTERNAL] -// Wrapper for OCIDateTimeGetTime(). -//----------------------------------------------------------------------------- -int dpiOci__dateTimeGetTime(void *envHandle, void *handle, uint8_t *hour, - uint8_t *minute, uint8_t *second, uint32_t *fsecond, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDateTimeGetTime", dpiOciSymbols.fnDateTimeGetTime) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDateTimeGetTime)(envHandle, error->handle, - handle, hour, minute, second, fsecond); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get time portion"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dateTimeGetTimeZoneOffset() [INTERNAL] -// Wrapper for OCIDateTimeGetTimeZoneOffset(). -//----------------------------------------------------------------------------- -int dpiOci__dateTimeGetTimeZoneOffset(void *envHandle, void *handle, - int8_t *tzHourOffset, int8_t *tzMinuteOffset, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDateTimeGetTimeZoneOffset", - dpiOciSymbols.fnDateTimeGetTimeZoneOffset) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDateTimeGetTimeZoneOffset)(envHandle, - error->handle, handle, tzHourOffset, tzMinuteOffset); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get time zone portion"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dateTimeIntervalAdd() [INTERNAL] -// Wrapper for OCIDateTimeIntervalAdd(). -//----------------------------------------------------------------------------- -int dpiOci__dateTimeIntervalAdd(void *envHandle, void *handle, void *interval, - void *outHandle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDateTimeIntervalAdd", - dpiOciSymbols.fnDateTimeIntervalAdd) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDateTimeIntervalAdd)(envHandle, error->handle, - handle, interval, outHandle); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "add interval to date"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dateTimeSubtract() [INTERNAL] -// Wrapper for OCIDateTimeSubtract(). -//----------------------------------------------------------------------------- -int dpiOci__dateTimeSubtract(void *envHandle, void *handle1, void *handle2, - void *interval, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDateTimeSubtract", - dpiOciSymbols.fnDateTimeSubtract) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDateTimeSubtract)(envHandle, error->handle, - handle1, handle2, interval); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "subtract date"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dbShutdown() [INTERNAL] -// Wrapper for OCIDBShutdown(). -//----------------------------------------------------------------------------- -int dpiOci__dbShutdown(dpiConn *conn, uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDBShutdown", dpiOciSymbols.fnDbShutdown) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDbShutdown)(conn->handle, error->handle, NULL, - mode); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "shutdown database"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__dbStartup() [INTERNAL] -// Wrapper for OCIDBStartup(). -//----------------------------------------------------------------------------- -int dpiOci__dbStartup(dpiConn *conn, uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDBStartup", dpiOciSymbols.fnDbStartup) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDbStartup)(conn->handle, error->handle, NULL, - DPI_OCI_DEFAULT, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "startup database"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__defineByPos() [INTERNAL] -// Wrapper for OCIDefineByPos(). -//----------------------------------------------------------------------------- -int dpiOci__defineByPos(dpiStmt *stmt, void **defineHandle, uint32_t pos, - dpiVar *var, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDefineByPos", dpiOciSymbols.fnDefineByPos) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDefineByPos)(stmt->handle, defineHandle, - error->handle, pos, (var->isDynamic) ? NULL : - var->buffer.data.asRaw, - (var->isDynamic) ? INT_MAX : (int32_t) var->sizeInBytes, - var->type->oracleType, (var->isDynamic) ? NULL : - var->buffer.indicator, - (var->isDynamic) ? NULL : var->buffer.actualLength16, - (var->isDynamic) ? NULL : var->buffer.returnCode, - (var->isDynamic) ? DPI_OCI_DYNAMIC_FETCH : DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "define"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__defineByPos2() [INTERNAL] -// Wrapper for OCIDefineByPos2(). -//----------------------------------------------------------------------------- -int dpiOci__defineByPos2(dpiStmt *stmt, void **defineHandle, uint32_t pos, - dpiVar *var, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDefineByPos2", dpiOciSymbols.fnDefineByPos2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDefineByPos2)(stmt->handle, defineHandle, - error->handle, pos, (var->isDynamic) ? NULL : - var->buffer.data.asRaw, - (var->isDynamic) ? INT_MAX : var->sizeInBytes, - var->type->oracleType, (var->isDynamic) ? NULL : - var->buffer.indicator, - (var->isDynamic) ? NULL : var->buffer.actualLength32, - (var->isDynamic) ? NULL : var->buffer.returnCode, - (var->isDynamic) ? DPI_OCI_DYNAMIC_FETCH : DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "define"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__defineDynamic() [INTERNAL] -// Wrapper for OCIDefineDynamic(). -//----------------------------------------------------------------------------- -int dpiOci__defineDynamic(dpiVar *var, void *defineHandle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDefineDynamic", dpiOciSymbols.fnDefineDynamic) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDefineDynamic)(defineHandle, error->handle, var, - (void*) dpiVar__defineCallback); - DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "define dynamic"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__defineObject() [INTERNAL] -// Wrapper for OCIDefineObject(). -//----------------------------------------------------------------------------- -int dpiOci__defineObject(dpiVar *var, void *defineHandle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDefineObject", dpiOciSymbols.fnDefineObject) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDefineObject)(defineHandle, error->handle, - var->objectType->tdo, (void**) var->buffer.data.asRaw, 0, - var->buffer.objectIndicator, 0); - DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "define object"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__describeAny() [INTERNAL] -// Wrapper for OCIDescribeAny(). -//----------------------------------------------------------------------------- -int dpiOci__describeAny(dpiConn *conn, void *obj, uint32_t objLength, - uint8_t objType, void *describeHandle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDescribeAny", dpiOciSymbols.fnDescribeAny) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnDescribeAny)(conn->handle, error->handle, obj, - objLength, objType, 0, DPI_OCI_PTYPE_TYPE, describeHandle); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "describe type"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__descriptorAlloc() [INTERNAL] -// Wrapper for OCIDescriptorAlloc(). -//----------------------------------------------------------------------------- -int dpiOci__descriptorAlloc(void *envHandle, void **handle, - const uint32_t handleType, const char *action, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDescriptorAlloc", dpiOciSymbols.fnDescriptorAlloc) - status = (*dpiOciSymbols.fnDescriptorAlloc)(envHandle, handle, handleType, - 0, NULL); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); -} - - -//----------------------------------------------------------------------------- -// dpiOci__descriptorFree() [INTERNAL] -// Wrapper for OCIDescriptorFree(). -//----------------------------------------------------------------------------- -int dpiOci__descriptorFree(void *handle, uint32_t handleType) -{ - dpiError *error = NULL; - int status; - - DPI_OCI_LOAD_SYMBOL("OCIDescriptorFree", dpiOciSymbols.fnDescriptorFree) - status = (*dpiOciSymbols.fnDescriptorFree)(handle, handleType); - if (status != DPI_OCI_SUCCESS && dpiDebugLevel & DPI_DEBUG_LEVEL_FREES) - dpiDebug__print("free descriptor %p, type %d failed\n", handle, - handleType); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__envNlsCreate() [INTERNAL] -// Wrapper for OCIEnvNlsCreate(). -//----------------------------------------------------------------------------- -int dpiOci__envNlsCreate(void **envHandle, uint32_t mode, uint16_t charsetId, - uint16_t ncharsetId, dpiError *error) -{ - void *mallocFn = NULL, *reallocFn = NULL, *freeFn = NULL; - int status; - - *envHandle = NULL; - DPI_OCI_LOAD_SYMBOL("OCIEnvNlsCreate", dpiOciSymbols.fnEnvNlsCreate) - if (dpiDebugLevel & DPI_DEBUG_LEVEL_MEM) { - mallocFn = (void*) dpiOci__allocateMem; - reallocFn = (void*) dpiOci__reallocMem; - freeFn = (void*) dpiOci__freeMem; - } - status = (*dpiOciSymbols.fnEnvNlsCreate)(envHandle, mode, NULL, mallocFn, - reallocFn, freeFn, 0, NULL, charsetId, ncharsetId); - if (*envHandle) { - if (status == DPI_OCI_SUCCESS || status == DPI_OCI_SUCCESS_WITH_INFO) - return DPI_SUCCESS; - if (dpiOci__errorGet(*envHandle, DPI_OCI_HTYPE_ENV, charsetId, - "create env", error) == 0) - return DPI_FAILURE; - } - return dpiError__set(error, "create env", DPI_ERR_CREATE_ENV); -} - - -//----------------------------------------------------------------------------- -// dpiOci__errorGet() [INTERNAL] -// Wrapper for OCIErrorGet(). -//----------------------------------------------------------------------------- -int dpiOci__errorGet(void *handle, uint32_t handleType, uint16_t charsetId, - const char *action, dpiError *error) -{ - uint32_t i, numChars, bufferChars; - uint16_t *utf16chars; - int status; - char *ptr; - - DPI_OCI_LOAD_SYMBOL("OCIErrorGet", dpiOciSymbols.fnErrorGet) - status = (*dpiOciSymbols.fnErrorGet)(handle, 1, NULL, &error->buffer->code, - error->buffer->message, sizeof(error->buffer->message), - handleType); - if (status != DPI_OCI_SUCCESS) - return dpiError__set(error, action, DPI_ERR_GET_FAILED); - error->buffer->action = action; - - // determine length of message since OCI does not provide this information; - // all encodings except UTF-16 can use normal string processing; cannot use - // type whar_t for processing UTF-16, though, as its size may be 4 on some - // platforms, not 2; also strip trailing whitespace from error messages - if (charsetId == DPI_CHARSET_ID_UTF16) { - numChars = 0; - utf16chars = (uint16_t*) error->buffer->message; - bufferChars = sizeof(error->buffer->message) / 2; - for (i = 0; i < bufferChars; i++) { - if (utf16chars[i] == 0) - break; - if (utf16chars[i] > 127 || !isspace(utf16chars[i])) - numChars = i + 1; - } - error->buffer->messageLength = numChars * 2; - } else { - error->buffer->messageLength = - (uint32_t) strlen(error->buffer->message); - ptr = error->buffer->message + error->buffer->messageLength - 1; - while (ptr > error->buffer->message && isspace((uint8_t) *ptr--)) - error->buffer->messageLength--; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__freeMem() [INTERNAL] -// Wrapper for OCI allocation of memory, only used when debugging memory -// allocation. -//----------------------------------------------------------------------------- -static void dpiOci__freeMem(UNUSED void *unused, void *ptr) -{ - char message[40]; - - (void) sprintf(message, "OCI freed ptr at %p", ptr); - free(ptr); - dpiDebug__print("%s\n", message); -} - - -//----------------------------------------------------------------------------- -// dpiOci__handleAlloc() [INTERNAL] -// Wrapper for OCIHandleAlloc(). -//----------------------------------------------------------------------------- -int dpiOci__handleAlloc(void *envHandle, void **handle, uint32_t handleType, - const char *action, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIHandleAlloc", dpiOciSymbols.fnHandleAlloc) - status = (*dpiOciSymbols.fnHandleAlloc)(envHandle, handle, handleType, 0, - NULL); - if (handleType == DPI_OCI_HTYPE_ERROR && status != DPI_OCI_SUCCESS) - return dpiError__set(error, action, DPI_ERR_NO_MEMORY); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); -} - - -//----------------------------------------------------------------------------- -// dpiOci__handleFree() [INTERNAL] -// Wrapper for OCIHandleFree(). -//----------------------------------------------------------------------------- -int dpiOci__handleFree(void *handle, uint32_t handleType) -{ - dpiError *error = NULL; - int status; - - DPI_OCI_LOAD_SYMBOL("OCIHandleFree", dpiOciSymbols.fnHandleFree) - status = (*dpiOciSymbols.fnHandleFree)(handle, handleType); - if (status != DPI_OCI_SUCCESS && dpiDebugLevel & DPI_DEBUG_LEVEL_FREES) - dpiDebug__print("free handle %p, handleType %d failed\n", handle, - handleType); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__intervalGetDaySecond() [INTERNAL] -// Wrapper for OCIIntervalGetDaySecond(). -//----------------------------------------------------------------------------- -int dpiOci__intervalGetDaySecond(void *envHandle, int32_t *day, int32_t *hour, - int32_t *minute, int32_t *second, int32_t *fsecond, - const void *interval, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIIntervalGetDaySecond", - dpiOciSymbols.fnIntervalGetDaySecond) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnIntervalGetDaySecond)(envHandle, - error->handle, day, hour, minute, second, fsecond, interval); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get interval components"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__intervalGetYearMonth() [INTERNAL] -// Wrapper for OCIIntervalGetYearMonth(). -//----------------------------------------------------------------------------- -int dpiOci__intervalGetYearMonth(void *envHandle, int32_t *year, - int32_t *month, const void *interval, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIIntervalGetYearMonth", - dpiOciSymbols.fnIntervalGetYearMonth) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnIntervalGetYearMonth)(envHandle, error->handle, - year, month, interval); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get interval components"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__intervalSetDaySecond() [INTERNAL] -// Wrapper for OCIIntervalSetDaySecond(). -//----------------------------------------------------------------------------- -int dpiOci__intervalSetDaySecond(void *envHandle, int32_t day, int32_t hour, - int32_t minute, int32_t second, int32_t fsecond, void *interval, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIIntervalSetDaySecond", - dpiOciSymbols.fnIntervalSetDaySecond) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnIntervalSetDaySecond)(envHandle, error->handle, - day, hour, minute, second, fsecond, interval); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "set interval components"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__intervalSetYearMonth() [INTERNAL] -// Wrapper for OCIIntervalSetYearMonth(). -//----------------------------------------------------------------------------- -int dpiOci__intervalSetYearMonth(void *envHandle, int32_t year, int32_t month, - void *interval, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIIntervalSetYearMonth", - dpiOciSymbols.fnIntervalSetYearMonth) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnIntervalSetYearMonth)(envHandle, error->handle, - year, month, interval); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "set interval components"); -} - - -#ifdef _WIN32 -//----------------------------------------------------------------------------- -// dpiOci__checkDllArchitecture() [INTERNAL] -// Check the architecture of the specified DLL name and check that it -// matches the expected architecture. Returns -1 if the DLL architecture could -// not be determined, 0 if it does not match and 1 if it matches. -//----------------------------------------------------------------------------- -static int dpiOci__checkDllArchitecture(const char *name) -{ - IMAGE_DOS_HEADER dosHeader; - IMAGE_NT_HEADERS ntHeaders; - FILE *fp; - - fp = fopen(name, "rb"); - if (!fp) - return -1; - fread(&dosHeader, sizeof(dosHeader), 1, fp); - if (dosHeader.e_magic != IMAGE_DOS_SIGNATURE) { - fclose(fp); - return -1; - } - fseek(fp, dosHeader.e_lfanew, SEEK_SET); - fread(&ntHeaders, sizeof(ntHeaders), 1, fp); - fclose(fp); - if (ntHeaders.Signature != IMAGE_NT_SIGNATURE) - return -1; -#if defined _M_AMD64 - if (ntHeaders.FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64) - return 1; -#elif defined _M_IX86 - if (ntHeaders.FileHeader.Machine == IMAGE_FILE_MACHINE_I386) - return 1; -#endif - return 0; -} - - -//----------------------------------------------------------------------------- -// dpiOci__findAndCheckDllArchitecture() [INTERNAL] -// Attempt to find the specified DLL name using the standard search path and -// if the DLL can be found but is of the wrong architecture, include the full -// name of the DLL in the load error. Return -1 if such a DLL could not be -// found and 0 if the load error was changed. -//----------------------------------------------------------------------------- -static int dpiOci__findAndCheckDllArchitecture(const char *dllName, - char *loadError, size_t loadErrorLength) -{ - char fullName[_MAX_PATH + 1], *path, *temp; - size_t length; - int found = 0; - - // first search executable directory - if (GetModuleFileName(NULL, fullName, sizeof(fullName)) != 0) { - temp = strrchr(fullName, '\\'); - if (temp) { - *(temp + 1) = '\0'; - strncat(fullName, dllName, - sizeof(fullName) - strlen(fullName) - 1); - if (dpiOci__checkDllArchitecture(fullName) == 0) - found = 1; - } - } - - // check current directory - if (!found && GetCurrentDirectory(sizeof(fullName), fullName) != 0) { - temp = fullName + strlen(fullName); - snprintf(temp, sizeof(fullName) - strlen(fullName), "\\%s", dllName); - if (dpiOci__checkDllArchitecture(fullName) == 0) - found = 1; - } - - // search PATH - path = getenv("PATH"); - if (path) { - while (!found) { - temp = strchr(path, ';'); - if (!temp) - length = strlen(path); - else length = temp - path; - if (length <= _MAX_DIR) { - snprintf(fullName, sizeof(fullName), "%.*s\\%s", (int) length, - path, dllName); - if (dpiOci__checkDllArchitecture(fullName) == 0) { - found = 1; - break; - } - } - if (!temp) - break; - path = temp + 1; - } - } - - // if found, adjust the load error - if (found) { - snprintf(loadError, loadErrorLength, - "%s is not the correct architecture", fullName); - loadError[loadErrorLength - 1] = '\0'; - return 0; - } - - return -1; -} - - -//----------------------------------------------------------------------------- -// dpiOci__getLoadErrorOnWindows() [INTERNAL] -// Get the error message for a load failure on Windows. -//----------------------------------------------------------------------------- -static void dpiOci__getLoadErrorOnWindows(const char *dllName, - char *loadError, size_t loadErrorLength) -{ - DWORD length = 0, errorNum, status; - wchar_t *wLoadError = NULL; - - // if DLL is of the wrong architecture, attempt to locate the DLL that was - // loaded and use that information if it can be found - errorNum = GetLastError(); - if (errorNum == ERROR_BAD_EXE_FORMAT && - dpiOci__findAndCheckDllArchitecture(dllName, loadError, - loadErrorLength) == 0) - return; - - // get error message in Unicode first - // use English unless English error messages aren't available - status = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, errorNum, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), - (LPWSTR) &wLoadError, 0, NULL); - if (!status && GetLastError() == ERROR_MUI_FILE_NOT_FOUND) - FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, - NULL, errorNum, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPWSTR) &wLoadError, 0, NULL); - - if (wLoadError) { - - // strip trailing period and carriage return from message, if needed - length = (DWORD) wcslen(wLoadError); - while (length > 0) { - if (wLoadError[length - 1] > 127 || - (wLoadError[length - 1] != L'.' && - !isspace(wLoadError[length - 1]))) - break; - length--; - } - wLoadError[length] = L'\0'; - - // convert to a multi-byte string in UTF-8 encoding - if (length > 0) - length = WideCharToMultiByte(CP_UTF8, 0, wLoadError, -1, loadError, - (int) loadErrorLength, NULL, NULL); - LocalFree(wLoadError); - - } - - // fallback in case message cannot be determined - if (length == 0) - sprintf(loadError, "DLL load failed: Windows Error %d", errorNum); -} - - -//----------------------------------------------------------------------------- -// dpiOci__loadLibOnWindows() [INTERNAL] -// Load the library on the Windows platform. First an attempt is made to -// determine the location of the module containing ODPI-C. If found, an attempt -// is made to load oci.dll from that location; otherwise a standard Windows -// search is made for oci.dll. -//----------------------------------------------------------------------------- -static void dpiOci__loadLibOnWindows(const char *dllName) -{ - char moduleName[MAX_PATH + 1], *temp; - HMODULE module = NULL; - - // attempt to determine the location of the module containing ODPI-C; - // errors in this code are ignored and the normal loading mechanism is - // used instead - if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, - (LPCSTR) dpiOci__loadLibOnWindows, &module)) { - if (GetModuleFileName(module, moduleName, sizeof(moduleName)) > 0) { - temp = strrchr(moduleName, '\\'); - if (temp) { - *(temp + 1) = '\0'; - strncat(moduleName, dllName, - sizeof(moduleName) - strlen(moduleName) - 1); - dpiOciLibHandle = LoadLibrary(moduleName); - } - } - FreeLibrary(module); - } - - // if library was not loaded in the same location as ODPI-C, use the - // standard Windows search to locate oci.dll instead - if (!dpiOciLibHandle) - dpiOciLibHandle = LoadLibrary(dllName); -} -#endif - - -//----------------------------------------------------------------------------- -// dpiOci__loadLib() [INTERNAL] -// Load the OCI library. -//----------------------------------------------------------------------------- -static int dpiOci__loadLib(dpiError *error) -{ - const char *libName; - char loadError[512]; - unsigned int i; -#ifndef _WIN32 - char *oracleHome, *oracleHomeLibName; - size_t oracleHomeLibNameLength; -#endif - - // dynamically load the OCI library - for (i = 0; !dpiOciLibHandle; i++) { - libName = dpiOciLibNames[i]; - if (!libName) - break; -#ifdef _WIN32 - dpiOci__loadLibOnWindows(libName); - if (!dpiOciLibHandle && i == 0) - dpiOci__getLoadErrorOnWindows(libName, loadError, - sizeof(loadError)); -#else - dpiOciLibHandle = dlopen(libName, RTLD_LAZY); - if (!dpiOciLibHandle && i == 0) { - strncpy(loadError, dlerror(), sizeof(loadError) - 1); - loadError[sizeof(loadError) - 1] = '\0'; - } -#endif - - } - -#ifndef _WIN32 - // on platforms other than Windows, attempt to use - // $ORACLE_HOME/lib/libclntsh.so - if (!dpiOciLibHandle) { - oracleHome = getenv("ORACLE_HOME"); - if (oracleHome) { - oracleHomeLibNameLength = strlen(oracleHome) + 6 + - strlen(dpiOciLibNames[0]); - oracleHomeLibName = (char*) malloc(oracleHomeLibNameLength); - if (oracleHomeLibName) { - (void) sprintf(oracleHomeLibName, "%s/lib/%s", oracleHome, - dpiOciLibNames[0]); - dpiOciLibHandle = dlopen(oracleHomeLibName, RTLD_LAZY); - free(oracleHomeLibName); - } - } - } -#endif - - if (!dpiOciLibHandle) { - const char *bits = (sizeof(void*) == 8) ? "64" : "32"; - return dpiError__set(error, "load library", DPI_ERR_LOAD_LIBRARY, - bits, loadError, DPI_ERR_LOAD_URL_FRAGMENT); - } - - // validate library - if (dpiOci__loadLibValidate(error) < 0) { -#ifdef _WIN32 - FreeLibrary(dpiOciLibHandle); -#else - dlclose(dpiOciLibHandle); -#endif - dpiOciLibHandle = NULL; - memset(&dpiOciSymbols, 0, sizeof(dpiOciSymbols)); - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__loadLibValidate() [INTERNAL] -// Validate the OCI library after loading. -//----------------------------------------------------------------------------- -static int dpiOci__loadLibValidate(dpiError *error) -{ - // determine the OCI client version information - if (dpiOci__loadSymbol("OCIClientVersion", - (void**) &dpiOciSymbols.fnClientVersion, NULL) < 0) - return dpiError__set(error, "load symbol OCIClientVersion", - DPI_ERR_ORACLE_CLIENT_UNSUPPORTED); - memset(&dpiOciLibVersionInfo, 0, sizeof(dpiOciLibVersionInfo)); - (*dpiOciSymbols.fnClientVersion)(&dpiOciLibVersionInfo.versionNum, - &dpiOciLibVersionInfo.releaseNum, - &dpiOciLibVersionInfo.updateNum, - &dpiOciLibVersionInfo.portReleaseNum, - &dpiOciLibVersionInfo.portUpdateNum); - if (dpiOciLibVersionInfo.versionNum == 0) - return dpiError__set(error, "get OCI client version", - DPI_ERR_ORACLE_CLIENT_UNSUPPORTED); - dpiOciLibVersionInfo.fullVersionNum = (uint32_t) - DPI_ORACLE_VERSION_TO_NUMBER(dpiOciLibVersionInfo.versionNum, - dpiOciLibVersionInfo.releaseNum, - dpiOciLibVersionInfo.updateNum, - dpiOciLibVersionInfo.portReleaseNum, - dpiOciLibVersionInfo.portUpdateNum); - - // OCI version must be a minimum of 11.2 - if (dpiUtils__checkClientVersion(&dpiOciLibVersionInfo, 11, 2, error) < 0) - return DPI_FAILURE; - - // initialize threading capability in the OCI library - // this must be run prior to any other OCI threading calls - DPI_OCI_LOAD_SYMBOL("OCIThreadProcessInit", - dpiOciSymbols.fnThreadProcessInit) - (*dpiOciSymbols.fnThreadProcessInit)(); - - // load symbols for key functions which are called many times - // this list should be kept as small as possible in order to avoid - // overhead in looking up symbols at startup - DPI_OCI_LOAD_SYMBOL("OCIAttrGet", dpiOciSymbols.fnAttrGet) - DPI_OCI_LOAD_SYMBOL("OCIAttrSet", dpiOciSymbols.fnAttrSet) - DPI_OCI_LOAD_SYMBOL("OCIThreadKeyGet", dpiOciSymbols.fnThreadKeyGet) - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__loadSymbol() [INTERNAL] -// Return the symbol for the function that is to be called. The symbol table -// is first consulted. If the symbol is not found there, it is looked up and -// then stored there so the next invocation does not have to perform the -// lookup. -//----------------------------------------------------------------------------- -static int dpiOci__loadSymbol(const char *symbolName, void **symbol, - dpiError *error) -{ - // if library not already opened, open it - if (!dpiOciLibHandle && dpiOci__loadLib(error) < 0) - return DPI_FAILURE; - - // load symbol -#ifdef _WIN32 - *symbol = GetProcAddress(dpiOciLibHandle, symbolName); -#else - *symbol = dlsym(dpiOciLibHandle, symbolName); -#endif - if (!*symbol) - return dpiError__set(error, "get symbol", DPI_ERR_LOAD_SYMBOL, - symbolName); - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobClose() [INTERNAL] -// Wrapper for OCILobClose(). -//----------------------------------------------------------------------------- -int dpiOci__lobClose(dpiLob *lob, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobClose", dpiOciSymbols.fnLobClose) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobClose)(lob->conn->handle, error->handle, - lob->locator); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "close LOB"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobCreateTemporary() [INTERNAL] -// Wrapper for OCILobCreateTemporary(). -//----------------------------------------------------------------------------- -int dpiOci__lobCreateTemporary(dpiLob *lob, dpiError *error) -{ - uint8_t lobType; - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobCreateTemporary", - dpiOciSymbols.fnLobCreateTemporary) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BLOB) - lobType = DPI_OCI_TEMP_BLOB; - else lobType = DPI_OCI_TEMP_CLOB; - status = (*dpiOciSymbols.fnLobCreateTemporary)(lob->conn->handle, - error->handle, lob->locator, DPI_OCI_DEFAULT, - lob->type->charsetForm, lobType, 1, DPI_OCI_DURATION_SESSION); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "create temporary LOB"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobFileExists() [INTERNAL] -// Wrapper for OCILobFileExists(). -//----------------------------------------------------------------------------- -int dpiOci__lobFileExists(dpiLob *lob, int *exists, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobFileExists", dpiOciSymbols.fnLobFileExists) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobFileExists)(lob->conn->handle, error->handle, - lob->locator, exists); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get file exists"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobFileGetName() [INTERNAL] -// Wrapper for OCILobFileGetName(). -//----------------------------------------------------------------------------- -int dpiOci__lobFileGetName(dpiLob *lob, char *dirAlias, - uint16_t *dirAliasLength, char *name, uint16_t *nameLength, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobFileGetName", dpiOciSymbols.fnLobFileGetName) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobFileGetName)(lob->env->handle, error->handle, - lob->locator, dirAlias, dirAliasLength, name, nameLength); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get LOB file name"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobFileSetName() [INTERNAL] -// Wrapper for OCILobFileSetName(). -//----------------------------------------------------------------------------- -int dpiOci__lobFileSetName(dpiLob *lob, const char *dirAlias, - uint16_t dirAliasLength, const char *name, uint16_t nameLength, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobFileSetName", dpiOciSymbols.fnLobFileSetName) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobFileSetName)(lob->env->handle, error->handle, - &lob->locator, dirAlias, dirAliasLength, name, nameLength); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "set LOB file name"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobFreeTemporary() [INTERNAL] -// Wrapper for OCILobFreeTemporary(). -//----------------------------------------------------------------------------- -int dpiOci__lobFreeTemporary(dpiConn *conn, void *lobLocator, int checkError, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobFreeTemporary", - dpiOciSymbols.fnLobFreeTemporary) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobFreeTemporary)(conn->handle, - error->handle, lobLocator); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "free temporary LOB"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobGetChunkSize() [INTERNAL] -// Wrapper for OCILobGetChunkSize(). -//----------------------------------------------------------------------------- -int dpiOci__lobGetChunkSize(dpiLob *lob, uint32_t *size, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobGetChunkSize", dpiOciSymbols.fnLobGetChunkSize) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobGetChunkSize)(lob->conn->handle, - error->handle, lob->locator, size); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get chunk size"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobGetLength2() [INTERNAL] -// Wrapper for OCILobGetLength2(). -//----------------------------------------------------------------------------- -int dpiOci__lobGetLength2(dpiLob *lob, uint64_t *size, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobGetLength2", dpiOciSymbols.fnLobGetLength2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobGetLength2)(lob->conn->handle, error->handle, - lob->locator, size); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get length"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobIsOpen() [INTERNAL] -// Wrapper for OCILobIsOpen(). -//----------------------------------------------------------------------------- -int dpiOci__lobIsOpen(dpiLob *lob, int *isOpen, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobIsOpen", dpiOciSymbols.fnLobIsOpen) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobIsOpen)(lob->conn->handle, error->handle, - lob->locator, isOpen); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "check is open"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobIsTemporary() [INTERNAL] -// Wrapper for OCILobIsTemporary(). -//----------------------------------------------------------------------------- -int dpiOci__lobIsTemporary(dpiLob *lob, int *isTemporary, int checkError, - dpiError *error) -{ - int status; - - *isTemporary = 0; - DPI_OCI_LOAD_SYMBOL("OCILobIsTemporary", dpiOciSymbols.fnLobIsTemporary) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobIsTemporary)(lob->env->handle, error->handle, - lob->locator, isTemporary); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "check is temporary"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobLocatorAssign() [INTERNAL] -// Wrapper for OCILobLocatorAssign(). -//----------------------------------------------------------------------------- -int dpiOci__lobLocatorAssign(dpiLob *lob, void **copiedHandle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobLocatorAssign", - dpiOciSymbols.fnLobLocatorAssign) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobLocatorAssign)(lob->conn->handle, - error->handle, lob->locator, copiedHandle); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "assign locator"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobOpen() [INTERNAL] -// Wrapper for OCILobOpen(). -//----------------------------------------------------------------------------- -int dpiOci__lobOpen(dpiLob *lob, dpiError *error) -{ - uint8_t mode; - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobOpen", dpiOciSymbols.fnLobOpen) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - mode = (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BFILE) ? - DPI_OCI_LOB_READONLY : DPI_OCI_LOB_READWRITE; - status = (*dpiOciSymbols.fnLobOpen)(lob->conn->handle, error->handle, - lob->locator, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "close LOB"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobRead2() [INTERNAL] -// Wrapper for OCILobRead2(). -//----------------------------------------------------------------------------- -int dpiOci__lobRead2(dpiLob *lob, uint64_t offset, uint64_t *amountInBytes, - uint64_t *amountInChars, char *buffer, uint64_t bufferLength, - dpiError *error) -{ - uint16_t charsetId; - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobRead2", dpiOciSymbols.fnLobRead2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - charsetId = (lob->type->charsetForm == DPI_SQLCS_NCHAR) ? - lob->env->ncharsetId : lob->env->charsetId; - status = (*dpiOciSymbols.fnLobRead2)(lob->conn->handle, error->handle, - lob->locator, amountInBytes, amountInChars, offset, buffer, - bufferLength, DPI_OCI_ONE_PIECE, NULL, NULL, charsetId, - lob->type->charsetForm); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "read from LOB"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobTrim2() [INTERNAL] -// Wrapper for OCILobTrim2(). -//----------------------------------------------------------------------------- -int dpiOci__lobTrim2(dpiLob *lob, uint64_t newLength, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobTrim2", dpiOciSymbols.fnLobTrim2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnLobTrim2)(lob->conn->handle, error->handle, - lob->locator, newLength); - if (status == DPI_OCI_INVALID_HANDLE) - return dpiOci__lobCreateTemporary(lob, error); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "trim LOB"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__lobWrite2() [INTERNAL] -// Wrapper for OCILobWrite2(). -//----------------------------------------------------------------------------- -int dpiOci__lobWrite2(dpiLob *lob, uint64_t offset, const char *value, - uint64_t valueLength, dpiError *error) -{ - uint64_t lengthInBytes = valueLength, lengthInChars = 0; - uint16_t charsetId; - int status; - - DPI_OCI_LOAD_SYMBOL("OCILobWrite2", dpiOciSymbols.fnLobWrite2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - charsetId = (lob->type->charsetForm == DPI_SQLCS_NCHAR) ? - lob->env->ncharsetId : lob->env->charsetId; - status = (*dpiOciSymbols.fnLobWrite2)(lob->conn->handle, error->handle, - lob->locator, &lengthInBytes, &lengthInChars, offset, (void*) value, - valueLength, DPI_OCI_ONE_PIECE, NULL, NULL, charsetId, - lob->type->charsetForm); - DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "write to LOB"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__memoryAlloc() [INTERNAL] -// Wrapper for OCIMemoryAlloc(). -//----------------------------------------------------------------------------- -int dpiOci__memoryAlloc(dpiConn *conn, void **ptr, uint32_t size, - int checkError, dpiError *error) -{ - int status; - - *ptr = NULL; - DPI_OCI_LOAD_SYMBOL("OCIMemoryAlloc", dpiOciSymbols.fnMemoryAlloc) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnMemoryAlloc)(conn->sessionHandle, error->handle, - ptr, DPI_OCI_DURATION_SESSION, size, DPI_OCI_MEMORY_CLEARED); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "allocate memory"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__memoryFree() [INTERNAL] -// Wrapper for OCIMemoryFree(). -//----------------------------------------------------------------------------- -int dpiOci__memoryFree(dpiConn *conn, void *ptr, dpiError *error) -{ - DPI_OCI_LOAD_SYMBOL("OCIMemoryFree", dpiOciSymbols.fnMemoryFree) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - (*dpiOciSymbols.fnMemoryFree)(conn->sessionHandle, error->handle, ptr); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__nlsCharSetConvert() [INTERNAL] -// Wrapper for OCINlsCharSetConvert(). -//----------------------------------------------------------------------------- -int dpiOci__nlsCharSetConvert(void *envHandle, uint16_t destCharsetId, - char *dest, size_t destLength, uint16_t sourceCharsetId, - const char *source, size_t sourceLength, size_t *resultSize, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINlsCharSetConvert", - dpiOciSymbols.fnNlsCharSetConvert) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnNlsCharSetConvert)(envHandle, error->handle, - destCharsetId, dest, destLength, sourceCharsetId, source, - sourceLength, resultSize); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "convert text"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__nlsCharSetIdToName() [INTERNAL] -// Wrapper for OCINlsCharSetIdToName(). -//----------------------------------------------------------------------------- -int dpiOci__nlsCharSetIdToName(void *envHandle, char *buf, size_t bufLength, - uint16_t charsetId, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINlsCharSetIdToName", - dpiOciSymbols.fnNlsCharSetIdToName) - status = (*dpiOciSymbols.fnNlsCharSetIdToName)(envHandle, buf, bufLength, - charsetId); - return (status == DPI_OCI_SUCCESS) ? DPI_SUCCESS : DPI_FAILURE; -} - - -//----------------------------------------------------------------------------- -// dpiOci__nlsCharSetNameToId() [INTERNAL] -// Wrapper for OCINlsCharSetNameToId(). -//----------------------------------------------------------------------------- -int dpiOci__nlsCharSetNameToId(void *envHandle, const char *name, - uint16_t *charsetId, dpiError *error) -{ - DPI_OCI_LOAD_SYMBOL("OCINlsCharSetNameToId", - dpiOciSymbols.fnNlsCharSetNameToId) - *charsetId = (*dpiOciSymbols.fnNlsCharSetNameToId)(envHandle, name); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__nlsEnvironmentVariableGet() [INTERNAL] -// Wrapper for OCIEnvironmentVariableGet(). -//----------------------------------------------------------------------------- -int dpiOci__nlsEnvironmentVariableGet(uint16_t item, void *value, - dpiError *error) -{ - size_t ignored; - int status; - - DPI_OCI_LOAD_SYMBOL("OCINlsEnvironmentVariableGet", - dpiOciSymbols.fnNlsEnvironmentVariableGet) - status = (*dpiOciSymbols.fnNlsEnvironmentVariableGet)(value, 0, item, 0, - &ignored); - if (status != DPI_OCI_SUCCESS) - return dpiError__set(error, "get NLS environment variable", - DPI_ERR_NLS_ENV_VAR_GET); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__nlsNameMap() [INTERNAL] -// Wrapper for OCINlsNameMap(). -//----------------------------------------------------------------------------- -int dpiOci__nlsNameMap(void *envHandle, char *buf, size_t bufLength, - const char *source, uint32_t flag, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINlsNameMap", dpiOciSymbols.fnNlsNameMap) - status = (*dpiOciSymbols.fnNlsNameMap)(envHandle, buf, bufLength, source, - flag); - return (status == DPI_OCI_SUCCESS) ? DPI_SUCCESS : DPI_FAILURE; -} - - -//----------------------------------------------------------------------------- -// dpiOci__nlsNumericInfoGet() [INTERNAL] -// Wrapper for OCINlsNumericInfoGet(). -//----------------------------------------------------------------------------- -int dpiOci__nlsNumericInfoGet(void *envHandle, int32_t *value, uint16_t item, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINlsNumericInfoGet", - dpiOciSymbols.fnNlsNumericInfoGet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnNlsNumericInfoGet)(envHandle, error->handle, - value, item); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get NLS info"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__numberFromInt() [INTERNAL] -// Wrapper for OCINumberFromInt(). -//----------------------------------------------------------------------------- -int dpiOci__numberFromInt(const void *value, unsigned int valueLength, - unsigned int flags, void *number, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINumberFromInt", dpiOciSymbols.fnNumberFromInt) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnNumberFromInt)(error->handle, value, - valueLength, flags, number); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number from integer"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__numberFromReal() [INTERNAL] -// Wrapper for OCINumberFromReal(). -//----------------------------------------------------------------------------- -int dpiOci__numberFromReal(const double value, void *number, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINumberFromReal", dpiOciSymbols.fnNumberFromReal) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnNumberFromReal)(error->handle, &value, - sizeof(double), number); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number from real"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__numberToInt() [INTERNAL] -// Wrapper for OCINumberToInt(). -//----------------------------------------------------------------------------- -int dpiOci__numberToInt(void *number, void *value, unsigned int valueLength, - unsigned int flags, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINumberToInt", dpiOciSymbols.fnNumberToInt) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnNumberToInt)(error->handle, number, valueLength, - flags, value); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number to integer"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__numberToReal() [INTERNAL] -// Wrapper for OCINumberToReal(). -//----------------------------------------------------------------------------- -int dpiOci__numberToReal(double *value, void *number, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCINumberToReal", dpiOciSymbols.fnNumberToReal) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnNumberToReal)(error->handle, number, - sizeof(double), value); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number to real"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__objectCopy() [INTERNAL] -// Wrapper for OCIObjectCopy(). -//----------------------------------------------------------------------------- -int dpiOci__objectCopy(dpiObject *obj, void *sourceInstance, - void *sourceIndicator, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIObjectCopy", dpiOciSymbols.fnObjectCopy) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnObjectCopy)(obj->env->handle, error->handle, - obj->type->conn->handle, sourceInstance, sourceIndicator, - obj->instance, obj->indicator, obj->type->tdo, - DPI_OCI_DURATION_SESSION, DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "copy object"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__objectFree() [INTERNAL] -// Wrapper for OCIObjectFree(). -//----------------------------------------------------------------------------- -int dpiOci__objectFree(void *envHandle, void *data, int checkError, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIObjectFree", dpiOciSymbols.fnObjectFree) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnObjectFree)(envHandle, error->handle, data, - DPI_OCI_DEFAULT); - if (checkError && DPI_OCI_ERROR_OCCURRED(status)) { - dpiError__setFromOCI(error, status, NULL, "free instance"); - - // during the attempt to free, PL/SQL records fail with error - // "ORA-21602: operation does not support the specified typecode", but - // a subsequent attempt will yield error "OCI-21500: internal error - // code" and crash the process, so pretend like the free was - // successful! - if (error->buffer->code == 21602) - return DPI_SUCCESS; - return DPI_FAILURE; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__objectGetAttr() [INTERNAL] -// Wrapper for OCIObjectGetAttr(). -//----------------------------------------------------------------------------- -int dpiOci__objectGetAttr(dpiObject *obj, dpiObjectAttr *attr, - int16_t *scalarValueIndicator, void **valueIndicator, void **value, - void **tdo, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIObjectGetAttr", dpiOciSymbols.fnObjectGetAttr) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnObjectGetAttr)(obj->env->handle, error->handle, - obj->instance, obj->indicator, obj->type->tdo, &attr->name, - &attr->nameLength, 1, 0, 0, scalarValueIndicator, valueIndicator, - value, tdo); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get attribute"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__objectGetInd() [INTERNAL] -// Wrapper for OCIObjectGetInd(). -//----------------------------------------------------------------------------- -int dpiOci__objectGetInd(dpiObject *obj, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIObjectGetInd", dpiOciSymbols.fnObjectGetInd) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnObjectGetInd)(obj->env->handle, error->handle, - obj->instance, &obj->indicator); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get indicator"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__objectNew() [INTERNAL] -// Wrapper for OCIObjectNew(). -//----------------------------------------------------------------------------- -int dpiOci__objectNew(dpiObject *obj, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIObjectNew", dpiOciSymbols.fnObjectNew) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnObjectNew)(obj->env->handle, error->handle, - obj->type->conn->handle, obj->type->typeCode, obj->type->tdo, NULL, - DPI_OCI_DURATION_SESSION, 1, &obj->instance); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "create object"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__objectPin() [INTERNAL] -// Wrapper for OCIObjectPin(). -//----------------------------------------------------------------------------- -int dpiOci__objectPin(void *envHandle, void *objRef, void **obj, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIObjectPin", dpiOciSymbols.fnObjectPin) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnObjectPin)(envHandle, error->handle, objRef, - NULL, DPI_OCI_PIN_ANY, DPI_OCI_DURATION_SESSION, DPI_OCI_LOCK_NONE, - obj); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "pin reference"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__objectSetAttr() [INTERNAL] -// Wrapper for OCIObjectSetAttr(). -//----------------------------------------------------------------------------- -int dpiOci__objectSetAttr(dpiObject *obj, dpiObjectAttr *attr, - int16_t scalarValueIndicator, void *valueIndicator, const void *value, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIObjectSetAttr", dpiOciSymbols.fnObjectSetAttr) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnObjectSetAttr)(obj->env->handle, error->handle, - obj->instance, obj->indicator, obj->type->tdo, &attr->name, - &attr->nameLength, 1, NULL, 0, scalarValueIndicator, - valueIndicator, value); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "set attribute"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__passwordChange() [INTERNAL] -// Wrapper for OCIPasswordChange(). -//----------------------------------------------------------------------------- -int dpiOci__passwordChange(dpiConn *conn, const char *userName, - uint32_t userNameLength, const char *oldPassword, - uint32_t oldPasswordLength, const char *newPassword, - uint32_t newPasswordLength, uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIPasswordChange", dpiOciSymbols.fnPasswordChange) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnPasswordChange)(conn->handle, error->handle, - userName, userNameLength, oldPassword, oldPasswordLength, - newPassword, newPasswordLength, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "change password"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__paramGet() [INTERNAL] -// Wrapper for OCIParamGet(). -//----------------------------------------------------------------------------- -int dpiOci__paramGet(const void *handle, uint32_t handleType, void **parameter, - uint32_t pos, const char *action, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIParamGet", dpiOciSymbols.fnParamGet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnParamGet)(handle, handleType, error->handle, - parameter, pos); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); -} - - -//----------------------------------------------------------------------------- -// dpiOci__ping() [INTERNAL] -// Wrapper for OCIPing(). -//----------------------------------------------------------------------------- -int dpiOci__ping(dpiConn *conn, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIPing", dpiOciSymbols.fnPing) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnPing)(conn->handle, error->handle, - DPI_OCI_DEFAULT); - if (DPI_OCI_ERROR_OCCURRED(status)) { - dpiError__setFromOCI(error, status, conn, "ping"); - - // attempting to ping a database earlier than 10g will result in error - // ORA-1010: invalid OCI operation, but that implies a successful ping - // so ignore that error and treat it as a successful operation - if (error->buffer->code == 1010) - return DPI_SUCCESS; - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__rawAssignBytes() [INTERNAL] -// Wrapper for OCIRawAssignBytes(). -//----------------------------------------------------------------------------- -int dpiOci__rawAssignBytes(void *envHandle, const char *value, - uint32_t valueLength, void **handle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIRawAssignBytes", dpiOciSymbols.fnRawAssignBytes) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnRawAssignBytes)(envHandle, error->handle, value, - valueLength, handle); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "assign bytes to raw"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__rawPtr() [INTERNAL] -// Wrapper for OCIRawPtr(). -//----------------------------------------------------------------------------- -int dpiOci__rawPtr(void *envHandle, void *handle, void **ptr) -{ - dpiError *error = NULL; - - DPI_OCI_LOAD_SYMBOL("OCIRawPtr", dpiOciSymbols.fnRawPtr) - *ptr = (*dpiOciSymbols.fnRawPtr)(envHandle, handle); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__rawResize() [INTERNAL] -// Wrapper for OCIRawResize(). -//----------------------------------------------------------------------------- -int dpiOci__rawResize(void *envHandle, void **handle, uint32_t newSize, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIRawResize", dpiOciSymbols.fnRawResize) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnRawResize)(envHandle, error->handle, newSize, - handle); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "resize raw"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__rawSize() [INTERNAL] -// Wrapper for OCIRawSize(). -//----------------------------------------------------------------------------- -int dpiOci__rawSize(void *envHandle, void *handle, uint32_t *size) -{ - dpiError *error = NULL; - - DPI_OCI_LOAD_SYMBOL("OCIRawSize", dpiOciSymbols.fnRawSize) - *size = (*dpiOciSymbols.fnRawSize)(envHandle, handle); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__reallocMem() [INTERNAL] -// Wrapper for OCI allocation of memory, only used when debugging memory -// allocation. -//----------------------------------------------------------------------------- -static void *dpiOci__reallocMem(UNUSED void *unused, void *ptr, size_t newSize) -{ - char message[80]; - void *newPtr; - - (void) sprintf(message, "OCI reallocated ptr at %p", ptr); - newPtr = realloc(ptr, newSize); - dpiDebug__print("%s to %u bytes at %p\n", message, newSize, newPtr); - return newPtr; -} - - -//----------------------------------------------------------------------------- -// dpiOci__rowidToChar() [INTERNAL] -// Wrapper for OCIRowidToChar(). -//----------------------------------------------------------------------------- -int dpiOci__rowidToChar(dpiRowid *rowid, char *buffer, uint16_t *bufferSize, - dpiError *error) -{ - uint16_t origSize; - int status; - - DPI_OCI_LOAD_SYMBOL("OCIRowidToChar", dpiOciSymbols.fnRowidToChar) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - origSize = *bufferSize; - status = (*dpiOciSymbols.fnRowidToChar)(rowid->handle, buffer, bufferSize, - error->handle); - if (origSize == 0) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get rowid as string"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__serverAttach() [INTERNAL] -// Wrapper for OCIServerAttach(). -//----------------------------------------------------------------------------- -int dpiOci__serverAttach(dpiConn *conn, const char *connectString, - uint32_t connectStringLength, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIServerAttach", dpiOciSymbols.fnServerAttach) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnServerAttach)(conn->serverHandle, error->handle, - connectString, (int32_t) connectStringLength, DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "server attach"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__serverDetach() [INTERNAL] -// Wrapper for OCIServerDetach(). -//----------------------------------------------------------------------------- -int dpiOci__serverDetach(dpiConn *conn, int checkError, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIServerDetach", dpiOciSymbols.fnServerDetach) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnServerDetach)(conn->serverHandle, error->handle, - DPI_OCI_DEFAULT); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "detatch from server"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__serverRelease() [INTERNAL] -// Wrapper for OCIServerRelease(). -//----------------------------------------------------------------------------- -int dpiOci__serverRelease(dpiConn *conn, char *buffer, uint32_t bufferSize, - uint32_t *version, dpiError *error) -{ - int status; - - DPI_OCI_ENSURE_ERROR_HANDLE(error) - if (conn->env->versionInfo->versionNum < 18) { - DPI_OCI_LOAD_SYMBOL("OCIServerRelease", dpiOciSymbols.fnServerRelease) - status = (*dpiOciSymbols.fnServerRelease)(conn->handle, error->handle, - buffer, bufferSize, DPI_OCI_HTYPE_SVCCTX, version); - } else { - DPI_OCI_LOAD_SYMBOL("OCIServerRelease2", - dpiOciSymbols.fnServerRelease2) - status = (*dpiOciSymbols.fnServerRelease2)(conn->handle, error->handle, - buffer, bufferSize, DPI_OCI_HTYPE_SVCCTX, version, - DPI_OCI_DEFAULT); - } - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get server version"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sessionBegin() [INTERNAL] -// Wrapper for OCISessionBegin(). -//----------------------------------------------------------------------------- -int dpiOci__sessionBegin(dpiConn *conn, uint32_t credentialType, - uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISessionBegin", dpiOciSymbols.fnSessionBegin) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSessionBegin)(conn->handle, error->handle, - conn->sessionHandle, credentialType, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "begin session"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sessionEnd() [INTERNAL] -// Wrapper for OCISessionEnd(). -//----------------------------------------------------------------------------- -int dpiOci__sessionEnd(dpiConn *conn, int checkError, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISessionEnd", dpiOciSymbols.fnSessionEnd) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSessionEnd)(conn->handle, error->handle, - conn->sessionHandle, DPI_OCI_DEFAULT); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "end session"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sessionGet() [INTERNAL] -// Wrapper for OCISessionGet(). -//----------------------------------------------------------------------------- -int dpiOci__sessionGet(void *envHandle, void **handle, void *authInfo, - const char *connectString, uint32_t connectStringLength, - const char *tag, uint32_t tagLength, const char **outTag, - uint32_t *outTagLength, int *found, uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISessionGet", dpiOciSymbols.fnSessionGet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSessionGet)(envHandle, error->handle, handle, - authInfo, connectString, connectStringLength, tag, tagLength, - outTag, outTagLength, found, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get session"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sessionPoolCreate() [INTERNAL] -// Wrapper for OCISessionPoolCreate(). -//----------------------------------------------------------------------------- -int dpiOci__sessionPoolCreate(dpiPool *pool, const char *connectString, - uint32_t connectStringLength, uint32_t minSessions, - uint32_t maxSessions, uint32_t sessionIncrement, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISessionPoolCreate", - dpiOciSymbols.fnSessionPoolCreate) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSessionPoolCreate)(pool->env->handle, - error->handle, pool->handle, (char**) &pool->name, - &pool->nameLength, connectString, connectStringLength, minSessions, - maxSessions, sessionIncrement, userName, userNameLength, password, - passwordLength, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "create pool"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sessionPoolDestroy() [INTERNAL] -// Wrapper for OCISessionPoolDestroy(). -//----------------------------------------------------------------------------- -int dpiOci__sessionPoolDestroy(dpiPool *pool, uint32_t mode, int checkError, - dpiError *error) -{ - void *handle; - int status; - - DPI_OCI_LOAD_SYMBOL("OCISessionPoolDestroy", - dpiOciSymbols.fnSessionPoolDestroy) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - - // clear the pool handle immediately so that no further attempts are made - // to use the pool while the pool is being closed; if the pool close fails, - // restore the pool handle afterwards - handle = pool->handle; - pool->handle = NULL; - status = (*dpiOciSymbols.fnSessionPoolDestroy)(handle, error->handle, - mode); - if (checkError && DPI_OCI_ERROR_OCCURRED(status)) { - pool->handle = handle; - return dpiError__setFromOCI(error, status, NULL, "destroy pool"); - } - dpiOci__handleFree(handle, DPI_OCI_HTYPE_SPOOL); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__sessionRelease() [INTERNAL] -// Wrapper for OCISessionRelease(). -//----------------------------------------------------------------------------- -int dpiOci__sessionRelease(dpiConn *conn, const char *tag, uint32_t tagLength, - uint32_t mode, int checkError, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISessionRelease", dpiOciSymbols.fnSessionRelease) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSessionRelease)(conn->handle, error->handle, - tag, tagLength, mode); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "release session"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__shardingKeyColumnAdd() [INTERNAL] -// Wrapper for OCIshardingKeyColumnAdd(). -//----------------------------------------------------------------------------- -int dpiOci__shardingKeyColumnAdd(void *shardingKey, void *col, uint32_t colLen, - uint16_t colType, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIShardingKeyColumnAdd", - dpiOciSymbols.fnShardingKeyColumnAdd) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnShardingKeyColumnAdd)(shardingKey, - error->handle, col, colLen, colType, DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "add sharding column"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaBulkInsert() [INTERNAL] -// Wrapper for OCISodaBulkInsert(). -//----------------------------------------------------------------------------- -int dpiOci__sodaBulkInsert(dpiSodaColl *coll, void **documents, - uint32_t numDocuments, void *outputOptions, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaBulkInsert", dpiOciSymbols.fnSodaBulkInsert) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaBulkInsert)(coll->db->conn->handle, - coll->handle, documents, numDocuments, outputOptions, - error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "insert multiple documents"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaBulkInsertAndGet() [INTERNAL] -// Wrapper for OCISodaBulkInsert(). -//----------------------------------------------------------------------------- -int dpiOci__sodaBulkInsertAndGet(dpiSodaColl *coll, void **documents, - uint32_t numDocuments, void *outputOptions, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaBulkInsertAndGet", - dpiOciSymbols.fnSodaBulkInsertAndGet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaBulkInsertAndGet)(coll->db->conn->handle, - coll->handle, documents, numDocuments, outputOptions, - error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "insert (and get) multiple documents"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaCollCreateWithMetadata() [INTERNAL] -// Wrapper for OCISodaCollCreateWithMetadata(). -//----------------------------------------------------------------------------- -int dpiOci__sodaCollCreateWithMetadata(dpiSodaDb *db, const char *name, - uint32_t nameLength, const char *metadata, uint32_t metadataLength, - uint32_t mode, void **handle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaCollCreateWithMetadata", - dpiOciSymbols.fnSodaCollCreateWithMetadata) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaCollCreateWithMetadata)(db->conn->handle, - name, nameLength, metadata, metadataLength, handle, error->handle, - mode); - DPI_OCI_CHECK_AND_RETURN(error, status, db->conn, - "create SODA collection"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaCollDrop() [INTERNAL] -// Wrapper for OCISodaCollDrop(). -//----------------------------------------------------------------------------- -int dpiOci__sodaCollDrop(dpiSodaColl *coll, int *isDropped, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaCollDrop", dpiOciSymbols.fnSodaCollDrop) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaCollDrop)(coll->db->conn->handle, - coll->handle, isDropped, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "drop SODA collection"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaCollGetNext() [INTERNAL] -// Wrapper for OCISodaCollGetNext(). -//----------------------------------------------------------------------------- -int dpiOci__sodaCollGetNext(dpiConn *conn, void *cursorHandle, - void **collectionHandle, uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaCollGetNext", dpiOciSymbols.fnSodaCollGetNext) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaCollGetNext)(conn->handle, cursorHandle, - collectionHandle, error->handle, mode); - if (status == DPI_OCI_NO_DATA) { - *collectionHandle = NULL; - return DPI_SUCCESS; - } - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get next collection"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaCollList() [INTERNAL] -// Wrapper for OCISodaCollList(). -//----------------------------------------------------------------------------- -int dpiOci__sodaCollList(dpiSodaDb *db, const char *startingName, - uint32_t startingNameLength, void **handle, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaCollList", dpiOciSymbols.fnSodaCollList) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaCollList)(db->conn->handle, startingName, - startingNameLength, handle, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, db->conn, - "get SODA collection cursor"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaCollOpen() [INTERNAL] -// Wrapper for OCISodaCollOpen(). -//----------------------------------------------------------------------------- -int dpiOci__sodaCollOpen(dpiSodaDb *db, const char *name, uint32_t nameLength, - uint32_t mode, void **handle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaCollOpen", dpiOciSymbols.fnSodaCollOpen) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaCollOpen)(db->conn->handle, name, - nameLength, handle, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, db->conn, "open SODA collection"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaDataGuideGet() [INTERNAL] -// Wrapper for OCISodaDataGuideGet(). -//----------------------------------------------------------------------------- -int dpiOci__sodaDataGuideGet(dpiSodaColl *coll, void **handle, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaDataGuideGet", - dpiOciSymbols.fnSodaDataGuideGet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaDataGuideGet)(coll->db->conn->handle, - coll->handle, DPI_OCI_DEFAULT, handle, error->handle, mode); - if (DPI_OCI_ERROR_OCCURRED(status)) { - dpiError__setFromOCI(error, status, coll->db->conn, "get data guide"); - if (error->buffer->code != 24801) - return DPI_FAILURE; - *handle = NULL; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaDocCount() [INTERNAL] -// Wrapper for OCISodaDocCount(). -//----------------------------------------------------------------------------- -int dpiOci__sodaDocCount(dpiSodaColl *coll, void *options, uint32_t mode, - uint64_t *count, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaDocCount", dpiOciSymbols.fnSodaDocCount) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaDocCount)(coll->db->conn->handle, - coll->handle, options, count, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "get document count"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaDocGetNext() [INTERNAL] -// Wrapper for OCISodaDocGetNext(). -//----------------------------------------------------------------------------- -int dpiOci__sodaDocGetNext(dpiSodaDocCursor *cursor, void **handle, - uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaDocGetNext", dpiOciSymbols.fnSodaDocGetNext) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaDocGetNext)(cursor->coll->db->conn->handle, - cursor->handle, handle, error->handle, mode); - if (status == DPI_OCI_NO_DATA) { - *handle = NULL; - return DPI_SUCCESS; - } - DPI_OCI_CHECK_AND_RETURN(error, status, cursor->coll->db->conn, - "get next document"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaFind() [INTERNAL] -// Wrapper for OCISodaFind(). -//----------------------------------------------------------------------------- -int dpiOci__sodaFind(dpiSodaColl *coll, const void *options, uint32_t flags, - uint32_t mode, void **handle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaFind", dpiOciSymbols.fnSodaFind) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaFind)(coll->db->conn->handle, - coll->handle, options, flags, handle, error->handle, mode); - if (status == DPI_OCI_NO_DATA) { - *handle = NULL; - return DPI_SUCCESS; - } - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "find SODA documents"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaFindOne() [INTERNAL] -// Wrapper for OCISodaFindOne(). -//----------------------------------------------------------------------------- -int dpiOci__sodaFindOne(dpiSodaColl *coll, const void *options, uint32_t flags, - uint32_t mode, void **handle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaFindOne", dpiOciSymbols.fnSodaFindOne) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaFindOne)(coll->db->conn->handle, - coll->handle, options, flags, handle, error->handle, mode); - if (status == DPI_OCI_NO_DATA) { - *handle = NULL; - return DPI_SUCCESS; - } - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "get SODA document"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaIndexCreate() [INTERNAL] -// Wrapper for OCISodaIndexCreate(). -//----------------------------------------------------------------------------- -int dpiOci__sodaIndexCreate(dpiSodaColl *coll, const char *indexSpec, - uint32_t indexSpecLength, uint32_t mode, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaIndexCreate", dpiOciSymbols.fnSodaIndexCreate) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaIndexCreate)(coll->db->conn->handle, - coll->handle, indexSpec, indexSpecLength, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, "create index"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaIndexDrop() [INTERNAL] -// Wrapper for OCISodaIndexDrop(). -//----------------------------------------------------------------------------- -int dpiOci__sodaIndexDrop(dpiSodaColl *coll, const char *name, - uint32_t nameLength, uint32_t mode, int *isDropped, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaIndexDrop", dpiOciSymbols.fnSodaIndexDrop) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaIndexDrop)(coll->db->conn->handle, name, - nameLength, isDropped, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, "drop index"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaInsert() [INTERNAL] -// Wrapper for OCISodaInsert(). -//----------------------------------------------------------------------------- -int dpiOci__sodaInsert(dpiSodaColl *coll, void *handle, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaInsert", dpiOciSymbols.fnSodaInsert) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaInsert)(coll->db->conn->handle, - coll->handle, handle, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "insert SODA document"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaInsertAndGet() [INTERNAL] -// Wrapper for OCISodaInsertAndGet(). -//----------------------------------------------------------------------------- -int dpiOci__sodaInsertAndGet(dpiSodaColl *coll, void **handle, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaInsertAndGet", - dpiOciSymbols.fnSodaInsertAndGet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaInsertAndGet)(coll->db->conn->handle, - coll->handle, handle, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "insert and get SODA document"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaOperKeysSet() [INTERNAL] -// Wrapper for OCISodaOperKeysSet(). -//----------------------------------------------------------------------------- -int dpiOci__sodaOperKeysSet(const dpiSodaOperOptions *options, void *handle, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaOperKeysSet", dpiOciSymbols.fnSodaOperKeysSet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaOperKeysSet)(handle, options->keys, - options->keyLengths, options->numKeys, error->handle, - DPI_OCI_DEFAULT); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, - "set operation options keys"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaRemove() [INTERNAL] -// Wrapper for OCISodaRemove(). -//----------------------------------------------------------------------------- -int dpiOci__sodaRemove(dpiSodaColl *coll, void *options, uint32_t mode, - uint64_t *count, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaRemove", dpiOciSymbols.fnSodaRemove) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaRemove)(coll->db->conn->handle, - coll->handle, options, count, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "remove documents from SODA collection"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaReplOne() [INTERNAL] -// Wrapper for OCISodaReplOne(). -//----------------------------------------------------------------------------- -int dpiOci__sodaReplOne(dpiSodaColl *coll, const void *options, void *handle, - uint32_t mode, int *isReplaced, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaReplOne", dpiOciSymbols.fnSodaReplOne) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaReplOne)(coll->db->conn->handle, - coll->handle, options, handle, isReplaced, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "replace SODA document"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__sodaReplOneAndGet() [INTERNAL] -// Wrapper for OCISodaReplOneAndGet(). -//----------------------------------------------------------------------------- -int dpiOci__sodaReplOneAndGet(dpiSodaColl *coll, const void *options, - void **handle, uint32_t mode, int *isReplaced, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISodaReplOneAndGet", - dpiOciSymbols.fnSodaReplOneAndGet) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSodaReplOneAndGet)(coll->db->conn->handle, - coll->handle, options, handle, isReplaced, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, - "replace and get SODA document"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__stmtExecute() [INTERNAL] -// Wrapper for OCIStmtExecute(). -//----------------------------------------------------------------------------- -int dpiOci__stmtExecute(dpiStmt *stmt, uint32_t numIters, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIStmtExecute", dpiOciSymbols.fnStmtExecute) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStmtExecute)(stmt->conn->handle, stmt->handle, - error->handle, numIters, 0, 0, 0, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "execute"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__stmtFetch2() [INTERNAL] -// Wrapper for OCIStmtFetch2(). -//----------------------------------------------------------------------------- -int dpiOci__stmtFetch2(dpiStmt *stmt, uint32_t numRows, uint16_t fetchMode, - int32_t offset, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIStmtFetch2", dpiOciSymbols.fnStmtFetch2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStmtFetch2)(stmt->handle, error->handle, - numRows, fetchMode, offset, DPI_OCI_DEFAULT); - if (status == DPI_OCI_NO_DATA || fetchMode == DPI_MODE_FETCH_LAST) { - stmt->hasRowsToFetch = 0; - } else if (DPI_OCI_ERROR_OCCURRED(status)) { - return dpiError__setFromOCI(error, status, stmt->conn, "fetch"); - } else { - stmt->hasRowsToFetch = 1; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__stmtGetBindInfo() [INTERNAL] -// Wrapper for OCIStmtGetBindInfo(). -//----------------------------------------------------------------------------- -int dpiOci__stmtGetBindInfo(dpiStmt *stmt, uint32_t size, uint32_t startLoc, - int32_t *numFound, char *names[], uint8_t nameLengths[], - char *indNames[], uint8_t indNameLengths[], uint8_t isDuplicate[], - void *bindHandles[], dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIStmtGetBindInfo", dpiOciSymbols.fnStmtGetBindInfo) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStmtGetBindInfo)(stmt->handle, error->handle, - size, startLoc, numFound, names, nameLengths, indNames, - indNameLengths, isDuplicate, bindHandles); - if (status == DPI_OCI_NO_DATA) { - *numFound = 0; - return DPI_SUCCESS; - } - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "get bind info"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__stmtGetNextResult() [INTERNAL] -// Wrapper for OCIStmtGetNextResult(). -//----------------------------------------------------------------------------- -int dpiOci__stmtGetNextResult(dpiStmt *stmt, void **handle, dpiError *error) -{ - uint32_t returnType; - int status; - - DPI_OCI_LOAD_SYMBOL("OCIStmtGetNextResult", - dpiOciSymbols.fnStmtGetNextResult) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStmtGetNextResult)(stmt->handle, error->handle, - handle, &returnType, DPI_OCI_DEFAULT); - if (status == DPI_OCI_NO_DATA) { - *handle = NULL; - return DPI_SUCCESS; - } - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "get next result"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__stmtPrepare2() [INTERNAL] -// Wrapper for OCIStmtPrepare2(). -//----------------------------------------------------------------------------- -int dpiOci__stmtPrepare2(dpiStmt *stmt, const char *sql, uint32_t sqlLength, - const char *tag, uint32_t tagLength, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIStmtPrepare2", dpiOciSymbols.fnStmtPrepare2) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStmtPrepare2)(stmt->conn->handle, &stmt->handle, - error->handle, sql, sqlLength, tag, tagLength, DPI_OCI_NTV_SYNTAX, - DPI_OCI_DEFAULT); - if (DPI_OCI_ERROR_OCCURRED(status)) { - stmt->handle = NULL; - return dpiError__setFromOCI(error, status, stmt->conn, "prepare SQL"); - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__stmtRelease() [INTERNAL] -// Wrapper for OCIStmtRelease(). -//----------------------------------------------------------------------------- -int dpiOci__stmtRelease(dpiStmt *stmt, const char *tag, uint32_t tagLength, - int checkError, dpiError *error) -{ - uint32_t mode = DPI_OCI_DEFAULT; - uint32_t cacheSize = 0; - int status; - - // if the statement should be deleted from the cache, first check to see - // that there actually is a cache currently being used; otherwise, the - // error "ORA-24300: bad value for mode" will be raised - if (stmt->deleteFromCache) { - dpiOci__attrGet(stmt->conn->handle, DPI_OCI_HTYPE_SVCCTX, - &cacheSize, NULL, DPI_OCI_ATTR_STMTCACHESIZE, NULL, error); - if (cacheSize > 0) - mode = DPI_OCI_STRLS_CACHE_DELETE; - } - - DPI_OCI_LOAD_SYMBOL("OCIStmtRelease", dpiOciSymbols.fnStmtRelease) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStmtRelease)(stmt->handle, error->handle, tag, - tagLength, mode); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "release statement"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__stringAssignText() [INTERNAL] -// Wrapper for OCIStringAssignText(). -//----------------------------------------------------------------------------- -int dpiOci__stringAssignText(void *envHandle, const char *value, - uint32_t valueLength, void **handle, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIStringAssignText", - dpiOciSymbols.fnStringAssignText) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStringAssignText)(envHandle, error->handle, - value, valueLength, handle); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "assign to string"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__stringPtr() [INTERNAL] -// Wrapper for OCIStringPtr(). -//----------------------------------------------------------------------------- -int dpiOci__stringPtr(void *envHandle, void *handle, char **ptr) -{ - dpiError *error = NULL; - - DPI_OCI_LOAD_SYMBOL("OCIStringPtr", dpiOciSymbols.fnStringPtr) - *ptr = (*dpiOciSymbols.fnStringPtr)(envHandle, handle); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__stringResize() [INTERNAL] -// Wrapper for OCIStringResize(). -//----------------------------------------------------------------------------- -int dpiOci__stringResize(void *envHandle, void **handle, uint32_t newSize, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIStringResize", dpiOciSymbols.fnStringResize) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnStringResize)(envHandle, error->handle, newSize, - handle); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "resize string"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__stringSize() [INTERNAL] -// Wrapper for OCIStringSize(). -//----------------------------------------------------------------------------- -int dpiOci__stringSize(void *envHandle, void *handle, uint32_t *size) -{ - dpiError *error = NULL; - - DPI_OCI_LOAD_SYMBOL("OCIStringSize", dpiOciSymbols.fnStringSize) - *size = (*dpiOciSymbols.fnStringSize)(envHandle, handle); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__subscriptionRegister() [INTERNAL] -// Wrapper for OCISubscriptionRegister(). -//----------------------------------------------------------------------------- -int dpiOci__subscriptionRegister(dpiConn *conn, void **handle, uint32_t mode, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCISubscriptionRegister", - dpiOciSymbols.fnSubscriptionRegister) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnSubscriptionRegister)(conn->handle, handle, 1, - error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "register"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__subscriptionUnRegister() [INTERNAL] -// Wrapper for OCISubscriptionUnRegister(). -//----------------------------------------------------------------------------- -int dpiOci__subscriptionUnRegister(dpiConn *conn, dpiSubscr *subscr, - dpiError *error) -{ - uint32_t mode; - int status; - - DPI_OCI_LOAD_SYMBOL("OCISubscriptionUnRegister", - dpiOciSymbols.fnSubscriptionUnRegister) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - mode = (subscr->clientInitiated) ? DPI_OCI_SECURE_NOTIFICATION : - DPI_OCI_DEFAULT; - status = (*dpiOciSymbols.fnSubscriptionUnRegister)(conn->handle, - subscr->handle, error->handle, mode); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "unregister"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__tableDelete() [INTERNAL] -// Wrapper for OCITableDelete(). -//----------------------------------------------------------------------------- -int dpiOci__tableDelete(dpiObject *obj, int32_t index, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITableDelete", dpiOciSymbols.fnTableDelete) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTableDelete)(obj->env->handle, error->handle, - index, obj->instance); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "delete element"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__tableExists() [INTERNAL] -// Wrapper for OCITableExists(). -//----------------------------------------------------------------------------- -int dpiOci__tableExists(dpiObject *obj, int32_t index, int *exists, - dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITableExists", dpiOciSymbols.fnTableExists) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTableExists)(obj->env->handle, error->handle, - obj->instance, index, exists); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, - "get index exists"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__tableFirst() [INTERNAL] -// Wrapper for OCITableFirst(). -//----------------------------------------------------------------------------- -int dpiOci__tableFirst(dpiObject *obj, int32_t *index, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITableFirst", dpiOciSymbols.fnTableFirst) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTableFirst)(obj->env->handle, error->handle, - obj->instance, index); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, - "get first index"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__tableLast() [INTERNAL] -// Wrapper for OCITableLast(). -//----------------------------------------------------------------------------- -int dpiOci__tableLast(dpiObject *obj, int32_t *index, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITableLast", dpiOciSymbols.fnTableLast) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTableLast)(obj->env->handle, error->handle, - obj->instance, index); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get last index"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__tableNext() [INTERNAL] -// Wrapper for OCITableNext(). -//----------------------------------------------------------------------------- -int dpiOci__tableNext(dpiObject *obj, int32_t index, int32_t *nextIndex, - int *exists, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITableNext", dpiOciSymbols.fnTableNext) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTableNext)(obj->env->handle, error->handle, - index, obj->instance, nextIndex, exists); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get next index"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__tablePrev() [INTERNAL] -// Wrapper for OCITablePrev(). -//----------------------------------------------------------------------------- -int dpiOci__tablePrev(dpiObject *obj, int32_t index, int32_t *prevIndex, - int *exists, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITablePrev", dpiOciSymbols.fnTablePrev) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTablePrev)(obj->env->handle, error->handle, - index, obj->instance, prevIndex, exists); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get prev index"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__tableSize() [INTERNAL] -// Wrapper for OCITableSize(). -//----------------------------------------------------------------------------- -int dpiOci__tableSize(dpiObject *obj, int32_t *size, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITableSize", dpiOciSymbols.fnTableSize) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTableSize)(obj->env->handle, error->handle, - obj->instance, size); - DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get size"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__threadKeyDestroy() [INTERNAL] -// Wrapper for OCIThreadKeyDestroy(). -//----------------------------------------------------------------------------- -int dpiOci__threadKeyDestroy(void *envHandle, void *errorHandle, void **key, - dpiError *error) -{ - DPI_OCI_LOAD_SYMBOL("OCIThreadKeyDestroy", - dpiOciSymbols.fnThreadKeyDestroy) - (*dpiOciSymbols.fnThreadKeyDestroy)(envHandle, errorHandle, key); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__threadKeyGet() [INTERNAL] -// Wrapper for OCIThreadKeyGet(). -//----------------------------------------------------------------------------- -int dpiOci__threadKeyGet(void *envHandle, void *errorHandle, void *key, - void **value, dpiError *error) -{ - int status; - - status = (*dpiOciSymbols.fnThreadKeyGet)(envHandle, errorHandle, key, - value); - if (status != DPI_OCI_SUCCESS) - return dpiError__set(error, "get TLS error", DPI_ERR_TLS_ERROR); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__threadKeyInit() [INTERNAL] -// Wrapper for OCIThreadKeyInit(). -//----------------------------------------------------------------------------- -int dpiOci__threadKeyInit(void *envHandle, void *errorHandle, void **key, - void *destroyFunc, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIThreadKeyInit", dpiOciSymbols.fnThreadKeyInit) - status = (*dpiOciSymbols.fnThreadKeyInit)(envHandle, errorHandle, key, - destroyFunc); - DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "initialize thread key"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__threadKeySet() [INTERNAL] -// Wrapper for OCIThreadKeySet(). -//----------------------------------------------------------------------------- -int dpiOci__threadKeySet(void *envHandle, void *errorHandle, void *key, - void *value, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCIThreadKeySet", dpiOciSymbols.fnThreadKeySet) - status = (*dpiOciSymbols.fnThreadKeySet)(envHandle, errorHandle, key, - value); - if (status != DPI_OCI_SUCCESS) - return dpiError__set(error, "set TLS error", DPI_ERR_TLS_ERROR); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiOci__transCommit() [INTERNAL] -// Wrapper for OCITransCommit(). -//----------------------------------------------------------------------------- -int dpiOci__transCommit(dpiConn *conn, uint32_t flags, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITransCommit", dpiOciSymbols.fnTransCommit) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTransCommit)(conn->handle, error->handle, - flags); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "commit"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__transPrepare() [INTERNAL] -// Wrapper for OCITransPrepare(). -//----------------------------------------------------------------------------- -int dpiOci__transPrepare(dpiConn *conn, int *commitNeeded, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITransPrepare", dpiOciSymbols.fnTransPrepare) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTransPrepare)(conn->handle, error->handle, - DPI_OCI_DEFAULT); - *commitNeeded = (status == DPI_OCI_SUCCESS); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "prepare transaction"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__transRollback() [INTERNAL] -// Wrapper for OCITransRollback(). -//----------------------------------------------------------------------------- -int dpiOci__transRollback(dpiConn *conn, int checkError, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITransRollback", dpiOciSymbols.fnTransRollback) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTransRollback)(conn->handle, error->handle, - DPI_OCI_DEFAULT); - if (!checkError) - return DPI_SUCCESS; - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "rollback"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__transStart() [INTERNAL] -// Wrapper for OCITransStart(). -//----------------------------------------------------------------------------- -int dpiOci__transStart(dpiConn *conn, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITransStart", dpiOciSymbols.fnTransStart) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTransStart)(conn->handle, error->handle, 0, - DPI_OCI_TRANS_NEW); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "start transaction"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__typeByName() [INTERNAL] -// Wrapper for OCITypeByName(). -//----------------------------------------------------------------------------- -int dpiOci__typeByName(dpiConn *conn, const char *schema, - uint32_t schemaLength, const char *name, uint32_t nameLength, - void **tdo, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITypeByName", dpiOciSymbols.fnTypeByName) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTypeByName)(conn->env->handle, error->handle, - conn->handle, schema, schemaLength, name, nameLength, NULL, 0, - DPI_OCI_DURATION_SESSION, DPI_OCI_TYPEGET_ALL, tdo); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get type by name"); -} - - -//----------------------------------------------------------------------------- -// dpiOci__typeByFullName() [INTERNAL] -// Wrapper for OCITypeByFullName(). -//----------------------------------------------------------------------------- -int dpiOci__typeByFullName(dpiConn *conn, const char *name, - uint32_t nameLength, void **tdo, dpiError *error) -{ - int status; - - DPI_OCI_LOAD_SYMBOL("OCITypeByFullName", dpiOciSymbols.fnTypeByFullName) - DPI_OCI_ENSURE_ERROR_HANDLE(error) - status = (*dpiOciSymbols.fnTypeByFullName)(conn->env->handle, - error->handle, conn->handle, name, nameLength, NULL, 0, - DPI_OCI_DURATION_SESSION, DPI_OCI_TYPEGET_ALL, tdo); - DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get type by full name"); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiOracleType.c b/vendor/github.com/godror/godror/odpi/src/dpiOracleType.c deleted file mode 100644 index ee307a7d995..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiOracleType.c +++ /dev/null @@ -1,504 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiOracleType.c -// Implementation of variable types. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// definition of Oracle types (MUST be in same order as enumeration) -//----------------------------------------------------------------------------- -static const dpiOracleType - dpiAllOracleTypes[DPI_ORACLE_TYPE_MAX - DPI_ORACLE_TYPE_NONE - 1] = { - { - DPI_ORACLE_TYPE_VARCHAR, // public Oracle type - DPI_NATIVE_TYPE_BYTES, // default native type - DPI_SQLT_CHR, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - 0, // buffer size - 1, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NVARCHAR, // public Oracle type - DPI_NATIVE_TYPE_BYTES, // default native type - DPI_SQLT_CHR, // internal Oracle type - DPI_SQLCS_NCHAR, // charset form - 0, // buffer size - 1, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_CHAR, // public Oracle type - DPI_NATIVE_TYPE_BYTES, // default native type - DPI_SQLT_AFC, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - 0, // buffer size - 1, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NCHAR, // public Oracle type - DPI_NATIVE_TYPE_BYTES, // default native type - DPI_SQLT_AFC, // internal Oracle type - DPI_SQLCS_NCHAR, // charset form - 0, // buffer size - 1, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_ROWID, // public Oracle type - DPI_NATIVE_TYPE_ROWID, // default native type - DPI_SQLT_RDD, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 1, // is character data - 1, // can be in array - 1 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_RAW, // public Oracle type - DPI_NATIVE_TYPE_BYTES, // default native type - DPI_SQLT_BIN, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - 0, // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NATIVE_FLOAT, // public Oracle type - DPI_NATIVE_TYPE_FLOAT, // default native type - DPI_SQLT_BFLOAT, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(float), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NATIVE_DOUBLE, // public Oracle type - DPI_NATIVE_TYPE_DOUBLE, // default native type - DPI_SQLT_BDOUBLE, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(double), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NATIVE_INT, // public Oracle type - DPI_NATIVE_TYPE_INT64, // default native type - DPI_SQLT_INT, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(int64_t), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NUMBER, // public Oracle type - DPI_NATIVE_TYPE_DOUBLE, // default native type - DPI_SQLT_VNU, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - DPI_OCI_NUMBER_SIZE, // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_DATE, // public Oracle type - DPI_NATIVE_TYPE_TIMESTAMP, // default native type - DPI_SQLT_ODT, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(dpiOciDate), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_TIMESTAMP, // public Oracle type - DPI_NATIVE_TYPE_TIMESTAMP, // default native type - DPI_SQLT_TIMESTAMP, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_TIMESTAMP_TZ, // public Oracle type - DPI_NATIVE_TYPE_TIMESTAMP, // default native type - DPI_SQLT_TIMESTAMP_TZ, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_TIMESTAMP_LTZ, // public Oracle type - DPI_NATIVE_TYPE_TIMESTAMP, // default native type - DPI_SQLT_TIMESTAMP_LTZ, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_INTERVAL_DS, // public Oracle type - DPI_NATIVE_TYPE_INTERVAL_DS, // default native type - DPI_SQLT_INTERVAL_DS, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_INTERVAL_YM, // public Oracle type - DPI_NATIVE_TYPE_INTERVAL_YM, // default native type - DPI_SQLT_INTERVAL_YM, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_CLOB, // public Oracle type - DPI_NATIVE_TYPE_LOB, // default native type - DPI_SQLT_CLOB, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 1, // is character data - 0, // can be in array - 1 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NCLOB, // public Oracle type - DPI_NATIVE_TYPE_LOB, // default native type - DPI_SQLT_CLOB, // internal Oracle type - DPI_SQLCS_NCHAR, // charset form - sizeof(void*), // buffer size - 1, // is character data - 0, // can be in array - 1 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_BLOB, // public Oracle type - DPI_NATIVE_TYPE_LOB, // default native type - DPI_SQLT_BLOB, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 0, // can be in array - 1 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_BFILE, // public Oracle type - DPI_NATIVE_TYPE_LOB, // default native type - DPI_SQLT_BFILE, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 0, // can be in array - 1 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_STMT, // public Oracle type - DPI_NATIVE_TYPE_STMT, // default native type - DPI_SQLT_RSET, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 0, // can be in array - 1 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_BOOLEAN, // public Oracle type - DPI_NATIVE_TYPE_BOOLEAN, // default native type - DPI_SQLT_BOL, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(int), // buffer size - 0, // is character data - 0, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_OBJECT, // public Oracle type - DPI_NATIVE_TYPE_OBJECT, // default native type - DPI_SQLT_NTY, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(void*), // buffer size - 0, // is character data - 0, // can be in array - 1 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_LONG_VARCHAR, // public Oracle type - DPI_NATIVE_TYPE_BYTES, // default native type - DPI_SQLT_CHR, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - DPI_MAX_BASIC_BUFFER_SIZE + 1, // buffer size - 1, // is character data - 0, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_LONG_RAW, // public Oracle type - DPI_NATIVE_TYPE_BYTES, // default native type - DPI_SQLT_BIN, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - DPI_MAX_BASIC_BUFFER_SIZE + 1, // buffer size - 0, // is character data - 0, // can be in array - 0 // requires pre-fetch - }, - { - DPI_ORACLE_TYPE_NATIVE_UINT, // public Oracle type - DPI_NATIVE_TYPE_UINT64, // default native type - DPI_SQLT_UIN, // internal Oracle type - DPI_SQLCS_IMPLICIT, // charset form - sizeof(uint64_t), // buffer size - 0, // is character data - 1, // can be in array - 0 // requires pre-fetch - } -}; - - -//----------------------------------------------------------------------------- -// dpiOracleType__convertFromOracle() [INTERNAL] -// Return a value from the dpiOracleTypeNum enumeration for the OCI data type -// and charset form. If the OCI data type is not supported, 0 is returned. -//----------------------------------------------------------------------------- -static dpiOracleTypeNum dpiOracleType__convertFromOracle(uint16_t typeCode, - uint8_t charsetForm) -{ - switch(typeCode) { - case DPI_SQLT_CHR: - case DPI_SQLT_VCS: - if (charsetForm == DPI_SQLCS_NCHAR) - return DPI_ORACLE_TYPE_NVARCHAR; - return DPI_ORACLE_TYPE_VARCHAR; - case DPI_SQLT_INT: - case DPI_SQLT_FLT: - case DPI_SQLT_NUM: - case DPI_SQLT_PDN: - case DPI_SQLT_VNU: - case DPI_SQLT_BFLOAT: - case DPI_SQLT_BDOUBLE: - case DPI_OCI_TYPECODE_SMALLINT: - return DPI_ORACLE_TYPE_NUMBER; - case DPI_SQLT_DAT: - case DPI_SQLT_ODT: - return DPI_ORACLE_TYPE_DATE; - case DPI_SQLT_BIN: - case DPI_SQLT_LVB: - return DPI_ORACLE_TYPE_RAW; - case DPI_SQLT_AFC: - if (charsetForm == DPI_SQLCS_NCHAR) - return DPI_ORACLE_TYPE_NCHAR; - return DPI_ORACLE_TYPE_CHAR; - case DPI_OCI_TYPECODE_BINARY_INTEGER: - case DPI_OCI_TYPECODE_PLS_INTEGER: - return DPI_ORACLE_TYPE_NATIVE_INT; - case DPI_SQLT_IBFLOAT: - return DPI_ORACLE_TYPE_NATIVE_FLOAT; - case DPI_SQLT_IBDOUBLE: - return DPI_ORACLE_TYPE_NATIVE_DOUBLE; - case DPI_SQLT_DATE: - case DPI_SQLT_TIMESTAMP: - return DPI_ORACLE_TYPE_TIMESTAMP; - case DPI_SQLT_TIMESTAMP_TZ: - return DPI_ORACLE_TYPE_TIMESTAMP_TZ; - case DPI_SQLT_TIMESTAMP_LTZ: - return DPI_ORACLE_TYPE_TIMESTAMP_LTZ; - case DPI_SQLT_NTY: - case DPI_SQLT_REC: - case DPI_SQLT_NCO: - return DPI_ORACLE_TYPE_OBJECT; - case DPI_SQLT_BOL: - return DPI_ORACLE_TYPE_BOOLEAN; - case DPI_SQLT_CLOB: - if (charsetForm == DPI_SQLCS_NCHAR) - return DPI_ORACLE_TYPE_NCLOB; - return DPI_ORACLE_TYPE_CLOB; - case DPI_SQLT_BLOB: - return DPI_ORACLE_TYPE_BLOB; - case DPI_SQLT_BFILE: - return DPI_ORACLE_TYPE_BFILE; - case DPI_SQLT_RDD: - case DPI_OCI_TYPECODE_ROWID: - return DPI_ORACLE_TYPE_ROWID; - case DPI_SQLT_RSET: - return DPI_ORACLE_TYPE_STMT; - case DPI_SQLT_INTERVAL_DS: - return DPI_ORACLE_TYPE_INTERVAL_DS; - case DPI_SQLT_INTERVAL_YM: - return DPI_ORACLE_TYPE_INTERVAL_YM; - case DPI_SQLT_LNG: - case DPI_OCI_TYPECODE_LONG: - return DPI_ORACLE_TYPE_LONG_VARCHAR; - case DPI_SQLT_LBI: - case DPI_OCI_TYPECODE_LONG_RAW: - return DPI_ORACLE_TYPE_LONG_RAW; - } - return (dpiOracleTypeNum) 0; -} - - -//----------------------------------------------------------------------------- -// dpiOracleType__getFromNum() [INTERNAL] -// Return the type associated with the type number. -//----------------------------------------------------------------------------- -const dpiOracleType *dpiOracleType__getFromNum(dpiOracleTypeNum typeNum, - dpiError *error) -{ - if (typeNum > DPI_ORACLE_TYPE_NONE && typeNum < DPI_ORACLE_TYPE_MAX) - return &dpiAllOracleTypes[typeNum - DPI_ORACLE_TYPE_NONE - 1]; - dpiError__set(error, "check type", DPI_ERR_INVALID_ORACLE_TYPE, typeNum); - return NULL; -} - - -//----------------------------------------------------------------------------- -// dpiOracleType__populateTypeInfo() [INTERNAL] -// Populate dpiDataTypeInfo structure given an Oracle descriptor. Note that -// no error is raised by this function if the data type is not supported. This -// method is called for both implicit and explicit describes (which behave -// slightly differently). -//----------------------------------------------------------------------------- -int dpiOracleType__populateTypeInfo(dpiConn *conn, void *handle, - uint32_t handleType, dpiDataTypeInfo *info, dpiError *error) -{ - const dpiOracleType *oracleType = NULL; - dpiNativeTypeNum nativeTypeNum; - uint32_t dataTypeAttribute; - uint8_t charsetForm; - uint16_t ociSize; - - // acquire data type - if (handleType == DPI_OCI_DTYPE_PARAM) - dataTypeAttribute = DPI_OCI_ATTR_TYPECODE; - else dataTypeAttribute = DPI_OCI_ATTR_DATA_TYPE; - if (dpiOci__attrGet(handle, handleType, (void*) &info->ociTypeCode, 0, - dataTypeAttribute, "get data type", error) < 0) - return DPI_FAILURE; - - // acquire character set form - if (info->ociTypeCode != DPI_SQLT_CHR && - info->ociTypeCode != DPI_SQLT_AFC && - info->ociTypeCode != DPI_SQLT_VCS && - info->ociTypeCode != DPI_SQLT_CLOB) - charsetForm = DPI_SQLCS_IMPLICIT; - else if (dpiOci__attrGet(handle, handleType, (void*) &charsetForm, 0, - DPI_OCI_ATTR_CHARSET_FORM, "get charset form", error) < 0) - return DPI_FAILURE; - - // convert Oracle type to ODPI-C enumerations, if possible - info->oracleTypeNum = dpiOracleType__convertFromOracle(info->ociTypeCode, - charsetForm); - if (!info->oracleTypeNum) - info->defaultNativeTypeNum = (dpiNativeTypeNum) 0; - else { - oracleType = dpiOracleType__getFromNum(info->oracleTypeNum, error); - if (!oracleType) - return DPI_FAILURE; - info->defaultNativeTypeNum = oracleType->defaultNativeTypeNum; - } - - // determine precision/scale - nativeTypeNum = info->defaultNativeTypeNum; - switch (nativeTypeNum) { - case DPI_NATIVE_TYPE_DOUBLE: - case DPI_NATIVE_TYPE_FLOAT: - case DPI_NATIVE_TYPE_INT64: - case DPI_NATIVE_TYPE_TIMESTAMP: - case DPI_NATIVE_TYPE_INTERVAL_YM: - case DPI_NATIVE_TYPE_INTERVAL_DS: - if (dpiOci__attrGet(handle, handleType, (void*) &info->scale, 0, - DPI_OCI_ATTR_SCALE, "get scale", error) < 0) - return DPI_FAILURE; - if (dpiOci__attrGet(handle, handleType, (void*) &info->precision, - 0, DPI_OCI_ATTR_PRECISION, "get precision", error) < 0) - return DPI_FAILURE; - if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP || - nativeTypeNum == DPI_NATIVE_TYPE_INTERVAL_DS) { - info->fsPrecision = (uint8_t) info->scale; - info->scale = 0; - } - break; - default: - info->precision = 0; - info->fsPrecision = 0; - info->scale = 0; - break; - } - - // change default type to integer if precision/scale supports it - if (info->oracleTypeNum == DPI_ORACLE_TYPE_NUMBER && info->scale == 0 && - info->precision > 0 && info->precision <= DPI_MAX_INT64_PRECISION) - info->defaultNativeTypeNum = DPI_NATIVE_TYPE_INT64; - - // acquire size (in bytes) of item - info->sizeInChars = 0; - if (oracleType && oracleType->sizeInBytes == 0) { - if (dpiOci__attrGet(handle, handleType, (void*) &ociSize, 0, - DPI_OCI_ATTR_DATA_SIZE, "get size (bytes)", error) < 0) - return DPI_FAILURE; - info->dbSizeInBytes = ociSize; - info->clientSizeInBytes = ociSize; - } else { - info->dbSizeInBytes = 0; - info->clientSizeInBytes = 0; - } - - // acquire size (in characters) of item, if applicable - if (oracleType && oracleType->isCharacterData && - oracleType->sizeInBytes == 0) { - if (dpiOci__attrGet(handle, handleType, (void*) &ociSize, 0, - DPI_OCI_ATTR_CHAR_SIZE, "get size (chars)", error) < 0) - return DPI_FAILURE; - info->sizeInChars = ociSize; - if (charsetForm == DPI_SQLCS_NCHAR) - info->clientSizeInBytes = info->sizeInChars * - conn->env->nmaxBytesPerCharacter; - else if (conn->charsetId != conn->env->charsetId) - info->clientSizeInBytes = info->sizeInChars * - conn->env->maxBytesPerCharacter; - } - - // acquire object type, if applicable - if (info->oracleTypeNum == DPI_ORACLE_TYPE_OBJECT) { - if (dpiObjectType__allocate(conn, handle, DPI_OCI_ATTR_TYPE_NAME, - &info->objectType, error) < 0) - return DPI_FAILURE; - if (dpiObjectType__isXmlType(info->objectType)) { - dpiObjectType__free(info->objectType, error); - info->objectType = NULL; - info->ociTypeCode = DPI_SQLT_CHR; - info->oracleTypeNum = DPI_ORACLE_TYPE_LONG_VARCHAR; - info->defaultNativeTypeNum = DPI_NATIVE_TYPE_BYTES; - } - } - - return DPI_SUCCESS; -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiPool.c b/vendor/github.com/godror/godror/odpi/src/dpiPool.c deleted file mode 100644 index 58f21e5efc9..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiPool.c +++ /dev/null @@ -1,586 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiPool.c -// Implementation of session pools. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiPool__acquireConnection() [INTERNAL] -// Internal method used for acquiring a connection from a pool. -//----------------------------------------------------------------------------- -int dpiPool__acquireConnection(dpiPool *pool, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - dpiConnCreateParams *params, dpiConn **conn, dpiError *error) -{ - dpiConn *tempConn; - - // allocate new connection - if (dpiGen__allocate(DPI_HTYPE_CONN, pool->env, (void**) &tempConn, - error) < 0) - return DPI_FAILURE; - error->env = pool->env; - - // create the connection - if (dpiConn__create(tempConn, pool->env->context, userName, userNameLength, - password, passwordLength, pool->name, pool->nameLength, pool, - NULL, params, error) < 0) { - dpiConn__free(tempConn, error); - return DPI_FAILURE; - } - - *conn = tempConn; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiPool__checkConnected() [INTERNAL] -// Determine if the session pool is connected to the database. If not, an -// error is raised. -//----------------------------------------------------------------------------- -static int dpiPool__checkConnected(dpiPool *pool, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(pool, DPI_HTYPE_POOL, fnName, error) < 0) - return DPI_FAILURE; - if (!pool->handle) - return dpiError__set(error, "check pool", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiPool__create() [INTERNAL] -// Internal method for creating a session pool. -//----------------------------------------------------------------------------- -static int dpiPool__create(dpiPool *pool, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - const dpiCommonCreateParams *commonParams, - dpiPoolCreateParams *createParams, dpiError *error) -{ - uint32_t poolMode; - uint8_t getMode; - void *authInfo; - - // validate parameters - if (createParams->externalAuth && - ((userName && userNameLength > 0) || - (password && passwordLength > 0))) - return dpiError__set(error, "check mixed credentials", - DPI_ERR_EXT_AUTH_WITH_CREDENTIALS); - - // create the session pool handle - if (dpiOci__handleAlloc(pool->env->handle, &pool->handle, - DPI_OCI_HTYPE_SPOOL, "allocate pool handle", error) < 0) - return DPI_FAILURE; - - // prepare pool mode - poolMode = DPI_OCI_SPC_STMTCACHE; - if (createParams->homogeneous) - poolMode |= DPI_OCI_SPC_HOMOGENEOUS; - - // create authorization handle - if (dpiOci__handleAlloc(pool->env->handle, &authInfo, - DPI_OCI_HTYPE_AUTHINFO, "allocate authinfo handle", error) < 0) - return DPI_FAILURE; - - // set context attributes - if (dpiUtils__setAttributesFromCommonCreateParams(authInfo, - DPI_OCI_HTYPE_AUTHINFO, commonParams, error) < 0) - return DPI_FAILURE; - - // set PL/SQL session state fixup callback, if applicable - if (createParams->plsqlFixupCallback && - createParams->plsqlFixupCallbackLength > 0) { - if (dpiUtils__checkClientVersion(pool->env->versionInfo, 12, 2, - error) < 0) - return DPI_FAILURE; - if (dpiOci__attrSet(authInfo, DPI_OCI_HTYPE_AUTHINFO, - (void*) createParams->plsqlFixupCallback, - createParams->plsqlFixupCallbackLength, - DPI_OCI_ATTR_FIXUP_CALLBACK, - "set PL/SQL session state fixup callback", error) < 0) - return DPI_FAILURE; - } - - // set authorization info on session pool - if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) authInfo, 0, - DPI_OCI_ATTR_SPOOL_AUTH, "set auth info", error) < 0) - return DPI_FAILURE; - - // create pool - if (dpiOci__sessionPoolCreate(pool, connectString, connectStringLength, - createParams->minSessions, createParams->maxSessions, - createParams->sessionIncrement, userName, userNameLength, password, - passwordLength, poolMode, error) < 0) - return DPI_FAILURE; - - // set the get mode on the pool - getMode = (uint8_t) createParams->getMode; - if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) &getMode, 0, - DPI_OCI_ATTR_SPOOL_GETMODE, "set get mode", error) < 0) - return DPI_FAILURE; - - // set the session timeout on the pool - if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) - &createParams->timeout, 0, DPI_OCI_ATTR_SPOOL_TIMEOUT, - "set timeout", error) < 0) - return DPI_FAILURE; - - // set the wait timeout on the pool (valid in 12.2 and higher) - if (pool->env->versionInfo->versionNum > 12 || - (pool->env->versionInfo->versionNum == 12 && - pool->env->versionInfo->releaseNum >= 2)) { - if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) - &createParams->waitTimeout, 0, DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT, - "set wait timeout", error) < 0) - return DPI_FAILURE; - } - - // set the maximum lifetime session on the pool (valid in 12.1 and higher) - if (pool->env->versionInfo->versionNum >= 12) { - if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) - &createParams->maxLifetimeSession, 0, - DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION, - "set max lifetime session", error) < 0) - return DPI_FAILURE; - } - - // set the maximum number of sessions per shard (valid in 18.3 and higher) - if (pool->env->versionInfo->versionNum > 18 || - (pool->env->versionInfo->versionNum == 18 && - pool->env->versionInfo->releaseNum >= 3)) { - if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) - &createParams->maxSessionsPerShard, 0, - DPI_OCI_ATTR_SPOOL_MAX_PER_SHARD, - "set max sessions per shard", error) < 0) - return DPI_FAILURE; - } - - // set reamining attributes directly - pool->homogeneous = createParams->homogeneous; - pool->externalAuth = createParams->externalAuth; - pool->pingInterval = createParams->pingInterval; - pool->pingTimeout = createParams->pingTimeout; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiPool__free() [INTERNAL] -// Free any memory associated with the pool. -//----------------------------------------------------------------------------- -void dpiPool__free(dpiPool *pool, dpiError *error) -{ - if (pool->handle) { - dpiOci__sessionPoolDestroy(pool, DPI_OCI_SPD_FORCE, 0, error); - pool->handle = NULL; - } - if (pool->env) { - dpiEnv__free(pool->env, error); - pool->env = NULL; - } - dpiUtils__freeMemory(pool); -} - - -//----------------------------------------------------------------------------- -// dpiPool__getAttributeUint() [INTERNAL] -// Return the value of the attribute as an unsigned integer. -//----------------------------------------------------------------------------- -static int dpiPool__getAttributeUint(dpiPool *pool, uint32_t attribute, - uint32_t *value, const char *fnName) -{ - int status, supported = 1; - dpiError error; - - if (dpiPool__checkConnected(pool, fnName, &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(pool, value) - switch (attribute) { - case DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION: - if (pool->env->versionInfo->versionNum < 12) - supported = 0; - break; - case DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT: - if (pool->env->versionInfo->versionNum < 12 || - (pool->env->versionInfo->versionNum == 12 && - pool->env->versionInfo->releaseNum < 2)) - supported = 0; - break; - case DPI_OCI_ATTR_SPOOL_BUSY_COUNT: - case DPI_OCI_ATTR_SPOOL_OPEN_COUNT: - case DPI_OCI_ATTR_SPOOL_STMTCACHESIZE: - case DPI_OCI_ATTR_SPOOL_TIMEOUT: - break; - default: - supported = 0; - break; - } - if (supported) - status = dpiOci__attrGet(pool->handle, DPI_OCI_HTYPE_SPOOL, value, - NULL, attribute, "get attribute value", &error); - else status = dpiError__set(&error, "get attribute value", - DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(pool, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiPool__setAttributeUint() [INTERNAL] -// Set the value of the OCI attribute as an unsigned integer. -//----------------------------------------------------------------------------- -static int dpiPool__setAttributeUint(dpiPool *pool, uint32_t attribute, - uint32_t value, const char *fnName) -{ - int status, supported = 1; - void *ociValue = &value; - uint8_t shortValue; - dpiError error; - - // make sure session pool is connected - if (dpiPool__checkConnected(pool, fnName, &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - - // determine pointer to pass (OCI uses different sizes) - switch (attribute) { - case DPI_OCI_ATTR_SPOOL_GETMODE: - shortValue = (uint8_t) value; - ociValue = &shortValue; - break; - case DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION: - if (pool->env->versionInfo->versionNum < 12) - supported = 0; - break; - case DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT: - if (pool->env->versionInfo->versionNum < 12 || - (pool->env->versionInfo->versionNum == 12 && - pool->env->versionInfo->releaseNum < 2)) - supported = 0; - break; - case DPI_OCI_ATTR_SPOOL_STMTCACHESIZE: - case DPI_OCI_ATTR_SPOOL_TIMEOUT: - break; - default: - supported = 0; - break; - } - - // set value in the OCI - if (supported) - status = dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, ociValue, - 0, attribute, "set attribute value", &error); - else status = dpiError__set(&error, "set attribute value", - DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(pool, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiPool_acquireConnection() [PUBLIC] -// Acquire a connection from the pool. -//----------------------------------------------------------------------------- -int dpiPool_acquireConnection(dpiPool *pool, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - dpiConnCreateParams *params, dpiConn **conn) -{ - dpiConnCreateParams localParams; - dpiError error; - int status; - - // validate parameters - if (dpiPool__checkConnected(pool, __func__, &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(pool, userName) - DPI_CHECK_PTR_AND_LENGTH(pool, password) - DPI_CHECK_PTR_NOT_NULL(pool, conn) - - // use default parameters if none provided - if (!params) { - dpiContext__initConnCreateParams(&localParams); - params = &localParams; - } - - // the username must be enclosed within [] if external authentication - // with proxy is desired - if (pool->externalAuth && userName && userNameLength > 0 && - (userName[0] != '[' || userName[userNameLength - 1] != ']')) { - dpiError__set(&error, "verify proxy user name with external auth", - DPI_ERR_EXT_AUTH_INVALID_PROXY); - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error ); - } - - status = dpiPool__acquireConnection(pool, userName, userNameLength, - password, passwordLength, params, conn, &error); - return dpiGen__endPublicFn(pool, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiPool_addRef() [PUBLIC] -// Add a reference to the pool. -//----------------------------------------------------------------------------- -int dpiPool_addRef(dpiPool *pool) -{ - return dpiGen__addRef(pool, DPI_HTYPE_POOL, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_close() [PUBLIC] -// Destroy the pool now, not when the reference count reaches zero. -//----------------------------------------------------------------------------- -int dpiPool_close(dpiPool *pool, dpiPoolCloseMode mode) -{ - dpiError error; - - if (dpiPool__checkConnected(pool, __func__, &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - if (dpiOci__sessionPoolDestroy(pool, mode, 1, &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - return dpiGen__endPublicFn(pool, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiPool_create() [PUBLIC] -// Create a new session pool and return it. -//----------------------------------------------------------------------------- -int dpiPool_create(const dpiContext *context, const char *userName, - uint32_t userNameLength, const char *password, uint32_t passwordLength, - const char *connectString, uint32_t connectStringLength, - const dpiCommonCreateParams *commonParams, - dpiPoolCreateParams *createParams, dpiPool **pool) -{ - dpiCommonCreateParams localCommonParams; - dpiPoolCreateParams localCreateParams; - dpiPool *tempPool; - dpiError error; - - // validate parameters - if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, - &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(context, userName) - DPI_CHECK_PTR_AND_LENGTH(context, password) - DPI_CHECK_PTR_AND_LENGTH(context, connectString) - DPI_CHECK_PTR_NOT_NULL(context, pool) - - // use default parameters if none provided - if (!commonParams) { - dpiContext__initCommonCreateParams(&localCommonParams); - commonParams = &localCommonParams; - } - - // size changed in 3.1; must use local variable until version 4 released - if (!createParams || context->dpiMinorVersion < 1) { - dpiContext__initPoolCreateParams(&localCreateParams); - if (createParams) - memcpy(&localCreateParams, createParams, - sizeof(dpiPoolCreateParams__v30)); - createParams = &localCreateParams; - } - - // allocate memory for pool - if (dpiGen__allocate(DPI_HTYPE_POOL, NULL, (void**) &tempPool, &error) < 0) - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - - // initialize environment - if (dpiEnv__init(tempPool->env, context, commonParams, NULL, &error) < 0) { - dpiPool__free(tempPool, &error); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - } - - // perform remaining steps required to create pool - if (dpiPool__create(tempPool, userName, userNameLength, password, - passwordLength, connectString, connectStringLength, commonParams, - createParams, &error) < 0) { - dpiPool__free(tempPool, &error); - return dpiGen__endPublicFn(context, DPI_FAILURE, &error); - } - - createParams->outPoolName = tempPool->name; - createParams->outPoolNameLength = tempPool->nameLength; - *pool = tempPool; - dpiHandlePool__release(tempPool->env->errorHandles, &error.handle); - return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getBusyCount() [PUBLIC] -// Return the pool's busy count. -//----------------------------------------------------------------------------- -int dpiPool_getBusyCount(dpiPool *pool, uint32_t *value) -{ - return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_BUSY_COUNT, - value, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getEncodingInfo() [PUBLIC] -// Get the encoding information from the pool. -//----------------------------------------------------------------------------- -int dpiPool_getEncodingInfo(dpiPool *pool, dpiEncodingInfo *info) -{ - dpiError error; - int status; - - if (dpiPool__checkConnected(pool, __func__, &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(pool, info) - status = dpiEnv__getEncodingInfo(pool->env, info); - return dpiGen__endPublicFn(pool, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getGetMode() [PUBLIC] -// Return the pool's "get" mode. -//----------------------------------------------------------------------------- -int dpiPool_getGetMode(dpiPool *pool, dpiPoolGetMode *value) -{ - dpiError error; - - if (dpiPool__checkConnected(pool, __func__, &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(pool, value) - if (dpiOci__attrGet(pool->handle, DPI_OCI_HTYPE_SPOOL, value, NULL, - DPI_OCI_ATTR_SPOOL_GETMODE, "get attribute value", &error) < 0) - return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); - return dpiGen__endPublicFn(pool, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getMaxLifetimeSession() [PUBLIC] -// Return the pool's maximum lifetime session. -//----------------------------------------------------------------------------- -int dpiPool_getMaxLifetimeSession(dpiPool *pool, uint32_t *value) -{ - return dpiPool__getAttributeUint(pool, - DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION, value, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getOpenCount() [PUBLIC] -// Return the pool's open count. -//----------------------------------------------------------------------------- -int dpiPool_getOpenCount(dpiPool *pool, uint32_t *value) -{ - return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_OPEN_COUNT, - value, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getStmtCacheSize() [PUBLIC] -// Return the pool's default statement cache size. -//----------------------------------------------------------------------------- -int dpiPool_getStmtCacheSize(dpiPool *pool, uint32_t *value) -{ - return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_STMTCACHESIZE, - value, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getTimeout() [PUBLIC] -// Return the pool's timeout value. -//----------------------------------------------------------------------------- -int dpiPool_getTimeout(dpiPool *pool, uint32_t *value) -{ - return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_TIMEOUT, value, - __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_getWaitTimeout() [PUBLIC] -// Return the pool's wait timeout value. -//----------------------------------------------------------------------------- -int dpiPool_getWaitTimeout(dpiPool *pool, uint32_t *value) -{ - return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT, - value, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_release() [PUBLIC] -// Release a reference to the pool. -//----------------------------------------------------------------------------- -int dpiPool_release(dpiPool *pool) -{ - return dpiGen__release(pool, DPI_HTYPE_POOL, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_setGetMode() [PUBLIC] -// Set the pool's "get" mode. -//----------------------------------------------------------------------------- -int dpiPool_setGetMode(dpiPool *pool, dpiPoolGetMode value) -{ - return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_GETMODE, value, - __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_setMaxLifetimeSession() [PUBLIC] -// Set the pool's maximum lifetime session. -//----------------------------------------------------------------------------- -int dpiPool_setMaxLifetimeSession(dpiPool *pool, uint32_t value) -{ - return dpiPool__setAttributeUint(pool, - DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION, value, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_setStmtCacheSize() [PUBLIC] -// Set the pool's default statement cache size. -//----------------------------------------------------------------------------- -int dpiPool_setStmtCacheSize(dpiPool *pool, uint32_t value) -{ - return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_STMTCACHESIZE, - value, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_setTimeout() [PUBLIC] -// Set the pool's timeout value. -//----------------------------------------------------------------------------- -int dpiPool_setTimeout(dpiPool *pool, uint32_t value) -{ - return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_TIMEOUT, value, - __func__); -} - - -//----------------------------------------------------------------------------- -// dpiPool_setWaitTimeout() [PUBLIC] -// Set the pool's wait timeout value. -//----------------------------------------------------------------------------- -int dpiPool_setWaitTimeout(dpiPool *pool, uint32_t value) -{ - return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT, - value, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiQueue.c b/vendor/github.com/godror/godror/odpi/src/dpiQueue.c deleted file mode 100644 index 9c2f39a9a82..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiQueue.c +++ /dev/null @@ -1,560 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiQueue.c -// Implementation of AQ queues. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// forward declarations of internal functions only used in this file -static int dpiQueue__allocateBuffer(dpiQueue *queue, uint32_t numElements, - dpiError *error); -static int dpiQueue__deq(dpiQueue *queue, uint32_t *numProps, - dpiMsgProps **props, dpiError *error); -static void dpiQueue__freeBuffer(dpiQueue *queue, dpiError *error); -static int dpiQueue__getPayloadTDO(dpiQueue *queue, void **tdo, - dpiError *error); - - -//----------------------------------------------------------------------------- -// dpiQueue__allocate() [INTERNAL] -// Allocate and initialize a queue. -//----------------------------------------------------------------------------- -int dpiQueue__allocate(dpiConn *conn, const char *name, uint32_t nameLength, - dpiObjectType *payloadType, dpiQueue **queue, dpiError *error) -{ - dpiQueue *tempQueue; - char *buffer; - - // allocate handle; store reference to the connection that created it - if (dpiGen__allocate(DPI_HTYPE_QUEUE, conn->env, (void**) &tempQueue, - error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(conn, error, 1); - tempQueue->conn = conn; - - // store payload type, which is either an object type or NULL (meaning that - // RAW payloads are being enqueued and dequeued) - if (payloadType) { - dpiGen__setRefCount(payloadType, error, 1); - tempQueue->payloadType = payloadType; - } - - // allocate space for the name of the queue; OCI requires a NULL-terminated - // string so allocate enough space to store the NULL terminator; UTF-16 - // encoded strings are not currently supported - if (dpiUtils__allocateMemory(1, nameLength + 1, 0, "queue name", - (void**) &buffer, error) < 0) { - dpiQueue__free(tempQueue, error); - return DPI_FAILURE; - } - memcpy(buffer, name, nameLength); - buffer[nameLength] = '\0'; - tempQueue->name = buffer; - - *queue = tempQueue; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue__allocateBuffer() [INTERNAL] -// Ensure there is enough space in the buffer for the specified number of -// elements. -//----------------------------------------------------------------------------- -static int dpiQueue__allocateBuffer(dpiQueue *queue, uint32_t numElements, - dpiError *error) -{ - dpiQueue__freeBuffer(queue, error); - queue->buffer.numElements = numElements; - if (dpiUtils__allocateMemory(numElements, sizeof(dpiMsgProps*), 1, - "allocate msg props array", (void**) &queue->buffer.props, - error) < 0) - return DPI_FAILURE; - if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, - "allocate OCI handles array", (void**) &queue->buffer.handles, - error) < 0) - return DPI_FAILURE; - if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, - "allocate OCI instances array", (void**) &queue->buffer.instances, - error) < 0) - return DPI_FAILURE; - if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, - "allocate OCI indicators array", - (void**) &queue->buffer.indicators, error) < 0) - return DPI_FAILURE; - if (!queue->payloadType) { - if (dpiUtils__allocateMemory(numElements, sizeof(int16_t), 1, - "allocate OCI raw indicators array", - (void**) &queue->buffer.rawIndicators, error) < 0) - return DPI_FAILURE; - } - if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, - "allocate message ids array", (void**) &queue->buffer.msgIds, - error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue__check() [INTERNAL] -// Determine if the queue is available to use. -//----------------------------------------------------------------------------- -static int dpiQueue__check(dpiQueue *queue, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(queue, DPI_HTYPE_QUEUE, fnName, error) < 0) - return DPI_FAILURE; - if (!queue->conn->handle || queue->conn->closing) - return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue__createDeqOptions() [INTERNAL] -// Create the dequeue options object that will be used for performing -// dequeues against the queue. -//----------------------------------------------------------------------------- -static int dpiQueue__createDeqOptions(dpiQueue *queue, dpiError *error) -{ - dpiDeqOptions *tempOptions; - - if (dpiGen__allocate(DPI_HTYPE_DEQ_OPTIONS, queue->env, - (void**) &tempOptions, error) < 0) - return DPI_FAILURE; - if (dpiDeqOptions__create(tempOptions, queue->conn, error) < 0) { - dpiDeqOptions__free(tempOptions, error); - return DPI_FAILURE; - } - - queue->deqOptions = tempOptions; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue__createEnqOptions() [INTERNAL] -// Create the dequeue options object that will be used for performing -// dequeues against the queue. -//----------------------------------------------------------------------------- -static int dpiQueue__createEnqOptions(dpiQueue *queue, dpiError *error) -{ - dpiEnqOptions *tempOptions; - - if (dpiGen__allocate(DPI_HTYPE_ENQ_OPTIONS, queue->env, - (void**) &tempOptions, error) < 0) - return DPI_FAILURE; - if (dpiEnqOptions__create(tempOptions, queue->conn, error) < 0) { - dpiEnqOptions__free(tempOptions, error); - return DPI_FAILURE; - } - - queue->enqOptions = tempOptions; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue__deq() [INTERNAL] -// Perform a dequeue of up to the specified number of properties. -//----------------------------------------------------------------------------- -static int dpiQueue__deq(dpiQueue *queue, uint32_t *numProps, - dpiMsgProps **props, dpiError *error) -{ - dpiMsgProps *prop; - void *payloadTDO; - uint32_t i; - - // create dequeue options, if necessary - if (!queue->deqOptions && dpiQueue__createDeqOptions(queue, error) < 0) - return DPI_FAILURE; - - // allocate buffer, if necessary - if (queue->buffer.numElements < *numProps && - dpiQueue__allocateBuffer(queue, *numProps, error) < 0) - return DPI_FAILURE; - - // populate buffer - for (i = 0; i < *numProps; i++) { - prop = queue->buffer.props[i]; - - // create new message properties, if applicable - if (!prop) { - if (dpiMsgProps__allocate(queue->conn, &prop, error) < 0) - return DPI_FAILURE; - queue->buffer.props[i] = prop; - } - - // create payload object, if applicable - if (queue->payloadType && !prop->payloadObj && - dpiObject__allocate(queue->payloadType, NULL, NULL, NULL, - &prop->payloadObj, error) < 0) - return DPI_FAILURE; - - // set OCI arrays - queue->buffer.handles[i] = prop->handle; - if (queue->payloadType) { - queue->buffer.instances[i] = prop->payloadObj->instance; - queue->buffer.indicators[i] = prop->payloadObj->indicator; - } else { - queue->buffer.instances[i] = prop->payloadRaw; - queue->buffer.indicators[i] = &queue->buffer.rawIndicators[i]; - } - queue->buffer.msgIds[i] = prop->msgIdRaw; - - } - - // perform dequeue - if (dpiQueue__getPayloadTDO(queue, &payloadTDO, error) < 0) - return DPI_FAILURE; - if (dpiOci__aqDeqArray(queue->conn, queue->name, queue->deqOptions->handle, - numProps, queue->buffer.handles, payloadTDO, - queue->buffer.instances, queue->buffer.indicators, - queue->buffer.msgIds, error) < 0) { - if (error->buffer->code != 25228) - return DPI_FAILURE; - error->buffer->offset = (uint16_t) *numProps; - } - - // transfer message properties to destination array - for (i = 0; i < *numProps; i++) { - props[i] = queue->buffer.props[i]; - queue->buffer.props[i] = NULL; - if (!queue->payloadType) - props[i]->payloadRaw = queue->buffer.instances[i]; - props[i]->msgIdRaw = queue->buffer.msgIds[i]; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue__enq() [INTERNAL] -// Perform an enqueue of the specified properties. -//----------------------------------------------------------------------------- -static int dpiQueue__enq(dpiQueue *queue, uint32_t numProps, - dpiMsgProps **props, dpiError *error) -{ - void *payloadTDO; - uint32_t i; - - // if no messages are being enqueued, nothing to do! - if (numProps == 0) - return DPI_SUCCESS; - - // create enqueue options, if necessary - if (!queue->enqOptions && dpiQueue__createEnqOptions(queue, error) < 0) - return DPI_FAILURE; - - // allocate buffer, if necessary - if (queue->buffer.numElements < numProps && - dpiQueue__allocateBuffer(queue, numProps, error) < 0) - return DPI_FAILURE; - - // populate buffer - for (i = 0; i < numProps; i++) { - - // perform checks - if (!props[i]->payloadObj && !props[i]->payloadRaw) - return dpiError__set(error, "check payload", - DPI_ERR_QUEUE_NO_PAYLOAD); - if ((queue->payloadType && !props[i]->payloadObj) || - (!queue->payloadType && props[i]->payloadObj)) - return dpiError__set(error, "check payload", - DPI_ERR_QUEUE_WRONG_PAYLOAD_TYPE); - if (queue->payloadType && props[i]->payloadObj && - queue->payloadType->tdo != props[i]->payloadObj->type->tdo) - return dpiError__set(error, "check payload", - DPI_ERR_WRONG_TYPE, - props[i]->payloadObj->type->schemaLength, - props[i]->payloadObj->type->schema, - props[i]->payloadObj->type->nameLength, - props[i]->payloadObj->type->name, - queue->payloadType->schemaLength, - queue->payloadType->schema, - queue->payloadType->nameLength, - queue->payloadType->name); - - // set OCI arrays - queue->buffer.handles[i] = props[i]->handle; - if (queue->payloadType) { - queue->buffer.instances[i] = props[i]->payloadObj->instance; - queue->buffer.indicators[i] = props[i]->payloadObj->indicator; - } else { - queue->buffer.instances[i] = props[i]->payloadRaw; - queue->buffer.indicators[i] = &queue->buffer.rawIndicators[i]; - } - queue->buffer.msgIds[i] = props[i]->msgIdRaw; - - } - - // perform enqueue - if (dpiQueue__getPayloadTDO(queue, &payloadTDO, error) < 0) - return DPI_FAILURE; - if (numProps == 1) { - if (dpiOci__aqEnq(queue->conn, queue->name, queue->enqOptions->handle, - queue->buffer.handles[0], payloadTDO, queue->buffer.instances, - queue->buffer.indicators, queue->buffer.msgIds, error) < 0) - return DPI_FAILURE; - } else { - if (dpiOci__aqEnqArray(queue->conn, queue->name, - queue->enqOptions->handle, &numProps, queue->buffer.handles, - payloadTDO, queue->buffer.instances, queue->buffer.indicators, - queue->buffer.msgIds, error) < 0) { - error->buffer->offset = (uint16_t) numProps; - return DPI_FAILURE; - } - } - - // transfer message ids back to message properties - for (i = 0; i < numProps; i++) - props[i]->msgIdRaw = queue->buffer.msgIds[i]; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue__free() [INTERNAL] -// Free the memory for a queue. -//----------------------------------------------------------------------------- -void dpiQueue__free(dpiQueue *queue, dpiError *error) -{ - if (queue->conn) { - dpiGen__setRefCount(queue->conn, error, -1); - queue->conn = NULL; - } - if (queue->payloadType) { - dpiGen__setRefCount(queue->payloadType, error, -1); - queue->payloadType = NULL; - } - if (queue->name) { - dpiUtils__freeMemory((void*) queue->name); - queue->name = NULL; - } - if (queue->deqOptions) { - dpiGen__setRefCount(queue->deqOptions, error, -1); - queue->deqOptions = NULL; - } - if (queue->enqOptions) { - dpiGen__setRefCount(queue->enqOptions, error, -1); - queue->enqOptions = NULL; - } - dpiQueue__freeBuffer(queue, error); - dpiUtils__freeMemory(queue); -} - - -//----------------------------------------------------------------------------- -// dpiQueue__freeBuffer() [INTERNAL] -// Free the memory areas in the queue buffer. -//----------------------------------------------------------------------------- -static void dpiQueue__freeBuffer(dpiQueue *queue, dpiError *error) -{ - dpiQueueBuffer *buffer = &queue->buffer; - uint32_t i; - - if (buffer->props) { - for (i = 0; i < buffer->numElements; i++) { - if (buffer->props[i]) { - dpiGen__setRefCount(buffer->props[i], error, -1); - buffer->props[i] = NULL; - } - } - dpiUtils__freeMemory(buffer->props); - buffer->props = NULL; - } - if (buffer->handles) { - dpiUtils__freeMemory(buffer->handles); - buffer->handles = NULL; - } - if (buffer->instances) { - dpiUtils__freeMemory(buffer->instances); - buffer->instances = NULL; - } - if (buffer->indicators) { - dpiUtils__freeMemory(buffer->indicators); - buffer->indicators = NULL; - } - if (buffer->rawIndicators) { - dpiUtils__freeMemory(buffer->rawIndicators); - buffer->rawIndicators = NULL; - } - if (buffer->msgIds) { - dpiUtils__freeMemory(buffer->msgIds); - buffer->msgIds = NULL; - } -} - - -//----------------------------------------------------------------------------- -// dpiQueue__getPayloadTDO() [INTERNAL] -// Acquire the TDO to use for the payload. This will either be the TDO of the -// object type (if one was specified when the queue was created) or it will be -// the RAW TDO cached on the connection. -//----------------------------------------------------------------------------- -static int dpiQueue__getPayloadTDO(dpiQueue *queue, void **tdo, - dpiError *error) -{ - if (queue->payloadType) { - *tdo = queue->payloadType->tdo; - } else { - if (dpiConn__getRawTDO(queue->conn, error) < 0) - return DPI_FAILURE; - *tdo = queue->conn->rawTDO; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiQueue_addRef() [PUBLIC] -// Add a reference to the queue. -//----------------------------------------------------------------------------- -int dpiQueue_addRef(dpiQueue *queue) -{ - return dpiGen__addRef(queue, DPI_HTYPE_QUEUE, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiQueue_deqMany() [PUBLIC] -// Dequeue multiple messages from the queue. -//----------------------------------------------------------------------------- -int dpiQueue_deqMany(dpiQueue *queue, uint32_t *numProps, dpiMsgProps **props) -{ - dpiError error; - int status; - - if (dpiQueue__check(queue, __func__, &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(queue, numProps) - DPI_CHECK_PTR_NOT_NULL(queue, props) - status = dpiQueue__deq(queue, numProps, props, &error); - return dpiGen__endPublicFn(queue, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiQueue_deqOne() [PUBLIC] -// Dequeue a single message from the queue. -//----------------------------------------------------------------------------- -int dpiQueue_deqOne(dpiQueue *queue, dpiMsgProps **props) -{ - uint32_t numProps = 1; - dpiError error; - - if (dpiQueue__check(queue, __func__, &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(queue, props) - if (dpiQueue__deq(queue, &numProps, props, &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - if (numProps == 0) - *props = NULL; - return dpiGen__endPublicFn(queue, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiQueue_enqMany() [PUBLIC] -// Enqueue multiple message to the queue. -//----------------------------------------------------------------------------- -int dpiQueue_enqMany(dpiQueue *queue, uint32_t numProps, dpiMsgProps **props) -{ - dpiError error; - uint32_t i; - int status; - - // validate parameters - if (dpiQueue__check(queue, __func__, &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(queue, props) - for (i = 0; i < numProps; i++) { - if (dpiGen__checkHandle(props[i], DPI_HTYPE_MSG_PROPS, - "check message properties", &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - } - status = dpiQueue__enq(queue, numProps, props, &error); - return dpiGen__endPublicFn(queue, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiQueue_enqOne() [PUBLIC] -// Enqueue a single message to the queue. -//----------------------------------------------------------------------------- -int dpiQueue_enqOne(dpiQueue *queue, dpiMsgProps *props) -{ - dpiError error; - int status; - - if (dpiQueue__check(queue, __func__, &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - if (dpiGen__checkHandle(props, DPI_HTYPE_MSG_PROPS, - "check message properties", &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - status = dpiQueue__enq(queue, 1, &props, &error); - return dpiGen__endPublicFn(queue, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiQueue_getDeqOptions() [PUBLIC] -// Return the dequeue options associated with the queue. If no dequeue -// options are currently associated with the queue, create them first. -//----------------------------------------------------------------------------- -int dpiQueue_getDeqOptions(dpiQueue *queue, dpiDeqOptions **options) -{ - dpiError error; - - if (dpiGen__startPublicFn(queue, DPI_HTYPE_QUEUE, __func__, &error) < 0) - return DPI_FAILURE; - DPI_CHECK_PTR_NOT_NULL(queue, options) - if (!queue->deqOptions && dpiQueue__createDeqOptions(queue, &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - *options = queue->deqOptions; - return dpiGen__endPublicFn(queue, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiQueue_getEnqOptions() [PUBLIC] -// Return the enqueue options associated with the queue. If no enqueue -// options are currently associated with the queue, create them first. -//----------------------------------------------------------------------------- -int dpiQueue_getEnqOptions(dpiQueue *queue, dpiEnqOptions **options) -{ - dpiError error; - - if (dpiGen__startPublicFn(queue, DPI_HTYPE_QUEUE, __func__, &error) < 0) - return DPI_FAILURE; - DPI_CHECK_PTR_NOT_NULL(queue, options) - if (!queue->enqOptions && dpiQueue__createEnqOptions(queue, &error) < 0) - return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); - *options = queue->enqOptions; - return dpiGen__endPublicFn(queue, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiQueue_release() [PUBLIC] -// Release a reference to the queue. -//----------------------------------------------------------------------------- -int dpiQueue_release(dpiQueue *queue) -{ - return dpiGen__release(queue, DPI_HTYPE_QUEUE, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiRowid.c b/vendor/github.com/godror/godror/odpi/src/dpiRowid.c deleted file mode 100644 index 9bda49e7cd1..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiRowid.c +++ /dev/null @@ -1,134 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiRowid.c -// Implementation of rowids. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiRowid__allocate() [INTERNAL] -// Allocate and initialize a rowid object. -//----------------------------------------------------------------------------- -int dpiRowid__allocate(dpiConn *conn, dpiRowid **rowid, dpiError *error) -{ - dpiRowid *tempRowid; - - if (dpiGen__allocate(DPI_HTYPE_ROWID, conn->env, (void**) &tempRowid, - error) < 0) - return DPI_FAILURE; - if (dpiOci__descriptorAlloc(conn->env->handle, &tempRowid->handle, - DPI_OCI_DTYPE_ROWID, "allocate descriptor", error) < 0) { - dpiRowid__free(tempRowid, error); - return DPI_FAILURE; - } - - *rowid = tempRowid; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiRowid__free() [INTERNAL] -// Free the memory for a rowid. -//----------------------------------------------------------------------------- -void dpiRowid__free(dpiRowid *rowid, UNUSED dpiError *error) -{ - if (rowid->handle) { - dpiOci__descriptorFree(rowid->handle, DPI_OCI_DTYPE_ROWID); - rowid->handle = NULL; - } - if (rowid->buffer) { - dpiUtils__freeMemory(rowid->buffer); - rowid->buffer = NULL; - } - dpiUtils__freeMemory(rowid); -} - - -//----------------------------------------------------------------------------- -// dpiRowid_addRef() [PUBLIC] -// Add a reference to the rowid. -//----------------------------------------------------------------------------- -int dpiRowid_addRef(dpiRowid *rowid) -{ - return dpiGen__addRef(rowid, DPI_HTYPE_ROWID, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiRowid_getStringValue() [PUBLIC] -// Get the string representation of the rowid. -//----------------------------------------------------------------------------- -int dpiRowid_getStringValue(dpiRowid *rowid, const char **value, - uint32_t *valueLength) -{ - char temp, *adjustedBuffer, *sourcePtr; - uint16_t *targetPtr; - dpiError error; - uint16_t i; - - if (dpiGen__startPublicFn(rowid, DPI_HTYPE_ROWID, __func__, &error) < 0) - return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(rowid, value) - DPI_CHECK_PTR_NOT_NULL(rowid, valueLength) - if (!rowid->buffer) { - - // determine length of rowid - rowid->bufferLength = 0; - dpiOci__rowidToChar(rowid, &temp, &rowid->bufferLength, &error); - - // allocate and populate buffer containing string representation - if (dpiUtils__allocateMemory(1, rowid->bufferLength, 0, - "allocate rowid buffer", (void**) &rowid->buffer, &error) < 0) - return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); - if (dpiOci__rowidToChar(rowid, rowid->buffer, &rowid->bufferLength, - &error) < 0) - return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); - - // UTF-16 is not handled properly (data is returned as ASCII instead) - // adjust the buffer to use the correct encoding - if (rowid->env->charsetId == DPI_CHARSET_ID_UTF16) { - if (dpiUtils__allocateMemory(2, rowid->bufferLength, 0, - "allocate rowid buffer", (void**) &adjustedBuffer, - &error) < 0) { - dpiUtils__freeMemory(rowid->buffer); - rowid->bufferLength = 0; - rowid->buffer = NULL; - return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); - } - sourcePtr = rowid->buffer; - targetPtr = (uint16_t*) adjustedBuffer; - for (i = 0; i < rowid->bufferLength; i++) - *targetPtr++ = (uint16_t) *sourcePtr++; - dpiUtils__freeMemory(rowid->buffer); - rowid->buffer = adjustedBuffer; - rowid->bufferLength *= 2; - } - - } - - *value = rowid->buffer; - *valueLength = rowid->bufferLength; - return dpiGen__endPublicFn(rowid, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiRowid_release() [PUBLIC] -// Release a reference to the rowid. -//----------------------------------------------------------------------------- -int dpiRowid_release(dpiRowid *rowid) -{ - return dpiGen__release(rowid, DPI_HTYPE_ROWID, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c deleted file mode 100644 index b0a0ded7c34..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c +++ /dev/null @@ -1,812 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiSodaColl.c -// Implementation of SODA collections. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiSodaColl__allocate() [INTERNAL] -// Allocate and initialize a SODA collection structure. -//----------------------------------------------------------------------------- -int dpiSodaColl__allocate(dpiSodaDb *db, void *handle, dpiSodaColl **coll, - dpiError *error) -{ - uint8_t sqlType, contentType; - dpiSodaColl *tempColl; - - if (dpiOci__attrGet(handle, DPI_OCI_HTYPE_SODA_COLLECTION, - (void*) &sqlType, 0, DPI_OCI_ATTR_SODA_CTNT_SQL_TYPE, - "get content sql type", error) < 0) - return DPI_FAILURE; - if (dpiGen__allocate(DPI_HTYPE_SODA_COLL, db->env, (void**) &tempColl, - error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(db, error, 1); - tempColl->db = db; - tempColl->handle = handle; - if (sqlType == DPI_SQLT_BLOB) { - tempColl->binaryContent = 1; - contentType = 0; - dpiOci__attrGet(handle, DPI_OCI_HTYPE_SODA_COLLECTION, - (void*) &contentType, 0, DPI_OCI_ATTR_SODA_CTNT_FORMAT, - NULL, error); - if (contentType == DPI_OCI_JSON_FORMAT_OSON) - tempColl->binaryContent = 0; - } - *coll = tempColl; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__check() [INTERNAL] -// Determine if the SODA collection is available to use. -//----------------------------------------------------------------------------- -static int dpiSodaColl__check(dpiSodaColl *coll, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(coll, DPI_HTYPE_SODA_COLL, fnName, error) < 0) - return DPI_FAILURE; - if (!coll->db->conn->handle || coll->db->conn->closing) - return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__createOperOptions() [INTERNAL] -// Create a SODA operation options handle with the specified information. -//----------------------------------------------------------------------------- -static int dpiSodaColl__createOperOptions(dpiSodaColl *coll, - const dpiSodaOperOptions *options, void **handle, dpiError *error) -{ - dpiSodaOperOptions localOptions; - - // if no options specified, use default values - if (!options) { - dpiContext__initSodaOperOptions(&localOptions); - options = &localOptions; - } - - // allocate new handle - if (dpiOci__handleAlloc(coll->env->handle, handle, - DPI_OCI_HTYPE_SODA_OPER_OPTIONS, - "allocate SODA operation options handle", error) < 0) - return DPI_FAILURE; - - // set multiple keys, if applicable - if (options->numKeys > 0) { - if (dpiOci__sodaOperKeysSet(options, *handle, error) < 0) { - dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return DPI_FAILURE; - } - } - - // set single key, if applicable - if (options->keyLength > 0) { - if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, - (void*) options->key, options->keyLength, - DPI_OCI_ATTR_SODA_KEY, "set key", error) < 0) { - dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return DPI_FAILURE; - } - } - - // set single version, if applicable - if (options->versionLength > 0) { - if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, - (void*) options->version, options->versionLength, - DPI_OCI_ATTR_SODA_VERSION, "set version", error) < 0) { - dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return DPI_FAILURE; - } - } - - // set filter, if applicable - if (options->filterLength > 0) { - if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, - (void*) options->filter, options->filterLength, - DPI_OCI_ATTR_SODA_FILTER, "set filter", error) < 0) { - dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return DPI_FAILURE; - } - } - - // set skip count, if applicable - if (options->skip > 0) { - if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, - (void*) &options->skip, 0, DPI_OCI_ATTR_SODA_SKIP, - "set skip count", error) < 0) { - dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return DPI_FAILURE; - } - } - - // set limit, if applicable - if (options->limit > 0) { - if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, - (void*) &options->limit, 0, DPI_OCI_ATTR_SODA_LIMIT, - "set limit", error) < 0) { - dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return DPI_FAILURE; - } - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__find() [INTERNAL] -// Perform a find of SODA documents by creating an operation options handle -// and populating it with the requested options. Once the find is complete, -// return either a cursor or a document. -//----------------------------------------------------------------------------- -static int dpiSodaColl__find(dpiSodaColl *coll, - const dpiSodaOperOptions *options, uint32_t flags, - dpiSodaDocCursor **cursor, dpiSodaDoc **doc, dpiError *error) -{ - uint32_t ociMode, returnHandleType, ociFlags; - void *optionsHandle, *ociReturnHandle; - int status; - - // determine OCI mode to pass - ociMode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - ociMode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // create new OCI operation options handle - if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, - error) < 0) - return DPI_FAILURE; - - // determine OCI flags to use - ociFlags = (coll->binaryContent) ? DPI_OCI_SODA_AS_STORED : - DPI_OCI_SODA_AS_AL32UTF8; - - // perform actual find - if (cursor) { - *cursor = NULL; - status = dpiOci__sodaFind(coll, optionsHandle, ociFlags, ociMode, - &ociReturnHandle, error); - } else { - *doc = NULL; - status = dpiOci__sodaFindOne(coll, optionsHandle, ociFlags, ociMode, - &ociReturnHandle, error); - } - dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - if (status < 0) - return DPI_FAILURE; - - // return cursor or document, as appropriate - if (cursor) { - status = dpiSodaDocCursor__allocate(coll, ociReturnHandle, cursor, - error); - returnHandleType = DPI_OCI_HTYPE_SODA_DOC_CURSOR; - } else if (ociReturnHandle) { - status = dpiSodaDoc__allocate(coll->db, ociReturnHandle, doc, error); - returnHandleType = DPI_OCI_HTYPE_SODA_DOCUMENT; - } - if (status < 0) - dpiOci__handleFree(ociReturnHandle, returnHandleType); - - return status; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__free() [INTERNAL] -// Free the memory for a SODA collection. Note that the reference to the -// database must remain until after the handle is freed; otherwise, a segfault -// can take place. -//----------------------------------------------------------------------------- -void dpiSodaColl__free(dpiSodaColl *coll, dpiError *error) -{ - if (coll->handle) { - dpiOci__handleFree(coll->handle, DPI_OCI_HTYPE_SODA_COLLECTION); - coll->handle = NULL; - } - if (coll->db) { - dpiGen__setRefCount(coll->db, error, -1); - coll->db = NULL; - } - dpiUtils__freeMemory(coll); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__getDocCount() [INTERNAL] -// Internal method for getting document count. -//----------------------------------------------------------------------------- -static int dpiSodaColl__getDocCount(dpiSodaColl *coll, - const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count, - dpiError *error) -{ - void *optionsHandle; - uint32_t ociMode; - int status; - - // determine OCI mode to pass - ociMode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - ociMode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // create new OCI operation options handle - if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, - error) < 0) - return DPI_FAILURE; - - // perform actual document count - status = dpiOci__sodaDocCount(coll, optionsHandle, ociMode, count, error); - dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__insertMany() [INTERNAL] -// Insert multiple documents into the collection and return handles to the -// newly created documents, if desired. -//----------------------------------------------------------------------------- -static int dpiSodaColl__insertMany(dpiSodaColl *coll, uint32_t numDocs, - void **docHandles, uint32_t flags, dpiSodaDoc **insertedDocs, - dpiError *error) -{ - void *optionsHandle; - uint32_t i, j, mode; - uint64_t docCount; - int status; - - // create OCI output options handle - if (dpiOci__handleAlloc(coll->env->handle, &optionsHandle, - DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS, - "allocate SODA output options handle", error) < 0) - return DPI_FAILURE; - - // determine mode to pass - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // perform actual bulk insert - if (insertedDocs) { - status = dpiOci__sodaBulkInsertAndGet(coll, docHandles, numDocs, - optionsHandle, mode, error); - } else { - status = dpiOci__sodaBulkInsert(coll, docHandles, numDocs, - optionsHandle, mode, error); - } - - // on failure, determine the number of documents that were successfully - // inserted and store that information in the error buffer - if (status < 0) { - dpiOci__attrGet(optionsHandle, DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS, - (void*) &docCount, 0, DPI_OCI_ATTR_SODA_DOC_COUNT, - NULL, error); - error->buffer->offset = (uint16_t) docCount; - } - dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS); - - // on failure, if using the "AndGet" variant, any document handles that - // were created need to be freed - if (insertedDocs && status < 0) { - for (i = 0; i < numDocs; i++) { - if (docHandles[i]) { - dpiOci__handleFree(docHandles[i], DPI_OCI_HTYPE_SODA_DOCUMENT); - docHandles[i] = NULL; - } - } - } - if (status < 0) - return DPI_FAILURE; - - // return document handles, if desired - if (insertedDocs) { - for (i = 0; i < numDocs; i++) { - if (dpiSodaDoc__allocate(coll->db, docHandles[i], &insertedDocs[i], - error) < 0) { - for (j = 0; j < i; j++) { - dpiSodaDoc__free(insertedDocs[j], error); - insertedDocs[j] = NULL; - } - for (j = i; j < numDocs; j++) { - dpiOci__handleFree(docHandles[i], - DPI_OCI_HTYPE_SODA_DOCUMENT); - } - return DPI_FAILURE; - } - } - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__remove() [INTERNAL] -// Internal method for removing documents from a collection. -//----------------------------------------------------------------------------- -static int dpiSodaColl__remove(dpiSodaColl *coll, - const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count, - dpiError *error) -{ - void *optionsHandle; - uint32_t mode; - int status; - - // determine OCI mode to pass - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // create new OCI operation options handle - if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, - error) < 0) - return DPI_FAILURE; - - // remove documents from collection - status = dpiOci__sodaRemove(coll, optionsHandle, mode, count, error); - dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl__replace() [INTERNAL] -// Internal method for replacing a document in the collection. -//----------------------------------------------------------------------------- -static int dpiSodaColl__replace(dpiSodaColl *coll, - const dpiSodaOperOptions *options, dpiSodaDoc *doc, uint32_t flags, - int *replaced, dpiSodaDoc **replacedDoc, dpiError *error) -{ - void *docHandle, *optionsHandle; - int status, dummyIsReplaced; - uint32_t mode; - - // use dummy value if the replaced flag is not desired - if (!replaced) - replaced = &dummyIsReplaced; - - // determine OCI mode to pass - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // create new OCI operation options handle - if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, - error) < 0) - return DPI_FAILURE; - - // replace document in collection - // use "AndGet" variant if the replaced document is requested - docHandle = doc->handle; - if (!replacedDoc) { - status = dpiOci__sodaReplOne(coll, optionsHandle, docHandle, mode, - replaced, error); - } else { - *replacedDoc = NULL; - status = dpiOci__sodaReplOneAndGet(coll, optionsHandle, &docHandle, - mode, replaced, error); - if (status == 0 && docHandle) { - status = dpiSodaDoc__allocate(coll->db, docHandle, replacedDoc, - error); - if (status < 0) - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - } - } - - dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_addRef() [PUBLIC] -// Add a reference to the SODA collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_addRef(dpiSodaColl *coll) -{ - return dpiGen__addRef(coll, DPI_HTYPE_SODA_COLL, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_createIndex() [PUBLIC] -// Create an index on the collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_createIndex(dpiSodaColl *coll, const char *indexSpec, - uint32_t indexSpecLength, uint32_t flags) -{ - dpiError error; - uint32_t mode; - int status; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(coll, indexSpec) - - // determine mode to pass to OCI - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // create index - status = dpiOci__sodaIndexCreate(coll, indexSpec, indexSpecLength, mode, - &error); - return dpiGen__endPublicFn(coll, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_drop() [PUBLIC] -// Drop the collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_drop(dpiSodaColl *coll, uint32_t flags, int *isDropped) -{ - int status, dummyIsDropped; - dpiError error; - uint32_t mode; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - // isDropped is not a mandatory parameter, but it is for OCI - if (!isDropped) - isDropped = &dummyIsDropped; - - // determine mode to pass to OCI - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // drop collection - status = dpiOci__sodaCollDrop(coll, isDropped, mode, &error); - return dpiGen__endPublicFn(coll, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_dropIndex() [PUBLIC] -// Drop the index on the collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_dropIndex(dpiSodaColl *coll, const char *name, - uint32_t nameLength, uint32_t flags, int *isDropped) -{ - int status, dummyIsDropped; - dpiError error; - uint32_t mode; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(coll, name) - - // isDropped is not a mandatory parameter, but it is for OCI - if (!isDropped) - isDropped = &dummyIsDropped; - - // determine mode to pass to OCI - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - if (flags & DPI_SODA_FLAGS_INDEX_DROP_FORCE) - mode |= DPI_OCI_SODA_INDEX_DROP_FORCE; - - // drop index - status = dpiOci__sodaIndexDrop(coll, name, nameLength, mode, isDropped, - &error); - return dpiGen__endPublicFn(coll, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_find() [PUBLIC] -// Find documents in a collection and return a cursor. -//----------------------------------------------------------------------------- -int dpiSodaColl_find(dpiSodaColl *coll, const dpiSodaOperOptions *options, - uint32_t flags, dpiSodaDocCursor **cursor) -{ - dpiError error; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, cursor) - - // perform find and return a cursor - if (dpiSodaColl__find(coll, options, flags, cursor, NULL, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_findOne() [PUBLIC] -// Find a single document in a collection and return it. -//----------------------------------------------------------------------------- -int dpiSodaColl_findOne(dpiSodaColl *coll, const dpiSodaOperOptions *options, - uint32_t flags, dpiSodaDoc **doc) -{ - dpiError error; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, doc) - - // perform find and return a document - if (dpiSodaColl__find(coll, options, flags, NULL, doc, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_getDataGuide() [PUBLIC] -// Return the data guide document for the collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_getDataGuide(dpiSodaColl *coll, uint32_t flags, - dpiSodaDoc **doc) -{ - void *docHandle; - dpiError error; - uint32_t mode; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, doc) - - // determine mode to pass - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // get data guide - if (dpiOci__sodaDataGuideGet(coll, &docHandle, mode, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - if (!docHandle) { - *doc = NULL; - } else if (dpiSodaDoc__allocate(coll->db, docHandle, doc, &error) < 0) { - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - } - - return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_getDocCount() [PUBLIC] -// Return the number of documents in the collection that match the specified -// criteria. -//----------------------------------------------------------------------------- -int dpiSodaColl_getDocCount(dpiSodaColl *coll, - const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count) -{ - dpiError error; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, count) - - // get document count - if (dpiSodaColl__getDocCount(coll, options, flags, count, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_getMetadata() [PUBLIC] -// Return the metadata for the collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_getMetadata(dpiSodaColl *coll, const char **value, - uint32_t *valueLength) -{ - dpiError error; - int status; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, value) - DPI_CHECK_PTR_NOT_NULL(coll, valueLength) - - // get attribute value - status = dpiOci__attrGet(coll->handle, DPI_OCI_HTYPE_SODA_COLLECTION, - (void*) value, valueLength, DPI_OCI_ATTR_SODA_COLL_DESCRIPTOR, - "get value", &error); - return dpiGen__endPublicFn(coll, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_getName() [PUBLIC] -// Return the name of the collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_getName(dpiSodaColl *coll, const char **value, - uint32_t *valueLength) -{ - dpiError error; - int status; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, value) - DPI_CHECK_PTR_NOT_NULL(coll, valueLength) - - // get attribute value - status = dpiOci__attrGet(coll->handle, DPI_OCI_HTYPE_SODA_COLLECTION, - (void*) value, valueLength, DPI_OCI_ATTR_SODA_COLL_NAME, - "get value", &error); - return dpiGen__endPublicFn(coll, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_insertMany() [PUBLIC] -// Insert multiple documents into the collection and return handles to the -// newly created documents, if desired. -//----------------------------------------------------------------------------- -int dpiSodaColl_insertMany(dpiSodaColl *coll, uint32_t numDocs, - dpiSodaDoc **docs, uint32_t flags, dpiSodaDoc **insertedDocs) -{ - void **docHandles; - dpiError error; - uint32_t i; - int status; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, docs) - if (numDocs == 0) { - dpiError__set(&error, "check num documents", DPI_ERR_ARRAY_SIZE_ZERO); - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - } - for (i = 0; i < numDocs; i++) { - if (dpiGen__checkHandle(docs[i], DPI_HTYPE_SODA_DOC, "check document", - &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - } - - // bulk insert is only supported with Oracle Client 18.5+ - if (dpiUtils__checkClientVersion(coll->env->versionInfo, 18, 5, - &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - // create and populate array to hold document handles - if (dpiUtils__allocateMemory(numDocs, sizeof(void*), 1, - "allocate document handles", (void**) &docHandles, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - for (i = 0; i < numDocs; i++) - docHandles[i] = docs[i]->handle; - - // perform bulk insert - status = dpiSodaColl__insertMany(coll, numDocs, docHandles, flags, - insertedDocs, &error); - dpiUtils__freeMemory(docHandles); - return dpiGen__endPublicFn(coll, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_insertOne() [PUBLIC] -// Insert a document into the collection and return a handle to the newly -// created document, if desired. -//----------------------------------------------------------------------------- -int dpiSodaColl_insertOne(dpiSodaColl *coll, dpiSodaDoc *doc, uint32_t flags, - dpiSodaDoc **insertedDoc) -{ - void *docHandle; - dpiError error; - uint32_t mode; - int status; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - if (dpiGen__checkHandle(doc, DPI_HTYPE_SODA_DOC, "check document", - &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - // determine OCI mode to use - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // insert document into collection - // use "AndGet" variant if the inserted document is requested - docHandle = doc->handle; - if (!insertedDoc) - status = dpiOci__sodaInsert(coll, docHandle, mode, &error); - else { - status = dpiOci__sodaInsertAndGet(coll, &docHandle, mode, &error); - if (status == 0) { - status = dpiSodaDoc__allocate(coll->db, docHandle, insertedDoc, - &error); - if (status < 0) - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - } - } - - return dpiGen__endPublicFn(coll, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_release() [PUBLIC] -// Release a reference to the SODA collection. -//----------------------------------------------------------------------------- -int dpiSodaColl_release(dpiSodaColl *coll) -{ - return dpiGen__release(coll, DPI_HTYPE_SODA_COLL, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_remove() [PUBLIC] -// Remove the documents from the collection that match the given criteria. -//----------------------------------------------------------------------------- -int dpiSodaColl_remove(dpiSodaColl *coll, const dpiSodaOperOptions *options, - uint32_t flags, uint64_t *count) -{ - dpiError error; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(coll, count) - - // perform removal - if (dpiSodaColl__remove(coll, options, flags, count, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaColl_replaceOne() [PUBLIC] -// Replace the first document in the collection that matches the given -// criteria. Returns a handle to the newly replaced document, if desired. -//----------------------------------------------------------------------------- -int dpiSodaColl_replaceOne(dpiSodaColl *coll, - const dpiSodaOperOptions *options, dpiSodaDoc *doc, uint32_t flags, - int *replaced, dpiSodaDoc **replacedDoc) -{ - dpiError error; - int status; - - // validate parameters - if (dpiSodaColl__check(coll, __func__, &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - if (dpiGen__checkHandle(doc, DPI_HTYPE_SODA_DOC, "check document", - &error) < 0) - return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); - - // perform replace - status = dpiSodaColl__replace(coll, options, doc, flags, replaced, - replacedDoc, &error); - return dpiGen__endPublicFn(coll, status, &error); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c deleted file mode 100644 index f4e91a427cb..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c +++ /dev/null @@ -1,144 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor.c -// Implementation of SODA collection cursors. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor__allocate() [INTERNAL] -// Allocate and initialize a SODA collection cursor structure. -//----------------------------------------------------------------------------- -int dpiSodaCollCursor__allocate(dpiSodaDb *db, void *handle, - dpiSodaCollCursor **cursor, dpiError *error) -{ - dpiSodaCollCursor *tempCursor; - - if (dpiGen__allocate(DPI_HTYPE_SODA_COLL_CURSOR, db->env, - (void**) &tempCursor, error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(db, error, 1); - tempCursor->db = db; - tempCursor->handle = handle; - *cursor = tempCursor; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor__check() [INTERNAL] -// Determine if the SODA collection cursor is available to use. -//----------------------------------------------------------------------------- -static int dpiSodaCollCursor__check(dpiSodaCollCursor *cursor, - const char *fnName, dpiError *error) -{ - if (dpiGen__startPublicFn(cursor, DPI_HTYPE_SODA_COLL_CURSOR, fnName, - error) < 0) - return DPI_FAILURE; - if (!cursor->handle) - return dpiError__set(error, "check closed", - DPI_ERR_SODA_CURSOR_CLOSED); - if (!cursor->db->conn->handle || cursor->db->conn->closing) - return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor__free() [INTERNAL] -// Free the memory for a SODA collection cursor. Note that the reference to -// the database must remain until after the handle is freed; otherwise, a -// segfault can take place. -//----------------------------------------------------------------------------- -void dpiSodaCollCursor__free(dpiSodaCollCursor *cursor, dpiError *error) -{ - if (cursor->handle) { - dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); - cursor->handle = NULL; - } - if (cursor->db) { - dpiGen__setRefCount(cursor->db, error, -1); - cursor->db = NULL; - } - dpiUtils__freeMemory(cursor); -} - - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor_addRef() [PUBLIC] -// Add a reference to the SODA collection cursor. -//----------------------------------------------------------------------------- -int dpiSodaCollCursor_addRef(dpiSodaCollCursor *cursor) -{ - return dpiGen__addRef(cursor, DPI_HTYPE_SODA_COLL_CURSOR, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor_close() [PUBLIC] -// Close the cursor. -//----------------------------------------------------------------------------- -int dpiSodaCollCursor_close(dpiSodaCollCursor *cursor) -{ - dpiError error; - - if (dpiSodaCollCursor__check(cursor, __func__, &error) < 0) - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - if (cursor->handle) { - dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); - cursor->handle = NULL; - } - return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor_getNext() [PUBLIC] -// Return the next collection available from the cursor. -//----------------------------------------------------------------------------- -int dpiSodaCollCursor_getNext(dpiSodaCollCursor *cursor, uint32_t flags, - dpiSodaColl **coll) -{ - dpiError error; - uint32_t mode; - void *handle; - - if (dpiSodaCollCursor__check(cursor, __func__, &error) < 0) - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(cursor, coll) - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - if (dpiOci__sodaCollGetNext(cursor->db->conn, cursor->handle, &handle, - mode, &error) < 0) - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - *coll = NULL; - if (handle) { - if (dpiSodaColl__allocate(cursor->db, handle, coll, &error) < 0) { - dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLLECTION); - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - } - } - return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaCollCursor_release() [PUBLIC] -// Release a reference to the SODA collection cursor. -//----------------------------------------------------------------------------- -int dpiSodaCollCursor_release(dpiSodaCollCursor *cursor) -{ - return dpiGen__release(cursor, DPI_HTYPE_SODA_COLL_CURSOR, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c deleted file mode 100644 index 0e1605a3507..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c +++ /dev/null @@ -1,431 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiSodaDb.c -// Implementation of SODA database methods. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiSodaDb__checkConnected() [INTERNAL] -// Check to see that the connection to the database is available for use. -//----------------------------------------------------------------------------- -static int dpiSodaDb__checkConnected(dpiSodaDb *db, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(db, DPI_HTYPE_SODA_DB, fnName, error) < 0) - return DPI_FAILURE; - if (!db->conn->handle || db->conn->closing) - return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb__getCollectionNames() [PUBLIC] -// Internal method used for getting all collection names from the database. -// The provided cursor handle is iterated until either the limit is reached -// or there are no more collections to find. -//----------------------------------------------------------------------------- -static int dpiSodaDb__getCollectionNames(dpiSodaDb *db, void *cursorHandle, - uint32_t limit, dpiSodaCollNames *names, char **namesBuffer, - dpiError *error) -{ - uint32_t numAllocatedNames, namesBufferUsed, namesBufferAllocated; - uint32_t i, nameLength, *tempNameLengths; - char *name, *tempNamesBuffer, *ptr; - void *collectionHandle; - - ptr = *namesBuffer; - namesBufferUsed = namesBufferAllocated = numAllocatedNames = 0; - while (names->numNames < limit || limit == 0) { - - // get next collection from cursor - if (dpiOci__sodaCollGetNext(db->conn, cursorHandle, &collectionHandle, - DPI_OCI_DEFAULT, error) < 0) - return DPI_FAILURE; - if (!collectionHandle) - break; - - // get name from collection - if (dpiOci__attrGet(collectionHandle, DPI_OCI_HTYPE_SODA_COLLECTION, - (void*) &name, &nameLength, DPI_OCI_ATTR_SODA_COLL_NAME, - "get collection name", error) < 0) { - dpiOci__handleFree(collectionHandle, - DPI_OCI_HTYPE_SODA_COLLECTION); - return DPI_FAILURE; - } - - // allocate additional space for the lengths array, if needed - if (numAllocatedNames <= names->numNames) { - numAllocatedNames += 256; - if (dpiUtils__allocateMemory(numAllocatedNames, sizeof(uint32_t), - 0, "allocate lengths array", (void**) &tempNameLengths, - error) < 0) { - dpiOci__handleFree(collectionHandle, - DPI_OCI_HTYPE_SODA_COLLECTION); - return DPI_FAILURE; - } - if (names->nameLengths) { - memcpy(tempNameLengths, names->nameLengths, - names->numNames * sizeof(uint32_t)); - dpiUtils__freeMemory(names->nameLengths); - } - names->nameLengths = tempNameLengths; - } - - // allocate additional space for the names buffer, if needed - if (namesBufferUsed + nameLength > namesBufferAllocated) { - namesBufferAllocated += 32768; - if (dpiUtils__allocateMemory(namesBufferAllocated, 1, 0, - "allocate names buffer", (void**) &tempNamesBuffer, - error) < 0) { - dpiOci__handleFree(collectionHandle, - DPI_OCI_HTYPE_SODA_COLLECTION); - return DPI_FAILURE; - } - if (*namesBuffer) { - memcpy(tempNamesBuffer, *namesBuffer, namesBufferUsed); - dpiUtils__freeMemory(*namesBuffer); - } - *namesBuffer = tempNamesBuffer; - ptr = *namesBuffer + namesBufferUsed; - } - - // store name in buffer and length in array - // the names array itself is created and populated afterwards in order - // to avoid unnecessary copying - memcpy(ptr, name, nameLength); - namesBufferUsed += nameLength; - names->nameLengths[names->numNames] = nameLength; - names->numNames++; - ptr += nameLength; - - // free collection now that we have processed it successfully - dpiOci__handleFree(collectionHandle, DPI_OCI_HTYPE_SODA_COLLECTION); - - } - - // now that all of the names have been determined, populate names array - if (names->numNames > 0) { - if (dpiUtils__allocateMemory(names->numNames, sizeof(char*), 0, - "allocate names array", (void**) &names->names, error) < 0) - return DPI_FAILURE; - ptr = *namesBuffer; - for (i = 0; i < names->numNames; i++) { - names->names[i] = ptr; - ptr += names->nameLengths[i]; - } - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb__free() [INTERNAL] -// Free the memory for a SODA database. -//----------------------------------------------------------------------------- -void dpiSodaDb__free(dpiSodaDb *db, dpiError *error) -{ - if (db->conn) { - dpiGen__setRefCount(db->conn, error, -1); - db->conn = NULL; - } - dpiUtils__freeMemory(db); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_addRef() [PUBLIC] -// Add a reference to the SODA database. -//----------------------------------------------------------------------------- -int dpiSodaDb_addRef(dpiSodaDb *db) -{ - return dpiGen__addRef(db, DPI_HTYPE_SODA_DB, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_createCollection() [PUBLIC] -// Create a new SODA collection with the given name and metadata. -//----------------------------------------------------------------------------- -int dpiSodaDb_createCollection(dpiSodaDb *db, const char *name, - uint32_t nameLength, const char *metadata, uint32_t metadataLength, - uint32_t flags, dpiSodaColl **coll) -{ - dpiError error; - uint32_t mode; - void *handle; - - // validate parameters - if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(db, name) - DPI_CHECK_PTR_AND_LENGTH(db, metadata) - DPI_CHECK_PTR_NOT_NULL(db, coll) - - // determine OCI mode to use - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - if (flags & DPI_SODA_FLAGS_CREATE_COLL_MAP) - mode |= DPI_OCI_SODA_COLL_CREATE_MAP; - - // create collection - if (dpiOci__sodaCollCreateWithMetadata(db, name, nameLength, metadata, - metadataLength, mode, &handle, &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - if (dpiSodaColl__allocate(db, handle, coll, &error) < 0) { - dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLLECTION); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_createDocument() [PUBLIC] -// Create a SODA document that can be inserted in the collection or can be -// used to replace and existing document in the collection. -//----------------------------------------------------------------------------- -int dpiSodaDb_createDocument(dpiSodaDb *db, const char *key, - uint32_t keyLength, const char *content, uint32_t contentLength, - const char *mediaType, uint32_t mediaTypeLength, UNUSED uint32_t flags, - dpiSodaDoc **doc) -{ - int detectEncoding; - void *docHandle; - dpiError error; - - // validate parameters - if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(db, key) - DPI_CHECK_PTR_AND_LENGTH(db, content) - DPI_CHECK_PTR_AND_LENGTH(db, mediaType) - DPI_CHECK_PTR_NOT_NULL(db, doc) - - // allocate SODA document handle - if (dpiOci__handleAlloc(db->env->handle, &docHandle, - DPI_OCI_HTYPE_SODA_DOCUMENT, "allocate SODA document handle", - &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - - // set key, if applicable - if (key && keyLength > 0) { - if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, - (void*) key, keyLength, DPI_OCI_ATTR_SODA_KEY, "set key", - &error) < 0) { - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - } - - // set content, if applicable - if (content && contentLength > 0) { - detectEncoding = 1; - if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, - (void*) &detectEncoding, 0, DPI_OCI_ATTR_SODA_DETECT_JSON_ENC, - "set detect encoding", &error) < 0) { - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, - (void*) content, contentLength, DPI_OCI_ATTR_SODA_CONTENT, - "set content", &error) < 0) { - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - } - - // set media type, if applicable - if (mediaType && mediaTypeLength > 0) { - if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, - (void*) mediaType, mediaTypeLength, - DPI_OCI_ATTR_SODA_MEDIA_TYPE, "set media type", &error) < 0) { - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - } - - // allocate the ODPI-C document that will be returned - if (dpiSodaDoc__allocate(db, docHandle, doc, &error) < 0) { - dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - (*doc)->binaryContent = 1; - - return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_freeCollectionNames() [PUBLIC] -// Free the names of the collections allocated earlier with a call to -// dpiSodaDb_getCollectionNames(). -//----------------------------------------------------------------------------- -int dpiSodaDb_freeCollectionNames(dpiSodaDb *db, dpiSodaCollNames *names) -{ - dpiError error; - - // validate parameters - if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(db, names) - - // perform frees; note that the memory for the names themselves is stored - // in one contiguous block pointed to by the first name - if (names->names) { - dpiUtils__freeMemory((void*) names->names[0]); - dpiUtils__freeMemory((void*) names->names); - names->names = NULL; - } - if (names->nameLengths) { - dpiUtils__freeMemory(names->nameLengths); - names->nameLengths = NULL; - } - names->numNames = 0; - - return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_getCollections() [PUBLIC] -// Return a cursor to iterate over the SODA collections in the database. -//----------------------------------------------------------------------------- -int dpiSodaDb_getCollections(dpiSodaDb *db, const char *startName, - uint32_t startNameLength, uint32_t flags, dpiSodaCollCursor **cursor) -{ - dpiError error; - uint32_t mode; - void *handle; - - if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(db, startName) - DPI_CHECK_PTR_NOT_NULL(db, cursor) - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - if (dpiOci__sodaCollList(db, startName, startNameLength, &handle, mode, - &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - if (dpiSodaCollCursor__allocate(db, handle, cursor, &error) < 0) { - dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_getCollectionNames() [PUBLIC] -// Return the names of all collections in the provided array. -//----------------------------------------------------------------------------- -int dpiSodaDb_getCollectionNames(dpiSodaDb *db, const char *startName, - uint32_t startNameLength, uint32_t limit, uint32_t flags, - dpiSodaCollNames *names) -{ - char *namesBuffer; - dpiError error; - uint32_t mode; - void *handle; - int status; - - // validate parameters - if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(db, startName) - DPI_CHECK_PTR_NOT_NULL(db, names) - - // initialize output structure - names->numNames = 0; - names->names = NULL; - names->nameLengths = NULL; - - // determine OCI mode to use - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - - // acquire collection cursor - if (dpiOci__sodaCollList(db, startName, startNameLength, &handle, mode, - &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - - // iterate over cursor to acquire collection names - namesBuffer = NULL; - status = dpiSodaDb__getCollectionNames(db, handle, limit, names, - &namesBuffer, &error); - dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); - if (status < 0) { - names->numNames = 0; - if (namesBuffer) { - dpiUtils__freeMemory(namesBuffer); - namesBuffer = NULL; - } - if (names->names) { - dpiUtils__freeMemory((void*) names->names); - names->names = NULL; - } - if (names->nameLengths) { - dpiUtils__freeMemory(names->nameLengths); - names->nameLengths = NULL; - } - } - return dpiGen__endPublicFn(db, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_openCollection() [PUBLIC] -// Open an existing SODA collection and return a handle to it. -//----------------------------------------------------------------------------- -int dpiSodaDb_openCollection(dpiSodaDb *db, const char *name, - uint32_t nameLength, uint32_t flags, dpiSodaColl **coll) -{ - dpiError error; - uint32_t mode; - void *handle; - - if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(db, name) - DPI_CHECK_PTR_NOT_NULL(db, coll) - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - if (dpiOci__sodaCollOpen(db, name, nameLength, mode, &handle, - &error) < 0) - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - *coll = NULL; - if (handle) { - if (dpiSodaColl__allocate(db, handle, coll, &error) < 0) { - dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLLECTION); - return dpiGen__endPublicFn(db, DPI_FAILURE, &error); - } - } - return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDb_release() [PUBLIC] -// Release a reference to the SODA database. -//----------------------------------------------------------------------------- -int dpiSodaDb_release(dpiSodaDb *db) -{ - return dpiGen__release(db, DPI_HTYPE_SODA_DB, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c deleted file mode 100644 index b009e33a44a..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c +++ /dev/null @@ -1,231 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiSodaDoc.c -// Implementation of SODA documents. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiSodaDoc__allocate() [INTERNAL] -// Allocate and initialize a SODA document structure. -//----------------------------------------------------------------------------- -int dpiSodaDoc__allocate(dpiSodaDb *db, void *handle, dpiSodaDoc **doc, - dpiError *error) -{ - dpiSodaDoc *tempDoc; - - if (dpiGen__allocate(DPI_HTYPE_SODA_DOC, db->env, (void**) &tempDoc, - error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(db, error, 1); - tempDoc->db = db; - tempDoc->handle = handle; - *doc = tempDoc; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc__check() [INTERNAL] -// Determine if the SODA document is available to use. -//----------------------------------------------------------------------------- -static int dpiSodaDoc__check(dpiSodaDoc *doc, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(doc, DPI_HTYPE_SODA_DOC, fnName, error) < 0) - return DPI_FAILURE; - if (!doc->db->conn->handle || doc->db->conn->closing) - return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc__free() [INTERNAL] -// Free the memory for a SODA document. Note that the reference to the -// database must remain until after the handle is freed; otherwise, a segfault -// can take place. -//----------------------------------------------------------------------------- -void dpiSodaDoc__free(dpiSodaDoc *doc, dpiError *error) -{ - if (doc->handle) { - dpiOci__handleFree(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT); - doc->handle = NULL; - } - if (doc->db) { - dpiGen__setRefCount(doc->db, error, -1); - doc->db = NULL; - } - dpiUtils__freeMemory(doc); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc__getAttributeText() [INTERNAL] -// Get the value of the OCI attribute as a text string. -//----------------------------------------------------------------------------- -static int dpiSodaDoc__getAttributeText(dpiSodaDoc *doc, uint32_t attribute, - const char **value, uint32_t *valueLength, const char *fnName) -{ - dpiError error; - int status; - - // validate parameters - if (dpiSodaDoc__check(doc, fnName, &error) < 0) - return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(doc, value) - DPI_CHECK_PTR_NOT_NULL(doc, valueLength) - - // get attribute value - status = dpiOci__attrGet(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT, - (void*) value, valueLength, attribute, "get value", &error); - return dpiGen__endPublicFn(doc, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_addRef() [PUBLIC] -// Add a reference to the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_addRef(dpiSodaDoc *doc) -{ - return dpiGen__addRef(doc, DPI_HTYPE_SODA_DOC, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_getContent() [PUBLIC] -// Return the content of the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_getContent(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength, const char **encoding) -{ - uint16_t charsetId; - dpiError error; - - // validate parameters - if (dpiSodaDoc__check(doc, __func__, &error) < 0) - return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(doc, value) - DPI_CHECK_PTR_NOT_NULL(doc, valueLength) - DPI_CHECK_PTR_NOT_NULL(doc, encoding) - - // get content - if (dpiOci__attrGet(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT, - (void*) value, valueLength, DPI_OCI_ATTR_SODA_CONTENT, - "get content", &error) < 0) - return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); - - // if content is not in binary form, always use UTF-8 - if (!doc->binaryContent) - *encoding = DPI_CHARSET_NAME_UTF8; - - // otherwise, determine the encoding from OCI - else { - if (dpiOci__attrGet(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT, - (void*) &charsetId, 0, DPI_OCI_ATTR_SODA_JSON_CHARSET_ID, - "get charset", &error) < 0) - return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); - switch (charsetId) { - case 0: - *encoding = NULL; - break; - case DPI_CHARSET_ID_UTF8: - *encoding = DPI_CHARSET_NAME_UTF8; - break; - case DPI_CHARSET_ID_UTF16BE: - *encoding = DPI_CHARSET_NAME_UTF16BE; - break; - case DPI_CHARSET_ID_UTF16LE: - *encoding = DPI_CHARSET_NAME_UTF16LE; - break; - default: - dpiError__set(&error, "check charset", - DPI_ERR_INVALID_CHARSET_ID, charsetId); - return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); - } - } - - return dpiGen__endPublicFn(doc, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_getCreatedOn() [PUBLIC] -// Return the created timestamp of the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_getCreatedOn(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength) -{ - return dpiSodaDoc__getAttributeText(doc, - DPI_OCI_ATTR_SODA_CREATE_TIMESTAMP, value, valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_getKey() [PUBLIC] -// Return the key of the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_getKey(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength) -{ - return dpiSodaDoc__getAttributeText(doc, DPI_OCI_ATTR_SODA_KEY, value, - valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_getLastModified() [PUBLIC] -// Return the last modified timestamp of the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_getLastModified(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength) -{ - return dpiSodaDoc__getAttributeText(doc, - DPI_OCI_ATTR_SODA_LASTMOD_TIMESTAMP, value, valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_getMediaType() [PUBLIC] -// Return the media type of the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_getMediaType(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength) -{ - return dpiSodaDoc__getAttributeText(doc, DPI_OCI_ATTR_SODA_MEDIA_TYPE, - value, valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_getVersion() [PUBLIC] -// Return the version of the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_getVersion(dpiSodaDoc *doc, const char **value, - uint32_t *valueLength) -{ - return dpiSodaDoc__getAttributeText(doc, DPI_OCI_ATTR_SODA_VERSION, - value, valueLength, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDoc_release() [PUBLIC] -// Release a reference to the SODA document. -//----------------------------------------------------------------------------- -int dpiSodaDoc_release(dpiSodaDoc *doc) -{ - return dpiGen__release(doc, DPI_HTYPE_SODA_DOC, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c deleted file mode 100644 index 9bfd2bdbeea..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c +++ /dev/null @@ -1,144 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor.c -// Implementation of SODA document cursors. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor__allocate() [INTERNAL] -// Allocate and initialize a SODA document cursor structure. -//----------------------------------------------------------------------------- -int dpiSodaDocCursor__allocate(dpiSodaColl *coll, void *handle, - dpiSodaDocCursor **cursor, dpiError *error) -{ - dpiSodaDocCursor *tempCursor; - - if (dpiGen__allocate(DPI_HTYPE_SODA_DOC_CURSOR, coll->env, - (void**) &tempCursor, error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(coll, error, 1); - tempCursor->coll = coll; - tempCursor->handle = handle; - *cursor = tempCursor; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor__check() [INTERNAL] -// Determine if the SODA document cursor is available to use. -//----------------------------------------------------------------------------- -static int dpiSodaDocCursor__check(dpiSodaDocCursor *cursor, - const char *fnName, dpiError *error) -{ - if (dpiGen__startPublicFn(cursor, DPI_HTYPE_SODA_DOC_CURSOR, fnName, - error) < 0) - return DPI_FAILURE; - if (!cursor->handle) - return dpiError__set(error, "check closed", - DPI_ERR_SODA_CURSOR_CLOSED); - if (!cursor->coll->db->conn->handle || cursor->coll->db->conn->closing) - return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor__free() [INTERNAL] -// Free the memory for a SODA document cursor. Note that the reference to the -// collection must remain until after the handle is freed; otherwise, a -// segfault can take place. -//----------------------------------------------------------------------------- -void dpiSodaDocCursor__free(dpiSodaDocCursor *cursor, dpiError *error) -{ - if (cursor->handle) { - dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_DOC_CURSOR); - cursor->handle = NULL; - } - if (cursor->coll) { - dpiGen__setRefCount(cursor->coll, error, -1); - cursor->coll = NULL; - } - dpiUtils__freeMemory(cursor); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor_addRef() [PUBLIC] -// Add a reference to the SODA document cursor. -//----------------------------------------------------------------------------- -int dpiSodaDocCursor_addRef(dpiSodaDocCursor *cursor) -{ - return dpiGen__addRef(cursor, DPI_HTYPE_SODA_DOC_CURSOR, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor_close() [PUBLIC] -// Close the cursor. -//----------------------------------------------------------------------------- -int dpiSodaDocCursor_close(dpiSodaDocCursor *cursor) -{ - dpiError error; - - if (dpiSodaDocCursor__check(cursor, __func__, &error) < 0) - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - if (cursor->handle) { - dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_DOC_CURSOR); - cursor->handle = NULL; - } - return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor_getNext() [PUBLIC] -// Return the next document available from the cursor. -//----------------------------------------------------------------------------- -int dpiSodaDocCursor_getNext(dpiSodaDocCursor *cursor, uint32_t flags, - dpiSodaDoc **doc) -{ - dpiError error; - uint32_t mode; - void *handle; - - if (dpiSodaDocCursor__check(cursor, __func__, &error) < 0) - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(cursor, doc) - mode = DPI_OCI_DEFAULT; - if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) - mode |= DPI_OCI_SODA_ATOMIC_COMMIT; - if (dpiOci__sodaDocGetNext(cursor, &handle, mode, &error) < 0) - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - *doc = NULL; - if (handle) { - if (dpiSodaDoc__allocate(cursor->coll->db, handle, doc, &error) < 0) { - dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_DOCUMENT); - return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); - } - (*doc)->binaryContent = cursor->coll->binaryContent; - } - return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSodaDocCursor_release() [PUBLIC] -// Release a reference to the SODA document cursor. -//----------------------------------------------------------------------------- -int dpiSodaDocCursor_release(dpiSodaDocCursor *cursor) -{ - return dpiGen__release(cursor, DPI_HTYPE_SODA_DOC_CURSOR, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiStmt.c b/vendor/github.com/godror/godror/odpi/src/dpiStmt.c deleted file mode 100644 index cd3520b93b0..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiStmt.c +++ /dev/null @@ -1,1898 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiStmt.c -// Implementation of statements (cursors). -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// forward declarations of internal functions only used in this file -static int dpiStmt__getQueryInfo(dpiStmt *stmt, uint32_t pos, - dpiQueryInfo *info, dpiError *error); -static int dpiStmt__getQueryInfoFromParam(dpiStmt *stmt, void *param, - dpiQueryInfo *info, dpiError *error); -static int dpiStmt__postFetch(dpiStmt *stmt, dpiError *error); -static int dpiStmt__beforeFetch(dpiStmt *stmt, dpiError *error); -static int dpiStmt__reExecute(dpiStmt *stmt, uint32_t numIters, - uint32_t mode, dpiError *error); - - -//----------------------------------------------------------------------------- -// dpiStmt__allocate() [INTERNAL] -// Create a new statement object and return it. In case of error NULL is -// returned. -//----------------------------------------------------------------------------- -int dpiStmt__allocate(dpiConn *conn, int scrollable, dpiStmt **stmt, - dpiError *error) -{ - dpiStmt *tempStmt; - - *stmt = NULL; - if (dpiGen__allocate(DPI_HTYPE_STMT, conn->env, (void**) &tempStmt, - error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(conn, error, 1); - tempStmt->conn = conn; - tempStmt->fetchArraySize = DPI_DEFAULT_FETCH_ARRAY_SIZE; - tempStmt->scrollable = scrollable; - *stmt = tempStmt; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__bind() [INTERNAL] -// Bind the variable to the statement using either a position or a name. A -// reference to the variable will be retained. -//----------------------------------------------------------------------------- -static int dpiStmt__bind(dpiStmt *stmt, dpiVar *var, int addReference, - uint32_t pos, const char *name, uint32_t nameLength, dpiError *error) -{ - dpiBindVar *bindVars, *entry = NULL; - int found, dynamicBind, status; - void *bindHandle = NULL; - uint32_t i; - - // a zero length name is not supported - if (pos == 0 && nameLength == 0) - return dpiError__set(error, "bind zero length name", - DPI_ERR_NOT_SUPPORTED); - - // prevent attempts to bind a statement to itself - if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_STMT) { - for (i = 0; i < var->buffer.maxArraySize; i++) { - if (var->buffer.externalData[i].value.asStmt == stmt) { - return dpiError__set(error, "bind to self", - DPI_ERR_NOT_SUPPORTED); - } - } - } - - // check to see if the bind position or name has already been bound - found = 0; - for (i = 0; i < stmt->numBindVars; i++) { - entry = &stmt->bindVars[i]; - if (entry->pos == pos && entry->nameLength == nameLength) { - if (nameLength > 0 && strncmp(entry->name, name, nameLength) != 0) - continue; - found = 1; - break; - } - } - - // if already found, use that entry - if (found) { - - // if already bound, no need to bind a second time - if (entry->var == var) - return DPI_SUCCESS; - - // otherwise, release previously bound variable, if applicable - else if (entry->var) { - dpiGen__setRefCount(entry->var, error, -1); - entry->var = NULL; - } - - // if not found, add to the list of bind variables - } else { - - // allocate memory for additional bind variables, if needed - if (stmt->numBindVars == stmt->allocatedBindVars) { - if (dpiUtils__allocateMemory(stmt->allocatedBindVars + 8, - sizeof(dpiBindVar), 1, "allocate bind vars", - (void**) &bindVars, error) < 0) - return DPI_FAILURE; - if (stmt->bindVars) { - for (i = 0; i < stmt->numBindVars; i++) - bindVars[i] = stmt->bindVars[i]; - dpiUtils__freeMemory(stmt->bindVars); - } - stmt->bindVars = bindVars; - stmt->allocatedBindVars += 8; - } - - // add to the list of bind variables - entry = &stmt->bindVars[stmt->numBindVars]; - entry->var = NULL; - entry->pos = pos; - if (name) { - if (dpiUtils__allocateMemory(1, nameLength, 0, - "allocate memory for name", (void**) &entry->name, - error) < 0) - return DPI_FAILURE; - entry->nameLength = nameLength; - memcpy( (void*) entry->name, name, nameLength); - } - stmt->numBindVars++; - - } - - // for PL/SQL where the maxSize is greater than 32K, adjust the variable - // so that LOBs are used internally - if (var->isDynamic && (stmt->statementType == DPI_STMT_TYPE_BEGIN || - stmt->statementType == DPI_STMT_TYPE_DECLARE || - stmt->statementType == DPI_STMT_TYPE_CALL)) { - if (dpiVar__convertToLob(var, error) < 0) - return DPI_FAILURE; - } - - // perform actual bind - if (addReference) - dpiGen__setRefCount(var, error, 1); - entry->var = var; - dynamicBind = stmt->isReturning || var->isDynamic; - if (pos > 0) { - if (stmt->env->versionInfo->versionNum < 12) - status = dpiOci__bindByPos(stmt, &bindHandle, pos, dynamicBind, - var, error); - else status = dpiOci__bindByPos2(stmt, &bindHandle, pos, dynamicBind, - var, error); - } else { - if (stmt->env->versionInfo->versionNum < 12) - status = dpiOci__bindByName(stmt, &bindHandle, name, - (int32_t) nameLength, dynamicBind, var, error); - else status = dpiOci__bindByName2(stmt, &bindHandle, name, - (int32_t) nameLength, dynamicBind, var, error); - } - - // attempt to improve message "ORA-01036: illegal variable name/number" - if (status < 0) { - if (error->buffer->code == 1036) { - if (stmt->statementType == DPI_STMT_TYPE_CREATE || - stmt->statementType == DPI_STMT_TYPE_DROP || - stmt->statementType == DPI_STMT_TYPE_ALTER) - dpiError__set(error, error->buffer->action, - DPI_ERR_NO_BIND_VARS_IN_DDL); - } - return DPI_FAILURE; - } - - // set the charset form if applicable - if (var->type->charsetForm != DPI_SQLCS_IMPLICIT) { - if (dpiOci__attrSet(bindHandle, DPI_OCI_HTYPE_BIND, - (void*) &var->type->charsetForm, 0, DPI_OCI_ATTR_CHARSET_FORM, - "set charset form", error) < 0) - return DPI_FAILURE; - } - - // set the max data size, if applicable - if (var->type->sizeInBytes == 0 && !var->isDynamic) { - if (dpiOci__attrSet(bindHandle, DPI_OCI_HTYPE_BIND, - (void*) &var->sizeInBytes, 0, DPI_OCI_ATTR_MAXDATA_SIZE, - "set max data size", error) < 0) - return DPI_FAILURE; - } - - // bind object, if applicable - if (var->buffer.objectIndicator && - dpiOci__bindObject(var, bindHandle, error) < 0) - return DPI_FAILURE; - - // setup dynamic bind, if applicable - if (dynamicBind && dpiOci__bindDynamic(var, bindHandle, error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__check() [INTERNAL] -// Determine if the statement is open and available for use. -//----------------------------------------------------------------------------- -static int dpiStmt__check(dpiStmt *stmt, const char *fnName, dpiError *error) -{ - if (dpiGen__startPublicFn(stmt, DPI_HTYPE_STMT, fnName, error) < 0) - return DPI_FAILURE; - if (!stmt->handle || (stmt->parentStmt && !stmt->parentStmt->handle)) - return dpiError__set(error, "check closed", DPI_ERR_STMT_CLOSED); - if (dpiConn__checkConnected(stmt->conn, error) < 0) - return DPI_FAILURE; - if (stmt->statementType == 0 && dpiStmt__init(stmt, error) < 0) - return DPI_FAILURE; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__clearBatchErrors() [INTERNAL] -// Clear the batch errors associated with the statement. -//----------------------------------------------------------------------------- -static void dpiStmt__clearBatchErrors(dpiStmt *stmt) -{ - if (stmt->batchErrors) { - dpiUtils__freeMemory(stmt->batchErrors); - stmt->batchErrors = NULL; - } - stmt->numBatchErrors = 0; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__clearBindVars() [INTERNAL] -// Clear the bind variables associated with the statement. -//----------------------------------------------------------------------------- -static void dpiStmt__clearBindVars(dpiStmt *stmt, dpiError *error) -{ - uint32_t i; - - if (stmt->bindVars) { - for (i = 0; i < stmt->numBindVars; i++) { - dpiGen__setRefCount(stmt->bindVars[i].var, error, -1); - if (stmt->bindVars[i].name) - dpiUtils__freeMemory( (void*) stmt->bindVars[i].name); - } - dpiUtils__freeMemory(stmt->bindVars); - stmt->bindVars = NULL; - } - stmt->numBindVars = 0; - stmt->allocatedBindVars = 0; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__clearQueryVars() [INTERNAL] -// Clear the query variables associated with the statement. -//----------------------------------------------------------------------------- -static void dpiStmt__clearQueryVars(dpiStmt *stmt, dpiError *error) -{ - uint32_t i; - - if (stmt->queryVars) { - for (i = 0; i < stmt->numQueryVars; i++) { - if (stmt->queryVars[i]) { - dpiGen__setRefCount(stmt->queryVars[i], error, -1); - stmt->queryVars[i] = NULL; - } - if (stmt->queryInfo[i].typeInfo.objectType) { - dpiGen__setRefCount(stmt->queryInfo[i].typeInfo.objectType, - error, -1); - stmt->queryInfo[i].typeInfo.objectType = NULL; - } - } - dpiUtils__freeMemory(stmt->queryVars); - stmt->queryVars = NULL; - } - if (stmt->queryInfo) { - dpiUtils__freeMemory(stmt->queryInfo); - stmt->queryInfo = NULL; - } - stmt->numQueryVars = 0; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__close() [INTERNAL] -// Internal method used for closing the statement. If the statement is marked -// as needing to be dropped from the statement cache that is done as well. This -// is called from dpiStmt_close() where errors are expected to be propagated -// and from dpiStmt__free() where errors are ignored. -//----------------------------------------------------------------------------- -int dpiStmt__close(dpiStmt *stmt, const char *tag, uint32_t tagLength, - int propagateErrors, dpiError *error) -{ - int closing, status = DPI_SUCCESS; - - // determine whether statement is already being closed and if not, mark - // statement as being closed; this MUST be done while holding the lock (if - // in threaded mode) to avoid race conditions! - if (stmt->env->threaded) - dpiMutex__acquire(stmt->env->mutex); - closing = stmt->closing; - stmt->closing = 1; - if (stmt->env->threaded) - dpiMutex__release(stmt->env->mutex); - - // if statement is already being closed, nothing needs to be done - if (closing) - return DPI_SUCCESS; - - // perform actual work of closing statement - dpiStmt__clearBatchErrors(stmt); - dpiStmt__clearBindVars(stmt, error); - dpiStmt__clearQueryVars(stmt, error); - if (stmt->lastRowid) - dpiGen__setRefCount(stmt->lastRowid, error, -1); - if (stmt->handle) { - if (stmt->parentStmt) { - dpiGen__setRefCount(stmt->parentStmt, error, -1); - stmt->parentStmt = NULL; - } else if (!stmt->conn->deadSession && stmt->conn->handle) { - if (stmt->isOwned) - dpiOci__handleFree(stmt->handle, DPI_OCI_HTYPE_STMT); - else status = dpiOci__stmtRelease(stmt, tag, tagLength, - propagateErrors, error); - } - if (!stmt->conn->closing && !stmt->parentStmt) - dpiHandleList__removeHandle(stmt->conn->openStmts, - stmt->openSlotNum); - stmt->handle = NULL; - } - - // if actual close fails, reset closing flag; again, this must be done - // while holding the lock (if in threaded mode) in order to avoid race - // conditions! - if (status < 0) { - if (stmt->env->threaded) - dpiMutex__acquire(stmt->env->mutex); - stmt->closing = 0; - if (stmt->env->threaded) - dpiMutex__release(stmt->env->mutex); - } - - return status; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__createBindVar() [INTERNAL] -// Create a bind variable given a value to bind. -//----------------------------------------------------------------------------- -static int dpiStmt__createBindVar(dpiStmt *stmt, - dpiNativeTypeNum nativeTypeNum, dpiData *data, dpiVar **var, - uint32_t pos, const char *name, uint32_t nameLength, dpiError *error) -{ - dpiOracleTypeNum oracleTypeNum; - dpiObjectType *objType; - dpiData *varData; - dpiVar *tempVar; - uint32_t size; - - // determine the type (and size) of bind variable to create - size = 0; - objType = NULL; - switch (nativeTypeNum) { - case DPI_NATIVE_TYPE_INT64: - case DPI_NATIVE_TYPE_UINT64: - case DPI_NATIVE_TYPE_FLOAT: - case DPI_NATIVE_TYPE_DOUBLE: - oracleTypeNum = DPI_ORACLE_TYPE_NUMBER; - break; - case DPI_NATIVE_TYPE_BYTES: - oracleTypeNum = DPI_ORACLE_TYPE_VARCHAR; - size = data->value.asBytes.length; - break; - case DPI_NATIVE_TYPE_TIMESTAMP: - oracleTypeNum = DPI_ORACLE_TYPE_TIMESTAMP; - break; - case DPI_NATIVE_TYPE_INTERVAL_DS: - oracleTypeNum = DPI_ORACLE_TYPE_INTERVAL_DS; - break; - case DPI_NATIVE_TYPE_INTERVAL_YM: - oracleTypeNum = DPI_ORACLE_TYPE_INTERVAL_YM; - break; - case DPI_NATIVE_TYPE_OBJECT: - oracleTypeNum = DPI_ORACLE_TYPE_OBJECT; - if (data->value.asObject) - objType = data->value.asObject->type; - break; - case DPI_NATIVE_TYPE_ROWID: - oracleTypeNum = DPI_ORACLE_TYPE_ROWID; - break; - case DPI_NATIVE_TYPE_BOOLEAN: - oracleTypeNum = DPI_ORACLE_TYPE_BOOLEAN; - break; - default: - return dpiError__set(error, "create bind var", - DPI_ERR_UNHANDLED_CONVERSION, 0, nativeTypeNum); - } - - // create the variable and set its value - if (dpiVar__allocate(stmt->conn, oracleTypeNum, nativeTypeNum, 1, size, 1, - 0, objType, &tempVar, &varData, error) < 0) - return DPI_FAILURE; - - // copy value from source to target data - if (dpiVar__copyData(tempVar, 0, data, error) < 0) - return DPI_FAILURE; - - // bind variable to statement - if (dpiStmt__bind(stmt, tempVar, 0, pos, name, nameLength, error) < 0) { - dpiVar__free(tempVar, error); - return DPI_FAILURE; - } - - *var = tempVar; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__createQueryVars() [INTERNAL] -// Create space for the number of query variables required to support the -// query. -//----------------------------------------------------------------------------- -static int dpiStmt__createQueryVars(dpiStmt *stmt, dpiError *error) -{ - uint32_t numQueryVars, i; - - // determine number of query variables - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - (void*) &numQueryVars, 0, DPI_OCI_ATTR_PARAM_COUNT, - "get parameter count", error) < 0) - return DPI_FAILURE; - - // clear the previous query vars if the number has changed - if (stmt->numQueryVars > 0 && stmt->numQueryVars != numQueryVars) - dpiStmt__clearQueryVars(stmt, error); - - // allocate space for the query vars, if needed - if (numQueryVars != stmt->numQueryVars) { - if (dpiUtils__allocateMemory(numQueryVars, sizeof(dpiVar*), 1, - "allocate query vars", (void**) &stmt->queryVars, error) < 0) - return DPI_FAILURE; - if (dpiUtils__allocateMemory(numQueryVars, sizeof(dpiQueryInfo), 1, - "allocate query info", (void**) &stmt->queryInfo, error) < 0) { - dpiStmt__clearQueryVars(stmt, error); - return DPI_FAILURE; - } - stmt->numQueryVars = numQueryVars; - for (i = 0; i < numQueryVars; i++) { - if (dpiStmt__getQueryInfo(stmt, i + 1, &stmt->queryInfo[i], - error) < 0) { - dpiStmt__clearQueryVars(stmt, error); - return DPI_FAILURE; - } - } - } - - // indicate start of fetch - stmt->bufferRowIndex = stmt->fetchArraySize; - stmt->hasRowsToFetch = 1; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__define() [INTERNAL] -// Define the variable that will accept output from the statement in the -// specified column. At this point the statement, position and variable are all -// assumed to be valid. -//----------------------------------------------------------------------------- -static int dpiStmt__define(dpiStmt *stmt, uint32_t pos, dpiVar *var, - dpiError *error) -{ - void *defineHandle = NULL; - dpiQueryInfo *queryInfo; - int tempBool; - - // no need to perform define if variable is unchanged - if (stmt->queryVars[pos - 1] == var) - return DPI_SUCCESS; - - // for objects, the type specified must match the type in the database - queryInfo = &stmt->queryInfo[pos - 1]; - if (var->objectType && queryInfo->typeInfo.objectType && - var->objectType->tdo != queryInfo->typeInfo.objectType->tdo) - return dpiError__set(error, "check type", DPI_ERR_WRONG_TYPE, - var->objectType->schemaLength, var->objectType->schema, - var->objectType->nameLength, var->objectType->name, - queryInfo->typeInfo.objectType->schemaLength, - queryInfo->typeInfo.objectType->schema, - queryInfo->typeInfo.objectType->nameLength, - queryInfo->typeInfo.objectType->name); - - // perform the define - if (stmt->env->versionInfo->versionNum < 12) { - if (dpiOci__defineByPos(stmt, &defineHandle, pos, var, error) < 0) - return DPI_FAILURE; - } else { - if (dpiOci__defineByPos2(stmt, &defineHandle, pos, var, error) < 0) - return DPI_FAILURE; - } - - // set the charset form if applicable - if (var->type->charsetForm != DPI_SQLCS_IMPLICIT) { - if (dpiOci__attrSet(defineHandle, DPI_OCI_HTYPE_DEFINE, - (void*) &var->type->charsetForm, 0, DPI_OCI_ATTR_CHARSET_FORM, - "set charset form", error) < 0) - return DPI_FAILURE; - } - - // specify that the LOB length should be prefetched - if (var->nativeTypeNum == DPI_NATIVE_TYPE_LOB) { - tempBool = 1; - if (dpiOci__attrSet(defineHandle, DPI_OCI_HTYPE_DEFINE, - (void*) &tempBool, 0, DPI_OCI_ATTR_LOBPREFETCH_LENGTH, - "set lob prefetch length", error) < 0) - return DPI_FAILURE; - } - - // define objects, if applicable - if (var->buffer.objectIndicator && dpiOci__defineObject(var, defineHandle, - error) < 0) - return DPI_FAILURE; - - // register callback for dynamic defines - if (var->isDynamic && dpiOci__defineDynamic(var, defineHandle, error) < 0) - return DPI_FAILURE; - - // remove previous variable and retain new one - if (stmt->queryVars[pos - 1]) - dpiGen__setRefCount(stmt->queryVars[pos - 1], error, -1); - dpiGen__setRefCount(var, error, 1); - stmt->queryVars[pos - 1] = var; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__execute() [INTERNAL] -// Internal execution of statement. -//----------------------------------------------------------------------------- -static int dpiStmt__execute(dpiStmt *stmt, uint32_t numIters, - uint32_t mode, int reExecute, dpiError *error) -{ - uint32_t prefetchSize, i, j; - dpiData *data; - dpiVar *var; - - // for all bound variables, transfer data from dpiData structure to Oracle - // buffer structures - for (i = 0; i < stmt->numBindVars; i++) { - var = stmt->bindVars[i].var; - if (var->isArray && numIters > 1) - return dpiError__set(error, "bind array var", - DPI_ERR_ARRAY_VAR_NOT_SUPPORTED); - for (j = 0; j < var->buffer.maxArraySize; j++) { - data = &var->buffer.externalData[j]; - if (dpiVar__setValue(var, &var->buffer, j, data, error) < 0) - return DPI_FAILURE; - if (var->dynBindBuffers) - var->dynBindBuffers[j].actualArraySize = 0; - } - if (stmt->isReturning || var->isDynamic) - var->error = error; - } - - // for queries, set the OCI prefetch to a fixed value; this prevents an - // additional round trip for single row fetches while avoiding the overhead - // of copying from the OCI prefetch buffer to our own buffers for larger - // fetches - if (stmt->statementType == DPI_STMT_TYPE_SELECT) { - prefetchSize = DPI_PREFETCH_ROWS_DEFAULT; - if (dpiOci__attrSet(stmt->handle, DPI_OCI_HTYPE_STMT, &prefetchSize, - sizeof(prefetchSize), DPI_OCI_ATTR_PREFETCH_ROWS, - "set prefetch rows", error) < 0) - return DPI_FAILURE; - } - - // clear batch errors from any previous execution - dpiStmt__clearBatchErrors(stmt); - - // adjust mode for scrollable cursors - if (stmt->scrollable) - mode |= DPI_OCI_STMT_SCROLLABLE_READONLY; - - // perform execution - // re-execute statement for ORA-01007: variable not in select list - // drop statement from cache for all errors (except those which are due to - // invalid data which may be fixed in subsequent execution) - if (dpiOci__stmtExecute(stmt, numIters, mode, error) < 0) { - dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - &error->buffer->offset, 0, DPI_OCI_ATTR_PARSE_ERROR_OFFSET, - "set parse offset", error); - switch (error->buffer->code) { - case 1007: - if (reExecute) - return dpiStmt__reExecute(stmt, numIters, mode, error); - stmt->deleteFromCache = 1; - break; - case 1: - case 1400: - case 1438: - case 1461: - case 2290: - case 2291: - case 2292: - case 21525: - break; - default: - stmt->deleteFromCache = 1; - } - return DPI_FAILURE; - } - - // for all bound variables, transfer data from Oracle buffer structures to - // dpiData structures; OCI doesn't provide a way of knowing if a variable - // is an out variable so do this for all of them when this is a possibility - if (stmt->isReturning || stmt->statementType == DPI_STMT_TYPE_BEGIN || - stmt->statementType == DPI_STMT_TYPE_DECLARE || - stmt->statementType == DPI_STMT_TYPE_CALL) { - for (i = 0; i < stmt->numBindVars; i++) { - var = stmt->bindVars[i].var; - for (j = 0; j < var->buffer.maxArraySize; j++) { - if (dpiVar__getValue(var, &var->buffer, j, 0, error) < 0) - return DPI_FAILURE; - } - var->error = NULL; - } - } - - // create query variables (if applicable) and reset row count to zero - if (stmt->statementType == DPI_STMT_TYPE_SELECT) { - stmt->rowCount = 0; - if (!(mode & DPI_MODE_EXEC_PARSE_ONLY) && - dpiStmt__createQueryVars(stmt, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__fetch() [INTERNAL] -// Performs the actual fetch from Oracle. -//----------------------------------------------------------------------------- -static int dpiStmt__fetch(dpiStmt *stmt, dpiError *error) -{ - // perform any pre-fetch activities required - if (dpiStmt__beforeFetch(stmt, error) < 0) - return DPI_FAILURE; - - // perform fetch - if (dpiOci__stmtFetch2(stmt, stmt->fetchArraySize, DPI_MODE_FETCH_NEXT, 0, - error) < 0) - return DPI_FAILURE; - - // determine the number of rows fetched into buffers - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - &stmt->bufferRowCount, 0, DPI_OCI_ATTR_ROWS_FETCHED, - "get rows fetched", error) < 0) - return DPI_FAILURE; - - // set buffer row info - stmt->bufferMinRow = stmt->rowCount + 1; - stmt->bufferRowIndex = 0; - - // perform post-fetch activities required - if (dpiStmt__postFetch(stmt, error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__free() [INTERNAL] -// Free the memory associated with the statement. -//----------------------------------------------------------------------------- -void dpiStmt__free(dpiStmt *stmt, dpiError *error) -{ - dpiStmt__close(stmt, NULL, 0, 0, error); - if (stmt->parentStmt) { - dpiGen__setRefCount(stmt->parentStmt, error, -1); - stmt->parentStmt = NULL; - } - if (stmt->conn) { - dpiGen__setRefCount(stmt->conn, error, -1); - stmt->conn = NULL; - } - dpiUtils__freeMemory(stmt); -} - - -//----------------------------------------------------------------------------- -// dpiStmt__getBatchErrors() [INTERNAL] -// Get batch errors after statement executed with batch errors enabled. -//----------------------------------------------------------------------------- -static int dpiStmt__getBatchErrors(dpiStmt *stmt, dpiError *error) -{ - void *batchErrorHandle, *localErrorHandle; - dpiError localError; - int overallStatus; - int32_t rowOffset; - uint32_t i; - - // determine the number of batch errors that were found - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - &stmt->numBatchErrors, 0, DPI_OCI_ATTR_NUM_DML_ERRORS, - "get batch error count", error) < 0) - return DPI_FAILURE; - - // allocate memory for the batch errors - if (dpiUtils__allocateMemory(stmt->numBatchErrors, sizeof(dpiErrorBuffer), - 1, "allocate errors", (void**) &stmt->batchErrors, error) < 0) { - stmt->numBatchErrors = 0; - return DPI_FAILURE; - } - - // allocate error handle used for OCIParamGet() - if (dpiOci__handleAlloc(stmt->env->handle, &localErrorHandle, - DPI_OCI_HTYPE_ERROR, "allocate parameter error handle", - error) < 0) { - dpiStmt__clearBatchErrors(stmt); - return DPI_FAILURE; - } - - // allocate error handle used for batch errors - if (dpiOci__handleAlloc(stmt->env->handle, &batchErrorHandle, - DPI_OCI_HTYPE_ERROR, "allocate batch error handle", error) < 0) { - dpiStmt__clearBatchErrors(stmt); - dpiOci__handleFree(localErrorHandle, DPI_OCI_HTYPE_ERROR); - return DPI_FAILURE; - } - - // process each error - overallStatus = DPI_SUCCESS; - localError.buffer = error->buffer; - localError.env = error->env; - for (i = 0; i < stmt->numBatchErrors; i++) { - - // get error handle for iteration - if (dpiOci__paramGet(error->handle, DPI_OCI_HTYPE_ERROR, - &batchErrorHandle, i, "get batch error", error) < 0) { - overallStatus = dpiError__set(error, "get batch error", - DPI_ERR_INVALID_INDEX, i); - break; - } - - // determine row offset - localError.handle = localErrorHandle; - if (dpiOci__attrGet(batchErrorHandle, DPI_OCI_HTYPE_ERROR, &rowOffset, - 0, DPI_OCI_ATTR_DML_ROW_OFFSET, "get row offset", - &localError) < 0) { - overallStatus = dpiError__set(error, "get row offset", - DPI_ERR_CANNOT_GET_ROW_OFFSET); - break; - } - - // get error message - localError.buffer = &stmt->batchErrors[i]; - localError.handle = batchErrorHandle; - dpiError__setFromOCI(&localError, DPI_OCI_ERROR, stmt->conn, - "get batch error"); - if (error->buffer->errorNum) { - overallStatus = DPI_FAILURE; - break; - } - localError.buffer->fnName = error->buffer->fnName; - localError.buffer->offset = (uint16_t) rowOffset; - - } - - // cleanup - dpiOci__handleFree(localErrorHandle, DPI_OCI_HTYPE_ERROR); - dpiOci__handleFree(batchErrorHandle, DPI_OCI_HTYPE_ERROR); - if (overallStatus < 0) - dpiStmt__clearBatchErrors(stmt); - return overallStatus; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__getRowCount() [INTERNAL] -// Return the number of rows affected by the last DML executed (for insert, -// update, delete and merge) or the number of rows fetched (for queries). In -// all other cases, 0 is returned. -//----------------------------------------------------------------------------- -static int dpiStmt__getRowCount(dpiStmt *stmt, uint64_t *count, - dpiError *error) -{ - uint32_t rowCount32; - - if (stmt->statementType == DPI_STMT_TYPE_SELECT) - *count = stmt->rowCount; - else if (stmt->statementType != DPI_STMT_TYPE_INSERT && - stmt->statementType != DPI_STMT_TYPE_UPDATE && - stmt->statementType != DPI_STMT_TYPE_DELETE && - stmt->statementType != DPI_STMT_TYPE_MERGE && - stmt->statementType != DPI_STMT_TYPE_CALL && - stmt->statementType != DPI_STMT_TYPE_BEGIN && - stmt->statementType != DPI_STMT_TYPE_DECLARE) { - *count = 0; - } else if (stmt->env->versionInfo->versionNum < 12) { - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, &rowCount32, 0, - DPI_OCI_ATTR_ROW_COUNT, "get row count", error) < 0) - return DPI_FAILURE; - *count = rowCount32; - } else { - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, count, 0, - DPI_OCI_ATTR_UB8_ROW_COUNT, "get row count", error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__getQueryInfo() [INTERNAL] -// Get query information for the position in question. -//----------------------------------------------------------------------------- -static int dpiStmt__getQueryInfo(dpiStmt *stmt, uint32_t pos, - dpiQueryInfo *info, dpiError *error) -{ - void *param; - int status; - - // acquire parameter descriptor - if (dpiOci__paramGet(stmt->handle, DPI_OCI_HTYPE_STMT, ¶m, pos, - "get parameter", error) < 0) - return DPI_FAILURE; - - // acquire information from the parameter descriptor - status = dpiStmt__getQueryInfoFromParam(stmt, param, info, error); - dpiOci__descriptorFree(param, DPI_OCI_DTYPE_PARAM); - return status; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__getQueryInfoFromParam() [INTERNAL] -// Get query information from the parameter. -//----------------------------------------------------------------------------- -static int dpiStmt__getQueryInfoFromParam(dpiStmt *stmt, void *param, - dpiQueryInfo *info, dpiError *error) -{ - uint8_t ociNullOk; - - // aquire name of item - if (dpiOci__attrGet(param, DPI_OCI_HTYPE_DESCRIBE, (void*) &info->name, - &info->nameLength, DPI_OCI_ATTR_NAME, "get name", error) < 0) - return DPI_FAILURE; - - // acquire type information - if (dpiOracleType__populateTypeInfo(stmt->conn, param, - DPI_OCI_HTYPE_DESCRIBE, &info->typeInfo, error) < 0) - return DPI_FAILURE; - - // acquire if column is permitted to be null - if (dpiOci__attrGet(param, DPI_OCI_HTYPE_DESCRIBE, (void*) &ociNullOk, 0, - DPI_OCI_ATTR_IS_NULL, "get null ok", error) < 0) - return DPI_FAILURE; - info->nullOk = ociNullOk; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__init() [INTERNAL] -// Initialize the statement for use. This is needed when preparing a -// statement for use and when returning a REF cursor. -//----------------------------------------------------------------------------- -int dpiStmt__init(dpiStmt *stmt, dpiError *error) -{ - // get statement type - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - (void*) &stmt->statementType, 0, DPI_OCI_ATTR_STMT_TYPE, - "get statement type", error) < 0) - return DPI_FAILURE; - - // for queries, mark statement as having rows to fetch - if (stmt->statementType == DPI_STMT_TYPE_SELECT) - stmt->hasRowsToFetch = 1; - - // otherwise, check if this is a RETURNING statement - else if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - (void*) &stmt->isReturning, 0, DPI_OCI_ATTR_STMT_IS_RETURNING, - "get is returning", error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__postFetch() [INTERNAL] -// Performs the transformations required to convert Oracle data values into -// C data values. -//----------------------------------------------------------------------------- -static int dpiStmt__postFetch(dpiStmt *stmt, dpiError *error) -{ - uint32_t i, j; - dpiVar *var; - - for (i = 0; i < stmt->numQueryVars; i++) { - var = stmt->queryVars[i]; - for (j = 0; j < stmt->bufferRowCount; j++) { - if (dpiVar__getValue(var, &var->buffer, j, 1, error) < 0) - return DPI_FAILURE; - if (var->type->requiresPreFetch) - var->requiresPreFetch = 1; - } - var->error = NULL; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__beforeFetch() [INTERNAL] -// Performs work that needs to be done prior to fetch for each variable. In -// addition, variables are created if they do not already exist. A check is -// also made to ensure that the variable has enough space to support a fetch -// of the requested size. -//----------------------------------------------------------------------------- -static int dpiStmt__beforeFetch(dpiStmt *stmt, dpiError *error) -{ - dpiQueryInfo *queryInfo; - dpiData *data; - dpiVar *var; - uint32_t i; - - if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, error) < 0) - return DPI_FAILURE; - for (i = 0; i < stmt->numQueryVars; i++) { - var = stmt->queryVars[i]; - if (!var) { - queryInfo = &stmt->queryInfo[i]; - if (dpiVar__allocate(stmt->conn, queryInfo->typeInfo.oracleTypeNum, - queryInfo->typeInfo.defaultNativeTypeNum, - stmt->fetchArraySize, - queryInfo->typeInfo.clientSizeInBytes, 1, 0, - queryInfo->typeInfo.objectType, &var, &data, error) < 0) - return DPI_FAILURE; - if (dpiStmt__define(stmt, i + 1, var, error) < 0) - return DPI_FAILURE; - dpiGen__setRefCount(var, error, -1); - } - var->error = error; - if (stmt->fetchArraySize > var->buffer.maxArraySize) - return dpiError__set(error, "check array size", - DPI_ERR_ARRAY_SIZE_TOO_SMALL, var->buffer.maxArraySize); - if (var->requiresPreFetch && dpiVar__extendedPreFetch(var, - &var->buffer, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiStmt__prepare() [INTERNAL] -// Prepare a statement for execution. -//----------------------------------------------------------------------------- -int dpiStmt__prepare(dpiStmt *stmt, const char *sql, uint32_t sqlLength, - const char *tag, uint32_t tagLength, dpiError *error) -{ - if (sql && dpiDebugLevel & DPI_DEBUG_LEVEL_SQL) - dpiDebug__print("SQL %.*s\n", sqlLength, sql); - if (dpiOci__stmtPrepare2(stmt, sql, sqlLength, tag, tagLength, error) < 0) - return DPI_FAILURE; - if (dpiHandleList__addHandle(stmt->conn->openStmts, stmt, - &stmt->openSlotNum, error) < 0) { - dpiOci__stmtRelease(stmt, NULL, 0, 0, error); - stmt->handle = NULL; - return DPI_FAILURE; - } - - return dpiStmt__init(stmt, error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt__reExecute() [INTERNAL] -// Re-execute the statement after receiving the error ORA-01007: variable not -// in select list. This takes place when one of the columns in a query is -// dropped, but the original metadata is still being used because the query -// statement was found in the statement cache. -//----------------------------------------------------------------------------- -static int dpiStmt__reExecute(dpiStmt *stmt, uint32_t numIters, - uint32_t mode, dpiError *error) -{ - void *origHandle, *newHandle; - uint32_t sqlLength, i; - dpiError localError; - dpiBindVar *bindVar; - dpiVar *var; - int status; - char *sql; - - // acquire the statement that was previously prepared; if this cannot be - // determined, let the original error propagate - localError.buffer = error->buffer; - localError.env = error->env; - localError.handle = error->handle; - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, (void*) &sql, - &sqlLength, DPI_OCI_ATTR_STATEMENT, "get statement", - &localError) < 0) - return DPI_FAILURE; - - // prepare statement a second time before releasing the original statement; - // release the original statement and delete it from the statement cache - // so that it does not return with the invalid metadata; again, if this - // cannot be done, let the original error propagate - origHandle = stmt->handle; - status = dpiOci__stmtPrepare2(stmt, sql, sqlLength, NULL, 0, &localError); - newHandle = stmt->handle; - stmt->handle = origHandle; - stmt->deleteFromCache = 1; - if (dpiOci__stmtRelease(stmt, NULL, 0, 1, &localError) < 0 || status < 0) - return DPI_FAILURE; - stmt->handle = newHandle; - dpiStmt__clearBatchErrors(stmt); - dpiStmt__clearQueryVars(stmt, error); - - // perform binds - for (i = 0; i < stmt->numBindVars; i++) { - bindVar = &stmt->bindVars[i]; - if (!bindVar->var) - continue; - var = bindVar->var; - bindVar->var = NULL; - if (dpiStmt__bind(stmt, var, 0, bindVar->pos, bindVar->name, - bindVar->nameLength, error) < 0) { - dpiGen__setRefCount(var, error, -1); - return DPI_FAILURE; - } - } - - // now re-execute the statement - return dpiStmt__execute(stmt, numIters, mode, 0, error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_addRef() [PUBLIC] -// Add a reference to the statement. -//----------------------------------------------------------------------------- -int dpiStmt_addRef(dpiStmt *stmt) -{ - return dpiGen__addRef(stmt, DPI_HTYPE_STMT, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_bindByName() [PUBLIC] -// Bind the variable by name. -//----------------------------------------------------------------------------- -int dpiStmt_bindByName(dpiStmt *stmt, const char *name, uint32_t nameLength, - dpiVar *var) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, name) - if (dpiGen__checkHandle(var, DPI_HTYPE_VAR, "bind by name", &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - status = dpiStmt__bind(stmt, var, 1, 0, name, nameLength, &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_bindByPos() [PUBLIC] -// Bind the variable by position. -//----------------------------------------------------------------------------- -int dpiStmt_bindByPos(dpiStmt *stmt, uint32_t pos, dpiVar *var) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (dpiGen__checkHandle(var, DPI_HTYPE_VAR, "bind by pos", &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - status = dpiStmt__bind(stmt, var, 1, pos, NULL, 0, &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_bindValueByName() [PUBLIC] -// Create a variable and bind it by name. -//----------------------------------------------------------------------------- -int dpiStmt_bindValueByName(dpiStmt *stmt, const char *name, - uint32_t nameLength, dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - dpiVar *var = NULL; - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, name) - DPI_CHECK_PTR_NOT_NULL(stmt, data) - if (dpiStmt__createBindVar(stmt, nativeTypeNum, data, &var, 0, name, - nameLength, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - status = dpiStmt__bind(stmt, var, 1, 0, name, nameLength, &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_bindValueByPos() [PUBLIC] -// Create a variable and bind it by position. -//----------------------------------------------------------------------------- -int dpiStmt_bindValueByPos(dpiStmt *stmt, uint32_t pos, - dpiNativeTypeNum nativeTypeNum, dpiData *data) -{ - dpiVar *var = NULL; - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, data) - if (dpiStmt__createBindVar(stmt, nativeTypeNum, data, &var, pos, NULL, 0, - &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - status = dpiStmt__bind(stmt, var, 1, pos, NULL, 0, &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_close() [PUBLIC] -// Close the statement so that it is no longer usable and all resources have -// been released. -//----------------------------------------------------------------------------- -int dpiStmt_close(dpiStmt *stmt, const char *tag, uint32_t tagLength) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(stmt, tag) - status = dpiStmt__close(stmt, tag, tagLength, 1, &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_define() [PUBLIC] -// Define the variable that will accept output from the cursor in the -// specified column. -//----------------------------------------------------------------------------- -int dpiStmt_define(dpiStmt *stmt, uint32_t pos, dpiVar *var) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (pos == 0 || pos > stmt->numQueryVars) { - dpiError__set(&error, "check query position", - DPI_ERR_QUERY_POSITION_INVALID, pos); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - if (dpiGen__checkHandle(var, DPI_HTYPE_VAR, "check variable", &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - status = dpiStmt__define(stmt, pos, var, &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_defineValue() [PUBLIC] -// Define the type of data to use for output from the cursor in the specified -// column. This implicitly creates a variable of the specified type and is -// intended for subsequent use by dpiStmt_getQueryValue(), which makes use of -// implicitly created variables. -//----------------------------------------------------------------------------- -int dpiStmt_defineValue(dpiStmt *stmt, uint32_t pos, - dpiOracleTypeNum oracleTypeNum, dpiNativeTypeNum nativeTypeNum, - uint32_t size, int sizeIsBytes, dpiObjectType *objType) -{ - dpiError error; - dpiData *data; - dpiVar *var; - - // verify parameters - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (pos == 0 || pos > stmt->numQueryVars) { - dpiError__set(&error, "check query position", - DPI_ERR_QUERY_POSITION_INVALID, pos); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - - // create a new variable of the specified type - if (dpiVar__allocate(stmt->conn, oracleTypeNum, nativeTypeNum, - stmt->fetchArraySize, size, sizeIsBytes, 0, objType, &var, &data, - &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (dpiStmt__define(stmt, pos, var, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - dpiGen__setRefCount(var, &error, -1); - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_execute() [PUBLIC] -// Execute a statement. If the statement has been executed before, however, -// and this is a query, the describe information is already available so defer -// execution until the first fetch. -//----------------------------------------------------------------------------- -int dpiStmt_execute(dpiStmt *stmt, dpiExecMode mode, uint32_t *numQueryColumns) -{ - uint32_t numIters; - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - numIters = (stmt->statementType == DPI_STMT_TYPE_SELECT) ? 0 : 1; - if (dpiStmt__execute(stmt, numIters, mode, 1, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (numQueryColumns) - *numQueryColumns = stmt->numQueryVars; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_executeMany() [PUBLIC] -// Execute a statement multiple times. Queries are not supported. The bind -// variables are checked to ensure that their maxArraySize is sufficient to -// support this. -//----------------------------------------------------------------------------- -int dpiStmt_executeMany(dpiStmt *stmt, dpiExecMode mode, uint32_t numIters) -{ - dpiError error; - uint32_t i; - - // verify statement is open - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - // queries are not supported - if (stmt->statementType == DPI_STMT_TYPE_SELECT) { - dpiError__set(&error, "check statement type", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - - // batch errors and array DML row counts are only supported with DML - // statements (insert, update, delete and merge) - if ((mode & DPI_MODE_EXEC_BATCH_ERRORS || - mode & DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS) && - stmt->statementType != DPI_STMT_TYPE_INSERT && - stmt->statementType != DPI_STMT_TYPE_UPDATE && - stmt->statementType != DPI_STMT_TYPE_DELETE && - stmt->statementType != DPI_STMT_TYPE_MERGE) { - dpiError__set(&error, "check mode", DPI_ERR_EXEC_MODE_ONLY_FOR_DML); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - - // ensure that all bind variables have a big enough maxArraySize to - // support this operation - for (i = 0; i < stmt->numBindVars; i++) { - if (stmt->bindVars[i].var->buffer.maxArraySize < numIters) { - dpiError__set(&error, "check array size", - DPI_ERR_ARRAY_SIZE_TOO_SMALL, - stmt->bindVars[i].var->buffer.maxArraySize); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - } - - // perform execution - dpiStmt__clearBatchErrors(stmt); - if (dpiStmt__execute(stmt, numIters, mode, 0, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - // handle batch errors if mode was specified - if (mode & DPI_MODE_EXEC_BATCH_ERRORS) { - if (dpiStmt__getBatchErrors(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_fetch() [PUBLIC] -// Fetch a row from the database. -//----------------------------------------------------------------------------- -int dpiStmt_fetch(dpiStmt *stmt, int *found, uint32_t *bufferRowIndex) -{ - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, found) - DPI_CHECK_PTR_NOT_NULL(stmt, bufferRowIndex) - if (stmt->bufferRowIndex >= stmt->bufferRowCount) { - if (stmt->hasRowsToFetch && dpiStmt__fetch(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (stmt->bufferRowIndex >= stmt->bufferRowCount) { - *found = 0; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); - } - } - *found = 1; - *bufferRowIndex = stmt->bufferRowIndex; - stmt->bufferRowIndex++; - stmt->rowCount++; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_fetchRows() [PUBLIC] -// Fetch rows into buffers and return the number of rows that were so -// fetched. If there are still rows available in the buffer, no additional -// fetch will take place. -//----------------------------------------------------------------------------- -int dpiStmt_fetchRows(dpiStmt *stmt, uint32_t maxRows, - uint32_t *bufferRowIndex, uint32_t *numRowsFetched, int *moreRows) -{ - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, bufferRowIndex) - DPI_CHECK_PTR_NOT_NULL(stmt, numRowsFetched) - DPI_CHECK_PTR_NOT_NULL(stmt, moreRows) - if (stmt->bufferRowIndex >= stmt->bufferRowCount) { - if (stmt->hasRowsToFetch && dpiStmt__fetch(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (stmt->bufferRowIndex >= stmt->bufferRowCount) { - *moreRows = 0; - *bufferRowIndex = 0; - *numRowsFetched = 0; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); - } - } - *bufferRowIndex = stmt->bufferRowIndex; - *numRowsFetched = stmt->bufferRowCount - stmt->bufferRowIndex; - *moreRows = stmt->hasRowsToFetch; - if (*numRowsFetched > maxRows) { - *numRowsFetched = maxRows; - *moreRows = 1; - } - stmt->bufferRowIndex += *numRowsFetched; - stmt->rowCount += *numRowsFetched; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getBatchErrorCount() [PUBLIC] -// Return the number of batch errors that took place during the last -// execution of the statement. -//----------------------------------------------------------------------------- -int dpiStmt_getBatchErrorCount(dpiStmt *stmt, uint32_t *count) -{ - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, count) - *count = stmt->numBatchErrors; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getBatchErrors() [PUBLIC] -// Return the batch errors that took place during the last execution of the -// statement. -//----------------------------------------------------------------------------- -int dpiStmt_getBatchErrors(dpiStmt *stmt, uint32_t numErrors, - dpiErrorInfo *errors) -{ - dpiError error, tempError; - uint32_t i; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, errors) - if (numErrors < stmt->numBatchErrors) { - dpiError__set(&error, "check num errors", DPI_ERR_ARRAY_SIZE_TOO_SMALL, - numErrors); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - for (i = 0; i < stmt->numBatchErrors; i++) { - tempError.buffer = &stmt->batchErrors[i]; - dpiError__getInfo(&tempError, &errors[i]); - } - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getBindCount() [PUBLIC] -// Return the number of bind variables referenced in the prepared SQL. In -// SQL statements this counts all bind variables but in PL/SQL statements -// this counts only uniquely named bind variables. -//----------------------------------------------------------------------------- -int dpiStmt_getBindCount(dpiStmt *stmt, uint32_t *count) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, count) - status = dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, (void*) count, - 0, DPI_OCI_ATTR_BIND_COUNT, "get bind count", &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getBindNames() [PUBLIC] -// Return the unique names of the bind variables referenced in the prepared -// SQL. -//----------------------------------------------------------------------------- -int dpiStmt_getBindNames(dpiStmt *stmt, uint32_t *numBindNames, - const char **bindNames, uint32_t *bindNameLengths) -{ - uint8_t bindNameLengthsBuffer[8], indNameLengthsBuffer[8], isDuplicate[8]; - uint32_t startLoc, i, numThisPass, numActualBindNames; - char *bindNamesBuffer[8], *indNamesBuffer[8]; - void *bindHandles[8]; - int32_t numFound; - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, numBindNames) - DPI_CHECK_PTR_NOT_NULL(stmt, bindNames) - DPI_CHECK_PTR_NOT_NULL(stmt, bindNameLengths) - startLoc = 1; - numActualBindNames = 0; - while (1) { - if (dpiOci__stmtGetBindInfo(stmt, 8, startLoc, &numFound, - bindNamesBuffer, bindNameLengthsBuffer, indNamesBuffer, - indNameLengthsBuffer, isDuplicate, bindHandles, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (numFound == 0) - break; - numThisPass = abs(numFound) - startLoc + 1; - if (numThisPass > 8) - numThisPass = 8; - for (i = 0; i < numThisPass; i++) { - startLoc++; - if (isDuplicate[i]) - continue; - if (numActualBindNames == *numBindNames) { - dpiError__set(&error, "check num bind names", - DPI_ERR_ARRAY_SIZE_TOO_SMALL, *numBindNames); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - bindNames[numActualBindNames] = bindNamesBuffer[i]; - bindNameLengths[numActualBindNames] = bindNameLengthsBuffer[i]; - numActualBindNames++; - } - if (numFound > 0) - break; - } - *numBindNames = numActualBindNames; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getFetchArraySize() [PUBLIC] -// Get the array size used for fetches. -//----------------------------------------------------------------------------- -int dpiStmt_getFetchArraySize(dpiStmt *stmt, uint32_t *arraySize) -{ - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, arraySize) - *arraySize = stmt->fetchArraySize; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getImplicitResult() [PUBLIC] -// Return the next implicit result from the previously executed statement. If -// no more implicit results exist, NULL is returned. -//----------------------------------------------------------------------------- -int dpiStmt_getImplicitResult(dpiStmt *stmt, dpiStmt **implicitResult) -{ - dpiStmt *tempStmt; - dpiError error; - void *handle; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, implicitResult) - if (dpiUtils__checkClientVersion(stmt->env->versionInfo, 12, 1, - &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (dpiOci__stmtGetNextResult(stmt, &handle, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - *implicitResult = NULL; - if (handle) { - if (dpiStmt__allocate(stmt->conn, 0, &tempStmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - tempStmt->handle = handle; - dpiGen__setRefCount(stmt, &error, 1); - tempStmt->parentStmt = stmt; - if (dpiStmt__createQueryVars(tempStmt, &error) < 0) { - dpiStmt__free(tempStmt, &error); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - *implicitResult = tempStmt; - } - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getInfo() [PUBLIC] -// Return information about the statement in the provided structure. -//----------------------------------------------------------------------------- -int dpiStmt_getInfo(dpiStmt *stmt, dpiStmtInfo *info) -{ - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, info) - info->isQuery = (stmt->statementType == DPI_STMT_TYPE_SELECT); - info->isPLSQL = (stmt->statementType == DPI_STMT_TYPE_BEGIN || - stmt->statementType == DPI_STMT_TYPE_DECLARE || - stmt->statementType == DPI_STMT_TYPE_CALL); - info->isDDL = (stmt->statementType == DPI_STMT_TYPE_CREATE || - stmt->statementType == DPI_STMT_TYPE_DROP || - stmt->statementType == DPI_STMT_TYPE_ALTER); - info->isDML = (stmt->statementType == DPI_STMT_TYPE_INSERT || - stmt->statementType == DPI_STMT_TYPE_UPDATE || - stmt->statementType == DPI_STMT_TYPE_DELETE || - stmt->statementType == DPI_STMT_TYPE_MERGE); - info->statementType = stmt->statementType; - info->isReturning = stmt->isReturning; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getLastRowid() [PUBLIC] -// Returns the rowid of the last row that was affected by a DML statement. If -// no rows were affected by the last statement executed or the last statement -// executed was not a DML statement, NULL is returned. -//----------------------------------------------------------------------------- -int dpiStmt_getLastRowid(dpiStmt *stmt, dpiRowid **rowid) -{ - uint64_t rowCount; - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, rowid) - *rowid = NULL; - if (stmt->statementType == DPI_STMT_TYPE_INSERT || - stmt->statementType == DPI_STMT_TYPE_UPDATE || - stmt->statementType == DPI_STMT_TYPE_DELETE || - stmt->statementType == DPI_STMT_TYPE_MERGE) { - if (dpiStmt__getRowCount(stmt, &rowCount, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (rowCount > 0) { - if (stmt->lastRowid) { - dpiGen__setRefCount(stmt->lastRowid, &error, -1); - stmt->lastRowid = NULL; - } - if (dpiRowid__allocate(stmt->conn, &stmt->lastRowid, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - stmt->lastRowid->handle, 0, DPI_OCI_ATTR_ROWID, - "get last rowid", &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - *rowid = stmt->lastRowid; - } - } - - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getNumQueryColumns() [PUBLIC] -// Returns the number of query columns associated with a statement. If the -// statement does not refer to a query, 0 is returned. -//----------------------------------------------------------------------------- -int dpiStmt_getNumQueryColumns(dpiStmt *stmt, uint32_t *numQueryColumns) -{ - dpiError error; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, numQueryColumns) - if (stmt->statementType == DPI_STMT_TYPE_SELECT && - stmt->numQueryVars == 0 && - dpiStmt__createQueryVars(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - *numQueryColumns = stmt->numQueryVars; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getQueryInfo() [PUBLIC] -// Get query information for the position in question. -//----------------------------------------------------------------------------- -int dpiStmt_getQueryInfo(dpiStmt *stmt, uint32_t pos, dpiQueryInfo *info) -{ - dpiError error; - - // validate parameters - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, info) - if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (pos == 0 || pos > stmt->numQueryVars) { - dpiError__set(&error, "check query position", - DPI_ERR_QUERY_POSITION_INVALID, pos); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - - // copy query information from internal cache - memcpy(info, &stmt->queryInfo[pos - 1], sizeof(dpiQueryInfo)); - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getQueryValue() [PUBLIC] -// Get value from query at specified position. -//----------------------------------------------------------------------------- -int dpiStmt_getQueryValue(dpiStmt *stmt, uint32_t pos, - dpiNativeTypeNum *nativeTypeNum, dpiData **data) -{ - dpiError error; - dpiVar *var; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, nativeTypeNum) - DPI_CHECK_PTR_NOT_NULL(stmt, data) - if (!stmt->queryVars) { - dpiError__set(&error, "check query vars", DPI_ERR_QUERY_NOT_EXECUTED); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - if (pos == 0 || pos > stmt->numQueryVars) { - dpiError__set(&error, "check query position", - DPI_ERR_QUERY_POSITION_INVALID, pos); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - var = stmt->queryVars[pos - 1]; - if (!var || stmt->bufferRowIndex == 0 || - stmt->bufferRowIndex > stmt->bufferRowCount) { - dpiError__set(&error, "check fetched row", DPI_ERR_NO_ROW_FETCHED); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - *nativeTypeNum = var->nativeTypeNum; - *data = &var->buffer.externalData[stmt->bufferRowIndex - 1]; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getRowCount() [PUBLIC] -// Return the number of rows affected by the last DML executed (for insert, -// update, delete and merge) or the number of rows fetched (for queries). In -// all other cases, 0 is returned. -//----------------------------------------------------------------------------- -int dpiStmt_getRowCount(dpiStmt *stmt, uint64_t *count) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, count) - status = dpiStmt__getRowCount(stmt, count, &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getRowCounts() [PUBLIC] -// Return the number of rows affected by each of the iterations executed -// using dpiStmt_executeMany(). -//----------------------------------------------------------------------------- -int dpiStmt_getRowCounts(dpiStmt *stmt, uint32_t *numRowCounts, - uint64_t **rowCounts) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, numRowCounts) - DPI_CHECK_PTR_NOT_NULL(stmt, rowCounts) - if (dpiUtils__checkClientVersion(stmt->env->versionInfo, 12, 1, - &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - status = dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, rowCounts, - numRowCounts, DPI_OCI_ATTR_DML_ROW_COUNT_ARRAY, "get row counts", - &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_getSubscrQueryId() [PUBLIC] -// Return the query id for a query registered using this statement. -//----------------------------------------------------------------------------- -int dpiStmt_getSubscrQueryId(dpiStmt *stmt, uint64_t *queryId) -{ - dpiError error; - int status; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(stmt, queryId) - status = dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, queryId, 0, - DPI_OCI_ATTR_CQ_QUERYID, "get query id", &error); - return dpiGen__endPublicFn(stmt, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_release() [PUBLIC] -// Release a reference to the statement. -//----------------------------------------------------------------------------- -int dpiStmt_release(dpiStmt *stmt) -{ - return dpiGen__release(stmt, DPI_HTYPE_STMT, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_scroll() [PUBLIC] -// Scroll to the specified location in the cursor. -//----------------------------------------------------------------------------- -int dpiStmt_scroll(dpiStmt *stmt, dpiFetchMode mode, int32_t offset, - int32_t rowCountOffset) -{ - uint32_t numRows, currentPosition; - uint64_t desiredRow = 0; - dpiError error; - - // make sure the cursor is open - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - // validate mode; determine desired row to fetch - switch (mode) { - case DPI_MODE_FETCH_NEXT: - desiredRow = stmt->rowCount + rowCountOffset + 1; - break; - case DPI_MODE_FETCH_PRIOR: - desiredRow = stmt->rowCount + rowCountOffset - 1; - break; - case DPI_MODE_FETCH_FIRST: - desiredRow = 1; - break; - case DPI_MODE_FETCH_LAST: - break; - case DPI_MODE_FETCH_ABSOLUTE: - desiredRow = (uint64_t) offset; - break; - case DPI_MODE_FETCH_RELATIVE: - desiredRow = stmt->rowCount + rowCountOffset + offset; - offset = (int32_t) (desiredRow - - (stmt->bufferMinRow + stmt->bufferRowCount - 1)); - break; - default: - dpiError__set(&error, "scroll mode", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - - // determine if a fetch is actually required; "last" is always fetched - if (mode != DPI_MODE_FETCH_LAST && desiredRow >= stmt->bufferMinRow && - desiredRow < stmt->bufferMinRow + stmt->bufferRowCount) { - stmt->bufferRowIndex = (uint32_t) (desiredRow - stmt->bufferMinRow); - stmt->rowCount = desiredRow - 1; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); - } - - // perform any pre-fetch activities required - if (dpiStmt__beforeFetch(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - // perform fetch; when fetching the last row, only fetch a single row - numRows = (mode == DPI_MODE_FETCH_LAST) ? 1 : stmt->fetchArraySize; - if (dpiOci__stmtFetch2(stmt, numRows, mode, offset, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - // determine the number of rows actually fetched - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, - &stmt->bufferRowCount, 0, DPI_OCI_ATTR_ROWS_FETCHED, - "get rows fetched", &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - // check that we haven't gone outside of the result set - if (stmt->bufferRowCount == 0) { - if (mode != DPI_MODE_FETCH_FIRST && mode != DPI_MODE_FETCH_LAST) { - dpiError__set(&error, "check result set bounds", - DPI_ERR_SCROLL_OUT_OF_RS); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - stmt->hasRowsToFetch = 0; - stmt->rowCount = 0; - stmt->bufferRowIndex = 0; - stmt->bufferMinRow = 0; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); - } - - // determine the current position of the cursor - if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, ¤tPosition, 0, - DPI_OCI_ATTR_CURRENT_POSITION, "get current pos", &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - // reset buffer row index and row count - stmt->rowCount = currentPosition - stmt->bufferRowCount; - stmt->bufferMinRow = stmt->rowCount + 1; - stmt->bufferRowIndex = 0; - - // perform post-fetch activities required - if (dpiStmt__postFetch(stmt, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiStmt_setFetchArraySize() [PUBLIC] -// Set the array size used for fetches. Using a value of zero will select the -// default value. A check is made to ensure that all defined variables have -// sufficient space to support the array size. -//----------------------------------------------------------------------------- -int dpiStmt_setFetchArraySize(dpiStmt *stmt, uint32_t arraySize) -{ - dpiError error; - dpiVar *var; - uint32_t i; - - if (dpiStmt__check(stmt, __func__, &error) < 0) - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - if (arraySize == 0) - arraySize = DPI_DEFAULT_FETCH_ARRAY_SIZE; - for (i = 0; i < stmt->numQueryVars; i++) { - var = stmt->queryVars[i]; - if (var && var->buffer.maxArraySize < arraySize) { - dpiError__set(&error, "check array size", - DPI_ERR_ARRAY_SIZE_TOO_BIG, arraySize); - return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); - } - } - stmt->fetchArraySize = arraySize; - return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSubscr.c b/vendor/github.com/godror/godror/odpi/src/dpiSubscr.c deleted file mode 100644 index cf1ed60b2d8..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiSubscr.c +++ /dev/null @@ -1,713 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiSubscr.c -// Implementation of subscriptions (CQN). -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// forward declarations of internal functions only used in this file -static void dpiSubscr__freeMessage(dpiSubscrMessage *message); -static int dpiSubscr__populateMessage(dpiSubscr *subscr, - dpiSubscrMessage *message, void *descriptor, dpiError *error); -static int dpiSubscr__populateMessageTable(dpiSubscr *subscr, - dpiSubscrMessageTable *table, void *descriptor, dpiError *error); -static int dpiSubscr__populateQueryChangeMessage(dpiSubscr *subscr, - dpiSubscrMessage *message, void *descriptor, dpiError *error); - - -//----------------------------------------------------------------------------- -// dpiSubscr__callback() [INTERNAL] -// Callback that is used to execute the callback registered when the -// subscription was created. -//----------------------------------------------------------------------------- -static void dpiSubscr__callback(dpiSubscr *subscr, UNUSED void *handle, - UNUSED void *payload, UNUSED uint32_t payloadLength, void *descriptor, - UNUSED uint32_t mode) -{ - dpiSubscrMessage message; - dpiErrorInfo errorInfo; - dpiError error; - - // ensure that the subscription handle is still valid - if (dpiGen__startPublicFn(subscr, DPI_HTYPE_SUBSCR, __func__, - &error) < 0) { - dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); - return; - } - - // if the subscription is no longer registered, nothing further to do - dpiMutex__acquire(subscr->mutex); - if (!subscr->registered) { - dpiMutex__release(subscr->mutex); - dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); - return; - } - - // populate message - memset(&message, 0, sizeof(message)); - if (dpiSubscr__populateMessage(subscr, &message, descriptor, &error) < 0) { - dpiError__getInfo(&error, &errorInfo); - message.errorInfo = &errorInfo; - } - message.registered = subscr->registered; - - // invoke user callback; temporarily increase reference count to ensure - // that the subscription is not freed during the callback - dpiGen__setRefCount(subscr, &error, 1); - (*subscr->callback)(subscr->callbackContext, &message); - dpiSubscr__freeMessage(&message); - dpiMutex__release(subscr->mutex); - dpiGen__setRefCount(subscr, &error, -1); - dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__check() [INTERNAL] -// Determine if the subscription is open and available for use. -//----------------------------------------------------------------------------- -static int dpiSubscr__check(dpiSubscr *subscr, const char *fnName, - dpiError *error) -{ - if (dpiGen__startPublicFn(subscr, DPI_HTYPE_SUBSCR, fnName, error) < 0) - return DPI_FAILURE; - if (!subscr->handle) - return dpiError__set(error, "check closed", DPI_ERR_SUBSCR_CLOSED); - return dpiConn__checkConnected(subscr->conn, error); -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__create() [INTERNAL] -// Create a new subscription structure and return it. In case of error NULL -// is returned. -//----------------------------------------------------------------------------- -int dpiSubscr__create(dpiSubscr *subscr, dpiConn *conn, - dpiSubscrCreateParams *params, dpiError *error) -{ - uint32_t qosFlags, mode; - int32_t int32Val; - int rowids; - - // retain a reference to the connection - dpiGen__setRefCount(conn, error, 1); - subscr->conn = conn; - subscr->callback = params->callback; - subscr->callbackContext = params->callbackContext; - subscr->subscrNamespace = params->subscrNamespace; - subscr->qos = params->qos; - subscr->clientInitiated = params->clientInitiated; - dpiMutex__initialize(subscr->mutex); - - // create the subscription handle - if (dpiOci__handleAlloc(conn->env->handle, &subscr->handle, - DPI_OCI_HTYPE_SUBSCRIPTION, "create subscr handle", error) < 0) - return DPI_FAILURE; - - // set the namespace - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) ¶ms->subscrNamespace, sizeof(uint32_t), - DPI_OCI_ATTR_SUBSCR_NAMESPACE, "set namespace", error) < 0) - return DPI_FAILURE; - - // set the protocol - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) ¶ms->protocol, sizeof(uint32_t), - DPI_OCI_ATTR_SUBSCR_RECPTPROTO, "set protocol", error) < 0) - return DPI_FAILURE; - - // set the timeout - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) ¶ms->timeout, sizeof(uint32_t), - DPI_OCI_ATTR_SUBSCR_TIMEOUT, "set timeout", error) < 0) - return DPI_FAILURE; - - // set the IP address used on the client to listen for events - if (params->ipAddress && params->ipAddressLength > 0 && - dpiOci__attrSet(subscr->env->handle, DPI_OCI_HTYPE_ENV, - (void*) params->ipAddress, params->ipAddressLength, - DPI_OCI_ATTR_SUBSCR_IPADDR, "set IP address", error) < 0) - return DPI_FAILURE; - - // set the port number used on the client to listen for events - if (params->portNumber > 0 && dpiOci__attrSet(subscr->env->handle, - DPI_OCI_HTYPE_ENV, (void*) ¶ms->portNumber, 0, - DPI_OCI_ATTR_SUBSCR_PORTNO, "set port number", error) < 0) - return DPI_FAILURE; - - // set the context for the callback - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) subscr, 0, DPI_OCI_ATTR_SUBSCR_CTX, "set callback context", - error) < 0) - return DPI_FAILURE; - - // set the callback, if applicable - if (params->callback && dpiOci__attrSet(subscr->handle, - DPI_OCI_HTYPE_SUBSCRIPTION, (void*) dpiSubscr__callback, 0, - DPI_OCI_ATTR_SUBSCR_CALLBACK, "set callback", error) < 0) - return DPI_FAILURE; - - // set the subscription name, if applicable - if (params->name && params->nameLength > 0 && - dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) params->name, params->nameLength, - DPI_OCI_ATTR_SUBSCR_NAME, "set name", error) < 0) - return DPI_FAILURE; - - // set QOS flags - qosFlags = 0; - if (params->qos & DPI_SUBSCR_QOS_RELIABLE) - qosFlags |= DPI_OCI_SUBSCR_QOS_RELIABLE; - if (params->qos & DPI_SUBSCR_QOS_DEREG_NFY) - qosFlags |= DPI_OCI_SUBSCR_QOS_PURGE_ON_NTFN; - if (qosFlags && dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) &qosFlags, sizeof(uint32_t), DPI_OCI_ATTR_SUBSCR_QOSFLAGS, - "set QOS", error) < 0) - return DPI_FAILURE; - - // set CQ specific QOS flags - qosFlags = 0; - if (params->qos & DPI_SUBSCR_QOS_QUERY) - qosFlags |= DPI_OCI_SUBSCR_CQ_QOS_QUERY; - if (params->qos & DPI_SUBSCR_QOS_BEST_EFFORT) - qosFlags |= DPI_OCI_SUBSCR_CQ_QOS_BEST_EFFORT; - if (qosFlags && dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) &qosFlags, sizeof(uint32_t), - DPI_OCI_ATTR_SUBSCR_CQ_QOSFLAGS, "set CQ QOS", error) < 0) - return DPI_FAILURE; - - // set rowids flag, if applicable - if (params->qos & DPI_SUBSCR_QOS_ROWIDS) { - rowids = 1; - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) &rowids, 0, DPI_OCI_ATTR_CHNF_ROWIDS, - "set rowids flag", error) < 0) - return DPI_FAILURE; - } - - // set which operations are desired, if applicable - if (params->operations && dpiOci__attrSet(subscr->handle, - DPI_OCI_HTYPE_SUBSCRIPTION, (void*) ¶ms->operations, 0, - DPI_OCI_ATTR_CHNF_OPERATIONS, "set operations", error) < 0) - return DPI_FAILURE; - - // set grouping information, if applicable - if (params->groupingClass) { - - // set grouping class - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) ¶ms->groupingClass, 0, - DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_CLASS, "set grouping class", - error) < 0) - return DPI_FAILURE; - - // set grouping value - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) ¶ms->groupingValue, 0, - DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_VALUE, "set grouping value", - error) < 0) - return DPI_FAILURE; - - // set grouping type - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) ¶ms->groupingType, 0, - DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_TYPE, "set grouping type", - error) < 0) - return DPI_FAILURE; - - // set grouping repeat count - int32Val = DPI_SUBSCR_GROUPING_FOREVER; - if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - (void*) &int32Val, 0, - DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_REPEAT_COUNT, - "set grouping repeat count", error) < 0) - return DPI_FAILURE; - - } - - // register the subscription; client initiated subscriptions are only valid - // with 19.4 client and database - mode = DPI_OCI_DEFAULT; - if (params->clientInitiated) { - if (dpiUtils__checkClientVersion(conn->env->versionInfo, 19, 4, - error) < 0) - return DPI_FAILURE; - if (dpiUtils__checkDatabaseVersion(conn, 19, 4, error) < 0) - return DPI_FAILURE; - mode = DPI_OCI_SECURE_NOTIFICATION; - } - if (dpiOci__subscriptionRegister(conn, &subscr->handle, mode, error) < 0) - return DPI_FAILURE; - subscr->registered = 1; - - // acquire the registration id - if (dpiOci__attrGet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, - ¶ms->outRegId, NULL, DPI_OCI_ATTR_SUBSCR_CQ_REGID, - "get registration id", error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__free() [INTERNAL] -// Free the memory and any resources associated with the subscription. -//----------------------------------------------------------------------------- -void dpiSubscr__free(dpiSubscr *subscr, dpiError *error) -{ - dpiMutex__acquire(subscr->mutex); - if (subscr->handle) { - if (subscr->registered) - dpiOci__subscriptionUnRegister(subscr->conn, subscr, error); - dpiOci__handleFree(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION); - subscr->handle = NULL; - } - if (subscr->conn) { - dpiGen__setRefCount(subscr->conn, error, -1); - subscr->conn = NULL; - } - dpiMutex__release(subscr->mutex); - dpiMutex__destroy(subscr->mutex); - dpiUtils__freeMemory(subscr); -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__freeMessage() [INTERNAL] -// Free memory associated with the message. -//----------------------------------------------------------------------------- -static void dpiSubscr__freeMessage(dpiSubscrMessage *message) -{ - dpiSubscrMessageQuery *query; - uint32_t i, j; - - // free the tables for the message - if (message->numTables > 0) { - for (i = 0; i < message->numTables; i++) { - if (message->tables[i].numRows > 0) - dpiUtils__freeMemory(message->tables[i].rows); - } - dpiUtils__freeMemory(message->tables); - } - - // free the queries for the message - if (message->numQueries > 0) { - for (i = 0; i < message->numQueries; i++) { - query = &message->queries[i]; - if (query->numTables > 0) { - for (j = 0; j < query->numTables; j++) { - if (query->tables[j].numRows > 0) - dpiUtils__freeMemory(query->tables[j].rows); - } - dpiUtils__freeMemory(query->tables); - } - } - dpiUtils__freeMemory(message->queries); - } -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__populateAQMessage() [INTERNAL] -// Populate message with details. -//----------------------------------------------------------------------------- -static int dpiSubscr__populateAQMessage(dpiSubscr *subscr, - dpiSubscrMessage *message, void *descriptor, dpiError *error) -{ - uint32_t flags = 0; - - // determine if message is a deregistration message - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_AQNFY_DESCRIPTOR, &flags, - NULL, DPI_OCI_ATTR_NFY_FLAGS, "get flags", error) < 0) - return DPI_FAILURE; - message->eventType = (flags == 1) ? DPI_EVENT_DEREG : DPI_EVENT_AQ; - if (message->eventType == DPI_EVENT_DEREG) { - subscr->registered = 0; - return DPI_SUCCESS; - } - - // determine the name of the queue which spawned the event - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_AQNFY_DESCRIPTOR, - (void*) &message->queueName, &message->queueNameLength, - DPI_OCI_ATTR_QUEUE_NAME, "get queue name", error) < 0) - return DPI_FAILURE; - - // determine the consumer name for the queue that spawned the event - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_AQNFY_DESCRIPTOR, - (void*) &message->consumerName, &message->consumerNameLength, - DPI_OCI_ATTR_CONSUMER_NAME, "get consumer name", error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__populateObjectChangeMessage() [INTERNAL] -// Populate object change message with details. -//----------------------------------------------------------------------------- -static int dpiSubscr__populateObjectChangeMessage(dpiSubscr *subscr, - dpiSubscrMessage *message, void *descriptor, dpiError *error) -{ - void **tableDescriptor, *indicator; - int32_t numTables; - void *tables; - uint32_t i; - int exists; - - // determine table collection - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &tables, 0, - DPI_OCI_ATTR_CHDES_TABLE_CHANGES, "get tables", error) < 0) - return DPI_FAILURE; - if (!tables) - return DPI_SUCCESS; - - // determine number of tables - if (dpiOci__collSize(subscr->conn, tables, &numTables, error) < 0) - return DPI_FAILURE; - - // allocate memory for table entries - if (dpiUtils__allocateMemory((size_t) numTables, - sizeof(dpiSubscrMessageTable), 1, "allocate msg tables", - (void**) &message->tables, error) < 0) - return DPI_FAILURE; - message->numTables = (uint32_t) numTables; - - // populate message table entries - for (i = 0; i < message->numTables; i++) { - if (dpiOci__collGetElem(subscr->conn, tables, (int32_t) i, &exists, - (void**) &tableDescriptor, &indicator, error) < 0) - return DPI_FAILURE; - if (dpiSubscr__populateMessageTable(subscr, &message->tables[i], - *tableDescriptor, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__populateMessage() [INTERNAL] -// Populate message with details. -//----------------------------------------------------------------------------- -static int dpiSubscr__populateMessage(dpiSubscr *subscr, - dpiSubscrMessage *message, void *descriptor, dpiError *error) -{ - void *rawValue; - - // if quality of service flag indicates that deregistration should take - // place when the first notification is received, mark the subscription - // as no longer registered - if (subscr->qos & DPI_SUBSCR_QOS_DEREG_NFY) - subscr->registered = 0; - - // handle AQ messages, if applicable - if (subscr->subscrNamespace == DPI_SUBSCR_NAMESPACE_AQ) - return dpiSubscr__populateAQMessage(subscr, message, descriptor, - error); - - // determine the type of event that was spawned - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &message->eventType, - NULL, DPI_OCI_ATTR_CHDES_NFYTYPE, "get event type", error) < 0) - return DPI_FAILURE; - - // determine the name of the database which spawned the event - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, - (void*) &message->dbName, &message->dbNameLength, - DPI_OCI_ATTR_CHDES_DBNAME, "get DB name", error) < 0) - return DPI_FAILURE; - - // determine the id of the transaction which spawned the event - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &rawValue, NULL, - DPI_OCI_ATTR_CHDES_XID, "get transaction id", error) < 0) - return DPI_FAILURE; - dpiOci__rawPtr(subscr->env->handle, rawValue, (void**) &message->txId); - dpiOci__rawSize(subscr->env->handle, rawValue, &message->txIdLength); - - // populate event specific attributes - switch (message->eventType) { - case DPI_EVENT_OBJCHANGE: - return dpiSubscr__populateObjectChangeMessage(subscr, message, - descriptor, error); - case DPI_EVENT_QUERYCHANGE: - return dpiSubscr__populateQueryChangeMessage(subscr, message, - descriptor, error); - case DPI_EVENT_DEREG: - subscr->registered = 0; - break; - case DPI_EVENT_STARTUP: - case DPI_EVENT_SHUTDOWN: - case DPI_EVENT_SHUTDOWN_ANY: - break; - default: - return dpiError__set(error, "event type", DPI_ERR_NOT_SUPPORTED); - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__populateMessageQuery() [INTERNAL] -// Populate a message query structure from the OCI descriptor. -//----------------------------------------------------------------------------- -static int dpiSubscr__populateMessageQuery(dpiSubscr *subscr, - dpiSubscrMessageQuery *query, void *descriptor, dpiError *error) -{ - void **tableDescriptor, *indicator, *tables; - int32_t numTables; - uint32_t i; - int exists; - - // determine query id - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CQDES, &query->id, 0, - DPI_OCI_ATTR_CQDES_QUERYID, "get id", error) < 0) - return DPI_FAILURE; - - // determine operation - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CQDES, &query->operation, 0, - DPI_OCI_ATTR_CQDES_OPERATION, "get operation", error) < 0) - return DPI_FAILURE; - - // determine table collection - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CQDES, &tables, 0, - DPI_OCI_ATTR_CQDES_TABLE_CHANGES, "get table descriptor", - error) < 0) - return DPI_FAILURE; - if (!tables) - return DPI_SUCCESS; - - // determine number of tables - if (dpiOci__collSize(subscr->conn, tables, &numTables, error) < 0) - return DPI_FAILURE; - - // allocate memory for table entries - if (dpiUtils__allocateMemory((size_t) numTables, - sizeof(dpiSubscrMessageTable), 1, "allocate query tables", - (void**) &query->tables, error) < 0) - return DPI_FAILURE; - query->numTables = (uint32_t) numTables; - - // populate message table entries - for (i = 0; i < query->numTables; i++) { - if (dpiOci__collGetElem(subscr->conn, tables, (int32_t) i, &exists, - (void**) &tableDescriptor, &indicator, error) < 0) - return DPI_FAILURE; - if (dpiSubscr__populateMessageTable(subscr, &query->tables[i], - *tableDescriptor, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__populateMessageRow() [INTERNAL] -// Populate a message row structure from the OCI descriptor. -//----------------------------------------------------------------------------- -static int dpiSubscr__populateMessageRow(dpiSubscrMessageRow *row, - void *descriptor, dpiError *error) -{ - // determine operation - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_ROW_CHDES, &row->operation, - 0, DPI_OCI_ATTR_CHDES_ROW_OPFLAGS, "get operation", error) < 0) - return DPI_FAILURE; - - // determine rowid - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_ROW_CHDES, - (void*) &row->rowid, &row->rowidLength, - DPI_OCI_ATTR_CHDES_ROW_ROWID, "get rowid", error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__populateMessageTable() [INTERNAL] -// Populate a message table structure from the OCI descriptor. -//----------------------------------------------------------------------------- -static int dpiSubscr__populateMessageTable(dpiSubscr *subscr, - dpiSubscrMessageTable *table, void *descriptor, dpiError *error) -{ - void **rowDescriptor, *indicator, *rows; - int32_t numRows; - int exists; - uint32_t i; - - // determine operation - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_TABLE_CHDES, - &table->operation, 0, DPI_OCI_ATTR_CHDES_TABLE_OPFLAGS, - "get operation", error) < 0) - return DPI_FAILURE; - - // determine table name - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_TABLE_CHDES, - (void*) &table->name, &table->nameLength, - DPI_OCI_ATTR_CHDES_TABLE_NAME, "get table name", error) < 0) - return DPI_FAILURE; - - // if change invalidated all rows, nothing to do - if (table->operation & DPI_OPCODE_ALL_ROWS) - return DPI_SUCCESS; - - // determine rows collection - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_TABLE_CHDES, &rows, 0, - DPI_OCI_ATTR_CHDES_TABLE_ROW_CHANGES, "get rows descriptor", - error) < 0) - return DPI_FAILURE; - - // determine number of rows in collection - if (dpiOci__collSize(subscr->conn, rows, &numRows, error) < 0) - return DPI_FAILURE; - - // allocate memory for row entries - if (dpiUtils__allocateMemory((size_t) numRows, sizeof(dpiSubscrMessageRow), - 1, "allocate rows", (void**) &table->rows, error) < 0) - return DPI_FAILURE; - table->numRows = (uint32_t) numRows; - - // populate the rows attribute - for (i = 0; i < table->numRows; i++) { - if (dpiOci__collGetElem(subscr->conn, rows, (int32_t) i, &exists, - (void**) &rowDescriptor, &indicator, error) < 0) - return DPI_FAILURE; - if (dpiSubscr__populateMessageRow(&table->rows[i], *rowDescriptor, - error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__populateQueryChangeMessage() [INTERNAL] -// Populate query change message with details. -//----------------------------------------------------------------------------- -static int dpiSubscr__populateQueryChangeMessage(dpiSubscr *subscr, - dpiSubscrMessage *message, void *descriptor, dpiError *error) -{ - void **queryDescriptor, *indicator, *queries; - int32_t numQueries; - int exists; - uint32_t i; - - // determine query collection - if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &queries, 0, - DPI_OCI_ATTR_CHDES_QUERIES, "get queries", error) < 0) - return DPI_FAILURE; - if (!queries) - return DPI_SUCCESS; - - // determine number of queries - if (dpiOci__collSize(subscr->conn, queries, &numQueries, error) < 0) - return DPI_FAILURE; - - // allocate memory for query entries - if (dpiUtils__allocateMemory((size_t) numQueries, - sizeof(dpiSubscrMessageQuery), 1, "allocate queries", - (void**) &message->queries, error) < 0) - return DPI_FAILURE; - message->numQueries = (uint32_t) numQueries; - - // populate each entry with a message query instance - for (i = 0; i < message->numQueries; i++) { - if (dpiOci__collGetElem(subscr->conn, queries, (int32_t) i, &exists, - (void**) &queryDescriptor, &indicator, error) < 0) - return DPI_FAILURE; - if (dpiSubscr__populateMessageQuery(subscr, &message->queries[i], - *queryDescriptor, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiSubscr__prepareStmt() [INTERNAL] -// Internal method for preparing statement against a subscription. This -// allows for normal error processing without having to worry about freeing the -// statement for every error that might take place. -//----------------------------------------------------------------------------- -static int dpiSubscr__prepareStmt(dpiSubscr *subscr, dpiStmt *stmt, - const char *sql, uint32_t sqlLength, dpiError *error) -{ - // prepare statement for execution; only SELECT statements are supported - if (dpiStmt__prepare(stmt, sql, sqlLength, NULL, 0, error) < 0) - return DPI_FAILURE; - if (stmt->statementType != DPI_STMT_TYPE_SELECT) - return dpiError__set(error, "subscr prepare statement", - DPI_ERR_NOT_SUPPORTED); - - // fetch array size is set to 1 in order to avoid over allocation since - // the query is not really going to be used for fetching rows, just for - // registration - stmt->fetchArraySize = 1; - - // set subscription handle - return dpiOci__attrSet(stmt->handle, DPI_OCI_HTYPE_STMT, subscr->handle, 0, - DPI_OCI_ATTR_CHNF_REGHANDLE, "set subscription handle", error); -} - - -//----------------------------------------------------------------------------- -// dpiSubscr_addRef() [PUBLIC] -// Add a reference to the subscription. -//----------------------------------------------------------------------------- -int dpiSubscr_addRef(dpiSubscr *subscr) -{ - return dpiGen__addRef(subscr, DPI_HTYPE_SUBSCR, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiSubscr_prepareStmt() [PUBLIC] -// Prepare statement for registration with subscription. -//----------------------------------------------------------------------------- -int dpiSubscr_prepareStmt(dpiSubscr *subscr, const char *sql, - uint32_t sqlLength, dpiStmt **stmt) -{ - dpiStmt *tempStmt; - dpiError error; - - if (dpiSubscr__check(subscr, __func__, &error) < 0) - return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(subscr, sql) - DPI_CHECK_PTR_NOT_NULL(subscr, stmt) - if (dpiStmt__allocate(subscr->conn, 0, &tempStmt, &error) < 0) - return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); - if (dpiSubscr__prepareStmt(subscr, tempStmt, sql, sqlLength, - &error) < 0) { - dpiStmt__free(tempStmt, &error); - return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); - } - - *stmt = tempStmt; - return dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiSubscr_release() [PUBLIC] -// Release a reference to the subscription. -//----------------------------------------------------------------------------- -int dpiSubscr_release(dpiSubscr *subscr) -{ - return dpiGen__release(subscr, DPI_HTYPE_SUBSCR, __func__); -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiUtils.c b/vendor/github.com/godror/godror/odpi/src/dpiUtils.c deleted file mode 100644 index 0ab09e54487..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiUtils.c +++ /dev/null @@ -1,401 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiUtils.c -// Utility methods that aren't specific to a particular type. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -//----------------------------------------------------------------------------- -// dpiUtils__allocateMemory() [INTERNAL] -// Method for allocating memory which permits tracing and populates the error -// structure in the event of a memory allocation failure. -//----------------------------------------------------------------------------- -int dpiUtils__allocateMemory(size_t numMembers, size_t memberSize, - int clearMemory, const char *action, void **ptr, dpiError *error) -{ - if (clearMemory) - *ptr = calloc(numMembers, memberSize); - else *ptr = malloc(numMembers * memberSize); - if (!*ptr) - return dpiError__set(error, action, DPI_ERR_NO_MEMORY); - if (dpiDebugLevel & DPI_DEBUG_LEVEL_MEM) - dpiDebug__print("allocated %u bytes at %p (%s)\n", - numMembers * memberSize, *ptr, action); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiUtils__checkClientVersion() [INTERNAL] -// Check the Oracle Client version and verify that it is at least at the -// minimum version that is required. -//----------------------------------------------------------------------------- -int dpiUtils__checkClientVersion(dpiVersionInfo *versionInfo, - int minVersionNum, int minReleaseNum, dpiError *error) -{ - if (versionInfo->versionNum < minVersionNum || - (versionInfo->versionNum == minVersionNum && - versionInfo->releaseNum < minReleaseNum)) - return dpiError__set(error, "check Oracle Client version", - DPI_ERR_ORACLE_CLIENT_TOO_OLD, versionInfo->versionNum, - versionInfo->releaseNum, minVersionNum, minReleaseNum); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiUtils__checkDatabaseVersion() [INTERNAL] -// Check the Oracle Database version and verify that it is at least at the -// minimum version that is required. -//----------------------------------------------------------------------------- -int dpiUtils__checkDatabaseVersion(dpiConn *conn, int minVersionNum, - int minReleaseNum, dpiError *error) -{ - if (dpiConn__getServerVersion(conn, error) < 0) - return DPI_FAILURE; - if (conn->versionInfo.versionNum < minVersionNum || - (conn->versionInfo.versionNum == minVersionNum && - conn->versionInfo.releaseNum < minReleaseNum)) - return dpiError__set(error, "check Oracle Database version", - DPI_ERR_ORACLE_DB_TOO_OLD, conn->versionInfo.versionNum, - conn->versionInfo.releaseNum, minVersionNum, minReleaseNum); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiUtils__clearMemory() [INTERNAL] -// Method for clearing memory that will not be optimised away by the -// compiler. Simple use of memset() can be optimised away. This routine makes -// use of a volatile pointer which most compilers will avoid optimising away, -// even if the pointer appears to be unused after the call. -//----------------------------------------------------------------------------- -void dpiUtils__clearMemory(void *ptr, size_t length) -{ - volatile unsigned char *temp = (unsigned char *) ptr; - - while (length--) - *temp++ = '\0'; -} - - -//----------------------------------------------------------------------------- -// dpiUtils__freeMemory() [INTERNAL] -// Method for allocating memory which permits tracing and populates the error -// structure in the event of a memory allocation failure. -//----------------------------------------------------------------------------- -void dpiUtils__freeMemory(void *ptr) -{ - if (dpiDebugLevel & DPI_DEBUG_LEVEL_MEM) - dpiDebug__print("freed ptr at %p\n", ptr); - free(ptr); -} - - -//----------------------------------------------------------------------------- -// dpiUtils__getAttrStringWithDup() [INTERNAL] -// Get the string attribute from the OCI and duplicate its contents. -//----------------------------------------------------------------------------- -int dpiUtils__getAttrStringWithDup(const char *action, const void *ociHandle, - uint32_t ociHandleType, uint32_t ociAttribute, const char **value, - uint32_t *valueLength, dpiError *error) -{ - char *source, *temp; - - if (dpiOci__attrGet(ociHandle, ociHandleType, (void*) &source, - valueLength, ociAttribute, action, error) < 0) - return DPI_FAILURE; - if (dpiUtils__allocateMemory(1, *valueLength, 0, action, (void**) &temp, - error) < 0) - return DPI_FAILURE; - *value = (const char*) memcpy(temp, source, *valueLength); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiUtils__parseNumberString() [INTERNAL] -// Parse the contents of a string that is supposed to contain a number. The -// number is expected to be in the format (www.json.org): -// - optional negative sign (-) -// - any number of digits but at least one (0-9) -// - an optional decimal point (.) -// - any number of digits but at least one if decimal point specified (0-9) -// - an optional exponent indicator (e or E) -// - an optional exponent sign (+ or -) -// - any number of digits, but at least one if exponent specified (0-9) -// What is returned is an indication of whether the number is negative, what -// the index of the decimal point in the string is and the list of digits -// without the decimal point. Note that OCI doesn't support more than 40 digits -// so if there are more than this amount an error is raised. OCI doesn't -// support larger than 1e126 so check for this value and raise a numeric -// overflow error if found. OCI also doesn't support smaller than 1E-130 so -// check for this value as well and if smaller than that value simply return -// zero. -//----------------------------------------------------------------------------- -int dpiUtils__parseNumberString(const char *value, uint32_t valueLength, - uint16_t charsetId, int *isNegative, int16_t *decimalPointIndex, - uint8_t *numDigits, uint8_t *digits, dpiError *error) -{ - char convertedValue[DPI_NUMBER_AS_TEXT_CHARS], exponentDigits[4]; - uint8_t numExponentDigits, digit; - uint32_t convertedValueLength; - uint16_t *utf16chars, i; - int exponentIsNegative; - const char *endValue; - int16_t exponent; - - // empty strings are not valid numbers - if (valueLength == 0) - return dpiError__set(error, "zero length", DPI_ERR_INVALID_NUMBER); - - // strings longer than the maximum length of a valid number are also - // excluded - if ((charsetId == DPI_CHARSET_ID_UTF16 && - valueLength > DPI_NUMBER_AS_TEXT_CHARS * 2) || - (charsetId != DPI_CHARSET_ID_UTF16 && - valueLength > DPI_NUMBER_AS_TEXT_CHARS)) - return dpiError__set(error, "check length", - DPI_ERR_NUMBER_STRING_TOO_LONG); - - // if value is encoded in UTF-16, convert to single byte encoding first - // check for values that cannot be encoded in a single byte and are - // obviously not part of a valid numeric string - // also verify maximum length of number - if (charsetId == DPI_CHARSET_ID_UTF16) { - utf16chars = (uint16_t*) value; - convertedValue[0] = '\0'; - convertedValueLength = valueLength / 2; - for (i = 0; i < convertedValueLength; i++) { - if (*utf16chars > 127) - return dpiError__set(error, "convert from UTF-16", - DPI_ERR_INVALID_NUMBER); - convertedValue[i] = (char) *utf16chars++; - } - value = convertedValue; - valueLength = convertedValueLength; - } - - // see if first character is a minus sign (number is negative) - endValue = value + valueLength; - *isNegative = (*value == '-'); - if (*isNegative) - value++; - - // scan for digits until the decimal point or exponent indicator is found - *numDigits = 0; - while (value < endValue) { - if (*value == '.' || *value == 'e' || *value == 'E') - break; - if (*value < '0' || *value > '9') - return dpiError__set(error, "check digits before decimal point", - DPI_ERR_INVALID_NUMBER); - digit = (uint8_t) (*value++ - '0'); - if (digit == 0 && *numDigits == 0) - continue; - *digits++ = digit; - (*numDigits)++; - } - *decimalPointIndex = *numDigits; - - // scan for digits following the decimal point, if applicable - if (value < endValue && *value == '.') { - value++; - while (value < endValue) { - if (*value == 'e' || *value == 'E') - break; - if (*value < '0' || *value > '9') - return dpiError__set(error, "check digits after decimal point", - DPI_ERR_INVALID_NUMBER); - digit = (uint8_t) (*value++ - '0'); - if (digit == 0 && *numDigits == 0) { - (*decimalPointIndex)--; - continue; - } - *digits++ = digit; - (*numDigits)++; - } - } - - // handle exponent, if applicable - if (value < endValue && (*value == 'e' || *value == 'E')) { - value++; - exponentIsNegative = 0; - numExponentDigits = 0; - if (value < endValue && (*value == '+' || *value == '-')) { - exponentIsNegative = (*value == '-'); - value++; - } - while (value < endValue) { - if (*value < '0' || *value > '9') - return dpiError__set(error, "check digits in exponent", - DPI_ERR_INVALID_NUMBER); - if (numExponentDigits == 3) - return dpiError__set(error, "check exponent digits > 3", - DPI_ERR_NOT_SUPPORTED); - exponentDigits[numExponentDigits] = *value++; - numExponentDigits++; - } - if (numExponentDigits == 0) - return dpiError__set(error, "no digits in exponent", - DPI_ERR_INVALID_NUMBER); - exponentDigits[numExponentDigits] = '\0'; - exponent = (int16_t) strtol(exponentDigits, NULL, 10); - if (exponentIsNegative) - exponent = -exponent; - *decimalPointIndex += exponent; - } - - // if there is anything left in the string, that indicates an invalid - // number as well - if (value < endValue) - return dpiError__set(error, "check string used", - DPI_ERR_INVALID_NUMBER); - - // strip trailing zeroes - digits--; - while (*numDigits > 0 && *digits-- == 0) - (*numDigits)--; - - // values must be less than 1e126 and greater than 1e-129; the number of - // digits also cannot exceed the maximum precision of Oracle numbers - if (*numDigits > DPI_NUMBER_MAX_DIGITS || *decimalPointIndex > 126 || - *decimalPointIndex < -129) { - return dpiError__set(error, "check value can be represented", - DPI_ERR_NUMBER_NO_REPR); - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiUtils__parseOracleNumber() [INTERNAL] -// Parse the contents of an Oracle number and return its constituent parts -// so that a string can be generated from it easily. -//----------------------------------------------------------------------------- -int dpiUtils__parseOracleNumber(void *oracleValue, int *isNegative, - int16_t *decimalPointIndex, uint8_t *numDigits, uint8_t *digits, - dpiError *error) -{ - uint8_t *source, length, i, byte, digit; - int8_t ociExponent; - - // the first byte of the structure is a length byte which includes the - // exponent and the mantissa bytes - source = (uint8_t*) oracleValue; - length = *source++ - 1; - - // a mantissa length longer than 20 signals corruption of some kind - if (length > 20) - return dpiError__set(error, "check mantissa length", - DPI_ERR_INVALID_OCI_NUMBER); - - // the second byte of the structure is the exponent - // positive numbers have the highest order bit set whereas negative numbers - // have the highest order bit cleared and the bits inverted - ociExponent = (int8_t) *source++; - *isNegative = (ociExponent & 0x80) ? 0 : 1; - if (*isNegative) - ociExponent = ~ociExponent; - ociExponent -= 193; - *decimalPointIndex = ociExponent * 2 + 2; - - // a mantissa length of 0 implies a value of 0 (if positive) - // or -1e126 (if negative) - if (length == 0) { - if (*isNegative) { - *digits = 1; - *decimalPointIndex = 127; - } - else { - *decimalPointIndex = 1; - *digits = 0; - } - *numDigits = 1; - return DPI_SUCCESS; - } - - // check for the trailing 102 byte for negative numbers and if present, - // reduce the number of mantissa digits - if (*isNegative && source[length - 1] == 102) - length--; - - // process the mantissa which are the remaining bytes - // each mantissa byte is a base-100 digit - *numDigits = length * 2; - for (i = 0; i < length; i++) { - byte = *source++; - - // positive numbers have 1 added to them; negative numbers are - // subtracted from the value 101 - if (*isNegative) - byte = 101 - byte; - else byte--; - - // process the first digit; leading zeroes are ignored - digit = (uint8_t) (byte / 10); - if (digit == 0 && i == 0) { - (*numDigits)--; - (*decimalPointIndex)--; - } else if (digit == 10) { - (*numDigits)++; - (*decimalPointIndex)++; - *digits++ = 1; - *digits++ = 0; - } else *digits++ = digit; - - // process the second digit; trailing zeroes are ignored - digit = byte % 10; - if (digit == 0 && i == length - 1) - (*numDigits)--; - else *digits++ = digit; - - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiUtils__setAttributesFromCommonCreateParams() [INTERNAL] -// Set the attributes on the authorization info structure or session handle -// using the specified parameters. -//----------------------------------------------------------------------------- -int dpiUtils__setAttributesFromCommonCreateParams(void *handle, - uint32_t handleType, const dpiCommonCreateParams *params, - dpiError *error) -{ - uint32_t driverNameLength; - const char *driverName; - - if (params->driverName && params->driverNameLength > 0) { - driverName = params->driverName; - driverNameLength = params->driverNameLength; - } else { - driverName = DPI_DEFAULT_DRIVER_NAME; - driverNameLength = (uint32_t) strlen(driverName); - } - if (driverName && driverNameLength > 0 && dpiOci__attrSet(handle, - handleType, (void*) driverName, driverNameLength, - DPI_OCI_ATTR_DRIVER_NAME, "set driver name", error) < 0) - return DPI_FAILURE; - if (params->edition && params->editionLength > 0 && - dpiOci__attrSet(handle, handleType, - (void*) params->edition, params->editionLength, - DPI_OCI_ATTR_EDITION, "set edition", error) < 0) - return DPI_FAILURE; - - return DPI_SUCCESS; -} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiVar.c b/vendor/github.com/godror/godror/odpi/src/dpiVar.c deleted file mode 100644 index d8cde787c64..00000000000 --- a/vendor/github.com/godror/godror/odpi/src/dpiVar.c +++ /dev/null @@ -1,1813 +0,0 @@ -//----------------------------------------------------------------------------- -// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. -// This program is free software: you can modify it and/or redistribute it -// under the terms of: -// -// (i) the Universal Permissive License v 1.0 or at your option, any -// later version (http://oss.oracle.com/licenses/upl); and/or -// -// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) -//----------------------------------------------------------------------------- - -//----------------------------------------------------------------------------- -// dpiVar.c -// Implementation of variables. -//----------------------------------------------------------------------------- - -#include "dpiImpl.h" - -// forward declarations of internal functions only used in this file -static int dpiVar__initBuffer(dpiVar *var, dpiVarBuffer *buffer, - dpiError *error); -static int dpiVar__setBytesFromDynamicBytes(dpiBytes *bytes, - dpiDynamicBytes *dynBytes, dpiError *error); -static int dpiVar__setBytesFromLob(dpiBytes *bytes, dpiDynamicBytes *dynBytes, - dpiLob *lob, dpiError *error); -static int dpiVar__setFromBytes(dpiVar *var, uint32_t pos, const char *value, - uint32_t valueLength, dpiError *error); -static int dpiVar__setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob, - dpiError *error); -static int dpiVar__setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj, - dpiError *error); -static int dpiVar__setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid, - dpiError *error); -static int dpiVar__setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt, - dpiError *error); -static int dpiVar__validateTypes(const dpiOracleType *oracleType, - dpiNativeTypeNum nativeTypeNum, dpiError *error); - - -//----------------------------------------------------------------------------- -// dpiVar__allocate() [INTERNAL] -// Create a new variable object and return it. In case of error NULL is -// returned. -//----------------------------------------------------------------------------- -int dpiVar__allocate(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, - dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, - int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, - dpiData **data, dpiError *error) -{ - const dpiOracleType *type; - uint32_t sizeInBytes; - dpiVar *tempVar; - - // validate arguments - *var = NULL; - type = dpiOracleType__getFromNum(oracleTypeNum, error); - if (!type) - return DPI_FAILURE; - if (maxArraySize == 0) - return dpiError__set(error, "check max array size", - DPI_ERR_ARRAY_SIZE_ZERO); - if (isArray && !type->canBeInArray) - return dpiError__set(error, "check can be in array", - DPI_ERR_NOT_SUPPORTED); - if (oracleTypeNum == DPI_ORACLE_TYPE_BOOLEAN && - dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 1, - error) < 0) - return DPI_FAILURE; - if (nativeTypeNum != type->defaultNativeTypeNum) { - if (dpiVar__validateTypes(type, nativeTypeNum, error) < 0) - return DPI_FAILURE; - } - - // calculate size in bytes - if (size == 0) - size = 1; - if (type->sizeInBytes) - sizeInBytes = type->sizeInBytes; - else if (sizeIsBytes || !type->isCharacterData) - sizeInBytes = size; - else if (type->charsetForm == DPI_SQLCS_IMPLICIT) - sizeInBytes = size * conn->env->maxBytesPerCharacter; - else sizeInBytes = size * conn->env->nmaxBytesPerCharacter; - - // allocate memory for variable type - if (dpiGen__allocate(DPI_HTYPE_VAR, conn->env, (void**) &tempVar, - error) < 0) - return DPI_FAILURE; - - // basic initialization - tempVar->buffer.maxArraySize = maxArraySize; - if (!isArray) - tempVar->buffer.actualArraySize = maxArraySize; - tempVar->sizeInBytes = sizeInBytes; - if (sizeInBytes > DPI_MAX_BASIC_BUFFER_SIZE) { - tempVar->sizeInBytes = 0; - tempVar->isDynamic = 1; - tempVar->requiresPreFetch = 1; - } - tempVar->type = type; - tempVar->nativeTypeNum = nativeTypeNum; - tempVar->isArray = isArray; - dpiGen__setRefCount(conn, error, 1); - tempVar->conn = conn; - if (objType) { - if (dpiGen__checkHandle(objType, DPI_HTYPE_OBJECT_TYPE, - "check object type", error) < 0) { - dpiVar__free(tempVar, error); - return DPI_FAILURE; - } - dpiGen__setRefCount(objType, error, 1); - tempVar->objectType = objType; - } - - // allocate the data for the variable - if (dpiVar__initBuffer(tempVar, &tempVar->buffer, error) < 0) { - dpiVar__free(tempVar, error); - return DPI_FAILURE; - } - - *var = tempVar; - *data = tempVar->buffer.externalData; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__allocateChunks() [INTERNAL] -// Allocate more chunks for handling dynamic bytes. -//----------------------------------------------------------------------------- -static int dpiVar__allocateChunks(dpiDynamicBytes *dynBytes, dpiError *error) -{ - dpiDynamicBytesChunk *chunks; - uint32_t allocatedChunks; - - allocatedChunks = dynBytes->allocatedChunks + 8; - if (dpiUtils__allocateMemory(allocatedChunks, sizeof(dpiDynamicBytesChunk), - 1, "allocate chunks", (void**) &chunks, error) < 0) - return DPI_FAILURE; - if (dynBytes->chunks) { - memcpy(chunks, dynBytes->chunks, - dynBytes->numChunks * sizeof(dpiDynamicBytesChunk)); - dpiUtils__freeMemory(dynBytes->chunks); - } - dynBytes->chunks = chunks; - dynBytes->allocatedChunks = allocatedChunks; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__allocateDynamicBytes() [INTERNAL] -// Allocate space in the dynamic bytes structure for the specified number of -// bytes. When complete, there will be exactly one allocated chunk of the -// specified size or greater in the dynamic bytes structure. -//----------------------------------------------------------------------------- -static int dpiVar__allocateDynamicBytes(dpiDynamicBytes *dynBytes, - uint32_t size, dpiError *error) -{ - // if an error occurs, none of the original space is valid - dynBytes->numChunks = 0; - - // if there are no chunks at all, make sure some exist - if (dynBytes->allocatedChunks == 0 && - dpiVar__allocateChunks(dynBytes, error) < 0) - return DPI_FAILURE; - - // at this point there should be 0 or 1 chunks as any retrieval that - // resulted in multiple chunks would have been consolidated already - // make sure that chunk has enough space in it - if (size > dynBytes->chunks->allocatedLength) { - if (dynBytes->chunks->ptr) - dpiUtils__freeMemory(dynBytes->chunks->ptr); - dynBytes->chunks->allocatedLength = - (size + DPI_DYNAMIC_BYTES_CHUNK_SIZE - 1) & - ~(DPI_DYNAMIC_BYTES_CHUNK_SIZE - 1); - if (dpiUtils__allocateMemory(1, dynBytes->chunks->allocatedLength, 0, - "allocate chunk", (void**) &dynBytes->chunks->ptr, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__assignCallbackBuffer() [INTERNAL] -// Assign callback pointers during OCI statement execution. This is used with -// the callack functions used for dynamic binding during DML returning -// statement execution. -//----------------------------------------------------------------------------- -static void dpiVar__assignCallbackBuffer(dpiVar *var, dpiVarBuffer *buffer, - uint32_t index, void **bufpp) -{ - switch (var->type->oracleTypeNum) { - case DPI_ORACLE_TYPE_TIMESTAMP: - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - *bufpp = buffer->data.asTimestamp[index]; - break; - case DPI_ORACLE_TYPE_INTERVAL_DS: - case DPI_ORACLE_TYPE_INTERVAL_YM: - *bufpp = buffer->data.asInterval[index]; - break; - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_NCLOB: - case DPI_ORACLE_TYPE_BFILE: - *bufpp = buffer->data.asLobLocator[index]; - break; - case DPI_ORACLE_TYPE_ROWID: - *bufpp = buffer->data.asRowid[index]; - break; - case DPI_ORACLE_TYPE_STMT: - *bufpp = buffer->data.asStmt[index]; - break; - default: - *bufpp = buffer->data.asBytes + index * var->sizeInBytes; - break; - } -} - - -//----------------------------------------------------------------------------- -// dpiVar__checkArraySize() [INTERNAL] -// Verifies that the array size has not been exceeded. -//----------------------------------------------------------------------------- -static int dpiVar__checkArraySize(dpiVar *var, uint32_t pos, - const char *fnName, dpiError *error) -{ - if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, fnName, error) < 0) - return DPI_FAILURE; - if (pos >= var->buffer.maxArraySize) - return dpiError__set(error, "check array size", - DPI_ERR_INVALID_ARRAY_POSITION, pos, - var->buffer.maxArraySize); - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__convertToLob() [INTERNAL] -// Convert the variable from using dynamic bytes for a long string to using a -// LOB instead. This is needed for PL/SQL which cannot handle more than 32K -// without the use of a LOB. -//----------------------------------------------------------------------------- -int dpiVar__convertToLob(dpiVar *var, dpiError *error) -{ - dpiDynamicBytes *dynBytes; - dpiLob *lob; - uint32_t i; - - // change type based on the original Oracle type - if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_RAW || - var->type->oracleTypeNum == DPI_ORACLE_TYPE_LONG_RAW) - var->type = dpiOracleType__getFromNum(DPI_ORACLE_TYPE_BLOB, error); - else if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_NCHAR) - var->type = dpiOracleType__getFromNum(DPI_ORACLE_TYPE_NCLOB, - error); - else var->type = dpiOracleType__getFromNum(DPI_ORACLE_TYPE_CLOB, - error); - - // adjust attributes and re-initialize buffers - // the dynamic bytes structures will not be removed - var->sizeInBytes = var->type->sizeInBytes; - var->isDynamic = 0; - if (dpiVar__initBuffer(var, &var->buffer, error) < 0) - return DPI_FAILURE; - - // copy any values already set - for (i = 0; i < var->buffer.maxArraySize; i++) { - dynBytes = &var->buffer.dynamicBytes[i]; - lob = var->buffer.references[i].asLOB; - if (dynBytes->numChunks == 0) - continue; - if (dpiLob__setFromBytes(lob, dynBytes->chunks->ptr, - dynBytes->chunks->length, error) < 0) - return DPI_FAILURE; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__copyData() [INTERNAL] -// Copy the data from the source to the target variable at the given array -// position. -//----------------------------------------------------------------------------- -int dpiVar__copyData(dpiVar *var, uint32_t pos, dpiData *sourceData, - dpiError *error) -{ - dpiData *targetData = &var->buffer.externalData[pos]; - - // handle null case - targetData->isNull = sourceData->isNull; - if (sourceData->isNull) - return DPI_SUCCESS; - - // handle copying of value from source to target - switch (var->nativeTypeNum) { - case DPI_NATIVE_TYPE_BYTES: - return dpiVar__setFromBytes(var, pos, - sourceData->value.asBytes.ptr, - sourceData->value.asBytes.length, error); - case DPI_NATIVE_TYPE_LOB: - return dpiVar__setFromLob(var, pos, sourceData->value.asLOB, - error); - case DPI_NATIVE_TYPE_OBJECT: - return dpiVar__setFromObject(var, pos, sourceData->value.asObject, - error); - case DPI_NATIVE_TYPE_STMT: - return dpiVar__setFromStmt(var, pos, sourceData->value.asStmt, - error); - case DPI_NATIVE_TYPE_ROWID: - return dpiVar__setFromRowid(var, pos, sourceData->value.asRowid, - error); - default: - memcpy(targetData, sourceData, sizeof(dpiData)); - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__defineCallback() [INTERNAL] -// Callback which runs during OCI statement execution and allocates the -// buffers required as well as provides that information to the OCI. This is -// intended for handling string and raw columns for which the size is unknown. -// These include LONG, LONG RAW and retrieving CLOB and BLOB as bytes, rather -// than use the LOB API. -//----------------------------------------------------------------------------- -int32_t dpiVar__defineCallback(dpiVar *var, UNUSED void *defnp, uint32_t iter, - void **bufpp, uint32_t **alenpp, UNUSED uint8_t *piecep, void **indpp, - uint16_t **rcodepp) -{ - dpiDynamicBytesChunk *chunk; - dpiDynamicBytes *bytes; - - // allocate more chunks, if necessary - bytes = &var->buffer.dynamicBytes[iter]; - if (bytes->numChunks == bytes->allocatedChunks && - dpiVar__allocateChunks(bytes, var->error) < 0) - return DPI_OCI_ERROR; - - // allocate memory for the chunk, if needed - chunk = &bytes->chunks[bytes->numChunks]; - if (!chunk->ptr) { - chunk->allocatedLength = DPI_DYNAMIC_BYTES_CHUNK_SIZE; - if (dpiUtils__allocateMemory(1, chunk->allocatedLength, 0, - "allocate chunk", (void**) &chunk->ptr, var->error) < 0) - return DPI_OCI_ERROR; - } - - // return chunk to OCI - bytes->numChunks++; - chunk->length = chunk->allocatedLength; - *bufpp = chunk->ptr; - *alenpp = &chunk->length; - *indpp = &(var->buffer.indicator[iter]); - *rcodepp = NULL; - return DPI_OCI_CONTINUE; -} - - -//----------------------------------------------------------------------------- -// dpiVar__extendedPreFetch() [INTERNAL] -// Perform any necessary actions prior to fetching data. -//----------------------------------------------------------------------------- -int dpiVar__extendedPreFetch(dpiVar *var, dpiVarBuffer *buffer, - dpiError *error) -{ - dpiRowid *rowid; - dpiData *data; - dpiStmt *stmt; - dpiLob *lob; - uint32_t i; - - if (var->isDynamic) { - for (i = 0; i < buffer->maxArraySize; i++) - buffer->dynamicBytes[i].numChunks = 0; - return DPI_SUCCESS; - } - - switch (var->type->oracleTypeNum) { - case DPI_ORACLE_TYPE_STMT: - for (i = 0; i < buffer->maxArraySize; i++) { - data = &buffer->externalData[i]; - if (buffer->references[i].asStmt) { - dpiGen__setRefCount(buffer->references[i].asStmt, - error, -1); - buffer->references[i].asStmt = NULL; - } - buffer->data.asStmt[i] = NULL; - data->value.asStmt = NULL; - if (dpiStmt__allocate(var->conn, 0, &stmt, error) < 0) - return DPI_FAILURE; - if (dpiOci__handleAlloc(var->env->handle, &stmt->handle, - DPI_OCI_HTYPE_STMT, "allocate statement", error) < 0) { - dpiStmt__free(stmt, error); - return DPI_FAILURE; - } - if (dpiHandleList__addHandle(var->conn->openStmts, stmt, - &stmt->openSlotNum, error) < 0) { - dpiOci__handleFree(stmt->handle, DPI_OCI_HTYPE_STMT); - stmt->handle = NULL; - dpiStmt__free(stmt, error); - return DPI_FAILURE; - } - buffer->references[i].asStmt = stmt; - stmt->isOwned = 1; - buffer->data.asStmt[i] = stmt->handle; - data->value.asStmt = stmt; - } - break; - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_NCLOB: - case DPI_ORACLE_TYPE_BFILE: - for (i = 0; i < buffer->maxArraySize; i++) { - data = &buffer->externalData[i]; - if (buffer->references[i].asLOB) { - dpiGen__setRefCount(buffer->references[i].asLOB, - error, -1); - buffer->references[i].asLOB = NULL; - } - buffer->data.asLobLocator[i] = NULL; - data->value.asLOB = NULL; - if (dpiLob__allocate(var->conn, var->type, &lob, error) < 0) - return DPI_FAILURE; - buffer->references[i].asLOB = lob; - buffer->data.asLobLocator[i] = lob->locator; - data->value.asLOB = lob; - if (buffer->dynamicBytes && - dpiOci__lobCreateTemporary(lob, error) < 0) - return DPI_FAILURE; - } - break; - case DPI_ORACLE_TYPE_ROWID: - for (i = 0; i < buffer->maxArraySize; i++) { - data = &buffer->externalData[i]; - if (buffer->references[i].asRowid) { - dpiGen__setRefCount(buffer->references[i].asRowid, - error, -1); - buffer->references[i].asRowid = NULL; - } - buffer->data.asRowid[i] = NULL; - data->value.asRowid = NULL; - if (dpiRowid__allocate(var->conn, &rowid, error) < 0) - return DPI_FAILURE; - buffer->references[i].asRowid = rowid; - buffer->data.asRowid[i] = rowid->handle; - data->value.asRowid = rowid; - } - break; - case DPI_ORACLE_TYPE_OBJECT: - for (i = 0; i < buffer->maxArraySize; i++) { - data = &buffer->externalData[i]; - if (buffer->references[i].asObject) { - dpiGen__setRefCount(buffer->references[i].asObject, - error, -1); - buffer->references[i].asObject = NULL; - } - buffer->data.asObject[i] = NULL; - buffer->objectIndicator[i] = NULL; - data->value.asObject = NULL; - } - break; - default: - break; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__finalizeBuffer() [INTERNAL] -// Finalize buffer used for passing data to/from Oracle. -//----------------------------------------------------------------------------- -static void dpiVar__finalizeBuffer(dpiVar *var, dpiVarBuffer *buffer, - dpiError *error) -{ - dpiDynamicBytes *dynBytes; - uint32_t i, j; - - // free any descriptors that were created - switch (var->type->oracleTypeNum) { - case DPI_ORACLE_TYPE_TIMESTAMP: - dpiOci__arrayDescriptorFree(&buffer->data.asTimestamp[0], - DPI_OCI_DTYPE_TIMESTAMP); - break; - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - dpiOci__arrayDescriptorFree(&buffer->data.asTimestamp[0], - DPI_OCI_DTYPE_TIMESTAMP_TZ); - break; - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - dpiOci__arrayDescriptorFree(&buffer->data.asTimestamp[0], - DPI_OCI_DTYPE_TIMESTAMP_LTZ); - break; - case DPI_ORACLE_TYPE_INTERVAL_DS: - dpiOci__arrayDescriptorFree(&buffer->data.asInterval[0], - DPI_OCI_DTYPE_INTERVAL_DS); - break; - case DPI_ORACLE_TYPE_INTERVAL_YM: - dpiOci__arrayDescriptorFree(&buffer->data.asInterval[0], - DPI_OCI_DTYPE_INTERVAL_YM); - break; - default: - break; - } - - // release any references that were created - if (buffer->references) { - for (i = 0; i < buffer->maxArraySize; i++) { - if (buffer->references[i].asHandle) { - dpiGen__setRefCount(buffer->references[i].asHandle, error, -1); - buffer->references[i].asHandle = NULL; - } - } - dpiUtils__freeMemory(buffer->references); - buffer->references = NULL; - } - - // free any dynamic buffers - if (buffer->dynamicBytes) { - for (i = 0; i < buffer->maxArraySize; i++) { - dynBytes = &buffer->dynamicBytes[i]; - if (dynBytes->allocatedChunks > 0) { - for (j = 0; j < dynBytes->allocatedChunks; j++) { - if (dynBytes->chunks[j].ptr) { - dpiUtils__freeMemory(dynBytes->chunks[j].ptr); - dynBytes->chunks[j].ptr = NULL; - } - } - dpiUtils__freeMemory(dynBytes->chunks); - dynBytes->allocatedChunks = 0; - dynBytes->chunks = NULL; - } - } - dpiUtils__freeMemory(buffer->dynamicBytes); - buffer->dynamicBytes = NULL; - } - - // free other memory allocated - if (buffer->indicator) { - dpiUtils__freeMemory(buffer->indicator); - buffer->indicator = NULL; - } - if (buffer->returnCode) { - dpiUtils__freeMemory(buffer->returnCode); - buffer->returnCode = NULL; - } - if (buffer->actualLength16) { - dpiUtils__freeMemory(buffer->actualLength16); - buffer->actualLength16 = NULL; - } - if (buffer->actualLength32) { - dpiUtils__freeMemory(buffer->actualLength32); - buffer->actualLength32 = NULL; - } - if (buffer->externalData) { - dpiUtils__freeMemory(buffer->externalData); - buffer->externalData = NULL; - } - if (buffer->data.asRaw) { - dpiUtils__freeMemory(buffer->data.asRaw); - buffer->data.asRaw = NULL; - } - if (buffer->objectIndicator) { - dpiUtils__freeMemory(buffer->objectIndicator); - buffer->objectIndicator = NULL; - } - if (buffer->tempBuffer) { - dpiUtils__freeMemory(buffer->tempBuffer); - buffer->tempBuffer = NULL; - } -} - - -//----------------------------------------------------------------------------- -// dpiVar__free() [INTERNAL] -// Free the memory associated with the variable. -//----------------------------------------------------------------------------- -void dpiVar__free(dpiVar *var, dpiError *error) -{ - uint32_t i; - - dpiVar__finalizeBuffer(var, &var->buffer, error); - if (var->dynBindBuffers) { - for (i = 0; i < var->buffer.maxArraySize; i++) - dpiVar__finalizeBuffer(var, &var->dynBindBuffers[i], error); - dpiUtils__freeMemory(var->dynBindBuffers); - var->dynBindBuffers = NULL; - } - if (var->objectType) { - dpiGen__setRefCount(var->objectType, error, -1); - var->objectType = NULL; - } - if (var->conn) { - dpiGen__setRefCount(var->conn, error, -1); - var->conn = NULL; - } - dpiUtils__freeMemory(var); -} - - -//----------------------------------------------------------------------------- -// dpiVar__getValue() [PRIVATE] -// Returns the contents of the variable in the type specified, if possible. -//----------------------------------------------------------------------------- -int dpiVar__getValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, - int inFetch, dpiError *error) -{ - dpiOracleTypeNum oracleTypeNum; - dpiBytes *bytes; - dpiData *data; - uint32_t i; - - // check for dynamic binds first; if they exist, process them instead - if (var->dynBindBuffers && buffer == &var->buffer) { - buffer = &var->dynBindBuffers[pos]; - for (i = 0; i < buffer->maxArraySize; i++) { - if (dpiVar__getValue(var, buffer, i, inFetch, error) < 0) - return DPI_FAILURE; - } - return DPI_SUCCESS; - } - - // check for a NULL value; for objects the indicator is elsewhere - data = &buffer->externalData[pos]; - if (!buffer->objectIndicator) - data->isNull = (buffer->indicator[pos] == DPI_OCI_IND_NULL); - else if (buffer->objectIndicator[pos]) - data->isNull = (*((int16_t*) buffer->objectIndicator[pos]) == - DPI_OCI_IND_NULL); - else data->isNull = 1; - if (data->isNull) { - if (inFetch && var->objectType && var->objectType->isCollection) { - if (dpiOci__objectFree(var->env->handle, - buffer->data.asObject[pos], 1, error) < 0) - return DPI_FAILURE; - if (dpiOci__objectFree(var->env->handle, - buffer->objectIndicator[pos], 1, error) < 0) - return DPI_FAILURE; - } - return DPI_SUCCESS; - } - - // check return code for variable length data - if (buffer->returnCode) { - if (buffer->returnCode[pos] != 0) { - dpiError__set(error, "check return code", DPI_ERR_COLUMN_FETCH, - pos, buffer->returnCode[pos]); - error->buffer->code = buffer->returnCode[pos]; - return DPI_FAILURE; - } - } - - // for 11g, dynamic lengths are 32-bit whereas static lengths are 16-bit - if (buffer->actualLength16 && buffer->actualLength32) - buffer->actualLength16[pos] = (uint16_t) buffer->actualLength32[pos]; - - // transform the various types - oracleTypeNum = var->type->oracleTypeNum; - switch (var->nativeTypeNum) { - case DPI_NATIVE_TYPE_INT64: - case DPI_NATIVE_TYPE_UINT64: - switch (oracleTypeNum) { - case DPI_ORACLE_TYPE_NATIVE_INT: - data->value.asInt64 = buffer->data.asInt64[pos]; - return DPI_SUCCESS; - case DPI_ORACLE_TYPE_NATIVE_UINT: - data->value.asUint64 = buffer->data.asUint64[pos]; - return DPI_SUCCESS; - case DPI_ORACLE_TYPE_NUMBER: - if (var->nativeTypeNum == DPI_NATIVE_TYPE_INT64) - return dpiDataBuffer__fromOracleNumberAsInteger( - &data->value, error, - &buffer->data.asNumber[pos]); - return dpiDataBuffer__fromOracleNumberAsUnsignedInteger( - &data->value, error, &buffer->data.asNumber[pos]); - default: - break; - } - break; - case DPI_NATIVE_TYPE_DOUBLE: - switch (oracleTypeNum) { - case DPI_ORACLE_TYPE_NUMBER: - return dpiDataBuffer__fromOracleNumberAsDouble( - &data->value, error, &buffer->data.asNumber[pos]); - case DPI_ORACLE_TYPE_NATIVE_DOUBLE: - data->value.asDouble = buffer->data.asDouble[pos]; - return DPI_SUCCESS; - case DPI_ORACLE_TYPE_TIMESTAMP: - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - return dpiDataBuffer__fromOracleTimestampAsDouble( - &data->value, var->env, error, - buffer->data.asTimestamp[pos]); - default: - break; - } - break; - case DPI_NATIVE_TYPE_BYTES: - bytes = &data->value.asBytes; - switch (oracleTypeNum) { - case DPI_ORACLE_TYPE_VARCHAR: - case DPI_ORACLE_TYPE_NVARCHAR: - case DPI_ORACLE_TYPE_CHAR: - case DPI_ORACLE_TYPE_NCHAR: - case DPI_ORACLE_TYPE_ROWID: - case DPI_ORACLE_TYPE_RAW: - case DPI_ORACLE_TYPE_LONG_VARCHAR: - case DPI_ORACLE_TYPE_LONG_RAW: - if (buffer->dynamicBytes) - return dpiVar__setBytesFromDynamicBytes(bytes, - &buffer->dynamicBytes[pos], error); - if (buffer->actualLength16) - bytes->length = buffer->actualLength16[pos]; - else bytes->length = buffer->actualLength32[pos]; - return DPI_SUCCESS; - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_NCLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_BFILE: - return dpiVar__setBytesFromLob(bytes, - &buffer->dynamicBytes[pos], - buffer->references[pos].asLOB, error); - case DPI_ORACLE_TYPE_NUMBER: - bytes->length = DPI_NUMBER_AS_TEXT_CHARS; - if (var->env->charsetId == DPI_CHARSET_ID_UTF16) - bytes->length *= 2; - return dpiDataBuffer__fromOracleNumberAsText(&data->value, - var->env, error, &buffer->data.asNumber[pos]); - default: - break; - } - break; - case DPI_NATIVE_TYPE_FLOAT: - data->value.asFloat = buffer->data.asFloat[pos]; - break; - case DPI_NATIVE_TYPE_TIMESTAMP: - if (oracleTypeNum == DPI_ORACLE_TYPE_DATE) - return dpiDataBuffer__fromOracleDate(&data->value, - &buffer->data.asDate[pos]); - return dpiDataBuffer__fromOracleTimestamp(&data->value, var->env, - error, buffer->data.asTimestamp[pos], - oracleTypeNum != DPI_ORACLE_TYPE_TIMESTAMP); - break; - case DPI_NATIVE_TYPE_INTERVAL_DS: - return dpiDataBuffer__fromOracleIntervalDS(&data->value, var->env, - error, buffer->data.asInterval[pos]); - case DPI_NATIVE_TYPE_INTERVAL_YM: - return dpiDataBuffer__fromOracleIntervalYM(&data->value, var->env, - error, buffer->data.asInterval[pos]); - case DPI_NATIVE_TYPE_OBJECT: - data->value.asObject = NULL; - if (!buffer->references[pos].asObject) { - if (dpiObject__allocate(var->objectType, - buffer->data.asObject[pos], - buffer->objectIndicator[pos], NULL, - &buffer->references[pos].asObject, error) < 0) - return DPI_FAILURE; - if (inFetch && var->objectType->isCollection) - buffer->references[pos].asObject->freeIndicator = 1; - } - data->value.asObject = buffer->references[pos].asObject; - break; - case DPI_NATIVE_TYPE_STMT: - data->value.asStmt = buffer->references[pos].asStmt; - break; - case DPI_NATIVE_TYPE_BOOLEAN: - data->value.asBoolean = buffer->data.asBoolean[pos]; - break; - default: - break; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__inBindCallback() [INTERNAL] -// Callback which runs during OCI statement execution and provides buffers to -// OCI for binding data IN. This is not used with DML returning so this method -// does nothing useful except satisfy OCI requirements. -//----------------------------------------------------------------------------- -int32_t dpiVar__inBindCallback(dpiVar *var, UNUSED void *bindp, - UNUSED uint32_t iter, UNUSED uint32_t index, void **bufpp, - uint32_t *alenp, uint8_t *piecep, void **indpp) -{ - dpiDynamicBytes *dynBytes; - - if (var->isDynamic) { - dynBytes = &var->buffer.dynamicBytes[iter]; - if (dynBytes->allocatedChunks == 0) { - *bufpp = NULL; - *alenp = 0; - } else { - *bufpp = dynBytes->chunks->ptr; - *alenp = dynBytes->chunks->length; - } - } else { - dpiVar__assignCallbackBuffer(var, &var->buffer, iter, bufpp); - if (var->buffer.actualLength16) - *alenp = var->buffer.actualLength16[iter]; - else if (var->buffer.actualLength32) - *alenp = var->buffer.actualLength32[iter]; - else *alenp = var->type->sizeInBytes; - } - *piecep = DPI_OCI_ONE_PIECE; - if (var->buffer.objectIndicator) - *indpp = var->buffer.objectIndicator[iter]; - else *indpp = &var->buffer.indicator[iter]; - return DPI_OCI_CONTINUE; -} - - -//----------------------------------------------------------------------------- -// dpiVar__initBuffer() [INTERNAL] -// Initialize buffers necessary for passing data to/from Oracle. -//----------------------------------------------------------------------------- -static int dpiVar__initBuffer(dpiVar *var, dpiVarBuffer *buffer, - dpiError *error) -{ - uint32_t i, tempBufferSize = 0; - unsigned long long dataLength; - dpiBytes *bytes; - - // initialize dynamic buffers for dynamic variables - if (var->isDynamic) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, - sizeof(dpiDynamicBytes), 1, "allocate dynamic bytes", - (void**) &buffer->dynamicBytes, error) < 0) - return DPI_FAILURE; - - // for all other variables, validate length and allocate buffers - } else { - dataLength = (unsigned long long) buffer->maxArraySize * - (unsigned long long) var->sizeInBytes; - if (dataLength > INT_MAX) - return dpiError__set(error, "check max array size", - DPI_ERR_ARRAY_SIZE_TOO_BIG, buffer->maxArraySize); - if (dpiUtils__allocateMemory(1, (size_t) dataLength, 0, - "allocate buffer", (void**) &buffer->data.asRaw, error) < 0) - return DPI_FAILURE; - } - - // allocate the indicator for the variable - // ensure all values start out as null - if (!buffer->indicator) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(int16_t), 0, - "allocate indicator", (void**) &buffer->indicator, error) < 0) - return DPI_FAILURE; - for (i = 0; i < buffer->maxArraySize; i++) - buffer->indicator[i] = DPI_OCI_IND_NULL; - } - - // allocate the actual length buffers for all but dynamic bytes which are - // handled differently; ensure actual length starts out as maximum value - if (!var->isDynamic && !buffer->actualLength16 && - !buffer->actualLength32) { - if (var->env->versionInfo->versionNum < 12 && buffer == &var->buffer) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, - sizeof(uint16_t), 0, "allocate actual length", - (void**) &buffer->actualLength16, error) < 0) - return DPI_FAILURE; - for (i = 0; i < buffer->maxArraySize; i++) - buffer->actualLength16[i] = (uint16_t) var->sizeInBytes; - } else { - if (dpiUtils__allocateMemory(buffer->maxArraySize, - sizeof(uint32_t), 0, "allocate actual length", - (void**) &buffer->actualLength32, error) < 0) - return DPI_FAILURE; - for (i = 0; i < buffer->maxArraySize; i++) - buffer->actualLength32[i] = var->sizeInBytes; - } - } - - // for variable length data, also allocate the return code array - if (var->type->defaultNativeTypeNum == DPI_NATIVE_TYPE_BYTES && - !var->isDynamic && !buffer->returnCode) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(uint16_t), 0, - "allocate return code", (void**) &buffer->returnCode, - error) < 0) - return DPI_FAILURE; - } - - // for numbers transferred to/from Oracle as bytes, allocate an additional - // set of buffers - if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_NUMBER && - var->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - tempBufferSize = DPI_NUMBER_AS_TEXT_CHARS; - if (var->env->charsetId == DPI_CHARSET_ID_UTF16) - tempBufferSize *= 2; - if (!buffer->tempBuffer) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, tempBufferSize, - 0, "allocate temp buffer", (void**) &buffer->tempBuffer, - error) < 0) - return DPI_FAILURE; - } - } - - // allocate the external data array, if needed - if (!buffer->externalData) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(dpiData), 1, - "allocate external data", (void**) &buffer->externalData, - error) < 0) - return DPI_FAILURE; - for (i = 0; i < buffer->maxArraySize; i++) - buffer->externalData[i].isNull = 1; - } - - // for bytes transfers, set encoding and pointers for small strings - if (var->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { - for (i = 0; i < buffer->maxArraySize; i++) { - bytes = &buffer->externalData[i].value.asBytes; - if (var->type->charsetForm == DPI_SQLCS_IMPLICIT) - bytes->encoding = var->env->encoding; - else bytes->encoding = var->env->nencoding; - if (buffer->tempBuffer) - bytes->ptr = buffer->tempBuffer + i * tempBufferSize; - else if (!var->isDynamic && !buffer->dynamicBytes) - bytes->ptr = buffer->data.asBytes + i * var->sizeInBytes; - } - } - - // create array of references, if applicable - if (var->type->requiresPreFetch && !var->isDynamic) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, - sizeof(dpiReferenceBuffer), 1, "allocate references", - (void**) &buffer->references, error) < 0) - return DPI_FAILURE; - } - - // perform variable specific initialization - switch (var->type->oracleTypeNum) { - case DPI_ORACLE_TYPE_TIMESTAMP: - return dpiOci__arrayDescriptorAlloc(var->env->handle, - &buffer->data.asTimestamp[0], DPI_OCI_DTYPE_TIMESTAMP, - buffer->maxArraySize, error); - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - return dpiOci__arrayDescriptorAlloc(var->env->handle, - &buffer->data.asTimestamp[0], DPI_OCI_DTYPE_TIMESTAMP_TZ, - buffer->maxArraySize, error); - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - return dpiOci__arrayDescriptorAlloc(var->env->handle, - &buffer->data.asTimestamp[0], DPI_OCI_DTYPE_TIMESTAMP_LTZ, - buffer->maxArraySize, error); - case DPI_ORACLE_TYPE_INTERVAL_DS: - return dpiOci__arrayDescriptorAlloc(var->env->handle, - &buffer->data.asInterval[0], DPI_OCI_DTYPE_INTERVAL_DS, - buffer->maxArraySize, error); - case DPI_ORACLE_TYPE_INTERVAL_YM: - return dpiOci__arrayDescriptorAlloc(var->env->handle, - &buffer->data.asInterval[0], DPI_OCI_DTYPE_INTERVAL_YM, - buffer->maxArraySize, error); - break; - case DPI_ORACLE_TYPE_CLOB: - case DPI_ORACLE_TYPE_BLOB: - case DPI_ORACLE_TYPE_NCLOB: - case DPI_ORACLE_TYPE_BFILE: - case DPI_ORACLE_TYPE_STMT: - case DPI_ORACLE_TYPE_ROWID: - return dpiVar__extendedPreFetch(var, buffer, error); - case DPI_ORACLE_TYPE_OBJECT: - if (!var->objectType) - return dpiError__set(error, "check object type", - DPI_ERR_NO_OBJECT_TYPE); - if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(void*), - 0, "allocate object indicator", - (void**) &buffer->objectIndicator, error) < 0) - return DPI_FAILURE; - return dpiVar__extendedPreFetch(var, buffer, error); - default: - break; - } - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__outBindCallback() [INTERNAL] -// Callback which runs during OCI statement execution and allocates the -// buffers required as well as provides that information to the OCI. This is -// intended for use with DML returning only. -//----------------------------------------------------------------------------- -int32_t dpiVar__outBindCallback(dpiVar *var, void *bindp, UNUSED uint32_t iter, - uint32_t index, void **bufpp, uint32_t **alenpp, uint8_t *piecep, - void **indpp, uint16_t **rcodepp) -{ - dpiDynamicBytesChunk *chunk; - uint32_t numRowsReturned; - dpiDynamicBytes *bytes; - dpiVarBuffer *buffer; - - // determine which variable buffer to use - if (!var->dynBindBuffers) { - if (dpiUtils__allocateMemory(var->buffer.maxArraySize, - sizeof(dpiVarBuffer), 1, "allocate DML returning buffers", - (void**) &var->dynBindBuffers, var->error) < 0) - return DPI_FAILURE; - } - buffer = &var->dynBindBuffers[iter]; - - // special processing during first value returned for each iteration - if (index == 0) { - - // determine number of rows returned - if (dpiOci__attrGet(bindp, DPI_OCI_HTYPE_BIND, &numRowsReturned, 0, - DPI_OCI_ATTR_ROWS_RETURNED, "get rows returned", - var->error) < 0) - return DPI_OCI_ERROR; - - // reallocate buffers, if needed - if (numRowsReturned > buffer->maxArraySize) { - dpiVar__finalizeBuffer(var, buffer, var->error); - buffer->maxArraySize = numRowsReturned; - if (dpiVar__initBuffer(var, buffer, var->error) < 0) - return DPI_OCI_ERROR; - } - - // set actual array size to number of rows returned - buffer->actualArraySize = numRowsReturned; - - } - - // handle dynamically allocated strings (multiple piece) - // index is the current index into the chunks - if (var->isDynamic) { - - // allocate more chunks, if necessary - bytes = &buffer->dynamicBytes[index]; - if (*piecep == DPI_OCI_ONE_PIECE) - bytes->numChunks = 0; - if (bytes->numChunks == bytes->allocatedChunks && - dpiVar__allocateChunks(bytes, var->error) < 0) - return DPI_OCI_ERROR; - - // allocate memory for the chunk, if needed - chunk = &bytes->chunks[bytes->numChunks]; - if (!chunk->ptr) { - chunk->allocatedLength = DPI_DYNAMIC_BYTES_CHUNK_SIZE; - if (dpiUtils__allocateMemory(1, chunk->allocatedLength, 0, - "allocate chunk", (void**) &chunk->ptr, var->error) < 0) - return DPI_OCI_ERROR; - } - - // return chunk to OCI - bytes->numChunks++; - chunk->length = chunk->allocatedLength; - *bufpp = chunk->ptr; - *alenpp = &chunk->length; - *indpp = &(buffer->indicator[index]); - *rcodepp = NULL; - - // handle normally allocated variables (one piece) - } else { - - *piecep = DPI_OCI_ONE_PIECE; - if (dpiVar__setValue(var, buffer, index, &buffer->externalData[index], - var->error) < 0) - return DPI_OCI_ERROR; - dpiVar__assignCallbackBuffer(var, buffer, index, bufpp); - if (buffer->actualLength32 || buffer->actualLength16) { - if (!buffer->actualLength32) { - if (dpiUtils__allocateMemory(buffer->maxArraySize, - sizeof(uint32_t), 1, "allocate 11g lengths", - (void**) &buffer->actualLength32, var->error) < 0) - return DPI_OCI_ERROR; - } - buffer->actualLength32[index] = var->sizeInBytes; - *alenpp = &(buffer->actualLength32[index]); - } else if (*alenpp && var->type->sizeInBytes) - **alenpp = var->type->sizeInBytes; - if (buffer->objectIndicator) - *indpp = buffer->objectIndicator[index]; - else *indpp = &(buffer->indicator[index]); - if (buffer->returnCode) - *rcodepp = &buffer->returnCode[index]; - - } - - return DPI_OCI_CONTINUE; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setBytesFromDynamicBytes() [PRIVATE] -// Set the pointer and length in the dpiBytes structure to the values -// retrieved from the database. At this point, if multiple chunks exist, they -// are combined into one. -//----------------------------------------------------------------------------- -static int dpiVar__setBytesFromDynamicBytes(dpiBytes *bytes, - dpiDynamicBytes *dynBytes, dpiError *error) -{ - uint32_t i, totalAllocatedLength; - - // if only one chunk is available, make use of it - if (dynBytes->numChunks == 1) { - bytes->ptr = dynBytes->chunks->ptr; - bytes->length = dynBytes->chunks->length; - return DPI_SUCCESS; - } - - // determine total allocated size of all chunks - totalAllocatedLength = 0; - for (i = 0; i < dynBytes->numChunks; i++) - totalAllocatedLength += dynBytes->chunks[i].allocatedLength; - - // allocate new memory consolidating all of the chunks - if (dpiUtils__allocateMemory(1, totalAllocatedLength, 0, - "allocate consolidated chunk", (void**) &bytes->ptr, error) < 0) - return DPI_FAILURE; - - // copy memory from chunks to consolidated chunk - bytes->length = 0; - for (i = 0; i < dynBytes->numChunks; i++) { - memcpy(bytes->ptr + bytes->length, dynBytes->chunks[i].ptr, - dynBytes->chunks[i].length); - bytes->length += dynBytes->chunks[i].length; - dpiUtils__freeMemory(dynBytes->chunks[i].ptr); - dynBytes->chunks[i].ptr = NULL; - dynBytes->chunks[i].length = 0; - dynBytes->chunks[i].allocatedLength = 0; - } - - // populate first chunk with consolidated information - dynBytes->numChunks = 1; - dynBytes->chunks->ptr = bytes->ptr; - dynBytes->chunks->length = bytes->length; - dynBytes->chunks->allocatedLength = totalAllocatedLength; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setBytesFromLob() [PRIVATE] -// Populate the dynamic bytes structure with the data from the LOB and then -// populate the bytes structure. -//----------------------------------------------------------------------------- -static int dpiVar__setBytesFromLob(dpiBytes *bytes, dpiDynamicBytes *dynBytes, - dpiLob *lob, dpiError *error) -{ - uint64_t length, lengthInBytes, lengthReadInBytes; - - // determine length of LOB in bytes - if (dpiOci__lobGetLength2(lob, &length, error) < 0) - return DPI_FAILURE; - if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_CLOB) - lengthInBytes = length * lob->env->maxBytesPerCharacter; - else if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_NCLOB) - lengthInBytes = length * lob->env->nmaxBytesPerCharacter; - else lengthInBytes = length; - - // ensure there is enough space to store the entire LOB value - if (lengthInBytes > UINT_MAX) - return dpiError__set(error, "check max length", DPI_ERR_NOT_SUPPORTED); - if (dpiVar__allocateDynamicBytes(dynBytes, (uint32_t) lengthInBytes, - error) < 0) - return DPI_FAILURE; - - // read data from the LOB - lengthReadInBytes = lengthInBytes; - if (length > 0 && dpiLob__readBytes(lob, 1, length, dynBytes->chunks->ptr, - &lengthReadInBytes, error) < 0) - return DPI_FAILURE; - - dynBytes->chunks->length = (uint32_t) lengthReadInBytes; - bytes->ptr = dynBytes->chunks->ptr; - bytes->length = dynBytes->chunks->length; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setFromBytes() [PRIVATE] -// Set the value of the variable at the given array position from a byte -// string. The byte string is not retained in any way. A copy will be made into -// buffers allocated by ODPI-C. -//----------------------------------------------------------------------------- -static int dpiVar__setFromBytes(dpiVar *var, uint32_t pos, const char *value, - uint32_t valueLength, dpiError *error) -{ - dpiData *data = &var->buffer.externalData[pos]; - dpiDynamicBytes *dynBytes; - dpiBytes *bytes; - - // for internally used LOBs, write the data directly - if (var->buffer.references) { - data->isNull = 0; - return dpiLob__setFromBytes(var->buffer.references[pos].asLOB, value, - valueLength, error); - } - - // validate the target can accept the input - if ((var->buffer.tempBuffer && - var->env->charsetId == DPI_CHARSET_ID_UTF16 && - valueLength > DPI_NUMBER_AS_TEXT_CHARS * 2) || - (var->buffer.tempBuffer && - var->env->charsetId != DPI_CHARSET_ID_UTF16 && - valueLength > DPI_NUMBER_AS_TEXT_CHARS) || - (!var->buffer.dynamicBytes && !var->buffer.tempBuffer && - valueLength > var->sizeInBytes)) - return dpiError__set(error, "check source length", - DPI_ERR_BUFFER_SIZE_TOO_SMALL, var->sizeInBytes); - - // for dynamic bytes, allocate space as needed - bytes = &data->value.asBytes; - if (var->buffer.dynamicBytes) { - dynBytes = &var->buffer.dynamicBytes[pos]; - if (dpiVar__allocateDynamicBytes(dynBytes, valueLength, error) < 0) - return DPI_FAILURE; - if (valueLength > 0) - memcpy(dynBytes->chunks->ptr, value, valueLength); - dynBytes->numChunks = 1; - dynBytes->chunks->length = valueLength; - bytes->ptr = dynBytes->chunks->ptr; - bytes->length = valueLength; - - // for everything else, space has already been allocated - } else { - bytes->length = valueLength; - if (valueLength > 0) - memcpy(bytes->ptr, value, valueLength); - if (var->type->sizeInBytes == 0) { - if (var->buffer.actualLength32) - var->buffer.actualLength32[pos] = valueLength; - else if (var->buffer.actualLength16) - var->buffer.actualLength16[pos] = (uint16_t) valueLength; - } - if (var->buffer.returnCode) - var->buffer.returnCode[pos] = 0; - } - data->isNull = 0; - - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setFromLob() [PRIVATE] -// Set the value of the variable at the given array position from a LOB. -// A reference to the LOB is retained by the variable. -//----------------------------------------------------------------------------- -static int dpiVar__setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob, - dpiError *error) -{ - dpiData *data; - - // validate the LOB object - if (dpiGen__checkHandle(lob, DPI_HTYPE_LOB, "check LOB", error) < 0) - return DPI_FAILURE; - - // mark the value as not null - data = &var->buffer.externalData[pos]; - data->isNull = 0; - - // if values are the same, nothing to do - if (var->buffer.references[pos].asLOB == lob) - return DPI_SUCCESS; - - // clear original value, if needed - if (var->buffer.references[pos].asLOB) { - dpiGen__setRefCount(var->buffer.references[pos].asLOB, error, -1); - var->buffer.references[pos].asLOB = NULL; - } - - // add reference to passed object - dpiGen__setRefCount(lob, error, 1); - var->buffer.references[pos].asLOB = lob; - var->buffer.data.asLobLocator[pos] = lob->locator; - data->value.asLOB = lob; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setFromObject() [PRIVATE] -// Set the value of the variable at the given array position from an object. -// The variable and position are assumed to be valid at this point. A reference -// to the object is retained by the variable. -//----------------------------------------------------------------------------- -static int dpiVar__setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj, - dpiError *error) -{ - dpiData *data; - - // validate the object - if (dpiGen__checkHandle(obj, DPI_HTYPE_OBJECT, "check obj", error) < 0) - return DPI_FAILURE; - if (obj->type->tdo != var->objectType->tdo) - return dpiError__set(error, "check type", DPI_ERR_WRONG_TYPE, - obj->type->schemaLength, obj->type->schema, - obj->type->nameLength, obj->type->name, - var->objectType->schemaLength, var->objectType->schema, - var->objectType->nameLength, var->objectType->name); - - // mark the value as not null - data = &var->buffer.externalData[pos]; - data->isNull = 0; - - // if values are the same, nothing to do - if (var->buffer.references[pos].asObject == obj) - return DPI_SUCCESS; - - // clear original value, if needed - if (var->buffer.references[pos].asObject) { - dpiGen__setRefCount(var->buffer.references[pos].asObject, error, -1); - var->buffer.references[pos].asObject = NULL; - } - - // add reference to passed object - dpiGen__setRefCount(obj, error, 1); - var->buffer.references[pos].asObject = obj; - var->buffer.data.asObject[pos] = obj->instance; - var->buffer.objectIndicator[pos] = obj->indicator; - data->value.asObject = obj; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setFromRowid() [PRIVATE] -// Set the value of the variable at the given array position from a rowid. -// A reference to the rowid is retained by the variable. -//----------------------------------------------------------------------------- -static int dpiVar__setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid, - dpiError *error) -{ - dpiData *data; - - // validate the rowid - if (dpiGen__checkHandle(rowid, DPI_HTYPE_ROWID, "check rowid", error) < 0) - return DPI_FAILURE; - - // mark the value as not null - data = &var->buffer.externalData[pos]; - data->isNull = 0; - - // if values are the same, nothing to do - if (var->buffer.references[pos].asRowid == rowid) - return DPI_SUCCESS; - - // clear original value, if needed - if (var->buffer.references[pos].asRowid) { - dpiGen__setRefCount(var->buffer.references[pos].asRowid, error, -1); - var->buffer.references[pos].asRowid = NULL; - } - - // add reference to passed object - dpiGen__setRefCount(rowid, error, 1); - var->buffer.references[pos].asRowid = rowid; - var->buffer.data.asRowid[pos] = rowid->handle; - data->value.asRowid = rowid; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setFromStmt() [PRIVATE] -// Set the value of the variable at the given array position from a -// statement. A reference to the statement is retained by the variable. -//----------------------------------------------------------------------------- -static int dpiVar__setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt, - dpiError *error) -{ - dpiData *data; - uint32_t i; - - // validate the statement - if (dpiGen__checkHandle(stmt, DPI_HTYPE_STMT, "check stmt", error) < 0) - return DPI_FAILURE; - - // prevent attempts to bind a statement to itself - for (i = 0; i < stmt->numBindVars; i++) { - if (stmt->bindVars[i].var == var) - return dpiError__set(error, "bind to self", DPI_ERR_NOT_SUPPORTED); - } - - // mark the value as not null - data = &var->buffer.externalData[pos]; - data->isNull = 0; - - // if values are the same, nothing to do - if (var->buffer.references[pos].asStmt == stmt) - return DPI_SUCCESS; - - // clear original value, if needed - if (var->buffer.references[pos].asStmt) { - dpiGen__setRefCount(var->buffer.references[pos].asStmt, error, -1); - var->buffer.references[pos].asStmt = NULL; - } - - // add reference to passed object - dpiGen__setRefCount(stmt, error, 1); - var->buffer.references[pos].asStmt = stmt; - var->buffer.data.asStmt[pos] = stmt->handle; - data->value.asStmt = stmt; - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__setValue() [PRIVATE] -// Sets the contents of the variable using the type specified, if possible. -//----------------------------------------------------------------------------- -int dpiVar__setValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, - dpiData *data, dpiError *error) -{ - dpiOracleTypeNum oracleTypeNum; - dpiObject *obj; - - // if value is null, no need to proceed further - // however, when binding objects a value MUST be present or OCI will - // segfault! - if (data->isNull) { - buffer->indicator[pos] = DPI_OCI_IND_NULL; - if (buffer->objectIndicator && !buffer->data.asObject[pos]) { - if (dpiObject__allocate(var->objectType, NULL, NULL, NULL, &obj, - error) < 0) - return DPI_FAILURE; - buffer->references[pos].asObject = obj; - data->value.asObject = obj; - buffer->data.asObject[pos] = obj->instance; - buffer->objectIndicator[pos] = obj->indicator; - if (buffer->objectIndicator[pos]) - *((int16_t*) buffer->objectIndicator[pos]) = DPI_OCI_IND_NULL; - } - return DPI_SUCCESS; - } - - // transform the various types - buffer->indicator[pos] = DPI_OCI_IND_NOTNULL; - oracleTypeNum = var->type->oracleTypeNum; - switch (var->nativeTypeNum) { - case DPI_NATIVE_TYPE_INT64: - case DPI_NATIVE_TYPE_UINT64: - switch (oracleTypeNum) { - case DPI_ORACLE_TYPE_NATIVE_INT: - buffer->data.asInt64[pos] = data->value.asInt64; - return DPI_SUCCESS; - case DPI_ORACLE_TYPE_NATIVE_UINT: - buffer->data.asUint64[pos] = data->value.asUint64; - return DPI_SUCCESS; - case DPI_ORACLE_TYPE_NUMBER: - if (var->nativeTypeNum == DPI_NATIVE_TYPE_INT64) - return dpiDataBuffer__toOracleNumberFromInteger( - &data->value, error, - &buffer->data.asNumber[pos]); - return dpiDataBuffer__toOracleNumberFromUnsignedInteger( - &data->value, error, &buffer->data.asNumber[pos]); - default: - break; - } - break; - case DPI_NATIVE_TYPE_FLOAT: - buffer->data.asFloat[pos] = data->value.asFloat; - return DPI_SUCCESS; - case DPI_NATIVE_TYPE_DOUBLE: - switch (oracleTypeNum) { - case DPI_ORACLE_TYPE_NATIVE_DOUBLE: - buffer->data.asDouble[pos] = data->value.asDouble; - return DPI_SUCCESS; - case DPI_ORACLE_TYPE_NUMBER: - return dpiDataBuffer__toOracleNumberFromDouble( - &data->value, error, &buffer->data.asNumber[pos]); - case DPI_ORACLE_TYPE_DATE: - return dpiDataBuffer__toOracleDateFromDouble( - &data->value, var->env, error, - &buffer->data.asDate[pos]); - case DPI_ORACLE_TYPE_TIMESTAMP: - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - return dpiDataBuffer__toOracleTimestampFromDouble( - &data->value, var->env, error, - buffer->data.asTimestamp[pos]); - default: - break; - } - break; - case DPI_NATIVE_TYPE_BYTES: - if (oracleTypeNum == DPI_ORACLE_TYPE_NUMBER) - return dpiDataBuffer__toOracleNumberFromText(&data->value, - var->env, error, &buffer->data.asNumber[pos]); - if (buffer->actualLength32) - buffer->actualLength32[pos] = data->value.asBytes.length; - else if (buffer->actualLength16) - buffer->actualLength16[pos] = - (uint16_t) data->value.asBytes.length; - if (buffer->returnCode) - buffer->returnCode[pos] = 0; - break; - case DPI_NATIVE_TYPE_TIMESTAMP: - if (oracleTypeNum == DPI_ORACLE_TYPE_DATE) - return dpiDataBuffer__toOracleDate(&data->value, - &buffer->data.asDate[pos]); - else if (oracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP) - return dpiDataBuffer__toOracleTimestamp(&data->value, - var->env, error, buffer->data.asTimestamp[pos], 0); - else if (oracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP_TZ || - oracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP_LTZ) - return dpiDataBuffer__toOracleTimestamp(&data->value, - var->env, error, buffer->data.asTimestamp[pos], 1); - break; - case DPI_NATIVE_TYPE_INTERVAL_DS: - return dpiDataBuffer__toOracleIntervalDS(&data->value, var->env, - error, buffer->data.asInterval[pos]); - case DPI_NATIVE_TYPE_INTERVAL_YM: - return dpiDataBuffer__toOracleIntervalYM(&data->value, var->env, - error, buffer->data.asInterval[pos]); - case DPI_NATIVE_TYPE_BOOLEAN: - buffer->data.asBoolean[pos] = data->value.asBoolean; - return DPI_SUCCESS; - default: - break; - } - return DPI_SUCCESS; -} - - -//----------------------------------------------------------------------------- -// dpiVar__validateTypes() [PRIVATE] -// Validate that the Oracle type and the native type are compatible with -// each other when the native type is not already the default native type. -//----------------------------------------------------------------------------- -static int dpiVar__validateTypes(const dpiOracleType *oracleType, - dpiNativeTypeNum nativeTypeNum, dpiError *error) -{ - switch (oracleType->oracleTypeNum) { - case DPI_ORACLE_TYPE_DATE: - case DPI_ORACLE_TYPE_TIMESTAMP: - case DPI_ORACLE_TYPE_TIMESTAMP_TZ: - case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: - if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) - return DPI_SUCCESS; - break; - case DPI_ORACLE_TYPE_NUMBER: - if (nativeTypeNum == DPI_NATIVE_TYPE_INT64 || - nativeTypeNum == DPI_NATIVE_TYPE_UINT64 || - nativeTypeNum == DPI_NATIVE_TYPE_BYTES) - return DPI_SUCCESS; - break; - default: - break; - } - return dpiError__set(error, "validate types", DPI_ERR_UNHANDLED_CONVERSION, - oracleType->oracleTypeNum, nativeTypeNum); -} - - -//----------------------------------------------------------------------------- -// dpiVar_addRef() [PUBLIC] -// Add a reference to the variable. -//----------------------------------------------------------------------------- -int dpiVar_addRef(dpiVar *var) -{ - return dpiGen__addRef(var, DPI_HTYPE_VAR, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiVar_copyData() [PUBLIC] -// Copy the data from the source variable to the target variable at the given -// array position. The variables must use the same native type. If the -// variables contain variable length data, the source length must not exceed -// the target allocated memory. -//----------------------------------------------------------------------------- -int dpiVar_copyData(dpiVar *var, uint32_t pos, dpiVar *sourceVar, - uint32_t sourcePos) -{ - dpiData *sourceData; - dpiError error; - int status; - - if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - if (dpiGen__checkHandle(sourceVar, DPI_HTYPE_VAR, "check source var", - &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - if (sourcePos >= sourceVar->buffer.maxArraySize) { - dpiError__set(&error, "check source size", - DPI_ERR_INVALID_ARRAY_POSITION, sourcePos, - sourceVar->buffer.maxArraySize); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - if (var->nativeTypeNum != sourceVar->nativeTypeNum) { - dpiError__set(&error, "check types match", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - sourceData = &sourceVar->buffer.externalData[sourcePos]; - status = dpiVar__copyData(var, pos, sourceData, &error); - return dpiGen__endPublicFn(var, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiVar_getNumElementsInArray() [PUBLIC] -// Return the actual number of elements in the array. This value is only -// relevant if the variable is bound as an array. -//----------------------------------------------------------------------------- -int dpiVar_getNumElementsInArray(dpiVar *var, uint32_t *numElements) -{ - dpiError error; - - if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(var, numElements) - if (var->dynBindBuffers) - *numElements = var->dynBindBuffers->actualArraySize; - else *numElements = var->buffer.actualArraySize; - return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); -} - -//----------------------------------------------------------------------------- -// dpiVar_getReturnedData() [PUBLIC] -// Return a pointer to the array of dpiData structures allocated for the -// given row that have been returned by a DML returning statement. The number -// of returned rows is also provided. If the bind variable had no data -// returned, the number of rows returned will be 0 and the pointer to the array -// of dpiData structures will be NULL. This will also be the case if the -// variable was only bound IN or was not bound to a DML returning statement. -// There is no way to differentiate between the two. -//----------------------------------------------------------------------------- -int dpiVar_getReturnedData(dpiVar *var, uint32_t pos, uint32_t *numElements, - dpiData **data) -{ - dpiError error; - - if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(var, numElements) - DPI_CHECK_PTR_NOT_NULL(var, data) - if (var->dynBindBuffers) { - *numElements = var->dynBindBuffers[pos].actualArraySize; - *data = var->dynBindBuffers[pos].externalData; - } else { - *numElements = 0; - *data = NULL; - } - return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); -} - - - -//----------------------------------------------------------------------------- -// dpiVar_getSizeInBytes() [PUBLIC] -// Returns the size in bytes of the buffer allocated for the variable. -//----------------------------------------------------------------------------- -int dpiVar_getSizeInBytes(dpiVar *var, uint32_t *sizeInBytes) -{ - dpiError error; - - if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - DPI_CHECK_PTR_NOT_NULL(var, sizeInBytes) - *sizeInBytes = var->sizeInBytes; - return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); -} - - -//----------------------------------------------------------------------------- -// dpiVar_release() [PUBLIC] -// Release a reference to the variable. -//----------------------------------------------------------------------------- -int dpiVar_release(dpiVar *var) -{ - return dpiGen__release(var, DPI_HTYPE_VAR, __func__); -} - - -//----------------------------------------------------------------------------- -// dpiVar_setFromBytes() [PUBLIC] -// Set the value of the variable at the given array position from a byte -// string. Checks on the array position, the size of the string and the type of -// variable will be made. The byte string is not retained in any way. A copy -// will be made into buffers allocated by ODPI-C. -//----------------------------------------------------------------------------- -int dpiVar_setFromBytes(dpiVar *var, uint32_t pos, const char *value, - uint32_t valueLength) -{ - dpiError error; - int status; - - if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - DPI_CHECK_PTR_AND_LENGTH(var, value) - if (var->nativeTypeNum != DPI_NATIVE_TYPE_BYTES && - var->nativeTypeNum != DPI_NATIVE_TYPE_LOB) { - dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - if (valueLength > DPI_MAX_VAR_BUFFER_SIZE) { - dpiError__set(&error, "check buffer", DPI_ERR_BUFFER_SIZE_TOO_LARGE, - valueLength, DPI_MAX_VAR_BUFFER_SIZE); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - status = dpiVar__setFromBytes(var, pos, value, valueLength, &error); - return dpiGen__endPublicFn(var, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiVar_setFromLob() [PUBLIC] -// Set the value of the variable at the given array position from a LOB. -// Checks on the array position and the validity of the passed handle. A -// reference to the LOB is retained by the variable. -//----------------------------------------------------------------------------- -int dpiVar_setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob) -{ - dpiError error; - int status; - - if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - if (var->nativeTypeNum != DPI_NATIVE_TYPE_LOB) { - dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - status = dpiVar__setFromLob(var, pos, lob, &error); - return dpiGen__endPublicFn(var, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiVar_setFromObject() [PUBLIC] -// Set the value of the variable at the given array position from an object. -// Checks on the array position and the validity of the passed handle. A -// reference to the object is retained by the variable. -//----------------------------------------------------------------------------- -int dpiVar_setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj) -{ - dpiError error; - int status; - - if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - if (var->nativeTypeNum != DPI_NATIVE_TYPE_OBJECT) { - dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - status = dpiVar__setFromObject(var, pos, obj, &error); - return dpiGen__endPublicFn(var, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiVar_setFromRowid() [PUBLIC] -// Set the value of the variable at the given array position from a rowid. -// Checks on the array position and the validity of the passed handle. A -// reference to the rowid is retained by the variable. -//----------------------------------------------------------------------------- -int dpiVar_setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid) -{ - dpiError error; - int status; - - if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - if (var->nativeTypeNum != DPI_NATIVE_TYPE_ROWID) { - dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - status = dpiVar__setFromRowid(var, pos, rowid, &error); - return dpiGen__endPublicFn(var, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiVar_setFromStmt() [PUBLIC] -// Set the value of the variable at the given array position from a -// statement. Checks on the array position and the validity of the passed -// handle. A reference to the statement is retained by the variable. -//----------------------------------------------------------------------------- -int dpiVar_setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt) -{ - dpiError error; - int status; - - if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - if (var->nativeTypeNum != DPI_NATIVE_TYPE_STMT) { - dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - status = dpiVar__setFromStmt(var, pos, stmt, &error); - return dpiGen__endPublicFn(var, status, &error); -} - - -//----------------------------------------------------------------------------- -// dpiVar_setNumElementsInArray() [PUBLIC] -// Set the number of elements in the array (different from the number of -// allocated elements). -//----------------------------------------------------------------------------- -int dpiVar_setNumElementsInArray(dpiVar *var, uint32_t numElements) -{ - dpiError error; - - if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, __func__, &error) < 0) - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - if (numElements > var->buffer.maxArraySize) { - dpiError__set(&error, "check num elements", - DPI_ERR_ARRAY_SIZE_TOO_SMALL, var->buffer.maxArraySize); - return dpiGen__endPublicFn(var, DPI_FAILURE, &error); - } - var->buffer.actualArraySize = numElements; - return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); -} diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml index 1689c7d7355..b122a8e3d9f 100644 --- a/vendor/github.com/mitchellh/mapstructure/.travis.yml +++ b/vendor/github.com/mitchellh/mapstructure/.travis.yml @@ -6,3 +6,4 @@ go: script: - go test + - go test -bench . -benchmem diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md index 3b3cb723f81..970dce4e0e1 100644 --- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md +++ b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.2.0 + +* Added support to capture unused values in a field using the `",remain"` value + in the mapstructure tag. There is an example to showcase usage. +* Added `DecoderConfig` option to always squash embedded structs +* `json.Number` can decode into `uint` types +* Empty slices are preserved and not replaced with nil slices + ## 1.1.2 * Fix error when decode hook decodes interface implementation into interface diff --git a/vendor/github.com/mitchellh/mapstructure/go.mod b/vendor/github.com/mitchellh/mapstructure/go.mod index d2a71256208..a03ae973088 100644 --- a/vendor/github.com/mitchellh/mapstructure/go.mod +++ b/vendor/github.com/mitchellh/mapstructure/go.mod @@ -1 +1,3 @@ module github.com/mitchellh/mapstructure + +go 1.14 diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go index 256ee63fbf3..968abf935ed 100644 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go @@ -1,10 +1,109 @@ -// Package mapstructure exposes functionality to convert an arbitrary -// map[string]interface{} into a native Go structure. +// Package mapstructure exposes functionality to convert one arbitrary +// Go type into another, typically to convert a map[string]interface{} +// into a native Go structure. // // The Go structure can be arbitrarily complex, containing slices, // other structs, etc. and the decoder will properly decode nested // maps and so on into the proper structures in the native Go struct. // See the examples to see what the decoder is capable of. +// +// The simplest function to start with is Decode. +// +// Field Tags +// +// When decoding to a struct, mapstructure will use the field name by +// default to perform the mapping. For example, if a struct has a field +// "Username" then mapstructure will look for a key in the source value +// of "username" (case insensitive). +// +// type User struct { +// Username string +// } +// +// You can change the behavior of mapstructure by using struct tags. +// The default struct tag that mapstructure looks for is "mapstructure" +// but you can customize it using DecoderConfig. +// +// Renaming Fields +// +// To rename the key that mapstructure looks for, use the "mapstructure" +// tag and set a value directly. For example, to change the "username" example +// above to "user": +// +// type User struct { +// Username string `mapstructure:"user"` +// } +// +// Embedded Structs and Squashing +// +// Embedded structs are treated as if they're another field with that name. +// By default, the two structs below are equivalent when decoding with +// mapstructure: +// +// type Person struct { +// Name string +// } +// +// type Friend struct { +// Person +// } +// +// type Friend struct { +// Person Person +// } +// +// This would require an input that looks like below: +// +// map[string]interface{}{ +// "person": map[string]interface{}{"name": "alice"}, +// } +// +// If your "person" value is NOT nested, then you can append ",squash" to +// your tag value and mapstructure will treat it as if the embedded struct +// were part of the struct directly. Example: +// +// type Friend struct { +// Person `mapstructure:",squash"` +// } +// +// Now the following input would be accepted: +// +// map[string]interface{}{ +// "name": "alice", +// } +// +// DecoderConfig has a field that changes the behavior of mapstructure +// to always squash embedded structs. +// +// Remainder Values +// +// If there are any unmapped keys in the source value, mapstructure by +// default will silently ignore them. You can error by setting ErrorUnused +// in DecoderConfig. If you're using Metadata you can also maintain a slice +// of the unused keys. +// +// You can also use the ",remain" suffix on your tag to collect all unused +// values in a map. The field with this tag MUST be a map type and should +// probably be a "map[string]interface{}" or "map[interface{}]interface{}". +// See example below: +// +// type Friend struct { +// Name string +// Other map[string]interface{} `mapstructure:",remain"` +// } +// +// Given the input below, Other would be populated with the other +// values that weren't used (everything but "name"): +// +// map[string]interface{}{ +// "name": "bob", +// "address": "123 Maple St.", +// } +// +// Other Configuration +// +// mapstructure is highly configurable. See the DecoderConfig struct +// for other features and options that are supported. package mapstructure import ( @@ -80,6 +179,14 @@ type DecoderConfig struct { // WeaklyTypedInput bool + // Squash will squash embedded structs. A squash tag may also be + // added to an individual struct field using a tag. For example: + // + // type Parent struct { + // Child `mapstructure:",squash"` + // } + Squash bool + // Metadata is the struct that will contain extra metadata about // the decoding. If this is nil, then no metadata will be tracked. Metadata *Metadata @@ -438,6 +545,7 @@ func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) er func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error { dataVal := reflect.Indirect(reflect.ValueOf(data)) dataKind := getKind(dataVal) + dataType := dataVal.Type() switch { case dataKind == reflect.Int: @@ -469,6 +577,18 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e } else { return fmt.Errorf("cannot parse '%s' as uint: %s", name, err) } + case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": + jn := data.(json.Number) + i, err := jn.Int64() + if err != nil { + return fmt.Errorf( + "error decoding json.Number into %s: %s", name, err) + } + if i < 0 && !d.config.WeaklyTypedInput { + return fmt.Errorf("cannot parse '%s', %d overflows uint", + name, i) + } + val.SetUint(uint64(i)) default: return fmt.Errorf( "'%s' expected type '%s', got unconvertible type '%s'", @@ -689,16 +809,19 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re keyName = tagParts[0] } + // If Squash is set in the config, we squash the field down. + squash := d.config.Squash && v.Kind() == reflect.Struct // If "squash" is specified in the tag, we squash the field down. - squash := false - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break + if !squash { + for _, tag := range tagParts[1:] { + if tag == "squash" { + squash = true + break + } + } + if squash && v.Kind() != reflect.Struct { + return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) } - } - if squash && v.Kind() != reflect.Struct { - return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) } switch v.Kind() { @@ -805,8 +928,8 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) valElemType := valType.Elem() sliceType := reflect.SliceOf(valElemType) - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { + // If we have a non array/slice type then we first attempt to convert. + if dataValKind != reflect.Array && dataValKind != reflect.Slice { if d.config.WeaklyTypedInput { switch { // Slice and array we use the normal logic @@ -833,18 +956,17 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) } } - // Check input type - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - - } + return fmt.Errorf( + "'%s': source data must be an array or slice, got %s", name, dataValKind) + } - // If the input value is empty, then don't allocate since non-nil != nil - if dataVal.Len() == 0 { - return nil - } + // If the input value is nil, then don't allocate since empty != nil + if dataVal.IsNil() { + return nil + } + valSlice := val + if valSlice.IsNil() || d.config.ZeroFields { // Make a new slice to hold our result, same size as the original data. valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) } @@ -1005,6 +1127,11 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e field reflect.StructField val reflect.Value } + + // remainField is set to a valid field set with the "remain" tag if + // we are keeping track of remaining values. + var remainField *field + fields := []field{} for len(structs) > 0 { structVal := structs[0] @@ -1017,13 +1144,21 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e fieldKind := fieldType.Type.Kind() // If "squash" is specified in the tag, we squash the field down. - squash := false + squash := d.config.Squash && fieldKind == reflect.Struct + remain := false + + // We always parse the tags cause we're looking for other tags too tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") for _, tag := range tagParts[1:] { if tag == "squash" { squash = true break } + + if tag == "remain" { + remain = true + break + } } if squash { @@ -1036,8 +1171,14 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e continue } - // Normal struct field, store it away - fields = append(fields, field{fieldType, structVal.Field(i)}) + // Build our field + fieldCurrent := field{fieldType, structVal.Field(i)} + if remain { + remainField = &fieldCurrent + } else { + // Normal struct field, store it away + fields = append(fields, field{fieldType, structVal.Field(i)}) + } } } @@ -1103,6 +1244,25 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } } + // If we have a "remain"-tagged field and we have unused keys then + // we put the unused keys directly into the remain field. + if remainField != nil && len(dataValKeysUnused) > 0 { + // Build a map of only the unused values + remain := map[interface{}]interface{}{} + for key := range dataValKeysUnused { + remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() + } + + // Decode it as-if we were just decoding this map onto our map. + if err := d.decodeMap(name, remain, remainField.val); err != nil { + errors = appendErrors(errors, err) + } + + // Set the map to nil so we have none so that the next check will + // not error (ErrorUnused) + dataValKeysUnused = nil + } + if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { keys := make([]string, 0, len(dataValKeysUnused)) for rawKey := range dataValKeysUnused { diff --git a/vendor/github.com/tsg/go-daemon/src/god.c b/vendor/github.com/tsg/go-daemon/src/god.c deleted file mode 100644 index 7f63e081efd..00000000000 --- a/vendor/github.com/tsg/go-daemon/src/god.c +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright 2013-2014 Alexandre Fiori -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -void usage() { - printf( - "Use: god [options] [--] program [arguments]\n" - "Options:\n" - "-h --help show this help and exit\n" - "-v --version show version and exit\n" - "-f --foreground run in foreground\n" - "-n --nohup make the program immune to SIGHUP\n" - "-l --logfile FILE write the program's stdout and stderr to FILE\n" - "-p --pidfile FILE write pid to FILE\n" - "-r --rundir DIR switch to DIR before executing the program\n" - "-u --user USER switch to USER before executing the program\n" - "-g --group GROUP switch to GROUP before executing the program\n" - "\nThe program's output go to a blackhole if no logfile is set.\n" - "Log files are recycled on SIGHUP.\n" - ); - exit(1); -} - -static int nohup = 0; -static int logfd[2]; // pipe -static pid_t childpid = 0; -static FILE *logfp = NULL; -static FILE *pidfp = NULL; -static char logfile[PATH_MAX]; -static char pidfile[PATH_MAX]; -static char linebuf[1024]; -static struct passwd *pwd = NULL; -static struct group *grp = NULL; -static pthread_mutex_t logger_mutex; - -void daemon_main(int optind, char **argv); -void *logger_thread(void *cmdname); -void sighup(int signum); -void sigfwd(int signum); - -int main(int argc, char **argv) { - char rundir[PATH_MAX]; - char user[64]; - char group[64]; - int foreground = 0; - struct stat exec_stat; - - memset(logfile, 0, sizeof logfile); - memset(pidfile, 0, sizeof pidfile); - memset(rundir, 0, sizeof rundir); - memset(user, 0, sizeof user); - memset(group, 0, sizeof group); - - static struct option opts[] = { - { "help", no_argument, NULL, 'h' }, - { "version", no_argument, NULL, 'v' }, - { "foreground", no_argument, NULL, 'f' }, - { "nohup", no_argument, NULL, 'n' }, - { "logfile", required_argument, NULL, 'l' }, - { "pidfile", required_argument, NULL, 'p' }, - { "rundir", required_argument, NULL, 'r' }, - { "user", required_argument, NULL, 'u' }, - { "group", required_argument, NULL, 'g' }, - { NULL, 0, NULL, 0 }, - }; - - int ch; - while (1) { - ch = getopt_long(argc, argv, "l:p:r:u:g:hvfns", opts, NULL); - if (ch == -1) - break; - - switch (ch) { - case 'v': - printf("Go daemon v1.2\n"); - printf("http://github.com/fiorix/go-daemon\n"); - return 0; - case 'f': - foreground = 1; - break; - case 'n': - nohup = 1; - break; - case 'l': - strncpy(logfile, optarg, sizeof logfile - 1); - break; - case 'p': - strncpy(pidfile, optarg, sizeof pidfile - 1); - break; - case 'r': - strncpy(rundir, optarg, sizeof rundir - 1); - break; - case 'u': - strncpy(user, optarg, sizeof user - 1); - break; - case 'g': - strncpy(group, optarg, sizeof group - 1); - break; - default: - usage(); - } - } - - // utility is expected to be argv's leftovers. - if (optind >= argc) - usage(); - - if (*rundir != 0 && chdir(rundir) == -1) { - perror("failed to switch to rundir"); - return 1; - } - - if (*user != 0 && (pwd = getpwnam(user)) == NULL) { - fprintf(stderr, "failed to switch to user %s: %s\n", - user, strerror(errno)); - return 1; - } - - if (*group != 0 && (grp = getgrnam(group)) == NULL) { - fprintf(stderr, "failed to switch to group %s: %s\n", - group, strerror(errno)); - return 1; - } - - if (*logfile != 0 && (logfp = fopen(logfile, "a")) == NULL) { - perror("failed to open logfile"); - return 1; - } - if (logfp) - setvbuf(logfp, linebuf, _IOLBF, sizeof linebuf); - - if (*pidfile != 0 && (pidfp = fopen(pidfile, "w+")) == NULL) { - perror("failed to open pidfile"); - return 1; - } - - if (grp != NULL && setegid(grp->gr_gid) == -1) { - fprintf(stderr, "failed to switch to group %s: %s\n", - group, strerror(errno)); - return 1; - } - - if (pwd != NULL && seteuid(pwd->pw_uid) == -1) { - fprintf(stderr, "failed to switch to user %s: %s\n", - user, strerror(errno)); - return 1; - } - - if (stat(argv[optind], &exec_stat) < 0) { - fprintf(stderr, "failed to stat %s: %s\n", - argv[optind], strerror(errno)); - return 1; - } - if (!(exec_stat.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) { - fprintf(stderr, "permission denied: %s\n", - argv[optind]); - return 1; - } - - if (foreground) { - daemon_main(optind, argv); - } else { - // Daemonize. - pid_t pid = fork(); - if (pid) { - waitpid(pid, NULL, 0); - } else if (!pid) { - if ((pid = fork())) { - exit(0); - } else if (!pid) { - close(0); - close(1); - close(2); - daemon_main(optind, argv); - } else { - perror("fork"); - exit(1); - } - } else { - perror("fork"); - exit(1); - } - } - - return 0; -} - -void daemon_main(int optind, char **argv) { - if (pidfp) { - fprintf(pidfp, "%d\n", getpid()); - fclose(pidfp); - } - // Fwd all signals to the child, except SIGHUP. - int signum; - for (signum = 1; signum < 33; signum++) { - if (signal(signum, sigfwd) == SIG_IGN) - signal(signum, SIG_IGN); - } - signal(SIGHUP, sighup); - pipe(logfd); - if ((childpid = fork())) { - close(logfd[1]); - pthread_t logth; - pthread_create(&logth, NULL, logger_thread, argv[optind]); - waitpid(childpid, NULL, 0); - pthread_join(logth, NULL); - } else if (!childpid) { - close(logfd[0]); - close(0); - close(1); - close(2); - dup2(logfd[1], 1); - dup2(logfd[1], 2); - execvp(argv[optind], argv + optind); - printf("\x1b%s", strerror(errno)); - fflush(stdout); - close(logfd[1]); - close(1); - close(2); - } else { - perror("fork"); - exit(1); - } - if (pidfp) - unlink(pidfile); -} - -void *logger_thread(void *cmdname) { - int n; - char buf[4096]; - int has_read = 0; - - while(1) { - // read() will fail when the child process fails - // to execute or dies, and closes its terminal. - // This is what terminates this thread and therefore - // the main thread can move along. - n = read(logfd[0], buf, sizeof buf); - if (n <= 0) - break; - - buf[n] = 0; - if (!has_read) { - has_read = 1; - if (*buf == '\x1b') { - char *p = buf; - printf("%s: %s\n", (char *) cmdname, ++p); - close(logfd[0]); - break; - } - } - - pthread_mutex_lock(&logger_mutex); - if (logfp) { - fwrite(buf, 1, n, logfp); - //fflush(logfp); - } - pthread_mutex_unlock(&logger_mutex); - } - - return NULL; -} - -void sighup(int signum) { - if (pwd != NULL) { - seteuid(getuid()); - } - if (grp != NULL) { - setegid(getgid()); - } - pthread_mutex_lock(&logger_mutex); - if (logfp) { - FILE *fp = fopen(logfile, "a"); - if (fp != NULL) { - fclose(logfp); - logfp = fp; - setvbuf(logfp, linebuf, _IOLBF, sizeof linebuf); - } - } - if (grp != NULL) { - setegid(grp->gr_gid); - } - if (pwd != NULL) { - seteuid(pwd->pw_uid); - } - pthread_mutex_unlock(&logger_mutex); - if (!nohup && childpid) // nonohup :~ - kill(childpid, signum); -} - -void sigfwd(int signum) { - if (childpid) - kill(childpid, signum); -} diff --git a/vendor/github.com/yuin/gopher-lua/parse/Makefile b/vendor/github.com/yuin/gopher-lua/parse/Makefile new file mode 100644 index 00000000000..b5b69096086 --- /dev/null +++ b/vendor/github.com/yuin/gopher-lua/parse/Makefile @@ -0,0 +1,4 @@ +all : parser.go + +parser.go : parser.go.y + go tool yacc -o $@ parser.go.y; [ -f y.output ] && ( rm -f y.output ) diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go index 5af64c5421b..9728d61d7aa 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/packet.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/packet.go @@ -14,6 +14,7 @@ import ( "crypto/rsa" "io" "math/big" + "math/bits" "golang.org/x/crypto/cast5" "golang.org/x/crypto/openpgp/errors" @@ -100,33 +101,65 @@ func (r *partialLengthReader) Read(p []byte) (n int, err error) { type partialLengthWriter struct { w io.WriteCloser lengthByte [1]byte + sentFirst bool + buf []byte } +// RFC 4880 4.2.2.4: the first partial length MUST be at least 512 octets long. +const minFirstPartialWrite = 512 + func (w *partialLengthWriter) Write(p []byte) (n int, err error) { + off := 0 + if !w.sentFirst { + if len(w.buf) > 0 || len(p) < minFirstPartialWrite { + off = len(w.buf) + w.buf = append(w.buf, p...) + if len(w.buf) < minFirstPartialWrite { + return len(p), nil + } + p = w.buf + w.buf = nil + } + w.sentFirst = true + } + + power := uint8(30) for len(p) > 0 { - for power := uint(14); power < 32; power-- { - l := 1 << power - if len(p) >= l { - w.lengthByte[0] = 224 + uint8(power) - _, err = w.w.Write(w.lengthByte[:]) - if err != nil { - return - } - var m int - m, err = w.w.Write(p[:l]) - n += m - if err != nil { - return - } - p = p[l:] - break + l := 1 << power + if len(p) < l { + power = uint8(bits.Len32(uint32(len(p)))) - 1 + l = 1 << power + } + w.lengthByte[0] = 224 + power + _, err = w.w.Write(w.lengthByte[:]) + if err == nil { + var m int + m, err = w.w.Write(p[:l]) + n += m + } + if err != nil { + if n < off { + return 0, err } + return n - off, err } + p = p[l:] } - return + return n - off, nil } func (w *partialLengthWriter) Close() error { + if len(w.buf) > 0 { + // In this case we can't send a 512 byte packet. + // Just send what we have. + p := w.buf + w.sentFirst = true + w.buf = nil + if _, err := w.Write(p); err != nil { + return err + } + } + w.lengthByte[0] = 0 _, err := w.w.Write(w.lengthByte[:]) if err != nil { diff --git a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go index a3d068634c2..5ede2c61b45 100644 --- a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go +++ b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go @@ -16,6 +16,17 @@ func (b *storageBuf) asBytes() *[maxRate]byte { return (*[maxRate]byte)(unsafe.Pointer(b)) } +//go:nocheckptr +// +// xorInUnaligned intentionally reads the input buffer as an unaligned slice of +// integers. The language spec is not clear on whether that is allowed. +// See: +// https://golang.org/issue/37644 +// https://golang.org/issue/37298 +// https://golang.org/issue/35381 + +// xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a +// XOR buf. func xorInUnaligned(d *state, buf []byte) { n := len(buf) bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))[: n/8 : n/8] diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go index dd7378c8a34..d1b4fca3a94 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go @@ -7,6 +7,7 @@ package terminal import ( "bytes" "io" + "runtime" "strconv" "sync" "unicode/utf8" @@ -939,6 +940,8 @@ func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) { // readPasswordLine reads from reader until it finds \n or io.EOF. // The slice returned does not include the \n. // readPasswordLine also ignores any \r it finds. +// Windows uses \r as end of line. So, on Windows, readPasswordLine +// reads until it finds \r and ignores any \n it finds during processing. func readPasswordLine(reader io.Reader) ([]byte, error) { var buf [1]byte var ret []byte @@ -952,9 +955,15 @@ func readPasswordLine(reader io.Reader) ([]byte, error) { ret = ret[:len(ret)-1] } case '\n': - return ret, nil + if runtime.GOOS != "windows" { + return ret, nil + } + // otherwise ignore \n case '\r': - // remove \r from passwords on Windows + if runtime.GOOS == "windows" { + return ret, nil + } + // otherwise ignore \r default: ret = append(ret, buf[0]) } diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index bdaba1d46b1..27cc893cc0e 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -19,7 +19,6 @@ package http2 // import "golang.org/x/net/http2" import ( "bufio" "crypto/tls" - "errors" "fmt" "io" "net/http" @@ -173,11 +172,6 @@ func (s SettingID) String() string { return fmt.Sprintf("UNKNOWN_SETTING_%d", uint16(s)) } -var ( - errInvalidHeaderFieldName = errors.New("http2: invalid header field name") - errInvalidHeaderFieldValue = errors.New("http2: invalid header field value") -) - // validWireHeaderFieldName reports whether v is a valid header field // name (key). See httpguts.ValidHeaderName for the base rules. // diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index de31d72b2c3..bc9e41a1b77 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -581,13 +581,10 @@ type stream struct { cancelCtx func() // owned by serverConn's serve loop: - bodyBytes int64 // body bytes seen so far - declBodyBytes int64 // or -1 if undeclared - flow flow // limits writing from Handler to client - inflow flow // what the client is allowed to POST/etc to us - parent *stream // or nil - numTrailerValues int64 - weight uint8 + bodyBytes int64 // body bytes seen so far + declBodyBytes int64 // or -1 if undeclared + flow flow // limits writing from Handler to client + inflow flow // what the client is allowed to POST/etc to us state streamState resetQueued bool // RST_STREAM queued for write; set by sc.resetStream gotTrailerHeader bool // HEADER frame for trailers was seen diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index d948e96eec2..81778bec612 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -2198,8 +2198,6 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { return nil } -var errInvalidTrailers = errors.New("http2: invalid trailers") - func (rl *clientConnReadLoop) endStream(cs *clientStream) { // TODO: check that any declared content-length matches, like // server.go's (*stream).endStream method. @@ -2430,7 +2428,6 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) var ( errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit") errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit") - errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers") ) func (cc *ClientConn) logf(format string, args ...interface{}) { diff --git a/vendor/golang.org/x/net/ipv4/helper.go b/vendor/golang.org/x/net/ipv4/helper.go index b494a2cde46..e845a7376ea 100644 --- a/vendor/golang.org/x/net/ipv4/helper.go +++ b/vendor/golang.org/x/net/ipv4/helper.go @@ -13,16 +13,13 @@ import ( ) var ( - errInvalidConn = errors.New("invalid connection") - errMissingAddress = errors.New("missing address") - errMissingHeader = errors.New("missing header") - errNilHeader = errors.New("nil header") - errHeaderTooShort = errors.New("header too short") - errExtHeaderTooShort = errors.New("extension header too short") - errInvalidConnType = errors.New("invalid conn type") - errNoSuchInterface = errors.New("no such interface") - errNoSuchMulticastInterface = errors.New("no such multicast interface") - errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH) + errInvalidConn = errors.New("invalid connection") + errMissingAddress = errors.New("missing address") + errNilHeader = errors.New("nil header") + errHeaderTooShort = errors.New("header too short") + errExtHeaderTooShort = errors.New("extension header too short") + errInvalidConnType = errors.New("invalid conn type") + errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH) // See https://www.freebsd.org/doc/en/books/porters-handbook/versions.html. freebsdVersion uint32 diff --git a/vendor/golang.org/x/net/ipv4/sys_asmreq.go b/vendor/golang.org/x/net/ipv4/sys_asmreq.go index c5eaafe96be..76d670acaa9 100644 --- a/vendor/golang.org/x/net/ipv4/sys_asmreq.go +++ b/vendor/golang.org/x/net/ipv4/sys_asmreq.go @@ -7,12 +7,15 @@ package ipv4 import ( + "errors" "net" "unsafe" "golang.org/x/net/internal/socket" ) +var errNoSuchInterface = errors.New("no such interface") + func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}} if err := setIPMreqInterface(&mreq, ifi); err != nil { diff --git a/vendor/golang.org/x/net/ipv6/helper.go b/vendor/golang.org/x/net/ipv6/helper.go index f767b1f5ddd..c2d508f9c30 100644 --- a/vendor/golang.org/x/net/ipv6/helper.go +++ b/vendor/golang.org/x/net/ipv6/helper.go @@ -15,7 +15,6 @@ var ( errMissingAddress = errors.New("missing address") errHeaderTooShort = errors.New("header too short") errInvalidConnType = errors.New("invalid conn type") - errNoSuchInterface = errors.New("no such interface") errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH) ) diff --git a/vendor/golang.org/x/net/publicsuffix/table.go b/vendor/golang.org/x/net/publicsuffix/table.go index 8eb0495edd2..369e44656ad 100644 --- a/vendor/golang.org/x/net/publicsuffix/table.go +++ b/vendor/golang.org/x/net/publicsuffix/table.go @@ -2,7 +2,7 @@ package publicsuffix -const version = "publicsuffix.org's public_suffix_list.dat, git revision 41cb01612341c7ce3bcdd0cc4e696ae9f6416600 (2019-11-08T08:48:39Z)" +const version = "publicsuffix.org's public_suffix_list.dat, git revision 7922d7c20e246552be418e8f72e577899fd30d99 (2020-02-18T23:18:19Z)" const ( nodesBitsChildren = 10 @@ -23,487 +23,488 @@ const ( ) // numTLD is the number of top level domains. -const numTLD = 1538 +const numTLD = 1528 // Text is the combined text of all labels. const text = "9guacuiababia-goracleaningroks-theatree12hpalermomahachijoinvill" + "eksvik12ix4432-balsfjordd-dnsiskinkyotobetsulikes-piedmonticello" + - "dingenaturhistorisches3-ap-south-16-b-dataikikonaikawachinaganoh" + - "aramcoachampionshiphoptobishimadridvagsoyereportatarantours3-ap-" + - "northeast-2038bloombergbauerninomiyakonojorpelandiyusuharabloxcm" + - "s3-website-us-west-2bluedancebmoattachments5yusuisservehumourbms" + - "akyotanabellunord-aurdalvdalaskanittedallasalleangaviikaascolipi" + - "cenodumetlifeinsurancebmwedeployuu2-localhostoregontrailroadnpar" + - "isor-fronirasakindigenaklodzkochikushinonsenergyuzawabnrwegrowei" + - "bolognagasakimobetsuitainaioirasebastopologyeongnamegawakayamaga" + - "zineat-urlimitedrangedalimoliseoullensvanguardray-dnsupdaternopi" + - "lawatchesalangenishiazaindustriabomloabathsbcatholicaxiashorokan" + - "aiebondrayddnsfreebox-osascoli-picenordre-landraydnsalondonetska" + - "rlsoybonnishigobookinghostfoldnavyboomlahppiacenzachpomorskienis" + - "hiharaboschaefflerdalinkyard-cloudnsaltdalivornobostikarmoybosto" + - "nakijinsekikogentingloboavistanbulsan-sudtirolombardynaliaskimit" + - "subatamibugattiffanynysadoes-itvedestrandrivefsnillfjordrobaknol" + - "uoktachikawakembuchikumagayagawakkanaibetsubamericanfamilydsclou" + - "deitychyattorneyagawafflecellclaimsaludrudupontariodejaneirodoyb" + - "otanicalgardenishiizunazukindustriesteamfamberkeleybotanicgarden" + - "ishikatakazakinfinitintuitjxfinitybotanybouncemerckmsdnipropetro" + - "vskjervoyagebounty-fullensakerrypropertiesalvadordalibabalestran" + - "dabergamo-siemensncfdurbanamexnethnologyboutiquebecheltenham-rad" + - "io-openairbusantiquest-a-la-maisondre-landroidurhamburglogoweirb" + - "ozen-sudtirolomzaporizhzhegurinuyamashinatsukigatakasakitchenish" + - "ikatsuragit-reposalzburgloppenzaolbia-tempio-olbiatempioolbialys" + - "tokkepnogatagajobojinvestmentsamegawabozen-suedtirolondrinamssko" + - "ganeinzais-a-candidatebplacedogawarabikomaezakirunorddalorenskog" + - "lugmbhartipscbgminakamichiharabrandywinevalleybrasiliabrindisibe" + - "nikinderoybristoloseyouriparliamentkmaxxjavald-aostarostwodzisla" + - "wellbeingzonebritishcolumbialowiezaganquanpachigasakievennodesab" + - "aerobaticketsamnangerbroadcastleclerchernihivgubsampalacebroadwa" + - "ybroke-itksatxn--0trq7p7nnishikawazukamisunagawabrokerbronnoysun" + - "dweberbrothermesaverdealstahaugesunderseaportsinfolldalotenkawab" + - "rowsersafetymarketsamsclubartowfarmsteadynathomebuiltmparmattele" + - "fonicarbonia-iglesias-carboniaiglesiascarboniabrumunddalottebrun" + - "elasticbeanstalkarpaczeladzparochernigovernmentoyosatoyokawabrus" + - "selsamsungmodellingmxn--11b4c3dyndns-at-homedepotenzamamidsundyn" + - "dns-at-workisboringrimstadyndns-blogdnsandnessjoenishimerabruxel" + - "lesandoybryansklepparsandvikcoromantovalle-d-aostaticsanfrancisc" + - "ofreakunemurorangeiseiyoichippubetsubetsugarugbydgoszczecinemage" + - "ntositecnologiabrynewhollandyndns-freeboxosloftranakanojoetsuwan" + - "ouchikujogaszkolajollamericanexpressexybuskerudinewmexicoalottok" + - "onamegatakatsukis-a-catererbuzentsujiiebuzzwhalingripebwhoswhokk" + - "sundyndns-homednsangobzhitomirumalatvuopmicrolightingriwataraidy" + - "ndns-ipartis-a-celticsfanishinomiyashironobzzcolognexus-2colonia" + - "lwilliamsburgrongausdalukowiiheyakumoldeloittemp-dnsaogoncartier" + - "coloradoplateaudiocolumbusheycommunecommunitycomoarekecomparemar" + - "kerryhotelsaotomeloyalistoragecompute-1computerhistoryofscience-" + - "fictioncomsecuritytacticsapporocondoshichinohealth-carereformina" + - "miechizenconferenceconstructionconsuladonnakaiwamizawassamukawat" + - "aricoharuovatranoyconsultanthropologyconsultingrossetouchihayaak" + - "asakawaharacontactransportecontagematsubaracontemporaryarteducat" + - "ionalchikugodontexistmein-iservebeercontractorskenconventureshin" + - "odebalancertificationcookingchannelsdvrdnsfor-better-thanawatcha" + - "ndclockashiwaracooluroycooperativano-frankivskolegallocus-3copen" + - "hagencyclopedichiryukyuragifuchungbukharanzanishinoomotegocorsic" + - "afederationcorvettemasekashiwazakiyosatokamachintaifun-dnsdojols" + - "tercosenzakopanecosidnshome-webserverdalutskasukabedzin-berlinda" + - "sdaburcostumedicinakamagayahabaghdadyndns-workshopitsitevadsobet" + - "sumidatlantichitachinakagawashtenawdev-myqnapcloudcontrolledekag" + - "aminogiftsanjotoyotapartsannanishinoshimatsuuracouchpotatofriesa" + - "rdegnaroycounciluxurycouponsardiniacq-acranbrookuwanalyticsarluz" + - "erncrdyndns1creditcardynnsarpsborgroundhandlingroznycreditunionc" + - "remonashgabadaddjaguarqhachirogatakanezawacrewildlifedorainfracl" + - "ouderacricketrzyncrimeast-kazakhstanangercrotonecrownipasadenara" + - "shinocrsvpassagensarufutsunomiyawakasaikaitakoelncruisesasayamac" + - "ryptonomichigangwoncuisinellair-traffic-controlleyculturalcenter" + - "tainmentransurlvivanovoldacuneocupcakecuritibahcavuotnagaivuotna" + - "gaokakyotambabyeniwaizumiotsukumiyamazonawsagaeroclubmedecincinn" + - "ationwidealercxn--12c1fe0bradescorporationcymrussiacyonabarumina" + - "mifuranocyoutheworkpccwilliamhillferrerotikagoshimalvikasumigaur" + - "awa-mazowszextraspace-to-rentalstomakomaibarafetsundynuconnectra" + - "paniizafgruefhvalerfidoomdnstracefieldynv6figueresinstaginguideg" + - "reefilateliafilegear-audnedalnfilegear-deatnufcfanfilegear-gbizf" + - "ilegear-iefilegear-jpmorganfilegear-sguitarsavannahgafilminamiiz" + - "ukamiokameokameyamatotakadafinalfinancefineartsaves-the-whalessa" + - "ndria-trani-barletta-andriatranibarlettaandriafinlandynvpnplus-4" + - "finnoyfirebaseapplinzis-a-financialadvisor-aurdalfirenzefireston" + - "efirmdalegoldpoint2thisamitsukefishingolffansavonarusawafitjarvo" + - "dkafjordyroyrvikingrpassenger-associationfitnessettlementraveler" + - "sinsurancefjalerflesbergujohanamakinoharaflickragerogersaxofligh" + - "tschoenbrunnflirfloginlinefloraflorencefloridattorelayfloripader" + - "bornfloristanohatakaharulminamimakis-a-geekasuyanagawaflorokunoh" + - "ealthcareerschokokekschokoladenflowerscholarshipschoolschulefltr" + - "dflynnhosting-clusterflynnhubanzaicloudcontrolappleborkdalpha-my" + - "qnapcloud66fndfor-ourfor-somedizinhistorischeschwarzgwangjuniper" + - "for-theaterforexrothadanorthwesternmutualforgotdnschweizforli-ce" + - "sena-forlicesenaforlikescandyn53forsaleikangerforsandasuologoipa" + - "triafortalfortmissoulancashirecreationfortworthadselectrentin-su" + - "d-tirolforumzfosnesciencecentersciencehistoryfotaris-a-greenfoxf" + - "ordebianfozorafredrikstadtvscientistordalfreeddnsgeekgalaxyfreed" + - "esktopocznore-og-uvdalfreemasonryfreesitexaskoyabearalvahkihokum" + - "akogengerdalcesurancechirealmpmnfreetlscjohnsonfreiburgulenfreig" + - "htrentin-sudtirolfreseniuscountryestateofdelawareggio-calabriafr" + - "ibourgunmaoris-a-gurulvikaszubyfriuli-v-giuliafriuli-ve-giuliafr" + - "iuli-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgi" + - "uliafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giu" + - "liafriuliveneziagiuliafriulivgiuliafrlfroganscotlandfrognfroland" + - "from-akrehamnfrom-alfrom-arfrom-azimuthdfcbankatowicefrom-capebr" + - "etonamicrosoftbankatsushikabeeldengeluidfrom-codyn-vpndnscrapper" + - "-sitefrom-ctrentin-sued-tirolfrom-dchitosetogakushimotoganewspap" + - "erfrom-dedyn-berlincolnfrom-flanderscrappinguovdageaidnunusualpe" + - "rsonfrom-gaulardalfrom-hichisochildrensgardenfrom-iafrom-idfrom-" + - "ilfrom-in-brbarcelonagareyamaizuruhrhcloudiscoveryombolzano-alto" + - "adigeu-3from-kscrysechocolatelemarkaruizawafrom-kyowariasahikawa" + - "winbarclaycards3-fips-us-gov-west-1from-lancasterfrom-mamurogawa" + - "from-mdfrom-meeresistancefrom-mifunefrom-mnfrom-modalenfrom-mser" + - "veirchofunatoriginstitutelevisionishiokoppegardyndns-mailouvreit" + - "oyotomiyazakis-a-chefarsundyndns-office-on-the-webhareidsbergeni" + - "shitosashimizunaminamibosogndalowiczest-le-patronishiwakis-a-con" + - "servativegarsheis-a-cpadualstackhero-networkinggroupartyfrom-mtn" + - "from-nctulanciafrom-ndfrom-nefrom-nh-serveblogsiteleafamilycompa" + - "nyminamiminowafrom-njaworznoticiasnesoddenmarkhangelskjakdneprop" + - "etrovskiervaapsteiermarkatsuyamarylandfrom-nminamioguni5from-nva" + - "lled-aostamayufuettertdasnetzfrom-nyfrom-ohkurafrom-oketogurafro" + - "m-orfrom-padovaksdalfrom-pratohmangonohejis-a-hard-workerservemi" + - "necraftrentin-suedtirolfrom-ris-a-hunterfrom-schmidtre-gauldalfr" + - "om-sdfrom-tnfrom-txn--12co0c3b4evalleaostavernfrom-utazuerichard" + - "lillehammerfeste-ipaviancarrdfrom-val-daostavalleyfrom-vtrentino" + - "-a-adigefrom-wafrom-wielunnerfrom-wvalledaostaobaomoriguchiharag" + - "usartservemp3from-wyfrosinonefrostalowa-wolawafroyahooguyfstcgro" + - "upfizerfujiiderafujikawaguchikonefujiminokamoenairlinedre-eikerf" + - "ujinomiyadavvenjargap-northeast-3fujiokayamangyshlakasamatsudovr" + - "e-eikerfujisatoshonairportland-4-salernoboribetsuckservep2pgfogg" + - "iafujisawafujishiroishidakabiratoridefenseljordfujitsurugashiman" + - "iwakuratextileirfjordfujixeroxn--1ck2e1barclays3-sa-east-1fujiyo" + - "shidavvesiidatsunanjoburgushikamifuranorth-kazakhstanfukayabeats" + - "ervepicservequakefukuchiyamadazaifudaigojomedio-campidano-medioc" + - "ampidanomediofukudominichonanbulsan-suedtirolpusercontentoyotsuk" + - "aidofukuis-a-knightpointtohobby-sitefukumitsubishigakisarazureco" + - "ntainerdpolicefukuokazakishiwadafukuroishikarikaturindalfukusaki" + - "sofukushimannorfolkebibleirvikaufenfukuyamagatakahatakaishimogos" + - "enfunabashiriuchinadafunagatakamatsukawafunahashikamiamakusatsum" + - "asendaisennangooglecodespotaruis-a-landscaperfundaciofuoiskujuku" + - "riyamansionservesarcasmatartanddesignfuosskoczowindmillfurniture" + - "ggio-emilia-romagnakatombetsumitakagiizefurubirafurudonostiaafur" + - "ukawairtelebitballooningwiddleitungsenfusodegaurafussaikisosakit" + - "agawafutabayamaguchinomigawafutboldlygoingnowhere-for-morenakats" + - "ugawafuttsurugimperiafuturecmservicesevastopolefuturehostingxn--" + - "1ctwolominamatargivestbytemarkautokeinotteroyfuturemailingfvgfyl" + - "kesbiblackbaudcdn77-securebungoonord-odalwaysdatabaseballangenka" + - "inanaejrietisalatinabenonichoseiroumuenchenissandiegofyresdalhan" + - "gglidinghangoutsystemscloudyclusterhannanmokuizumodenakayamarbur" + - "ghannosegawahanyuzenhapmirharstadharvestcelebrationhasamarcheapi" + - "geelvinckazoologyhasaminami-alpsewindowsharis-a-libertarianhashb" + - "anghasudahasura-appharmaciensharpharmacyshawaiijimarnardalhasvik" + - "azunow-dnshellaspeziahatogayaizuwakamatsubushikusakadogawahatoya" + - "mazakitakamiizumisanofidelityhatsukaichikaiseis-a-linux-useranis" + - "hiaritabashijonawatehattfjelldalhayashimamotobungotakadapliernew" + - "jerseyhazuminobusells-for-unzenhelsinkitakatakaokalmykiahembygds" + - "forbundhemneshimojis-a-llamarriottrentino-aadigehemsedalhepforge" + - "herokussldheroyhgtvallee-aosteroyhigashiagatsumagoianiahigashich" + - "ichibunkyonanaoshimageandsoundandvisionhigashihiroshimanehigashi" + - "izumozakitakyushuaiahigashikagawahigashikagurasoedahigashikawaki" + - "taaikitamihamadahigashikurumeetnedalhigashimatsushimaritimodernh" + - "igashimatsuyamakitaakitadaitoigawahigashimurayamamotorcycleshimo" + - "kawahigashinarusells-itrentino-alto-adigehigashinehigashiomihach" + - "imanaustdalhigashiosakasayamanakakogawahigashishirakawamatakaraz" + - "ukaluganskypehigashisumiyoshikawaminamiaikitamotosumy-gatewayhig" + - "ashitsunoshiroomurahigashiurausukitanakagusukumoduminamisanrikub" + - "etsurfastly-terrariuminamiiserniahigashiyamatokoriyamanashiftedi" + - "tchyouriphdhigashiyodogawahigashiyoshinogaris-a-musicianhiraizum" + - "isatohnoshoooshikamaishimodatehirakatashinagawahiranairtrafficpl" + - "exus-1hirarahiratsukagawahirayakagehistorichouseshimokitayamahit" + - "achiomiyagildeskaliszhitachiotagoppdalhitraeumtgeradelmenhorstal" + - "banshimonitayanagithubusercontentrentino-altoadigehjartdalhjelme" + - "landholeckobierzyceholidayhomeiphiladelphiaareadmyblogspotrentin" + - "o-s-tirolhomelinkitoolsztynsettlershimonosekikawahomelinuxn--1lq" + - "s03nhomeofficehomesecuritymacaparecidahomesecuritypchoshibuyacht" + - "sannohelplfinancialubindalublindesnesanokarumaifashionissayokkai" + - "chiropractichernivtsiciliahomesensellsyourhomegoodshimosuwalkis-" + - "a-nascarfanhomeunixn--1lqs71dhondahongotembaixadahonjyoitakasago" + - "tpantheonsitehornindalhorsembokukitashiobarahorteneis-a-nursemin" + - "ehospitalhoteleshimotsukehotmailhoyangerhoylandetroitskddielddan" + - "uorrikuzentakatajimidorissagamiharahumanitieshimotsumahurdalhuru" + - "majis-a-painteractivegaskvollhyllestadhyogoris-a-patsfanhyugawar" + - "ahyundaiwafuneis-very-sweetpepperis-with-thebandoisleofmancheste" + - "rjewelryjewishartgalleryjfkhakassiajgorajlljmphoenixn--1qqw23ajn" + - "jcphilipsyno-dshintokushimajoyentrentino-sued-tiroljoyokaichibal" + - "atinoipirangamvikharkivalleeaosteinkjerusalembroideryjpnjprshiny" + - "oshitomiokamitondabayashiogamagoriziajurkoseis-a-playerkosherbro" + - "okegawakoshimizumakiyosunndalkoshunantankhersonkosugekotohiradom" + - "ainsurehabmerkotourakouhokutamakizunokunimimatakatoris-a-republi" + - "cancerresearchaeologicaliforniakounosupplieshirahamatonbetsurnad" + - "alkouyamashikekouzushimashikis-a-rockstarachowicekozagawakozakis" + - "-a-socialistdlibestadkozowinnershirakofuefukihaboromskogkpnkppsp" + - "dnshiranukamitsuekrasnikahokutokashikis-a-soxfankrasnodarkredsto" + - "nekristiansandcatshiraois-a-studentalkristiansundkrodsheradkroks" + - "tadelvaldaostathelleluxembourgkryminamitanekumatorinokumejimasoy" + - "kumenantokigawakunisakis-a-teacherkassyncloudkunitachiarailwayku" + - "nitomigusukumamotoyamashikokuchuokunneppubtlshiraokamogawakunsts" + - "ammlungkunstunddesignkuokgroupictetrentino-suedtirolkureisenkurg" + - "ankurobelaudibleasingleshiratakahagitlaborkurogiminamiashigaraku" + - "roisoftwarendalenugkuromatsunais-a-techietis-a-personaltrainerku" + - "rotakikawasakis-a-therapistoiakushirogawakustanais-an-accountant" + - "shinichinankusupplykutchanelkutnokuzumakis-an-actorkvafjordkvals" + - "undkvamlidlugolekadenagahamaroygardenebakkeshibechambagriculture" + - "nnebudejjuedischesapeakebayernutwentekvanangenkvinesdalkvinnhera" + - "dkviteseidskogkvitsoykwpspectruminamiuonumassa-carrara-massacarr" + - "aramassabusinessebyklecznagasukekzmisugitokorozawamitourismolang" + - "evagrigentomologyeonggiehtavuoatnadexetermitoyoakemiuramiyazurew" + - "ebsiteshikagamiishibukawamiyotamanomjondalenmlbfanmonstermontrea" + - "lestatefarmequipmentrentinoaadigemonza-brianzapposhishikuis-an-a" + - "rtistgorymonza-e-della-brianzaptokuyamatsumotofukemonzabrianzara" + - "monzaebrianzamonzaedellabrianzamoonscalewismillermoparachutingmo" + - "rdoviamoriyamatsunomoriyoshiminamiawajikis-an-engineeringmormonm" + - "outhagakhanamigawamoroyamatsusakahoginankokubunjis-an-entertaine" + - "rmortgagemoscowioshisognemoseushistorymosjoenmoskeneshisuifuelve" + - "ruminamiyamashirokawanabelembetsukubankhmelnitskiyamarylhurstjor" + - "dalshalsenmosshitaramamosvikhmelnytskyivanylvenicemoteginowaniih" + - "amatamakawajimanxn--2scrj9christiansburgroks-thisayamanobeokakud" + - "amatsuemoviemovimientokyotangovtrentinoalto-adigemovistargardmoz" + - "illa-iotrentinoaltoadigemtranbymuenstermuginozawaonsenmuikamisat" + - "okaizukamikitayamatsuris-bytomaritimekeepingmukodairamulhouserve" + - "game-servermunakatanemuncienciamuosattemupictureshizukuishimofus" + - "aitamatsukuris-certifieducatorahimeshimamateramobaramurmanskhpla" + - "ystationmurotorcraftrentinos-tirolmusashimurayamatsushigemusashi" + - "noharamuseetrentinostirolmuseumverenigingmusicargodaddyn-o-saurl" + - "andeshizuokanagawamutsuzawamy-vigorgemy-wanggouvichristmasakindl" + - "efrakkestadyndns-picsantacruzsantafedjejuifminamidaitomandalucan" + - "iamyactivedirectorymyasustor-elvdalmycdn77-sslattuminanomydattol" + - "ocalhistorymyddnskingmydissentrentinosud-tirolmydobisshikis-foun" + - "dationmydroboehringerikemydshoppingmyeffectrentinosudtirolmyfire" + - "wallonieruchomoscienceandindustrynmyfritzmyftpaccesshoujis-gonem" + - "yhome-servermyjinomykolaivaomymailermymediapchromedicaltanissett" + - "airavennagatorockartuzymyokohamamatsudamypepiemontemypetshowamyp" + - "hotoshibalena-deviceshowtimembershriramsterdamnserverbaniamypiag" + - "etmyiphostrodawaramypsxn--30rr7ymysecuritycamerakermyshopblocksi" + - "enarutolgamytis-a-bookkeeperugiamytuleapilotsigdalmyvnchryslermy" + - "wirepaircraftingvollombardiamondsilklabudhabikinokawabarthaebaru" + - "ericssonyoursidell-ogliastraderpiwatepixolinopizzapknx-serversai" + - "lleshiojirishirifujiedaplantationplantsimple-urlplatformshangril" + - "ansirdalplazaplcube-serversicherungplumbingoplurinacionalpodhale" + - "zajskolobrzegersundpodlasiellaktyubinskiptveterinaireadthedocsca" + - "ppgafannefrankfurtrentinosuedtirolpodzonepohlpoivronpokerpokrovs" + - "komaganepoliticarrierpolitiendapolkowicepoltavalle-aostatic-acce" + - "ssjcbnpparibaselburgpomorzeszowitdkomakiyosemiteponpesaro-urbino" + - "-pesarourbinopesaromasvuotnaritakurashikis-into-animeguroroshinj" + - "ukumanowtvallee-d-aosteigenponypordenonepornporsangerporsangugep" + - "orsgrunnanyokoshibahikariwanumatakinouepoznanpraxis-a-bruinsfanp" + - "rdpreservationpresidioprgmrprimelhusdecorativeartslupskomatsushi" + - "masfjordenprincipeprivatizehealthinsuranceprochowiceproductionsl" + - "zprofesionalprogressivenneslaskerrylogisticsnoasaitoshimayfirsto" + - "ckholmestrandpromombetsurgeonshalloffameldalpropertyprotectionpr" + - "otonetrentinsud-tirolprudentialpruszkowithgoogleapisa-hockeynuts" + - "iracusakatakkoebenhavnprvcyberlevagangaviikanonjis-into-carshink" + - "amigotoyohashimototalprzeworskogptplusgardenpulawypupimientaketo" + - "misatomobellevuelosangelesjabbottrentinosued-tirolpvhagebostadpv" + - "trentinsudtirolpwchungnamdalseidfjordyndns-remotewdyndns-serveri" + - "signissedaluccapitalonewportlligatoyourapzqldqponiatowadaqslingq" + - "ualifioappinkmpspbarefootballfinanzgoraustinnavuotnaples3-ca-cen" + - "tral-1quickconnectrentinsued-tirolquicksytestingquipelementsokan" + - "aniimihoboleslawiechurcharternidyndns-webhopencraftoystre-slidre" + - "ttozawaqvcircleverappsseljeepsongdalenviknaharimalopolskanlandyn" + - "dns-wikirkenesantamariakesusonosuzakanazawasuzukaneyamazoesuzuki" + - "s-leetrentino-stirolsvalbardunloppacificircustomersveiosvelvikom" + - "onowruzhgorodeosvizzerasvn-reposopotrentinsuedtirolswedenswidnic" + - "artoonartdecologiaswidnikkokaminokawanishiaizubangeswiebodzin-bu" + - "tterswiftcoverswinoujscienceandhistoryswissmarterthanyousynology" + - "-diskstationsynology-dsor-odaltuscanytushuissier-justicetuvalle-" + - "daostavangertuxfamilytwmailvestfoldvestnesorocabalsan-sudtirolla" + - "gdenesnaaseinet-freaksolognevestre-slidreplanetariuminiserverves" + - "tre-totennishiawakuravestvagoyvevelstadvibo-valentiavibovalentia" + - "videovillasorreisahayakawakamiichikawamisatottoris-into-cartoons" + - "hinshinotsurgeryvinnicasacamdvrcampinagrandebuilderschlesischeso" + - "rtlandvinnytsiavipsinaappioneervirginiavirtual-userveexchangevir" + - "tualservervirtualuserveftpippugliavirtueeldomein-vigorlicevirtue" + - "lvisakegawaviterboknowsitallvivolkenkundenvixn--32vp30haibarakit" + - "ahiroshimapartmentsevenassisicilyvlaanderenvladikavkazimierz-dol" + - "nyvladimirvlogintoyonezawavminnesotaketakayamasudavologdanskomvu" + - "xn--2m4a15evolvolkswagentsorumincomcastresindevicenzaporizhzhiav" + - "olyngdalvoorloperauniterois-lostrolekamakurazakiwakunigamiharusl" + - "ivinghistoryvossevangenvotevotingvotoyonowloclawekongsbergwmflab" + - "soundcastronomy-routerwnextdirectromsakakinokiaworldworse-thanda" + - "wowithyoutuberspacekitagatargets-itroandinosaurepbodynamic-dnsor" + - "-varangerwpdevcloudwritesthisblogsytewroclawiwatsukiyonotairesta" + - "urantrogstadwtcmintelligencewtfastvps-serveronakasatsunairguardi" + - "annakadomarinebraskauniversitydalaheadjudaicable-modemocraciawuo" + - "zuwzmiuwajimaxn--3oq18vl8pn36axn--3pxu8kongsvingerxn--42c2d9axn-" + - "-45br5cylxn--45brj9citadeliveryggeexn--45q11citichernovtsymantec" + - "hnologyxn--4gbriminingxn--4it168dxn--4it797koninjambylxn--4pvxs4" + - "allxn--54b7fta0ccivilaviationiyodogawaxn--55qw42gxn--55qx5dxn--5" + - "js045dxn--5rtp49civilisationxn--5rtq34konskowolayangrouphonefoss" + - "hioyanaizustkannamilanotogawaxn--5su34j936bgsgxn--5tzm5gxn--6btw" + - "5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264civilizationxn--" + - "80adxhksouthcarolinarvikommunalforbundxn--80ao21axn--80aqecdr1ax" + - "n--80asehdbarrel-of-knowledgemologicallillyomitanoddaustrheimatu" + - "nduhrennesoyokozebinordreisa-geekaracoldwarmiastagebizenakanotod" + - "denayorovnobninskaragandaukraanghkeymachineustarnbergjemnes3-ap-" + - "southeast-2xn--80aswgxn--80augustownproviderxn--8ltr62konsulatro" + - "beepilepsykkylvenetodayxn--8pvr4uxn--8y0a063axn--90a3academiamic" + - "aaarborteaches-yogasawaracingxn--90aeroportalabamagasakishimabar" + - "aogakibichuoxn--90aishobarakawagoexn--90azhytomyravendbarrell-of" + - "-knowledgeologyonagoyauthordalandeportenrightathomeftpalmaserati" + - "bmdevelopmentcp4lima-cityeatselinogradultateshinanomachimkentate" + - "yamabogadodgehirnrtatsunobihirosakikamijimatsuzaki234xn--9dbhblg" + - "6dietcimdbarsycenterprisesakikugawalmartjeldsundishakotanflfanfs" + - "hostrowwlkpmgladefinimakanegasakirautomotiveconomiasakuchinotsuc" + - "hiurakawalesundgcagliaribeiraokinawashirosatochigiessensiositele" + - "kommunikationionjukudoyamaintenancehimejiitatebayashiibajddarchi" + - "tecturealtorlandiscountyolasitempresashibetsukuiiyamanouchikuhok" + - "uryugasakitaurayasudaurskog-holandingjerdrumemsettsupportaxihuan" + - "aval-d-aosta-valleyokosukanumazuryokoteastcoastaldefenceatonsber" + - "gjerstadotsuruokakamigaharagrocerybnikeisenbahnatuurwetenschappe" + - "naumburggfarmerseine164-baltimore-og-romsdalipayboltattoobiraetn" + - "abudapest-a-la-masion-webhostingdyniabruzzoologicalvinklein-addr" + - "ammenuorochesterimo-i-ranaamesjevuemielno-ipifonyc66xn--9dbq2axn" + - "--9et52uxn--9krt00axn--andy-iraxn--aroport-byandexcloudxn--asky-" + - "iraxn--aurskog-hland-jnbarsyonlinewhampshirealtysnes3-us-east-2x" + - "n--avery-yuasakuhokkaidownloadxn--b-5gaxn--b4w605ferdxn--balsan-" + - "sdtirol-nsbsouthwestfalenxn--bck1b9a5dre4civilwarmanagementozsde" + - "ltaiwanairforcebetsuikidsmynasushiobarackmazerbaijan-mayendofthe" + - "internetlifyis-a-cubicle-slavellinodearthachiojiyaitakanabeautys" + - "vardoesntexisteingeekashibatakasugais-a-democratrani-andria-barl" + - "etta-trani-andriaxn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jx" + - "axn--bhcavuotna-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn-" + - "-bievt-0qa2xn--bjarky-fyaotsurreyxn--bjddar-ptarnobrzegyptianxn-" + - "-blt-elabourxn--bmlo-graingerxn--bod-2natalxn--bozen-sdtirol-2ob" + - "anazawaxn--brnny-wuacademy-firewall-gatewayxn--brnnysund-m8accid" + - "ent-investigation-aptibleadpagest-mon-blogueurovision-rancherkas" + - "ydneyxn--brum-voagatromsojamisonxn--btsfjord-9zaxn--bulsan-sdtir" + - "ol-nsbashkiriautoscanadaeguambulanceoceanographics3-eu-west-1xn-" + - "-c1avgxn--c2br7gxn--c3s14misasaguris-an-anarchistoricalsocietyxn" + - "--cck2b3basicservercelliguriaveroykenglandiscourses3-eu-west-2xn" + - "--cesena-forl-mcbremangerxn--cesenaforl-i8axn--cg4bkis-not-certi" + - "fiedugit-pagespeedmobilizeroticahcesuoloanshinshiroxn--ciqpnxn--" + - "clchc0ea0b2g2a9gcdxn--comunicaes-v6a2oxn--correios-e-telecomunic" + - "aes-ghc29axn--czr694basilicataniavocatanzarowebspacemreviewskrak" + - "oweddingjesdalazioceanographiqueu-1xn--czrs0trusteexn--czru2dxn-" + - "-czrw28basketballyngenvironmentalconservationrenderxn--d1acj3bat" + - "ochiokinoshimakeupowiat-band-campaniavoues3-eu-west-3utilitiesqu" + - "are7xn--d1alfaromeoxn--d1atrvareservehalflifestylexn--d5qv7z876c" + - "lanbibaidarmeniaxn--davvenjrga-y4axn--djrs72d6uyxn--djty4konyvel" + - "olipophotographysioxn--dnna-grajewolterskluwerxn--drbak-wuaxn--d" + - "yry-iraxn--e1a4cldmailovecollegefantasyleaguernseyxn--eckvdtc9dx" + - "n--efvn9sowaxn--efvy88hair-surveillancexn--ehqz56nxn--elqq16haka" + - "tanortonxn--estv75gxn--eveni-0qa01gaxn--f6qx53axn--fct429kooris-" + - "a-photographerokuapphilatelyxn--fhbeiarnxn--finny-yuaxn--fiq228c" + - "5hspeedpartnersolundbeckomforbargainstantcloudfrontdoorxn--fiq64" + - "batsfjordisrechtraininglassassinationalheritageu-4xn--fiqs8spjel" + - "kavikommunexn--fiqz9spreadbettingxn--fjord-lraxn--fjq720axn--fl-" + - "ziaxn--flor-jraxn--flw351exn--forl-cesena-fcbsspydebergxn--forlc" + - "esena-c8axn--fpcrj9c3dxn--frde-grandrapidsrlxn--frna-woaraisaijo" + - "soyrovigotsukitahatakamoriokakegawaxn--frya-hraxn--fzc2c9e2click" + - "ashiharaxn--fzys8d69uvgmailxn--g2xx48clinichirurgiens-dentistes-" + - "en-francexn--gckr3f0fauskedsmokorsetagayaseralingenoamishirasato" + - "gokasells-for-lessaskatchewanxn--gecrj9cliniquenoharaxn--ggaviik" + - "a-8ya47hakodatexn--gildeskl-g0axn--givuotna-8yasakaiminatoyookan" + - "iepcexn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050is-savedu" + - "netflixilxn--gmqw5axn--h-2failxn--h1aeghakonexn--h2breg3evenesrt" + - "rentoyonakagyokutoyakokonoexn--h2brj9c8clintonoshoesantoandreamh" + - "ostersanukis-a-designerxn--h3cuzk1digitalxn--hbmer-xqaxn--hcesuo" + - "lo-7ya35bauhausposts-and-telecommunicationswatch-and-clockerxn--" + - "hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4acciden" + - "t-prevention-riopretobamaceratabuseating-organicbcn-north-1xn--h" + - "nefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn--hxt814exn-" + - "-hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513nxn--indery" + - "-fyasugivingxn--io0a7is-slickfhappousrcfastlylbananarepublicasad" + - "elamonedatingjovikarasjohkamikoaniikappuboliviajessheimetacentru" + - "meteorappalmspringsakerevistaples3-external-1xn--j1aefbsbxn--12c" + - "fi8ixb8lxn--j1amhakubahccavuotnagarahkkeravjuegoshikikuchikuseik" + - "arugalsacexn--j6w193gxn--jlq61u9w7beneventoeidsvollimanowarudaxa" + - "ustevollavagiskebinagisoccertmgretakahamalselvendrellavangenavig" + - "ationavoizumizakibigawajudygarlanddnslivelanddnss3-ap-southeast-" + - "1kappchizip6xn--jlster-byasuokanoyaltakashimarshallstatebankoper" + - "vikharkovalleedaostexn--jrpeland-54axn--jvr189misawaxn--k7yn95ex" + - "n--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woax" + - "n--klt787dxn--kltp7dxn--kltx9axn--klty5xn--3bst00misakis-an-actr" + - "esshinjournalismailillesandefjordxn--koluokta-7ya57hakuis-a-lawy" + - "erxn--kprw13dxn--kpry57dxn--kpu716fbx-osassaris-a-doctorayxn--kp" + - "ut3is-uberleetrentino-sud-tirolxn--krager-gyatomitamamuraxn--kra" + - "nghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfas" + - "tpanelblagrarchaeologyeongbuk0emmafann-arboretumbriamallamaceiob" + - "bcg120001wwwebredirectmemorial-o-g-i-n4t3l3p0rtashkentatamotors3" + - "-ap-northeast-1337xn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyatsuk" + - "anraxn--kvnangen-k0axn--l-1fairwindsrvaporcloudxn--l1accenturekl" + - "amborghinikolaeventstorfjordxn--laheadju-7yatsushiroxn--langevg-" + - "jxaxn--lcvr32dxn--ldingen-q1axn--leagaviika-52bentleyonagunicomm" + - "bankarasjokarasuyamarugame-hostrowiecaseihicampobassociatest-ise" + - "rvecounterstrikeverbankaratevje-og-hornnes3-us-gov-west-1xn--les" + - "und-huaxn--lgbbat1ad8jelenia-goraxn--lgrd-poacctrycloudflarezzox" + - "n--lhppi-xqaxn--linds-pramericanartrysiljanxn--lns-qlanxesstorjd" + - "evcloudfunctionshintomikasaharaxn--loabt-0qaxn--lrdal-sraxn--lre" + - "nskog-54axn--lt-liaclothingdustdataitogitsuldalucernexn--lten-gr" + - "anexn--lury-iraxn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2dde" + - "stpetersburgxn--mgb9awbfbxosaudaxn--mgba3a3ejtunesorfoldxn--mgba" + - "3a4f16axn--mgba3a4franamizuholdingstreamuneuesolutionsokndalxn--" + - "mgba7c0bbn0axn--mgbaakc7dvfedorapeoplegnicanonoichinomiyakexn--m" + - "gbaam7a8hakusanagochijiwadellogliastradingxn--mgbab2bdxn--mgbah1" + - "a3hjkrdxn--mgbai9a5eva00beppublishproxyzgorzeleccoffeedbackplane" + - "applicationcloudaccesscambridgestonewyorkshirecifedexhibitionhkt" + - "jmaxxxboxenapponazure-mobilexn--mgbai9azgqp6jeonnamerikawauexn--" + - "mgbayh7gpaleoxn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgbe" + - "rp4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mg" + - "bpl2fhskydivingxn--mgbqly7c0a67fbcn-northwest-1xn--mgbqly7cvafra" + - "nziskanerimaringatlantakahashimamakiryuohdattowebcampinashikimin" + - "ohostre-totendofinternet-dnsaliasiaxn--mgbt3dhdxn--mgbtf8flatang" + - "erxn--mgbtx2beskidyn-ip24xn--mgbx4cd0abbvieeexn--mix082fedorapro" + - "jectravelchannelxn--mix891feiraquarelleaseeklogesauheradynserveb" + - "bsasebofageorgeorgiaxn--mjndalen-64axn--mk0axin-dslgbtunkomorots" + - "ukaminoyamaxunjargaxn--mk1bu44cngrondarxn--mkru45is-very-badajoz" + - "xn--mlatvuopmi-s4axn--mli-tlapyxn--mlselv-iuaxn--moreke-juaxn--m" + - "ori-qsakuragawaxn--mosjen-eyawaraxn--mot-tlaquilancomelbournexn-" + - "-mre-og-romsdal-qqbestbuyshouses3-us-west-1xn--msy-ula0haldenxn-" + - "-mtta-vrjjat-k7aflakstadaokagakicks-assnasaarlandxn--muost-0qaxn" + - "--mxtq1misconfusedxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--3ds443gxn-" + - "-nit225koryokamikawanehonbetsurutaharaxn--nmesjevuemie-tcbalsan-" + - "suedtirolkuszczytnombresciaxn--nnx388axn--nodessakurais-very-evi" + - "llagexn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nt" + - "tery-byaeservehttpiszxn--nvuotna-hwaxn--nyqy26axn--o1achattanoog" + - "anordlandxn--o3cw4halsaintlouis-a-anarchistoireggiocalabriaxn--o" + - "3cyx2axn--od0algxn--od0aq3betainaboxfusejnyoriikaratsuginamikata" + - "gamilitaryoshiokanzakiyokawaraxn--ogbpf8flekkefjordxn--oppegrd-i" + - "xaxn--ostery-fyawatahamaxn--osyro-wuaxn--otu796dxn--p1acfermochi" + - "zukirovogradoyxn--p1ais-very-goodyearxn--pbt977cnpyatigorskodjef" + - "fersonxn--pgbs0dhlxn--porsgu-sta26ferraraxn--pssu33lxn--pssy2uxn" + - "--q9jyb4cnsaobernardoxn--qcka1pmckinseyxn--qqqt11mishimatsumaeba" + - "shikshacknetrentinoa-adigexn--qxamusementdllpagestudioxn--rady-i" + - "raxn--rdal-poaxn--rde-ularvikosaigawaxn--rdy-0nabaris-very-nicex" + - "n--rennesy-v1axn--rhkkervju-01aferrarivnexn--rholt-mragowoodside" + - "moneyxn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5nativeame" + - "ricanantiquestudynamisches-dnsomaxn--risr-iraxn--rland-uuaxn--rl" + - "ingen-mxaxn--rmskog-byaxn--rny31hammarfeastafricapetownnews-stag" + - "ingxn--rovu88bhzcasertaipeiheijin-the-bandain-vpncasinordkappana" + - "matta-varjjatjomemergencyahikobeardubaiduckdns3-us-west-2xn--rro" + - "s-granvindafjordxn--rskog-uuaxn--rst-0naturalhistorymuseumcenter" + - "xn--rsta-francaiseharaxn--rvc1e0am3exn--ryken-vuaxn--ryrvik-byax" + - "n--s-1faithruherecipescaravantaarpittsburghofficialxn--s9brj9cnt" + - "raniandriabarlettatraniandriaxn--sandnessjen-ogbieigersundivtasv" + - "uodnakamuratajirittogliattires3-website-ap-northeast-1xn--sandy-" + - "yuaxn--sdtirol-n2axn--seral-lraxn--ses554gxn--sgne-gratangenxn--" + - "skierv-utazastuff-4-salexn--skjervy-v1axn--skjk-soaxn--sknit-yqa" + - "xn--sknland-fxaxn--slat-5naturalsciencesnaturellestufftoread-boo" + - "ksnesomnarviikamishihoronobeauxartsandcraftsolarssonxn--slt-elab" + - "cieszynxn--smla-hraxn--smna-gratis-a-bulls-fanxn--snase-nraxn--s" + - "ndre-land-0cbielawaltervistaprinternationalfirearms3-website-ap-" + - "southeast-1xn--snes-poaxn--snsa-roaxn--sr-aurdal-l8axn--sr-fron-" + - "q1axn--sr-odal-q1axn--sr-varanger-ggbielladbrokes3-website-ap-so" + - "utheast-2xn--srfold-byaxn--srreisa-q1axn--srum-grazxn--stfold-9x" + - "axn--stjrdal-s1axn--stjrdalshalsen-sqbieszczadygeyachiyodaejeonb" + - "uklugsmilebtimnetzjampagefrontappanasonicateringebuildingleezexn" + - "--stre-toten-zcbievathletajimabaridagawakuyabukijobserverrankosh" + - "igayachimataijincheonhlfanhs3-website-eu-west-1xn--t60b56axn--tc" + - "kweatherchannelxn--tiq49xqyjetztrentino-sudtirolxn--tjme-hraxn--" + - "tn0agrinetbankosakaerodromegallupinbarreauctionredumbrella-spezi" + - "australiaisondriobranconagawalbrzycharitysfjordds3-eu-central-1x" + - "n--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol-rzbif" + - "ukagawarszawashingtondclkareliancexn--trentin-sdtirol-7vbigv-inf" + - "oodnetworkangerxn--trentino-sd-tirol-c3bihorologyukindianapolis-" + - "a-bloggerxn--trentino-sdtirol-szbikedagestangeometre-experts-com" + - "ptables3-website-sa-east-1xn--trentinosd-tirol-rzbilbaogashimada" + - "chicagoboats3-website-us-east-1xn--trentinosdtirol-7vbillustrati" + - "onthewifiatmallorcadaques3-website-us-west-1xn--trentinsd-tirol-" + - "6vbiohtawaramotoineppueblockbustermezlglitchaselfiparaglidingliw" + - "icexn--trentinsdtirol-nsbirdartcenterprisecloudappspotagerxn--tr" + - "gstad-r1axn--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atvarggatr" + - "itonxn--uc0ay4axn--uist22hamurakamigoris-a-liberalxn--uisz3gxn--" + - "unjrga-rtarumizusawaxn--unup4yxn--uuwu58axn--vads-jraxn--valle-a" + - "oste-ebbturystykanmakiwienxn--valle-d-aoste-ehbodollstuttgartrev" + - "isohughesooxn--valleaoste-e7axn--valledaoste-ebbvacationsusakis-" + - "into-gamessinazawaxn--vard-jraxn--vegrshei-c0axn--vermgensberate" + - "r-ctbirkenesoddtangenovaraholtalenikonanporomutashinaindianmarke" + - "tinglobalashovhachinohedmarkariyameiwamarumorimachidaxn--vermgen" + - "sberatung-pwbirthplacexn--vestvgy-ixa6oxn--vg-yiabkhaziaxn--vgan" + - "-qoaxn--vgsy-qoa0jevnakershuscultureggioemiliaromagnamsosnowiech" + - "oyodobashichikashukujitawaraumalborkasaokamiminersantabarbaraxn-" + - "-vgu402coguchikuzenxn--vhquvaroyxn--vler-qoaxn--vre-eiker-k8axn-" + - "-vrggt-xqadxn--vry-yla5gxn--vuq861bjarkoyukuhashimoichinosekigah" + - "araxn--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1collection" + - "xn--wgbl6axn--xhq521bjerkreimbamblebesbyglandroverhallaakesvuemi" + - "elecceu-2xn--xkc2al3hye2axn--xkc2dl3a5ee0handsonxn--y9a3aquarium" + - "issilevangerxn--yer-znaturbruksgymnxn--yfro4i67oxn--ygarden-p1ax" + - "n--ygbi2ammxn--3e0b707exn--ystre-slidre-ujbjugnieznord-frontierx" + - "n--zbx025dxn--zf0ao64axn--zf0avxn--3hcrj9cistrondheimmobilieniss" + - "hingucciprianiigataishinomakinkobayashikaoirmitakeharaxn--zfr164" + - "blackfridayurihonjournalistjohninohekinannestadivttasvuotnakanii" + - "kawatanaguraxnbayxz" + "dingen4tatarantours3-ap-south-16-b-dataiji234lima-cityeatselinog" + + "radult3l3p0rtashkentatamotors3-ap-northeast-2038blackfridayuu2-l" + + "ocalhostoregontrailroadnparachutingleezebloombergbauernirasakind" + + "igenaklodzkochikushinonsenergyuzawabloxcms3-website-us-west-1blu" + + "edagestangemologicallimoliseminebmoattachments3-website-us-west-" + + "2bms5ybmweddinglitchattanooganordlandrangedalinkyard-cloudyclust" + + "erbnrwedeploybomloabathsbchernihivgubsakyotanabellunord-aurdalph" + + "a-myqnapcloudaccesscambridgestoneuesalangenishiazaindustriabondr" + + "ay-dnsupdaternopilawatchesalondonetskaruizawabonnishigohtawaramo" + + "toineppueblockbustermezparaglidingliwicebookinghostfoldnavybooml" + + "air-traffic-controlleyboschaefflerdalivornomutashinaindustrieste" + + "amfamberkeleybostikarumaifarmsteadrayddnsfreebox-osascoli-piceno" + + "rdre-landraydnsaltdalombardynaliaskimitsubatamibudejjuegoshikiho" + + "kumakogenebakkeshibechambagriculturennebugattiffanynysadoes-itve" + + "destrandrivefsnillfjordrobaknoluoktachikawakembuchikumagayagawak" + + "kanaibetsubamericanfamilydsclouderackmazerbaijan-mayen-rootaribe" + + "iraogashimadachicagoboatsaludrudupontariobranconakamuratajirivne" + + "bostonakijinsekikogentappsselfiparisor-fronishiharabotanicalgard" + + "enishiizunazukinfinitintuitjomeloyalistoragebotanicgardenishikat" + + "aketomisatomobellevuelosangelesjabbottjxfinitybotanybouncemerckm" + + "sdnipropetrovskjervoyageorgeorgiabounty-fullensakerrypropertiesa" + + "lvadordalibabalestrandabergamo-siemensncfdurbanamexnethnologybou" + + "tiquebechernivtsiciliabozen-sudtirolomzaporizhzhegurinuyamashina" + + "tsukigatakasakitaurayasudabozen-suedtirolondrinamsskoganeinvestm" + + "entsalzburglobalashovhachinohedmarkasaokamiminersamegawabplacedo" + + "gawarabikomaezakirunorddalorenskogloboavistanbulsan-sudtiroloten" + + "kawabrandywinevalleybrasiliabrindisibenikimobetsuitainaioiraseba" + + "stopologyeongnamegawafflecellclaimsamnangerbristoloseyouriparlia" + + "mentkmaxxjavald-aostarnberglogowegroweibolognagareyamakeupowiath" + + "letajimabaridagawakuyabukikonaikawachinaganoharamcoachampionship" + + "hoptobishimadridvagsoyerbritishcolumbialowiezaganishikatsuragit-" + + "reposampalacebroadcastleclerchernovtsymantechnologybroadwaybroke" + + "-itksatxn--0trq7p7nnishikawazukamisunagawabrokerbronnoysundurham" + + "burgloppenzaolbia-tempio-olbiatempioolbialystokkepnogatagajoboji" + + "nzais-a-candidatebrothermesaverdealstahaugesunderseaportsinfolld" + + "alottebrowsersafetymarketsamsclubartoweirbrumunddalottokonamegat" + + "akayamashikokuchuobrunelasticbeanstalkashibatakatoris-a-catererb" + + "russelsamsunglugmbhartipscbgminakamichiharabruxellesandnessjoeni" + + "shimerabryansklepparmatta-varjjatmparochernigovernmentoyosatoyok" + + "awabrynewjerseybuskerudinewmexicoalouvreitoyotaparsandoybuzentsu" + + "jiiebuzzwellbeingzonebwfarsundweberbzhitomirumalatvuopmicrolight" + + "ingmodellingmxn--11b4c3dynathomebuiltwithdarkashiharabzzcolumbus" + + "heycommunecommunity-prochowicecomoarekecomparemarkerryhotelsanta" + + "mariakecompute-1computerhistoryofscience-fictioncomsecuritytacti" + + "csantoandreamhostersanukis-a-cubicle-slavellinodearthachiojiyaho" + + "oguycondoshichinohealth-carereforminamidaitomanchesterconference" + + "constructionconsuladonnagatorodoyconsultanthropologyconsultingro" + + "ngausdalukowhalingrossetouchihayaakasakawaharacontactraniandriab" + + "arlettatraniandriacontagematsubaracontemporaryarteducationalchik" + + "ugodontexistmein-iservebeercontractorskenconventureshinodebalanc" + + "ertificationcookingchannelsdvrdnsfor-better-thanawassamukawatari" + + "ghtathomeftpartycooluroycooperativano-frankivskolegallocus-3cope" + + "nhagencyclopedichitosetogakushimotoganewyorkshirecifedexhibition" + + "ishinoomotegocorsicafederationcorvettemp-dnsaobernardocosenzakop" + + "anecosidnshome-webserverdalutskasuyameinforumzcostumedicinaharim" + + "alopolskanlandyndns-office-on-the-webhareidsbergentingroundhandl" + + "ingroznycouchpotatofriesaogoncarriercounciluxurycouponsaotomelda" + + "luzerncq-acranbrookuwanalyticsapporocrdyndns-picsardegnaroycredi" + + "tcardyndns-remotewdyndns-serverisigncreditunioncremonashgabadadd" + + "jaguarqcxn--12c1fe0bradescorporationrendercrewhoswhokksundyndns-" + + "webhopencraftranoycricketrzyncrimeast-kazakhstanangercrotonecrow" + + "nipasadenarashinocrsvpassagensardiniacruisesarlvivanovoldacrypto" + + "nomichigangwoncuisinellajollamericanexpressexyculturalcentertain" + + "mentransportecuneocupcakecuritibaghdadyndns-wikirkenesarpsborgrp" + + "assenger-associationcymrussiacyonabaruminamiechizencyouthruherec" + + "ipescaravantaarpatriaferrerotikagoshimalvikaszubyfetsundyndns1fg" + + "uidegreefhvalerfidoomdnstracefieldynnsarufutsunomiyawakasaikaita" + + "koelnfigueresinstaginguitarsauheradynservebbsasayamayfirstockhol" + + "mestrandyndns-workshopitsitexaskoyabearalvahkijobservableusercon" + + "tentransurlfilateliafilegear-audnedalnfilegear-deatnulminamiiser" + + "niafilegear-gbizfilegear-iefilegear-jpmorganfilegear-sgujohanama" + + "kinoharafilminamiizukamiokameokameyamatotakadafinalfinancefinear" + + "tsavannahgafinlandynufcfanfinnoyfirebaseapplinzis-a-doctorayfire" + + "nzefirestonefirmdalegoldpoint2thisamitsukefishingolffansaves-the" + + "-whalessandria-trani-barletta-andriatranibarlettaandriafitjarvod" + + "kafjordynv6fitnessettlementravelersinsurancefjalerflesbergulenfl" + + "ickragerogersavonarusawaflightsaxoflirfloginlinefloraflorenceflo" + + "ridattorelayfloripaderbornfloristanohatakaharulvikatowicefloroku" + + "nohealthcareerschoenbrunnflowerschokokekschokoladenfltrdynvpnplu" + + "s-4flynnhosting-clusterflynnhubarcelonagawalesundgcagliaricoharu" + + "ovataxihuanflfanfshostrowwlkpmgjerdrumemsettsupportcp4fndyroyrvi" + + "kingruefor-ourfor-somedizinhistorischescholarshipschoolschulefor" + + "-theaterforexrothachirogatakamoriokakudamatsueforgotdnschwarzgwa" + + "ngjuniperforli-cesena-forlicesenaforlikescandyn53forsaleikangerf" + + "orsandasuologoipaviancargodaddyn-o-saurlandeschweizfortalfortmis" + + "soulancasterfortworthadanorthwesternmutualfosnesciencecenterscie" + + "ncehistoryfotaruis-a-financialadvisor-aurdalfoxfordebianfozorafr" + + "edrikstadtvscientistordalfreeddnsgeekgalaxyfreedesktopocznore-og" + + "-uvdalfreemasonryfreesitextileirfjordfreetlscjohnsonfreiburgunma" + + "nxn--12co0c3b4evalleaostavangerfreightrentin-sud-tirolfreseniusc" + + "ountryestateofdelawareggio-calabriafribourguovdageaidnunusualper" + + "sonfriuli-v-giuliafriuli-ve-giuliafriuli-vegiuliafriuli-venezia-" + + "giuliafriuli-veneziagiuliafriuli-vgiuliafriuliv-giuliafriulive-g" + + "iuliafriulivegiuliafriulivenezia-giuliafriuliveneziagiuliafriuli" + + "vgiuliafrlfroganscotlandfrognfrolandfrom-akrehamnfrom-alfrom-arf" + + "rom-azimutheworkpccwiiheyakagefrom-capebretonamicrosoftbankatsus" + + "hikabeeldengeluidfrom-codyn-vpndnscrapper-sitefrom-ctrentin-sudt" + + "irolfrom-dchocolatelevisionishinoshimatsushigefrom-dedyn-berlinc" + + "olnfrom-flanderscrappingushikamifuranorth-kazakhstanfrom-gaulard" + + "alfrom-hichisochildrensgardenfrom-iafrom-idfrom-ilfrom-in-brbarc" + + "laycards3-sa-east-1from-kscrysechofunatoriginstitutemasekashiwaz" + + "akiyosatokamachintaifun-dnsdojolsterfrom-kyowariasahikawawildlif" + + "edorainfracloudfrontdoorfrom-lanciafrom-mamurogawafrom-mdfrom-me" + + "eresistancefrom-mifunefrom-mnfrom-modalenfrom-mserveirchonanbuls" + + "an-suedtirolowiczest-le-patronishiokoppegardyndns-at-homedepoten" + + "zamamidsundyndns-at-workisboringrimstadyndns-blogdnsangofrom-mtn" + + "from-nctulangevagrigentomologyeonggiehtavuoatnadexeterfrom-ndfro" + + "m-nefrom-nh-serveblogsiteleafamilycompanyminamimakis-a-geekatsuy" + + "amarugame-hostrowiechoseiroumuenchenishitosashimizunaminamibosog" + + "ndalpusercontentoyotsukaidofrom-njaworznoticiasnesoddenmarkhange" + + "lskjakdnepropetrovskiervaapsteiermarkaufenfrom-nminamiminowafrom" + + "-nvalled-aostavernfrom-nyfrom-ohkurafrom-oketogurafrom-orfrom-pa" + + "dovaksdalfrom-pratohmandalfrom-ris-a-greenfrom-schmidtre-gauldal" + + "from-sdfrom-tnfrom-txn--1ck2e1barclays3-us-east-2from-utazuerich" + + "ardlillehammerfeste-ipfizerfrom-val-daostavalleyfrom-vtrentin-su" + + "ed-tirolfrom-wafrom-wielunnerfrom-wvalledaostaobaomoriguchiharah" + + "kkeravjuedischesapeakebayernunzenfrom-wyfrosinonefrostalowa-wola" + + "wafroyahikobeardubaiduckdnserveminecraftrentin-suedtirolfstcgrou" + + "pgfoggiafujiiderafujikawaguchikonefujiminokamoenairguardiannakad" + + "omarineat-urlfujinomiyadavvenjargap-northeast-3fujiokayamangonoh" + + "ejis-a-guruslivinghistoryfujisatoshonairlinebraskauniversitychya" + + "ttorneyagawakayamagazinedre-eikerfujisawafujishiroishidakabirato" + + "ridefenseljordfujitsurugashimangyshlakasamatsudovre-eikerfujixer" + + "oxn--1ctwolominamatargivestbytemarkautokeinotteroyfujiyoshidavve" + + "siidatsunanjoburgwiddleitungsenfukayabeatservemp3fukuchiyamadaza" + + "ifudaigojomedio-campidano-mediocampidanomediofukudominichoshibuy" + + "achiyodatingripefukuis-a-hard-workerservep2pharmacienservepicser" + + "vequakefukumitsubishigakisarazurecontainerdpolicefukuokazakishiw" + + "adafukuroishikarikaturindalfukusakisofukushimaniwakuratefukuyama" + + "gatakahatakaishimogosenfunabashiriuchinadafunagatakamatsukawafun" + + "ahashikamiamakusatsumasendaisennangooglecodespotrentino-a-adigef" + + "undaciofuoiskujukuriyamannorfolkebibleirvikazoologyfuosskoczowil" + + "liamhillfurnitureggio-emilia-romagnakasatsunairportland-4-salern" + + "oboribetsuckservesarcasmatartanddesignfurubirafurudonostiaafuruk" + + "awairtelebitballooningxn--1lqs03nfusodegaurafussagamiharafutabay" + + "amaguchinomigawafutboldlygoingnowhere-for-morenakatombetsumitaka" + + "giizefuttsurugimperiafuturecmservicesevastopolefuturehostingfutu" + + "remailingfvgfylkesbiblackbaudcdn77-securebungoonord-odalwaysdata" + + "baseballangenkainanaejrietisalatinabenonicbcn-north-1fyresdalhan" + + "goutsystemscloudhannanmokuizumodenakayamapartmentsewinbarefootba" + + "llfinanzgoraustrheimatunduhrennesoyokozebinagisoccertmgretakaham" + + "alselvendrellaziobiramusementdllpages3-ap-southeast-2hannosegawa" + + "hanyuzenhapmirharstadharvestcelebrationhasamarburghasaminami-alp" + + "sharis-a-lawyerhashbanghasudahasura-appharmacysharphdfcbankddiel" + + "ddanuorrittogliattireshawaiijimaritimoduminamioguni5hasvikfhappo" + + "usrcfastly-terrariuminamifuranohatogayaitakanezawahatoyamazakita" + + "kamiizumisanofidelityhatsukaichikaiseis-a-liberalhattfjelldalhay" + + "ashimamotobungotakadancehazuminobusells-for-ustkannamilanotogawa" + + "helsinkitakatakaokalmykiahembygdsforbundhemneshellaspeziahemseda" + + "lhepforgeherokussldheroyhgtvallee-aosteroyhigashiagatsumagoiania" + + "higashichichibunkyonanaoshimageandsoundandvisionthewifiatmallorc" + + "adaqueshimojis-a-libertarianhigashihiroshimanehigashiizumozakita" + + "kyushuaiahigashikagawahigashikagurasoedahigashikawakitaaikitamih" + + "amadahigashikurumeetnedalhigashimatsushimarcheapigeelvinckhakass" + + "iahigashimatsuyamakitaakitadaitoigawahigashimurayamamotorcyclesh" + + "imokawahigashinarusells-itrentino-alto-adigehigashinehigashiomih" + + "achimanagementrentino-altoadigehigashiosakasayamanakakogawahigas" + + "hishirakawamatakarazukaluganskygearapphiladelphiaareadmyblogspot" + + "rentino-s-tirolhigashisumiyoshikawaminamiaikitamotosumy-gatewayh" + + "igashitsunoshiroomurahigashiurausukitanakagusukumodernhigashiyam" + + "atokoriyamanashifteditchyouriphilatelyhigashiyodogawahigashiyosh" + + "inogaris-a-linux-useranishiaritabashijonawatehiraizumisatohnosho" + + "ooshikamaishimodatehirakatashinagawahiranairtrafficplexus-1hirar" + + "ahiratsukagawahirayaizuwakamatsubushikusakadogawahistorichousesh" + + "imokitayamahitachiomiyagildeskaliszhitachiotagoppdalhitraeumtger" + + "adelmenhorstalbanshimonitayanagithubusercontentrentino-stirolhja" + + "rtdalhjelmelandholeckobierzyceholidayhomeiphilipsyno-dshimonosek" + + "ikawahomelinkitoolsztynsettlershimosuwalkis-a-llamarriottrentino" + + "-sud-tirolhomelinuxn--1lqs71dhomeofficehomesecuritymacaparecidah" + + "omesecuritypchoyodobashichikashukujitawaravennagasukehomesenseer" + + "inghomeunixn--1qqw23ahondahongotembaixadahonjyoitakasagotpantheo" + + "nsitehornindalhorsellsyourhomegoodshimotsukehorteneis-a-musician" + + "hospitalhoteleshimotsumahotmailhoyangerhoylandetroitskypehumanit" + + "ieshinichinanhurdalhurumajis-a-nascarfanhyllestadhyogoris-a-nurs" + + "embokukitchenhyugawarahyundaiwafuneis-very-sweetpepperis-with-th" + + "ebandoisleofmanaustdaljewelryjewishartgalleryjfkharkovalleedaost" + + "ejgorajlljmphotographysiojnjcphonefosshintomikasaharajoyentrenti" + + "noa-adigejoyokaichibalatinogiftshiojirishirifujiedajpnjprshioyan" + + "aizujurkoseis-a-personaltrainerkosherbrookegawakoshimizumakizuno" + + "kunimimatakatsukiyosemitekoshunantankhmelnitskiyamarumorimachida" + + "kosugekotohiradomainsurehabmerkotourakouhokutamakis-a-photograph" + + "erokuapphoenixn--2m4a15ekounosupplieshirakofuefukihaboromskogkou" + + "yamarylhurstjordalshalsenkouzushimasfjordenkozagawakozakis-a-pla" + + "yerkozowindmillkpnkppspdnshiranukamitsuekrasnikahokutokashikis-a" + + "-republicancerresearchaeologicaliforniakrasnodarkredstonekristia" + + "nsandcatshiraois-a-rockstarachowicekristiansundkrodsheradkroksta" + + "delvaldaostarostwodzislawindowskrakowinnershiraokamogawakryminam" + + "isanrikubetsurfastpanelblagrarchaeologyeongbuk0emmafann-arboretu" + + "mbriamallamaceiobbcg120001wwwebredirectmembers3-ap-northeast-133" + + "7kumatorinokumejimashikis-a-socialistdlibestadkumenantokigawakun" + + "isakis-a-soxfankunitachiarailwaykunitomigusukumamotoyamashikekun" + + "neppubtlshiratakahagitlaborkunstsammlungkunstunddesignkuokgroupi" + + "lotshishikuis-a-studentalkureisenkurgankurobelaudibleasingleshis" + + "ognekurogiminamiashigarakuroisoftwarendalenugkuromatsunais-a-tea" + + "cherkassyncloudkurotakikawasakis-a-techietis-a-painteractivegask" + + "vollkushirogawakustanais-a-therapistoiakusupplykutchanelkutnokuz" + + "umakis-an-accountantshinjournalismailillesandefjordkvafjordkvals" + + "undkvamlidlugolekadenagahamaroygardendoftheinternetlifyis-an-act" + + "orkvanangenkvinesdalkvinnheradkviteseidskogkvitsoykwpspectrumina" + + "mitanekzmissileluxembourgmisugitokorozawamitourismolanxesshisuif" + + "uettertdasnetzmitoyoakemiuramiyazurewebsiteshikagamiishibukawami" + + "yotamanomjondalenmlbfanmonstermontrealestatefarmequipmentrentino" + + "aadigemonza-brianzapposhitaramamonza-e-della-brianzaptokuyamatsu" + + "maebashikshacknetrentinoalto-adigemonzabrianzaramonzaebrianzamon" + + "zaedellabrianzamoonscalevangermordoviamoriyamatsumotofukemoriyos" + + "himinamiawajikis-an-engineeringmormonmouthaebaruericssongdalenvi" + + "knakatsugawamoroyamatsunomortgagemoscowioshizukuishimofusaitamat" + + "sukuris-an-entertainermoseushistorymosjoenmoskeneshizuokanagawam" + + "osshoppingmosvikhplaystationmoteginowaniihamatamakawajimansionsh" + + "oujis-bytomaritimekeepingmoviemovimientokyotangovtrentinoaltoadi" + + "gemozilla-iotrentinos-tirolmtranbymuenstermuginozawaonsenmuikami" + + "satokaizukamikitayamatsuris-certifieducatorahimeshimamateramobar" + + "amukodairamulhouseoullensvanguardmunakatanemuncienciamuosattemup" + + "imientakinouemurmansklabudhabikinokawabarthadselectrentino-aadig" + + "emurotorcraftrentinostirolmusashimurayamatsusakahoginankokubunji" + + "s-foundationmusashinoharamuseetrentinosud-tirolmuseumverenigingm" + + "usicarbonia-iglesias-carboniaiglesiascarboniamutsuzawamy-vigorge" + + "my-wanggouvichromedicaltanissettairamyactivedirectorymyasustor-e" + + "lvdalmycdn77-sslattuminamiuonumassa-carrara-massacarraramassabus" + + "inessebyklecznagasakinderoymydattolocalhistorymyddnskingmydissen" + + "trentinosudtirolmydobisshikis-gonemydroboehringerikemydshowamyef" + + "fectrentinosued-tirolmyfirewallonieruchomoscienceandindustrynmyf" + + "oruminamiyamashirokawanabelembetsukubankhmelnytskyivanylvenicemy" + + "fritzmyftpaccesshowtimelhusdecorativeartshriramsterdamnserverban" + + "iamyhome-servermyjinomykolaivaomymailermymediapchungnamdalseidfj" + + "ordyndns-ipartis-a-chefashionishiwakis-a-conservativegarsheis-a-" + + "cpadualstackhero-networkinggroupartsannanissandiegomyokohamamats" + + "udamypepinkmpspbargainstantcloudfunctionswedenvironmentalconserv" + + "ationionjukudoyamaintenancempresashibetsukuiiyamanouchikuhokuryu" + + "gasakitashiobarauthordalanddnslivelanddnss3-eu-west-1mypetsienar" + + "utolgamyphotoshibalena-devicesigdalmypictetrentinosuedtirolmypsx" + + "n--30rr7ymysecuritycamerakermyshopblocksilknx-serverrankoshigaya" + + "nagawamytis-a-bloggermytuleapioneermyvnchurcharternidyndns-mailu" + + "bindalublindesnesannohelplfinancialucaniamywirepaircraftingvollo" + + "mbardiamondsimple-urlpizzapkolobrzegersundplantsirdalplatformsha" + + "ngrilapyplazaplcube-serversaillesjcbnpparibaselburgplumbingoplur" + + "inacionalpodhalewismillerpodlasiellaktyubinskiptveterinaireadthe" + + "docscappgafannefrankfurtrentinsud-tirolpodzonepohlpoivronpokerpo" + + "krovskomaganepoliticarrdpolitiendapolkowicepoltavalle-aostathell" + + "ezajskomakiyosunndalpomorzeszowitdkomatsushimarylandponpesaro-ur" + + "bino-pesarourbinopesaromasvuotnaritakurashikis-into-animeguroros" + + "hinkamigotoyohashimototalponypordenonepornporsangerporsangugepor" + + "sgrunnanyokoshibahikariwanumatakkoebenhavnpoznanpraxis-a-bookkee" + + "perspectakashimarnardalprdpreservationpresidioprgmrprimelbournep" + + "rincipeprivatizehealthinsuranceproductionslupskomforbarreauction" + + "-webhostingjerstadotsuruokakamigaharautomotiveconomiasakuchinots" + + "uchiurakawalbrzycharitysfjordds3-eu-west-2profesionalprogressive" + + "nneslaskerrylogisticslzpromombetsurgeonshalloffameiwamasoyproper" + + "typrotectionprotonetrentinsudtirolprudentialpruszkowithgoogleapi" + + "sa-hockeynutsiracusakatamayufuelveruminanoprvcyberlevagangaviika" + + "nonjis-into-carshinshinotsurgeryprzeworskogptplusgardenpulawypup" + + "ippugliapvhagakhanamigawapvtrentinsued-tirolpwcircustomer-ocimdb" + + "ananarepublicaseihicampobassociatest-iservecounterstrikehimejibm" + + "deportevadsobetsumidatlanticasertaipeiheijiitatebayashiibajddarc" + + "hitecturealtorlandevelopmentattoobservereviewsaintlouis-a-bruins" + + "fanayorovnoceanographics3-fips-us-gov-west-1pzqhagebostadqldqpon" + + "iatowadaqslingqualifioappiszquickconnectrentinsuedtirolquicksyte" + + "stingquipelementsnoasaitoshimattelekommunikationqvcistrondheimmo" + + "bilienissayokkaichiropractichirurgiens-dentistes-en-francesuzaka" + + "nazawasuzukaneyamazoesuzukis-leetrentino-sudtirolsvalbardunloppa" + + "cificitichiryukyuragifuchungbukharaumalborkashiwarasveiosvelviko" + + "morotsukaminoyamaxunjargasvizzerasvn-reposomnarviikamishihoronob" + + "eauxartsandcraftsokndalswidnicartoonartdecologiaswidnikkokaminok" + + "awanishiaizubangeswiebodzin-butterswiftcoverswinoujscienceandhis" + + "toryswissmarterthanyousynology-diskstationsynology-dsooturystyka" + + "nmakiwientuscanytushuissier-justicetuvalle-daostaticsor-varanger" + + "tuxfamilytwmailvestfoldvestnesorfoldvestre-slidreplantationvestr" + + "e-totennishiawakuravestvagoyvevelstadvibo-valentiavibovalentiavi" + + "deovillasorocabalsan-sudtirollagdenesnaaseinet-freaksolarssonvin" + + "nicasacamdvrcampinagrandebuilderschlesischesorreisahayakawakamii" + + "chikawamisatottoris-into-cartoonshinshirovinnytsiavipsinaappitts" + + "burghofficialvirginiavirtual-userveftpiwatevirtualservervirtualu" + + "servegame-servervirtueeldomein-vigorlicevirtuelvisakegawaviterbo" + + "knowsitallvivolkenkundenvixn--32vp30haibarakitahatakanabeautysva" + + "rdoesntexisteingeekazunow-dnsevenassisicilyvlaanderenvladikavkaz" + + "imierz-dolnyvladimirvlogintoyonezawavminiserversicherungvologdan" + + "skongsbergvolvolkswagentsortlandvolyngdalvoorloperauniterois-los" + + "trolekamakurazakiwakunigamiharutwentevossevangenvotevotingvotoyo" + + "nowloclawekongsvingerwmflabsorumincomcastresindevicenzaporizhzhi" + + "awnextdirectrogstadworldworse-thandawowithyoutuberspacekitagatar" + + "getmyiphostrodawarawpdevcloudwritesthisblogsytewroclawiwatsukiyo" + + "notairestaurantroandinosaurepbodynamic-dnsopotrentoyonakagyokuto" + + "yakokonoewtcminnesotaketakazakis-an-actresshinjukumanowtvallee-d" + + "-aosteigenwtfastvps-serveronakanotoddenwuozuwzmiuwajimaxn--3oq18" + + "vl8pn36axn--3pxu8koninjambylxn--42c2d9axn--45br5cylxn--45brj9civ" + + "ilisationisshinguccircleverappsanokasukabedzin-berlindasdaburxn-" + + "-45q11civilizationiyodogawaxn--4gbriminingxn--4it168dxn--4it797k" + + "onskowolayangroupictureshirahamatonbetsurnadalxn--4pvxs4allxn--5" + + "4b7fta0ccivilwarmiastagets-itozsdeltajimidorissagaeroclubmedecin" + + "cinnationwidealerxn--55qw42gxn--55qx5dxn--5js045dxn--5rtp49clanb" + + "ibaidarmeniaxn--5rtq34konsulatrobeepilepsykkylvenetodayxn--5su34" + + "j936bgsgxn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlx" + + "n--7t0a264cldmailovecollegefantasyleaguernseyxn--80adxhksoundcas" + + "tronomy-routerxn--80ao21axn--80aqecdr1axn--80asehdbarrell-of-kno" + + "wledgeiseiyoichippubetsubetsugarugbyglandroverhalla-speziautosca" + + "nadaeguambulanceobninskaracoldwarszawaukraanghkeymachinewhampshi" + + "realtydalaskanittedallasalleangaviikaascolipicenodumemergencyach" + + "ts3-ca-central-1xn--80aswgxn--80augustownproviderxn--8ltr62konyv" + + "elolipopiemontexn--8pvr4uxn--8y0a063axn--90a3academiamicaaarbort" + + "eaches-yogasawaracingxn--90aeroportalabamagasakishimabaraogakibi" + + "chuoxn--90aishobarakawagoexn--90azhytomyravendbarsycenterprisesa" + + "kikuchikuseikarugamvikarasjokarasuyamarshallstatebankaratemrhclo" + + "udiscountyombolzano-altoadigeometre-experts-comptables3-us-west-" + + "1xn--9dbhblg6dietciprianiigataishinomakinkobayashikaoirmitakehar" + + "axn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byandexc" + + "loudxn--asky-iraxn--aurskog-hland-jnbarsyonlinewhollandiscourses" + + "3-us-west-2xn--avery-yuasakuhokkaidownloadxn--b-5gaxn--b4w605fer" + + "dxn--balsan-sdtirol-nsbsouthcarolinarvikommunexn--bck1b9a5dre4cl" + + "ickasumigaurawa-mazowszextraspace-to-rentalstomakomaibaraxn--bdd" + + "dj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--b" + + "hccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-fy" + + "aotsurreyxn--bjddar-ptarnobrzegyptianxn--blt-elabourxn--bmlo-gra" + + "ingerxn--bod-2natalxn--bozen-sdtirol-2obanazawaxn--brnny-wuacade" + + "my-firewall-gatewayxn--brnnysund-m8accident-investigation-aptibl" + + "eadpagest-mon-blogueurovision-k3southwestfalenxn--brum-voagatrom" + + "sakakinokiaxn--btsfjord-9zaxn--bulsan-sdtirol-nsbashkiriaveroyke" + + "ngerdalcesurancechirealmpmnavigationavoizumizakibigawaurskog-hol" + + "andingdyniaetnabudapest-a-la-masion-riopretobamaceratabuseating-" + + "organicasadelamonedapliernewspapereportateshinanomachimkentateya" + + "mabogadobeaemcloud66xn--c1avgxn--c2br7gxn--c3s14misakis-an-anarc" + + "historicalsocietyxn--cck2b3basicservercelliguriavocatanzarowebsp" + + "acebinordreisa-geekaragandaustevoll-o-g-i-natuurwetenschappenaum" + + "burggfarmerseine164-baltimore-og-romsdalipayboltatsunobihirosaki" + + "kamijimatsuuragrocerybnikeisenbahnaturhistorisches3-ap-southeast" + + "-1kappchizip6xn--cckwcxetdxn--cesena-forl-mcbremangerxn--cesenaf" + + "orl-i8axn--cg4bkis-not-certifiedugit-pagespeedmobilizeroticahces" + + "uoloanshintokushimaxn--ciqpnxn--clchc0ea0b2g2a9gcdxn--comunicaes" + + "-v6a2oxn--correios-e-telecomunicaes-ghc29axn--czr694basilicatani" + + "avoues3-eu-west-3utilitiesquare7xn--czrs0tromsojamisonxn--czru2d" + + "xn--czrw28basketballyngenhktjeldsundiscoveryomitanoceanographiqu" + + "eu-1xn--d1acj3batochiokinoshimaizuruhrxn--d1alfaromeoxn--d1atrus" + + "teexn--d5qv7z876clinichitachinakagawashtenawdev-myqnapcloudeitys" + + "nesandvikcoromantovalle-d-aostatic-accessanfranciscofreakunemuro" + + "rangehirnrtoyotomiyazakis-a-celticsfanishinomiyashironoxn--davve" + + "njrga-y4axn--djrs72d6uyxn--djty4kooris-a-patsfanxn--dnna-grajewo" + + "lterskluwerxn--drbak-wuaxn--dyry-iraxn--e1a4cliniquenoharaxn--ec" + + "kvdtc9dxn--efvn9sowaxn--efvy88hair-surveillancexn--ehqz56nxn--el" + + "qq16hakatanortonxn--estv75gxn--eveni-0qa01gaxn--f6qx53axn--fct42" + + "9kopervikhersonxn--fhbeiarnxn--finny-yuaxn--fiq228c5hspeedpartne" + + "rsolognexn--fiq64batsfjordishakotanhlfanhs3-website-ap-northeast" + + "-1xn--fiqs8spjelkavikomonowruzhgorodeoxn--fiqz9spreadbettingxn--" + + "fjord-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--forl-ce" + + "sena-fcbsspydebergxn--forlcesena-c8axn--fpcrj9c3dxn--frde-grandr" + + "apidsrlxn--frna-woaraisaijosoyrovigotsukisosakitagawaxn--frya-hr" + + "axn--fzc2c9e2clintonoshoesantabarbaraxn--fzys8d69uvgmailxn--g2xx" + + "48clothingdustdataitogitsuldalucernexn--gckr3f0fauskedsmokorseta" + + "gayaseralingenoamishirasatogokasells-for-lessasebofageologyxn--g" + + "ecrj9cn-northwest-1xn--ggaviika-8ya47hakodatexn--gildeskl-g0axn-" + + "-givuotna-8yasakaiminatoyookaniepcexn--gjvik-wuaxn--gk3at1exn--g" + + "ls-elacaixaxn--gmq050is-savedunetflixilxn--gmqw5axn--h-2failxn--" + + "h1aeghakonexn--h2breg3evenesrvaporcloudxn--h2brj9c8cngroks-thisa" + + "yamanobeokakegawaxn--h3cuzk1digitalxn--hbmer-xqaxn--hcesuolo-7ya" + + "35bauhausposts-and-telecommunications3-website-ap-southeast-1xn-" + + "-hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4accide" + + "nt-prevention-rancherkasydneyxn--hnefoss-q1axn--hobl-iraxn--holt" + + "len-hxaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hylandet-54axn" + + "--i1b6b1a6a2exn--imr513nxn--indery-fyasugivingxn--io0a7is-slickh" + + "arkivalleeaosteinkjerusalembroideryxn--j1aefbsbxn--12cfi8ixb8lxn" + + "--j1amhakubahccavuotnagaraholtalenglandxn--j6w193gxn--jlq480n2rg" + + "xn--jlq61u9w7beneventoeidsvollimanowarudaxaustinnaval-d-aosta-va" + + "lleyokosukanumazuryokoteastcoastaldefenceatonsbergjemnes3-eu-cen" + + "tral-1xn--jlster-byasuokanoyakumoldeloittenrikuzentakataiwanairf" + + "orcebetsuikidsmynasushiobaragusartstorfjordxn--jrpeland-54axn--j" + + "vr189misasaguris-an-artistgoryxn--k7yn95exn--karmy-yuaxn--kbrq7o" + + "xn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woaxn--klt787dxn--kltp7dxn" + + "--kltx9axn--klty5xn--3bst00mintelligencexn--koluokta-7ya57hakuis" + + "-a-hunterxn--kprw13dxn--kpry57dxn--kpu716fbx-osaskatchewanxn--kp" + + "ut3is-uberleetrentino-sued-tirolxn--krager-gyatomitamamuraxn--kr" + + "anghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfa" + + "stlylbanzaicloudcontrolledekagaminombresciaustraliajudaicable-mo" + + "democraciabruzzoologicalvinklein-addrammenuorochesterimo-i-ranaa" + + "mesjevuemielno-ipifonyc66xn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-" + + "fyatsukanraxn--kvnangen-k0axn--l-1fairwindstorjdevcloudnshinyosh" + + "itomiokamitondabayashiogamagoriziaxn--l1accentureklamborghinikol" + + "aeventstpetersburgxn--laheadju-7yatsushiroxn--langevg-jxaxn--lcv" + + "r32dxn--ldingen-q1axn--leagaviika-52bentleyonagoyaxn--lesund-hua" + + "xn--lgbbat1ad8jelenia-goraxn--lgrd-poacctrvareservehalflifestyle" + + "xn--lhppi-xqaxn--linds-pramericanartrycloudflarezzoxn--lns-qlaqu" + + "ilanstreamswatch-and-clockerxn--loabt-0qaxn--lrdal-sraxn--lrensk" + + "og-54axn--lt-liacnpyatigorskodjeffersonxn--lten-granexn--lury-ir" + + "axn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2ddestudioxn--mgb9" + + "awbfbxosassaris-a-democratrapaniizaxn--mgba3a3ejtrysiljanxn--mgb" + + "a3a4f16axn--mgba3a4franamizuholdingstudynamisches-dnsolundbeckom" + + "munalforbundxn--mgba7c0bbn0axn--mgbaakc7dvfedorapeoplegnicanonoi" + + "chinomiyakexn--mgbaam7a8hakusanagochijiwadell-ogliastraderxn--mg" + + "bab2bdxn--mgbah1a3hjkrdxn--mgbai9a5eva00beppublishproxyzgorzelec" + + "coffeedbackplaneapplicationcloudappspotagerxn--mgbai9azgqp6jeonn" + + "amerikawauexn--mgbayh7gpaleoxn--mgbbh1a71exn--mgbc0a9azcgxn--mgb" + + "ca7dzdoxn--mgberp4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4" + + "ecexposedxn--mgbpl2fhskydivingxn--mgbqly7c0a67fbcnsantacruzsanta" + + "fedjejuifmetlifeinsurancexn--mgbqly7cvafranziskanerimaringatlant" + + "akahashimamakiryuohdattowebcampinashikiminohostre-totendofintern" + + "et-dnsaliasiaxn--mgbt3dhdxn--mgbtf8flatangerxn--mgbtx2beskidyn-i" + + "p24xn--mgbx4cd0abbvieeexn--mix082fedoraprojectravelchannelxn--mi" + + "x891feiraquarelleaseeklogesaudaxn--mjndalen-64axn--mk0axin-dslgb" + + "tunesor-odalxn--mk1bu44cntrani-andria-barletta-trani-andriaxn--m" + + "kru45is-very-badajozxn--mlatvuopmi-s4axn--mli-tlarvikoryokamikaw" + + "anehonbetsurutaharaxn--mlselv-iuaxn--moreke-juaxn--mori-qsakurag" + + "awaxn--mosjen-eyawaraxn--mot-tlavagiskexn--mre-og-romsdal-qqbuse" + + "rveexchangexn--msy-ula0haldenxn--mtta-vrjjat-k7aflakstadaokagaki" + + "cks-assnasaarlandxn--muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngb" + + "e9e0axn--ngbrxn--3ds443gxn--nit225kosaigawaxn--nmesjevuemie-tcba" + + "lsan-suedtirolkuszczytnoipirangalsacexn--nnx388axn--nodessakurai" + + "s-very-evillagexn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--nts" + + "q17gxn--nttery-byaeservehttpixolinoxn--nvuotna-hwaxn--nyqy26axn-" + + "-o1acheltenham-radio-openairbusantiquest-a-la-maisondre-landroid" + + "xn--o3cw4halsaikitahiroshimaoris-a-knightpointtohobby-sitexn--o3" + + "cyx2axn--od0algxn--od0aq3bestbuyshouses3-website-ap-southeast-2x" + + "n--ogbpf8flekkefjordxn--oppegrd-ixaxn--ostery-fyawatahamaxn--osy" + + "ro-wuaxn--otu796dxn--p1acfermochizukirovogradoyxn--p1ais-very-go" + + "odyearxn--pbt977coguchikuzenxn--pgbs0dhlxn--porsgu-sta26ferrarax" + + "n--pssu33lxn--pssy2uxn--q9jyb4collectionxn--qcka1pmckinseyxn--qq" + + "qt11misconfusedxn--qxa6axn--qxamuneustargardxn--rady-iraxn--rdal" + + "-poaxn--rde-ulavangenxn--rdy-0nabaris-very-nicexn--rennesy-v1axn" + + "--rhkkervju-01aferraris-a-designerxn--rholt-mragowoodsidemoneyxn" + + "--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5nativeamericanan" + + "tiquestuff-4-salexn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rms" + + "kog-byaxn--rny31hammarfeastafricapetownnews-stagingxn--rovu88bet" + + "ainaboxfusejnyonagunicommbankaratsuginamikatagamilitaryoriikarel" + + "ianceu-2xn--rros-granvindafjordxn--rskog-uuaxn--rst-0naturalhist" + + "orymuseumcenterxn--rsta-francaiseharaxn--rvc1e0am3exn--ryken-vua" + + "xn--ryrvik-byaxn--s-1faithamurakamigoris-a-landscaperugiaxn--s9b" + + "rj9colognexus-2xn--sandnessjen-ogbhzcateringebuildingjesdalimite" + + "diskussionsbereichaseljeepsondriodejaneirockartuzyoshiokanzakiyo" + + "kawaraxn--sandy-yuaxn--sdtirol-n2axn--seral-lraxn--ses554gxn--sg" + + "ne-gratangenxn--skierv-utazastufftoread-booksnesolutionsokananii" + + "mihoboleslawiecitadeliveryggeexn--skjervy-v1axn--skjk-soaxn--skn" + + "it-yqaxn--sknland-fxaxn--slat-5naturalsciencesnaturellestuttgart" + + "revisohughesomaxn--slt-elabcieszynxn--smla-hraxn--smna-gratis-a-" + + "bulls-fanxn--snase-nraxn--sndre-land-0cbieigersundisrechtraining" + + "jovikariyaltakasugaincheonikonanporocpanamatsuzakindianapolis-a-" + + "anarchistoireggiocalabriaxn--snes-poaxn--snsa-roaxn--sr-aurdal-l" + + "8axn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbielawalmartjm" + + "axxxboxenapponazure-mobileu-3xn--srfold-byaxn--srreisa-q1axn--sr" + + "um-grazxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshalsen-sqbiellaa" + + "kesvuemielecceu-4xn--stre-toten-zcbieszczadygeyachimataikikugawa" + + "ltervistaprinternationalfirearms3-website-eu-west-1xn--t60b56axn" + + "--tckweatherchannelxn--tiq49xqyjetztrentino-suedtirolxn--tjme-hr" + + "axn--tn0agrinetbankosakaerodromegallupinbarrel-of-knowledgestack" + + "arasjohkamikoaniikappuboliviajessheimetacentrumeteorappalmaserat" + + "in-the-bandain-vpncasinordkappalmspringsakerevistaples3-us-gov-w" + + "est-1xn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol" + + "-rzbievat-band-campaniaxn--trentin-sdtirol-7vbifukagawashingtond" + + "clkarlsoyukindianmarketingladefinimakanegasakiraxn--trentino-sd-" + + "tirol-c3bigv-infoodnetworkangerxn--trentino-sdtirol-szbihorology" + + "ukuhashimoichinosekigaharaxn--trentinosd-tirol-rzbikedaejeonbukl" + + "ugsmileborkdalvdalaheadjudygarlandivtasvuodnakaiwamizawatchandcl" + + "ockarmoyurihonjournalistjohninohekinannestadivttasvuotnakamagaya" + + "habahcavuotnagaivuotnagaokakyotambabydgoszczecinemagentositelema" + + "rkarpaczeladzjampagefrontappanasonicatholicaxiashorokanaievje-og" + + "-hornnes3-website-sa-east-1xn--trentinosdtirol-7vbilbaokinawashi" + + "rosatochigiessensiositecnologiaxn--trentinsd-tirol-6vbillustrati" + + "onredumbrellahppiacenzachpomorskieninomiyakonojorpelandiyusuhara" + + "xn--trentinsdtirol-nsbioddaxn--trgstad-r1axn--trna-woaxn--troms-" + + "zuaxn--tysvr-vraxn--uc0atvarggatritonxn--uc0ay4axn--uist22handso" + + "nyoursidellogliastradingxn--uisz3gxn--unjrga-rtarumizusawaxn--un" + + "up4yxn--uuwu58axn--vads-jraxn--valle-aoste-ebbtunkomvuxn--2scrj9" + + "christmasakindlefrakkestadyndns-homednsanjotoyouraxn--valle-d-ao" + + "ste-ehbodollsusakis-into-gamessinazawaxn--valleaoste-e7axn--vall" + + "edaoste-ebbvacationsusonoxn--vard-jraxn--vegrshei-c0axn--vermgen" + + "sberater-ctbirdartcenterprisecloudcontrolapplebtimnetzlglassassi" + + "nationalheritagexn--vermgensberatung-pwbirkenesoddtangenovaranza" + + "nquanpachigasakievennodesabaerobatickets3-website-us-east-1xn--v" + + "estvgy-ixa6oxn--vg-yiabkhaziaxn--vgan-qoaxn--vgsy-qoa0jevnakersh" + + "uscultureggioemiliaromagnamsosnowiechristiansburgriwataraidyndns" + + "-freeboxosloftranakaniikawatanaguraxn--vgu402colonialwilliamsbur" + + "grondarxn--vhquvaroyxn--vler-qoaxn--vre-eiker-k8axn--vrggt-xqadx" + + "n--vry-yla5gxn--vuq861birthplacexn--w4r85el8fhu5dnraxn--w4rs40lx" + + "n--wcvs22dxn--wgbh1coloradoplateaudioxn--wgbl6axn--xhq521bjarkoy" + + "usuisservehumourxn--xkc2al3hye2axn--xkc2dl3a5ee0hangglidingxn--y" + + "9a3aquariumishimasudaxn--yer-znaturbruksgymnxn--yfro4i67oxn--yga" + + "rden-p1axn--ygbi2ammxn--3e0b707exn--ystre-slidre-ujbjerkreimbamb" + + "lebesbyeniwaizumiotsukumiyamazonawsmpplanetariumemorialillyolasi" + + "tebizenakanojoetsuwanouchikujogaszkolancashirecreationavuotnaple" + + "s3-external-1xn--zbx025dxn--zf0ao64axn--zf0avxn--3hcrj9civilavia" + + "tionissedaluccapitalonewportlligatoystre-slidrettozawaxn--zfr164" + + "bjugnieznord-frontierxnbayxz" // nodes is the list of nodes. Each node is represented as a uint32, which // encodes the node's children, wildcard bit and node type (as an index into @@ -523,1816 +524,1805 @@ const text = "9guacuiababia-goracleaningroks-theatree12hpalermomahachijoinvill" // [15 bits] text index // [ 6 bits] text length var nodes = [...]uint32{ - 0x324003, - 0x3ac784, - 0x2e6d06, - 0x2f86c3, - 0x2f86c6, - 0x38e946, - 0x3b2f83, - 0x316b04, - 0x3280c7, - 0x2e6948, + 0x32ce03, + 0x243304, + 0x2d7946, + 0x215803, + 0x215806, + 0x38b3c6, + 0x3ae643, + 0x246d44, + 0x341047, + 0x2d7588, 0x1a000c2, - 0x1f3f4c7, - 0x378d49, - 0x2c3d8a, - 0x2c3d8b, - 0x234283, - 0x235a45, - 0x2203782, - 0x3c3f44, - 0x23be43, - 0x327905, - 0x260e2c2, - 0x3425c3, - 0x2a1f004, - 0x331f05, - 0x2e12502, - 0x270d0e, - 0x251a03, - 0x3a7ac6, - 0x3202e82, - 0x2cf107, - 0x238046, - 0x3602a42, - 0x223743, - 0x280904, - 0x2171c6, - 0x3381c8, - 0x289106, - 0x271dc4, + 0x1f3aec7, + 0x377a09, + 0x2c628a, + 0x2c628b, + 0x231b43, + 0x233805, + 0x2203042, + 0x212284, + 0x2d7ac3, + 0x203045, + 0x260c6c2, + 0x3290c3, + 0x2b22c44, + 0x33f285, + 0x2e0c182, + 0x26d6ce, + 0x24e5c3, + 0x3a36c6, + 0x3206082, + 0x2fd2c7, + 0x236086, + 0x3602982, + 0x27f103, + 0x27f104, + 0x397646, + 0x36bf08, + 0x288086, + 0x270104, 0x3a00ac2, - 0x34c289, - 0x215c87, - 0x331a86, - 0x2fb689, - 0x36dc08, - 0x34a384, - 0x36a106, - 0x248746, - 0x3e03082, - 0x22a54f, - 0x211b0e, - 0x216684, - 0x213985, - 0x323f05, - 0x2e3949, - 0x23ec89, - 0x2179c7, - 0x21e906, - 0x238a03, - 0x42197c2, - 0x2197c3, - 0x30d24a, - 0x4631643, - 0x255b85, - 0x2fae02, - 0x38f789, - 0x4e03002, - 0x204dc4, - 0x203006, - 0x32cec5, - 0x36f104, - 0x5624404, - 0x21c183, - 0x234dc4, - 0x5a04182, - 0x23afc4, - 0x5f8d7c4, - 0x37bc4a, + 0x34cb09, + 0x2171c7, + 0x344986, + 0x28dfc9, + 0x32fa48, + 0x34b444, + 0x3947c6, + 0x336a46, + 0x3e03582, + 0x3da686, + 0x24070f, + 0x2112ce, + 0x217bc4, + 0x20d005, + 0x32cd05, + 0x2e1b49, + 0x23b549, + 0x397e47, + 0x3cffc6, + 0x28e143, + 0x4212082, + 0x2232c3, + 0x28da0a, + 0x4613583, + 0x3cea45, + 0x299082, + 0x38c209, + 0x4e02282, + 0x213c04, + 0x21fb46, + 0x2fff45, + 0x36db84, + 0x5643344, + 0x225843, + 0x232b84, + 0x5a03342, + 0x31fd84, + 0x5f8a244, + 0x2fe64a, 0x6200882, - 0x3ba4c7, - 0x212208, - 0x7204602, - 0x3bda07, - 0x22f344, - 0x2c1247, - 0x22f345, - 0x361307, - 0x326546, - 0x28c784, - 0x342345, - 0x2774c7, - 0x8a02cc2, - 0x245a03, - 0x20bd02, - 0x36af43, - 0x8e09fc2, - 0x282e45, + 0x21ef47, + 0x27afc8, + 0x7204c82, + 0x2f6e47, + 0x2c2b84, + 0x2c2b87, + 0x3d6805, + 0x362187, + 0x2e73c6, + 0x27d8c4, + 0x328e45, + 0x256407, + 0x8a05802, + 0x3da803, + 0x21e182, + 0x369a03, + 0x8e09bc2, + 0x281705, 0x9200202, - 0x2452c4, - 0x3a9905, - 0x2165c7, - 0x366b8e, - 0x2b1b04, - 0x263a84, - 0x20fc03, - 0x268309, - 0x26a0cb, - 0x27e9c8, - 0x2fb448, - 0x353748, - 0x28dc48, - 0x34a1ca, - 0x361207, - 0x2c6606, - 0x9682702, - 0x375fc3, - 0x3cb183, - 0x3ccb84, - 0x376003, - 0x363c03, - 0x173b542, + 0x3c2844, + 0x277445, + 0x217b07, + 0x2fdfce, + 0x2b1044, + 0x261dc4, + 0x20e5c3, + 0x251789, + 0x265f0b, + 0x273788, + 0x28dd88, + 0x2e53c8, + 0x28c008, + 0x34b28a, + 0x362087, + 0x276586, + 0x9615842, + 0x2be403, + 0x3cab03, + 0x3cd244, + 0x2be443, + 0x28ca83, + 0x1736f42, 0x9a019c2, - 0x27fec5, - 0x339e46, - 0x235804, - 0x37ab87, - 0x23ae06, - 0x2ba3c4, - 0x394487, + 0x27e945, + 0x313dc6, + 0x2335c4, + 0x379907, + 0x263e46, + 0x2bfa04, + 0x399647, 0x2019c3, - 0x9ecab82, - 0xa21c342, - 0xa61c102, - 0x21c106, + 0x9ecb4c2, + 0xa227682, + 0xa627442, + 0x227446, 0xaa00282, - 0x284505, - 0x33ca83, - 0x3c2804, - 0x2e99c4, - 0x2e99c5, - 0x3c6083, - 0xae4af03, - 0xb33d3c2, - 0x28d145, - 0x3dc00b, - 0x3c65cb, - 0x226804, - 0x204389, - 0x205504, - 0xb605742, - 0x205f43, - 0x207583, - 0xba08d42, - 0x2ed10a, - 0xbe09002, - 0x3c41c5, - 0x2df2ca, - 0x390144, - 0x20b803, - 0x20c0c4, - 0x20d3c3, - 0x20d3c4, - 0x20d3c7, - 0x20e185, - 0x20ec06, - 0x20eec6, - 0x212fc3, - 0x216a08, - 0x20c483, - 0xc21c782, - 0x246648, - 0x38764b, - 0x21fe48, - 0x220c06, - 0x221187, - 0x224f08, - 0xd205142, - 0xd6bfa42, - 0x332048, - 0x210207, - 0x309b05, - 0x309b08, - 0xdac8208, - 0x2a9e43, - 0x22b9c4, - 0x38e9c2, - 0xde2bd82, - 0xe228b82, - 0xea2c542, - 0x22c543, - 0xee07982, - 0x305b43, - 0x238fc4, - 0x207983, - 0x31f8c4, - 0x332c0b, - 0x280c03, - 0x2e4a86, - 0x280c04, - 0x2b800e, - 0x384a45, - 0x3a7bc8, - 0x2fa347, - 0x2fa34a, - 0x223103, - 0x3ac587, - 0x26a285, - 0x231cc4, - 0x254146, - 0x254147, - 0x2f6e04, - 0x22ee47, - 0xf309544, - 0x37b904, - 0x37b906, - 0x2595c4, - 0x3a8c46, - 0x20bb03, - 0x3b9a08, - 0x20bb08, - 0x263a43, - 0x2ed0c3, - 0x3453c4, - 0x356ac3, - 0xfa47502, - 0xfe8d382, - 0x2056c3, - 0x243e86, - 0x342883, - 0x380c04, - 0x10216482, - 0x24ab83, - 0x216483, - 0x213e42, + 0x285845, + 0x338483, + 0x3bfc44, + 0x2eddc4, + 0x2eddc5, + 0x3c7543, + 0xae48343, + 0xb338dc2, + 0x203c05, + 0x203c0b, + 0x20b24b, + 0x26bb44, + 0x204a09, + 0x205f44, + 0xb606802, + 0x207043, + 0x207183, + 0xba08082, + 0x2ed8ca, + 0xbe08342, + 0x212505, + 0x2de9ca, + 0x35cc04, + 0x208343, + 0x209ec4, + 0x20ba03, + 0x20ba04, + 0x20ba07, + 0x20c585, + 0x20d346, + 0x213006, + 0x213cc3, + 0x217f48, + 0x20db43, + 0xc209582, + 0x23d4c8, + 0x20958b, + 0x221cc8, + 0x222a86, + 0x224447, + 0x226fc8, + 0xd205b82, + 0xd6c1142, + 0x33f3c8, + 0x20f9c7, + 0x30f645, + 0x30f648, + 0xdadcf48, + 0x27ff43, + 0x22a104, + 0x38b442, + 0xde2a542, + 0xe243bc2, + 0xea2a8c2, + 0x22a8c3, + 0xee04042, + 0x30e303, + 0x237484, + 0x204043, + 0x206444, + 0x37454b, + 0x2094c3, + 0x2e94c6, + 0x27f404, + 0x2ba20e, + 0x381e45, + 0x3a37c8, + 0x3dd347, + 0x3dd34a, + 0x22f603, + 0x243107, + 0x2660c5, + 0x22f604, + 0x250206, + 0x250207, + 0x2fc304, + 0xf30f084, + 0x2fe304, + 0x2fe306, + 0x3db9c4, + 0x3ba486, + 0x226e03, + 0x3a8908, + 0x3c38c8, + 0x291d83, + 0x2ed883, + 0x346ac4, + 0x358183, + 0xfa09382, + 0xfe8b742, + 0x20b983, + 0x240d86, + 0x329383, + 0x35b7c4, + 0x102179c2, + 0x24a583, + 0x2179c3, + 0x214c82, 0x10600d42, - 0x2c4586, - 0x236707, - 0x3be887, - 0x3c6a85, - 0x39ad84, - 0x290e85, - 0x239b07, - 0x2dbc49, - 0x2e1b06, - 0x2e5d88, - 0x2fd486, - 0x10a27f02, - 0x3db188, - 0x2fe246, - 0x227f05, - 0x3184c7, - 0x318b04, - 0x318b05, - 0x10f27544, - 0x327548, - 0x11214c42, + 0x2c5c86, + 0x2344c7, + 0x2f8407, + 0x3a9405, + 0x207484, + 0x29bac5, + 0x267347, + 0x3cb009, + 0x2db306, + 0x2ea9c6, + 0x10a02c82, + 0x331448, + 0x31f486, + 0x34ebc5, + 0x3ac387, + 0x306104, + 0x306105, + 0x10e02c84, + 0x202c88, + 0x11203cc2, 0x11600482, - 0x212746, + 0x21d746, 0x200488, - 0x358ec5, - 0x359946, - 0x35b9c8, - 0x3804c8, - 0x11a0e745, - 0x11e22584, - 0x245c47, - 0x12204f82, - 0x126291c2, - 0x13a03102, - 0x203105, - 0x2864c5, - 0x386c06, - 0x34f647, - 0x22db47, - 0x1422f743, - 0x30f807, - 0x37af08, - 0x1e22f909, - 0x270ec7, - 0x22fd87, - 0x2309c8, - 0x2311c6, - 0x2317c6, - 0x2324cc, - 0x23394a, - 0x2342c7, - 0x23590b, - 0x236547, - 0x23654e, - 0x1e6373c4, - 0x2375c4, - 0x238e87, - 0x25e687, - 0x23e546, - 0x23e547, - 0x344b07, - 0x26f503, - 0x1ea2ca82, - 0x23f306, - 0x23f30a, - 0x23fd0b, - 0x241187, - 0x241c05, - 0x242143, - 0x242c46, - 0x242c47, - 0x2eaf03, - 0x1ee00102, - 0x2434ca, - 0x1f37a202, - 0x1f647542, - 0x1fa46342, - 0x1fe38142, - 0x246a85, - 0x247204, - 0x20624502, - 0x23b045, - 0x23b843, - 0x205605, - 0x202984, - 0x20adc4, - 0x3671c6, - 0x27f2c6, - 0x2a75c3, - 0x3c0544, - 0x3beb83, - 0x21607682, - 0x221504, - 0x2461c6, - 0x221505, - 0x249f46, - 0x3185c8, - 0x225304, - 0x22e988, - 0x337f85, - 0x33aa08, - 0x2bc7c6, - 0x359d87, - 0x2877c4, - 0x22a877c6, - 0x22e3c8c3, - 0x3a03c3, - 0x2e6648, - 0x329044, - 0x23360887, - 0x23add286, - 0x2dd289, - 0x32d3c8, - 0x268a48, - 0x329bc4, - 0x204c03, - 0x2403c2, - 0x23e50002, - 0x24201d42, - 0x207ec3, - 0x2460ce02, - 0x2eae84, - 0x372c86, - 0x328205, - 0x21b703, - 0x2b6f47, - 0x3301c3, - 0x336588, - 0x210a05, - 0x25b603, - 0x3a9885, - 0x3a99c4, - 0x3006c6, - 0x212a46, - 0x216506, - 0x203884, - 0x236903, - 0x24a08682, - 0x24f39905, + 0x335f85, + 0x34d406, + 0x351b08, + 0x35b088, + 0x11a07d45, + 0x11e25744, + 0x322d47, + 0x122059c2, + 0x1268cac2, + 0x13a0c302, + 0x21fc45, + 0x284a05, + 0x384006, + 0x326507, + 0x3a80c7, + 0x1422c0c3, + 0x318887, + 0x3a4548, + 0x1f22c289, + 0x26d887, + 0x22c9c7, + 0x22d408, + 0x22dc06, + 0x22f106, + 0x23000c, + 0x230d0a, + 0x231b87, + 0x2336cb, + 0x234307, + 0x23430e, + 0x1f635404, + 0x235604, + 0x237347, + 0x25bfc7, + 0x23ac06, + 0x23ac07, + 0x333e47, + 0x2e4003, + 0x1fa2ae02, + 0x23bec6, + 0x23beca, + 0x23c90b, + 0x23e487, + 0x23ef05, + 0x23f443, + 0x23f946, + 0x23f947, + 0x2ef083, + 0x1fe00102, + 0x24038a, + 0x20378f82, + 0x20661482, + 0x20a3d1c2, + 0x20e36182, + 0x242505, + 0x242cc4, + 0x21659dc2, + 0x31fe05, + 0x23cf03, + 0x2954c5, + 0x2028c4, + 0x20a204, + 0x280186, + 0x27e0c6, + 0x203e03, + 0x3bcfc4, + 0x2f8703, + 0x226081c2, + 0x2247c4, + 0x3232c6, + 0x2247c5, + 0x244086, + 0x3ac488, + 0x22b144, + 0x36b888, + 0x322805, + 0x37f488, + 0x2c24c6, + 0x3049c7, + 0x287804, + 0x23a87806, + 0x23ee85c3, + 0x39c943, + 0x2ec108, + 0x331344, + 0x24361707, + 0x24abe846, + 0x2dbb09, + 0x330048, + 0x34b8c8, + 0x355644, + 0x3c6d83, + 0x23cfc2, + 0x24e4cfc2, + 0x25201d42, + 0x204583, + 0x2560a782, + 0x2ef004, + 0x24ad06, + 0x21af83, + 0x2b6387, + 0x2f7443, + 0x334888, + 0x2101c5, + 0x259203, + 0x2773c5, + 0x277504, + 0x305e06, + 0x2127c6, + 0x217a46, + 0x2203c4, + 0x2346c3, + 0x25a05202, + 0x25e2ec05, 0x200843, - 0x25612602, - 0x22f8c3, - 0x23ce85, - 0x25a34e83, - 0x26234e89, - 0x26600942, - 0x26e07bc2, - 0x28cc85, - 0x214b46, - 0x208a86, - 0x2ceb88, - 0x2ceb8b, - 0x3293cb, - 0x2fe6c5, - 0x2cb2c9, + 0x2660f4c2, + 0x22c243, + 0x373605, + 0x26a32c43, + 0x27232c49, + 0x27600942, + 0x27e04282, + 0x28b045, + 0x215e46, + 0x205606, + 0x2cf508, + 0x2cf50b, + 0x32ed0b, + 0x3a9605, + 0x2cbc09, 0x1600b42, - 0x2e7008, - 0x204684, - 0x27601bc2, - 0x34bf03, - 0x27e5e846, - 0x25d348, - 0x28201a02, - 0x28e248, - 0x28669102, - 0x340aca, - 0x28ad0703, - 0x29379386, - 0x37c3c8, - 0x30ad48, - 0x3c2d46, - 0x38acc7, - 0x22a747, - 0x2482ca, - 0x3901c4, - 0x35e684, - 0x3786c9, - 0x297ac185, - 0x211d06, - 0x210403, - 0x24fa44, - 0x29a227c4, - 0x331247, - 0x29eaabc7, - 0x2a1144, - 0x387c05, - 0x386cc8, - 0x3a47c7, - 0x247847, - 0x2a2143c2, - 0x3c51c4, - 0x294548, - 0x2494c4, - 0x24bd44, - 0x24c6c5, - 0x24c807, - 0x2a64e689, - 0x24e184, - 0x24ee09, - 0x24f048, - 0x24f7c4, - 0x24f7c7, - 0x2aa4fe03, - 0x250a47, - 0x16014c2, - 0x16b2642, - 0x251a46, - 0x251ec7, - 0x252304, - 0x253107, - 0x2547c7, - 0x255043, - 0x2b1d82, - 0x20d682, - 0x2fb543, - 0x3c0fc4, - 0x3c0fcb, - 0x2aefb548, - 0x25afc4, - 0x2572c5, - 0x258807, - 0x25a1c5, - 0x2def0a, - 0x25af03, - 0x2b208142, - 0x20c384, - 0x25e449, - 0x2628c3, - 0x262987, - 0x353b89, - 0x3d9dc8, - 0x229b43, - 0x27dbc7, - 0x27e549, - 0x239cc3, - 0x286b44, - 0x287dc9, - 0x28a706, - 0x339283, - 0x202ec2, - 0x237c43, - 0x2b2447, - 0x237c45, - 0x3bd6c6, - 0x2d7004, - 0x3cd145, - 0x27b483, - 0x213206, - 0x211603, - 0x204582, - 0x24aec4, - 0x2b6268c2, - 0x2ba268c3, - 0x2be020c2, - 0x24a403, - 0x20f344, - 0x20f347, - 0x390246, - 0x27cec2, - 0x2c25ec42, - 0x3187c4, - 0x2c60d542, - 0x2ca19202, - 0x23d144, - 0x23d145, - 0x28c405, - 0x366186, - 0x2ce0f4c2, - 0x32a305, - 0x354585, - 0x223383, - 0x3cf0c6, - 0x20f4c5, - 0x21c082, - 0x359585, - 0x21c084, - 0x225243, - 0x225483, - 0x2d209102, - 0x2dac07, - 0x24f244, - 0x24f249, - 0x24f944, - 0x286343, - 0x39f748, - 0x2d686344, - 0x286346, - 0x2a57c3, - 0x257b03, - 0x224943, - 0x2dae9882, - 0x2faf82, - 0x2de00642, - 0x33e548, - 0x342a88, - 0x3b3706, - 0x25adc5, - 0x22bc45, - 0x3306c7, - 0x2e26fbc5, - 0x203942, - 0x2e698402, - 0x2ea00042, - 0x315e88, - 0x3db0c5, - 0x2efec4, - 0x249e85, - 0x24b947, - 0x25f444, - 0x2433c2, - 0x2ee08b82, - 0x350584, - 0x217c07, - 0x28f207, - 0x3612c4, - 0x3cbb43, - 0x263984, - 0x263988, - 0x231b06, - 0x253fca, - 0x2aa144, - 0x2967c8, - 0x28ab44, - 0x221286, - 0x2983c4, - 0x203406, - 0x24f509, - 0x23c347, - 0x21fa83, - 0x2f25ce02, - 0x387f43, - 0x205942, - 0x2f616842, - 0x2f5d86, - 0x3836c8, - 0x2a74c7, - 0x225a09, - 0x2aba89, - 0x2a9385, - 0x2ab689, - 0x2ac745, - 0x2ad585, - 0x2ae048, - 0x2fa07a44, - 0x2fe55187, - 0x230143, - 0x2ae247, - 0x230146, - 0x2ae647, - 0x2a4ac5, - 0x2b9ac3, - 0x30233702, - 0x20ba44, - 0x3062cc02, - 0x30a05dc2, - 0x3cc0c6, - 0x212185, - 0x2b1047, - 0x326fc3, - 0x363b84, + 0x2cfc08, + 0x204d04, + 0x28601bc2, + 0x34a603, + 0x28e5c186, + 0x33e208, + 0x29201a02, + 0x28c608, + 0x29609802, + 0x33c4ca, + 0x29a46e03, + 0x2a378046, + 0x3910c8, + 0x330906, + 0x387087, + 0x240907, + 0x3365ca, + 0x35cc84, + 0x35fe04, + 0x376889, + 0x2a7a7545, + 0x2114c6, + 0x20fbc3, + 0x24bd04, + 0x2aa0d644, + 0x344147, + 0x2aee3587, + 0x293104, + 0x236cc5, + 0x3840c8, + 0x3a03c7, + 0x243547, + 0x2b20c202, + 0x298d44, + 0x294348, + 0x2443c4, + 0x249204, + 0x249b85, + 0x249cc7, + 0x2b658549, + 0x24a804, + 0x24b0c9, + 0x24b308, + 0x24ba84, + 0x24ba87, + 0x2ba4cdc3, + 0x24d2c7, + 0x2be014c2, + 0x16b1b82, + 0x24df86, + 0x24e607, + 0x24e884, + 0x24f687, + 0x250647, + 0x2510c3, + 0x2b12c2, + 0x20bcc2, + 0x28de83, + 0x3be3c4, + 0x3be3cb, + 0x2c28de88, + 0x258bc4, + 0x254205, + 0x255c47, + 0x238a05, + 0x2d908a, + 0x258b03, + 0x2c603d42, + 0x20da44, + 0x25bd89, + 0x2601c3, + 0x260287, + 0x2683c9, + 0x3de348, + 0x23e2c3, + 0x27c387, + 0x27ce49, + 0x266883, + 0x284fc4, + 0x286209, + 0x289406, + 0x2c7d43, + 0x2076c2, + 0x235c83, + 0x2b1987, + 0x235c85, + 0x3b8806, + 0x26e144, + 0x3cc645, + 0x279803, + 0x213f06, + 0x210dc3, + 0x204c02, + 0x248304, + 0x2ca6bc02, + 0x2ce6bc03, + 0x2d2020c2, + 0x247603, + 0x213484, + 0x239bc7, + 0x216586, + 0x278042, + 0x2d65c582, + 0x3ac684, + 0x2da0bb82, + 0x2de063c2, + 0x2b36c4, + 0x2b36c5, + 0x27d545, + 0x366a06, + 0x2e204882, + 0x3bd645, + 0x3cedc5, + 0x204883, + 0x21a286, + 0x21b845, + 0x2273c2, + 0x35acc5, + 0x2273c4, + 0x22b083, + 0x22b2c3, + 0x2e61d302, + 0x256607, + 0x24b504, + 0x24b509, + 0x24bc04, + 0x284883, + 0x39bf88, + 0x2ea84884, + 0x284886, + 0x2a6b43, + 0x254c43, + 0x228b03, + 0x2eeedc82, + 0x302342, + 0x2f200642, + 0x339f48, + 0x301408, + 0x3aedc6, + 0x272945, + 0x2802c5, + 0x345387, + 0x2f677f05, + 0x220482, + 0x2fa97642, + 0x2fe00042, + 0x278cc8, + 0x31f3c5, + 0x2f3e44, + 0x243fc5, + 0x245547, + 0x27a1c4, + 0x240282, + 0x30205702, + 0x352784, + 0x222f47, + 0x28cf47, + 0x362144, + 0x3cc143, + 0x291cc4, + 0x291cc8, + 0x22f446, + 0x25008a, + 0x2eb544, + 0x296008, + 0x242ec4, + 0x224546, + 0x297604, + 0x21ff46, + 0x24b7c9, + 0x2a62c7, + 0x2087c3, + 0x306033c2, + 0x34b643, + 0x206a02, + 0x30a17d82, + 0x2fb0c6, + 0x380708, + 0x2a8787, + 0x26ad49, + 0x2ad689, + 0x2aa9c5, + 0x2abd49, + 0x2ac545, + 0x2ad385, + 0x2ae008, + 0x30e04104, + 0x31251207, + 0x22cd83, + 0x2ae207, + 0x22cd86, + 0x2ae607, + 0x2a5e45, + 0x22c603, + 0x31630ac2, + 0x208584, + 0x31a0adc2, + 0x31e04742, + 0x3ae186, + 0x27af45, + 0x2b0587, + 0x2fef43, + 0x28ca04, 0x201e83, - 0x2c5e03, - 0x30e03842, - 0x31601cc2, - 0x38ea44, - 0x2dca43, - 0x2f6a45, - 0x31a00f42, - 0x32203702, - 0x2d8946, - 0x329184, - 0x3dacc4, - 0x3dacca, - 0x32a005c2, - 0x245e83, - 0x21368a, - 0x214348, - 0x32e21b84, + 0x20f703, + 0x32203dc2, + 0x32a01cc2, + 0x38b4c4, + 0x3881c3, + 0x2fbf45, + 0x32e00f42, + 0x33602b82, + 0x2d5c86, + 0x2fdf04, + 0x303f04, + 0x303f0a, + 0x33e005c2, + 0x263f43, + 0x20cd0a, + 0x214388, + 0x34224e44, 0x2005c3, - 0x33201803, - 0x26c409, - 0x207349, - 0x2b7046, - 0x33614503, - 0x315405, - 0x3b478d, - 0x214506, - 0x21a4cb, - 0x33a03302, - 0x2b4148, - 0x36a16b02, - 0x36e08242, - 0x2e8205, - 0x37201742, - 0x371347, - 0x2022c3, - 0x20f688, - 0x376051c2, - 0x32e244, - 0x210743, - 0x32aa45, - 0x240406, - 0x21da04, - 0x2ed083, - 0x2b3003, - 0x37a150c2, - 0x2fe644, - 0x3bc6c5, - 0x2b2047, - 0x27b8c3, - 0x2b2a03, - 0x16b2ac2, - 0x2b2ac3, - 0x2b2f83, - 0x37e00e02, - 0x3bac04, - 0x27f4c6, - 0x23d303, - 0x2b36c3, - 0x3824b4c2, - 0x24b4c8, - 0x2b4e04, - 0x369ac6, - 0x256e47, - 0x284746, - 0x2aed84, - 0x46601b82, - 0x23000b, - 0x2f378e, - 0x2156cf, - 0x366703, - 0x46e5bd02, - 0x1638902, - 0x472017c2, - 0x296d43, - 0x2092c3, - 0x21d086, - 0x2dbec6, - 0x218d87, - 0x3cb504, - 0x47614c82, - 0x47a10f02, - 0x242b05, - 0x2f1d87, - 0x2b5dc6, - 0x47e47482, - 0x32a244, - 0x2bae03, - 0x48251b42, - 0x48774343, - 0x2bbe44, - 0x2c0549, - 0x48ac7542, - 0x48e01882, + 0x34601803, + 0x266ac9, + 0x24d8c9, + 0x2b6486, + 0x34a14543, + 0x36f705, + 0x3b62cd, + 0x214546, + 0x219e4b, + 0x34e129c2, + 0x394608, + 0x38218042, + 0x38604dc2, + 0x2b3905, + 0x38a01742, + 0x2c67c7, + 0x214903, + 0x21ba08, + 0x38e02cc2, + 0x219384, + 0x20ff03, + 0x2f7ac5, + 0x23d006, + 0x21e244, + 0x2ed843, + 0x2b26c3, + 0x392163c2, + 0x3a9584, + 0x3b77c5, + 0x2b1587, + 0x279c43, + 0x2b2183, + 0x16b2242, + 0x2b2243, + 0x2b2643, + 0x39600e02, + 0x246b84, + 0x27e2c6, + 0x3cba43, + 0x2b2d43, + 0x39a48902, + 0x248908, + 0x2b3d84, + 0x20ed06, + 0x255087, + 0x270906, + 0x291e84, + 0x47e01b82, + 0x22cc4b, + 0x2f91ce, + 0x216c0f, + 0x292e43, + 0x48659902, + 0x163ea82, + 0x48a017c2, + 0x296583, + 0x20e883, + 0x2dd4c6, + 0x3cb286, + 0x2b0187, + 0x30b0c4, + 0x48e11902, + 0x492106c2, + 0x245005, + 0x2f1887, + 0x2b47c6, + 0x496526c2, + 0x2526c4, + 0x2b93c3, + 0x49a4e082, + 0x49f72383, + 0x2bac04, + 0x2c1d89, + 0x4a2c8c82, + 0x4a601882, 0x201885, - 0x492c8802, - 0x49604b42, - 0x35d987, - 0x3b6a09, - 0x378fcb, - 0x22a505, - 0x26aa09, - 0x270246, - 0x393bc7, - 0x49a04b44, - 0x3d6a49, - 0x37ed07, - 0x206a07, - 0x22c843, - 0x2b3fc6, - 0x322ec7, - 0x20b003, - 0x371f06, - 0x4a219842, - 0x4a612702, - 0x329a83, - 0x38f945, - 0x21f787, - 0x2dbfc6, - 0x237bc5, - 0x24f1c4, - 0x2a3fc5, - 0x390c84, - 0x4aa01b02, - 0x3be187, - 0x2c51c4, - 0x207244, - 0x20724d, - 0x34ca49, - 0x22cb48, + 0x4aac9182, + 0x4ae03c42, + 0x35f107, + 0x377c8b, + 0x2406c5, + 0x2570c9, + 0x268746, + 0x4b207844, + 0x328949, + 0x2c9cc7, + 0x32a547, + 0x22abc3, + 0x2b3546, + 0x3246c7, + 0x20a443, + 0x291246, + 0x4ba23342, + 0x4be1d702, + 0x34b783, + 0x38c3c5, + 0x221587, + 0x3cb386, + 0x235c05, + 0x24b484, + 0x2a4d05, + 0x38cf44, + 0x4c201b02, + 0x2c71c4, + 0x267f44, + 0x38830d, + 0x37adc9, + 0x22aec8, 0x201b04, - 0x31f985, - 0x20a247, - 0x20a5c4, - 0x266407, - 0x2aa705, - 0x4ae0e504, - 0x2b3145, - 0x261584, - 0x310fc6, - 0x35e105, - 0x4b224382, - 0x2126c3, - 0x3a2a83, - 0x346984, - 0x346985, - 0x361d86, - 0x237d05, - 0x229ac4, - 0x34dfc3, - 0x4b60cd46, - 0x223dc5, - 0x22ae85, - 0x34f544, - 0x2aa1c3, - 0x2aa1cc, - 0x4ba07dc2, - 0x4be01442, - 0x4c20e942, - 0x20e943, - 0x20e944, - 0x4c605542, - 0x353408, - 0x3bd785, - 0x2bd504, - 0x23e3c6, - 0x4ca065c2, - 0x4ce11e02, - 0x4d200c42, - 0x292905, - 0x203746, - 0x2aab04, - 0x217706, - 0x34b306, - 0x227803, - 0x4d737c4a, - 0x2747c5, - 0x30d203, - 0x222306, - 0x3ceec9, - 0x222307, - 0x297688, - 0x36dac9, - 0x326e08, - 0x222e46, - 0x20fbc3, - 0x4da030c2, - 0x3a17c8, - 0x4de49602, - 0x4e205982, - 0x225a83, - 0x2e1985, - 0x29b6c4, - 0x393d09, - 0x3a93c4, - 0x376588, - 0x4ea05983, - 0x4ef33084, - 0x214b88, - 0x207187, - 0x4f32a2c2, - 0x247702, - 0x323e85, - 0x264149, - 0x211d83, - 0x2814c4, - 0x3153c4, - 0x20a2c3, - 0x282a0a, - 0x4f727e02, - 0x4fa0b882, - 0x2cab03, - 0x3928c3, - 0x162f7c2, - 0x3757c3, - 0x4fe1f382, - 0x50200bc2, - 0x50746484, - 0x388586, - 0x26bc04, - 0x27aac3, - 0x3d4c43, - 0x50a00bc3, - 0x240086, - 0x3a5005, - 0x2cac87, - 0x2cdc45, - 0x2cee46, - 0x2d0048, - 0x2d0246, - 0x265cc4, - 0x29cc4b, - 0x2d41c3, - 0x2d41c5, - 0x2d4c48, - 0x203282, - 0x35dc82, - 0x50e46b02, - 0x51204fc2, - 0x214cc3, - 0x5166ff42, - 0x26ff43, - 0x2d5603, - 0x51e23c42, - 0x522da646, - 0x2578c6, - 0x526b4342, - 0x52a075c2, - 0x52e254c2, - 0x5323c9c2, - 0x53618382, - 0x53a02142, - 0x206183, - 0x2c9805, - 0x326406, - 0x53e09c04, - 0x245fca, - 0x3aa986, - 0x20d784, - 0x26a083, - 0x54a05682, - 0x208ac2, - 0x22f883, - 0x54e0ce83, - 0x3bd1c7, - 0x35e007, - 0x56e6f947, - 0x321a47, - 0x229483, - 0x22948a, - 0x265e44, - 0x3125c4, - 0x3125ca, - 0x22dc85, - 0x57211cc2, - 0x2522c3, - 0x57600602, - 0x22c483, - 0x387f03, - 0x57e00582, - 0x37ae84, - 0x3308c4, - 0x3ce845, - 0x319b45, - 0x28ea86, - 0x2aad46, - 0x5824dc02, - 0x58602f42, - 0x312a85, - 0x2575d2, - 0x351086, - 0x271283, - 0x301046, - 0x2ef145, - 0x1607f02, - 0x60a08d82, - 0x378043, - 0x208d83, - 0x282583, - 0x60e18782, - 0x23fc83, - 0x6160dbc2, - 0x2035c3, - 0x3bac48, - 0x26d843, - 0x26d846, - 0x32b747, - 0x31bb46, - 0x31bb4b, - 0x20d6c7, - 0x2e6444, - 0x61e00c02, - 0x3bd605, - 0x6220ce43, - 0x209b43, - 0x32c2c5, - 0x335703, - 0x62b35706, - 0x2e718a, - 0x2a3283, - 0x2170c4, + 0x3dad85, + 0x3a8e87, + 0x206504, + 0x263f07, + 0x2eb205, + 0x4c607b04, + 0x2a8b45, + 0x25ee84, + 0x27a306, + 0x35f885, + 0x4ca26902, + 0x21d6c3, + 0x28f783, + 0x348084, + 0x348085, + 0x37c586, + 0x235d45, + 0x3d3284, + 0x32c043, + 0x4ce0a6c6, + 0x225045, + 0x225c85, + 0x326404, + 0x2eb5c3, + 0x2eb5cc, + 0x4d204482, + 0x4d601442, + 0x4da03102, + 0x20e403, + 0x20e404, + 0x4de05f82, + 0x380d88, + 0x3b88c5, + 0x2c93c4, + 0x23aa86, + 0x4e217002, + 0x4e6115c2, + 0x4ea00c42, + 0x291a85, + 0x220286, + 0x20d584, + 0x397b86, + 0x21ed06, + 0x221983, + 0x4ee9e10a, + 0x279e05, + 0x28d9c3, + 0x2254c6, + 0x3bd449, + 0x2254c7, + 0x2a9c48, + 0x32f909, + 0x3b9e48, + 0x303706, + 0x20e583, + 0x4f21fc02, + 0x39dc88, + 0x4f644502, + 0x4fa06a42, + 0x238cc3, + 0x2e2a45, + 0x29b404, + 0x2f5d89, + 0x32acc4, + 0x3dabc8, + 0x50206a43, + 0x507749c4, + 0x215e88, + 0x388247, + 0x50a52742, + 0x22e302, + 0x32cc85, + 0x261b89, + 0x211543, + 0x27fcc4, + 0x36f6c4, + 0x20e903, + 0x2812ca, + 0x50f40d82, + 0x512083c2, + 0x2cb443, + 0x38f5c3, + 0x162c142, + 0x2bdc03, + 0x5161d902, + 0x51a00bc2, + 0x51f03f84, + 0x3b3506, + 0x269884, + 0x278b03, + 0x3bf203, + 0x52200bc3, + 0x23cc86, + 0x3a0e45, + 0x2cb5c7, + 0x2cf7c6, + 0x2d0648, + 0x2d0846, + 0x2035c4, + 0x29cd0b, + 0x2d3643, + 0x2d3645, + 0x21fdc2, + 0x35f402, + 0x52642582, + 0x52a05a02, + 0x215fc3, + 0x52e6bf42, + 0x26bf43, + 0x2d46c3, + 0x5360cac2, + 0x53ad9bc6, + 0x257906, + 0x53ed9d02, + 0x542071c2, + 0x5462b302, + 0x54a09082, + 0x54e18942, + 0x552050c2, + 0x208b03, + 0x26cb45, + 0x379b06, + 0x55617b84, + 0x3230ca, + 0x3a5d46, + 0x20bdc4, + 0x28dd43, + 0x56212b02, + 0x205642, + 0x22c203, + 0x5660a803, + 0x3b8307, + 0x35f787, + 0x58ae4447, + 0x39e847, + 0x229183, + 0x333b4a, + 0x340644, + 0x319084, + 0x31908a, + 0x3a8205, + 0x58e11482, + 0x24df43, + 0x59200602, + 0x24bbc3, + 0x34b603, + 0x59a00582, + 0x3a44c4, + 0x345584, + 0x3b0645, + 0x31e4c5, + 0x2e4a06, + 0x304146, + 0x59e39242, + 0x5a202f42, + 0x33d185, + 0x257612, + 0x353286, + 0x270e03, + 0x356606, + 0x31cd05, + 0x16045c2, + 0x626080c2, + 0x376203, + 0x2080c3, + 0x396203, + 0x62a18d42, + 0x23a183, + 0x63223242, + 0x220103, + 0x300808, + 0x239503, + 0x239506, + 0x3c4d87, + 0x321186, + 0x32118b, + 0x20bd07, + 0x2ebf04, + 0x63a00c02, + 0x3b8745, + 0x63e09783, + 0x21d283, + 0x2e60c5, + 0x333a43, + 0x64733a46, + 0x3c8fca, + 0x2a3fc3, + 0x235f44, 0x2003c6, - 0x228306, - 0x62e3f7c3, - 0x363a47, - 0x26c307, - 0x29e485, - 0x281ec6, - 0x223e03, - 0x65bcf303, - 0x65e00a82, - 0x663406c4, - 0x3b9809, - 0x207f45, - 0x227484, - 0x3531c8, - 0x23d505, - 0x6666fcc5, - 0x242249, - 0x331b43, - 0x2474c4, - 0x66a04ac2, - 0x214ec3, - 0x66e7a042, - 0x27a046, - 0x167ce82, - 0x67203482, - 0x292808, - 0x2a2203, - 0x2b3087, - 0x31bdc5, - 0x2e2fc5, - 0x34e14b, - 0x2e2fc6, - 0x34e346, - 0x2e3f06, - 0x280104, - 0x2c0746, - 0x676d7a48, - 0x280cc3, - 0x266a03, - 0x266a04, - 0x2fb244, - 0x30a607, - 0x2e7b45, - 0x67ae7c82, - 0x67e07702, - 0x6861b5c5, - 0x2b5c44, - 0x2d8f4b, - 0x2e98c8, - 0x24de84, - 0x68a2c9c2, - 0x68e1a142, - 0x3a8bc3, - 0x2eba44, - 0x2ebd05, - 0x2ec547, - 0x2efa04, - 0x3613c4, - 0x69214e02, - 0x37e589, - 0x2f0b45, - 0x22a7c5, - 0x2f16c5, - 0x69614e03, - 0x2f2d04, - 0x2f2d0b, - 0x2f3044, - 0x2f330b, - 0x2f4345, - 0x21580a, - 0x2f4b08, - 0x2f4d0a, - 0x2f5543, - 0x2f554a, - 0x69e1c282, - 0x6a203542, - 0x6a628743, - 0x6aaf93c2, - 0x2f93c3, - 0x6af56bc2, - 0x6b33d202, - 0x2fab44, - 0x216b46, - 0x217445, - 0x2fe1c3, - 0x3245c6, - 0x216f45, - 0x22cec4, - 0x6b600902, - 0x2a7b04, - 0x2caf4a, - 0x32d147, - 0x335a86, - 0x3ac3c7, - 0x23f343, - 0x2bbe88, - 0x3bdbcb, - 0x2b7145, - 0x2c0d85, - 0x2c0d86, - 0x26cf04, - 0x3c0688, - 0x21be43, - 0x248644, - 0x248647, - 0x2e6086, - 0x203a86, - 0x2b7e4a, - 0x24ee84, - 0x314eca, - 0x6bb48d46, - 0x348d47, - 0x257347, - 0x276e44, - 0x276e49, - 0x233045, - 0x326a0b, - 0x2e8f43, - 0x212c03, - 0x6be1d5c3, - 0x2c9a04, - 0x6c200682, - 0x224746, - 0x6c6b9845, - 0x301285, - 0x251c86, - 0x2a0304, - 0x6ca03e42, - 0x242184, - 0x6ce129c2, - 0x228ac5, - 0x268804, - 0x6da1bbc3, - 0x6de08dc2, - 0x208dc3, - 0x238446, - 0x6e205fc2, - 0x395a48, - 0x222184, - 0x222186, - 0x393146, - 0x6e6588c4, - 0x20ccc5, - 0x222488, - 0x2250c7, - 0x227547, - 0x22754f, - 0x294446, - 0x231603, - 0x23ee84, - 0x20c5c3, - 0x2213c4, - 0x251dc4, - 0x6ea0ba82, - 0x28d083, - 0x337243, - 0x6ee02442, - 0x223943, - 0x21c2c3, - 0x20e20a, - 0x275b47, - 0x25494c, - 0x6f254c06, - 0x254d86, - 0x256b47, - 0x6f630e07, - 0x25d989, - 0x246784, - 0x262b04, - 0x6fa14d02, - 0x6fe05c82, - 0x2b8206, - 0x363844, - 0x28d506, - 0x231288, - 0x38fa04, - 0x259c46, - 0x208a45, - 0x7028b748, - 0x242d43, - 0x30d485, - 0x2917c3, - 0x22a8c3, - 0x22a8c4, - 0x20c343, - 0x7064b902, - 0x70a033c2, - 0x2e8e09, - 0x292705, - 0x292a04, - 0x293245, - 0x20b444, - 0x3a2007, - 0x35fbc5, - 0x70e3bb84, - 0x2df6c8, - 0x2e0cc6, - 0x2e2e04, - 0x2e3508, - 0x2e3807, - 0x71201702, - 0x2e6804, - 0x30a484, - 0x2c1447, - 0x71605184, - 0x226b42, - 0x71a01782, + 0x34efc6, + 0x64a16603, + 0x340007, + 0x2669c7, + 0x29e985, + 0x26f486, + 0x2158c3, + 0x6761a4c3, + 0x67a00a82, + 0x67e8f804, + 0x3c36c9, + 0x2137c5, + 0x229bc4, + 0x354e88, + 0x2e47c5, + 0x682352c5, + 0x23f549, + 0x344a43, + 0x261404, + 0x686161c2, + 0x2161c3, + 0x68a74542, + 0x274546, + 0x1678002, + 0x68e08f82, + 0x291988, + 0x291c83, + 0x2a8a87, + 0x2b2745, + 0x2b22c5, + 0x2b22cb, + 0x2e8206, + 0x2b24c6, + 0x23bb44, + 0x2e8946, + 0x69321408, + 0x27f4c3, + 0x264503, + 0x264504, + 0x2e51c4, + 0x2ea707, + 0x2ec545, + 0x696ec682, + 0x69a08242, + 0x6a21ae45, + 0x2b8f44, + 0x2d244b, + 0x2edcc8, + 0x250f44, + 0x6a62ad42, + 0x6aa23c42, + 0x3ba403, + 0x2efb84, + 0x2efe45, + 0x2f0607, + 0x2f3984, + 0x362244, + 0x6ae16102, + 0x37b5c9, + 0x2f4c05, + 0x240985, + 0x2f5cc5, + 0x6b216103, + 0x2f67c4, + 0x2f67cb, + 0x2f8a84, + 0x2f8d4b, + 0x2f95c5, + 0x216d4a, + 0x2f9e88, + 0x2fa08a, + 0x2fa883, + 0x2fa88a, + 0x6ba13602, + 0x6be20082, + 0x6c2ba0c3, + 0x6c6fdb02, + 0x2fdb03, + 0x6caed182, + 0x6cf38c02, + 0x301f04, + 0x218086, + 0x3978c5, + 0x303c03, + 0x32d3c6, + 0x3973c5, + 0x3d2dc4, + 0x6d200902, + 0x29fc84, + 0x2cb88a, + 0x3001c7, + 0x32a006, + 0x242f47, + 0x23bf03, + 0x2bac48, + 0x3c608b, + 0x2b6585, + 0x2c26c5, + 0x2c26c6, + 0x229984, + 0x3a4f48, + 0x20f883, + 0x25b984, + 0x336947, + 0x2ebb46, + 0x340846, + 0x2ba04a, + 0x24b144, + 0x31b14a, + 0x6d7009c6, + 0x3009c7, + 0x254287, + 0x273f04, + 0x273f09, + 0x251e05, + 0x234f8b, + 0x2ed083, + 0x212983, + 0x6da1de03, + 0x331d84, + 0x6de00682, + 0x228906, + 0x6e2bb4c5, + 0x356845, + 0x24e1c6, + 0x2a1384, + 0x6e602442, + 0x23f484, + 0x6ea0a982, + 0x3287c5, + 0x34c884, + 0x6f61b443, + 0x6fa08102, + 0x208103, + 0x3062c6, + 0x6fe04e82, + 0x392248, + 0x225344, + 0x225346, + 0x38fe46, + 0x70255d04, + 0x20a645, + 0x225648, + 0x227187, + 0x34e087, + 0x34e08f, + 0x294246, + 0x23b743, + 0x23fac4, + 0x20dc83, + 0x224684, + 0x24e784, + 0x706085c2, + 0x28b443, + 0x335543, + 0x70a09482, + 0x209483, + 0x227603, + 0x20c60a, + 0x272bc7, + 0x25398c, + 0x70e53c46, + 0x253dc6, + 0x254d87, + 0x7122d847, + 0x25aac9, + 0x23d604, + 0x71660404, + 0x71a16002, + 0x71e02e42, + 0x2ba406, + 0x33fe04, + 0x28b8c6, + 0x22dcc8, + 0x38c484, + 0x2d7b46, + 0x2055c5, + 0x7228a748, + 0x23fa43, + 0x314705, + 0x28dc43, + 0x240a83, + 0x240a84, + 0x20da03, + 0x72648d42, + 0x72a03382, + 0x2ecf49, + 0x291b85, + 0x292544, + 0x296b45, + 0x209b04, + 0x2cd147, + 0x35a545, + 0x72e46484, + 0x2d2088, + 0x2d2f86, + 0x2dedc4, + 0x2e13c8, + 0x2e1a07, + 0x73201702, + 0x2e99c4, + 0x310d44, + 0x2c2d87, + 0x73605bc4, + 0x215782, + 0x73a01782, 0x201783, 0x201784, - 0x29f203, - 0x29f205, - 0x71e1df42, - 0x2fae85, - 0x287542, - 0x303a85, - 0x3b9145, - 0x72210b82, - 0x216404, - 0x726026c2, - 0x36b586, - 0x2ba0c6, - 0x264288, - 0x2c20c8, - 0x3cc044, - 0x3b2ac5, - 0x383b49, - 0x2fe744, - 0x2e7144, - 0x203983, - 0x248403, - 0x72a48405, - 0x234545, - 0x2865c4, - 0x35550d, - 0x354282, - 0x357a43, - 0x35ef43, - 0x72e05c42, - 0x73202302, - 0x395505, - 0x368687, - 0x21dc44, - 0x36dcc9, - 0x2cb089, - 0x279e83, - 0x279e88, - 0x2f3f49, - 0x2305c7, - 0x207ac5, - 0x383886, - 0x3a2c06, - 0x3a6305, - 0x34cb45, - 0x73601a82, - 0x27cbc5, - 0x2b8908, - 0x2c4346, - 0x73b2ec87, - 0x2a1084, - 0x309247, - 0x2ffe86, - 0x73e01082, - 0x361a86, - 0x30310a, - 0x303985, - 0x742e4542, - 0x7468f3c2, - 0x340fc6, - 0x318e08, - 0x74a8f3c7, - 0x74e28cc2, - 0x28a1c3, - 0x3a8546, - 0x224304, - 0x278b06, - 0x313646, - 0x376d4a, - 0x203bc5, - 0x331cc6, - 0x32ee03, - 0x32ee04, - 0x20b102, - 0x329103, - 0x7520e982, - 0x2ed803, - 0x213904, - 0x2c28c4, - 0x75718f4a, - 0x222f03, - 0x222f0a, - 0x239447, - 0x307186, - 0x23bd84, - 0x20d642, - 0x2a5b82, - 0x75a007c2, - 0x263943, - 0x257107, + 0x29f703, + 0x2aed05, + 0x73e2e942, + 0x302245, + 0x287582, + 0x30a205, + 0x3c0085, + 0x74210342, + 0x217944, + 0x74602602, + 0x28eb86, + 0x2bf706, + 0x261cc8, + 0x2c3748, + 0x3ae104, + 0x30ed05, + 0x3abbc9, + 0x2cfd44, + 0x3c8f84, + 0x2204c3, + 0x319c83, + 0x74b19c85, + 0x2411c5, + 0x284b04, + 0x356bcd, + 0x293042, + 0x359103, + 0x74e09442, + 0x75203a42, + 0x391d05, + 0x3babc7, + 0x21e484, + 0x32fb09, + 0x2cb9c9, + 0x277e43, + 0x277e48, + 0x245e09, + 0x214947, + 0x204185, + 0x37c106, + 0x37ec86, + 0x3808c5, + 0x37aec5, + 0x75601a82, + 0x287205, + 0x2b7748, + 0x2c5a46, + 0x75a52b07, + 0x2bd2c4, + 0x2fc647, + 0x305546, + 0x75e01082, + 0x37c286, + 0x30988a, + 0x30a105, + 0x762e8f82, + 0x76621902, + 0x3645c6, + 0x221908, + 0x76a8d107, + 0x76e43b02, + 0x288ec3, + 0x2ff806, + 0x226884, + 0x275b06, + 0x319f46, + 0x2034ca, + 0x2021c5, + 0x3006c6, + 0x2520c3, + 0x2520c4, + 0x207442, + 0x331403, + 0x7720e442, + 0x2f1803, + 0x7760cf84, + 0x221a44, + 0x77a21a4a, + 0x22ce03, + 0x266c87, + 0x30d106, + 0x2ff144, + 0x20bc82, + 0x2a6f02, + 0x77e007c2, + 0x22b9c3, + 0x254047, 0x2007c7, - 0x288e44, - 0x21f187, - 0x2ec646, - 0x210347, - 0x21c204, - 0x3ae645, - 0x20fa45, - 0x75e14642, - 0x387fc6, - 0x214643, - 0x21d882, - 0x21d886, - 0x76207202, - 0x7661a602, - 0x3c5285, - 0x76a44d02, - 0x76e01942, - 0x323485, - 0x2d4505, - 0x2a8485, - 0x77609903, - 0x372d45, - 0x2e3087, - 0x2f7405, - 0x203d85, - 0x322804, - 0x23d386, - 0x2fdc84, - 0x77a008c2, - 0x786e7645, - 0x3858c7, - 0x3543c8, - 0x250e06, - 0x38f0cd, - 0x250e09, - 0x250e12, - 0x349b05, - 0x34c683, - 0x78a05842, - 0x313244, - 0x214583, - 0x382b45, - 0x304945, - 0x78e10782, - 0x25b643, - 0x7921ddc2, - 0x79a736c2, - 0x79e00082, - 0x2d1885, - 0x21fb83, - 0x248d88, - 0x7a210242, - 0x7a613602, - 0x37ae46, - 0x31650a, - 0x206303, - 0x258dc3, - 0x2f1cc3, - 0x7ba04cc2, - 0x89e187c2, - 0x8a608c02, - 0x2038c2, - 0x3ccc09, - 0x2c6984, - 0x20a988, - 0x8aaf6602, - 0x8b205d42, - 0x2b04c5, - 0x235d48, - 0x2f9f08, - 0x2e95cc, - 0x239383, - 0x8b61fb02, - 0x8ba00f02, - 0x367b06, - 0x308005, - 0x2db783, - 0x250346, - 0x308146, - 0x291103, - 0x30a3c3, - 0x30a7c6, - 0x30c044, - 0x26c6c6, - 0x3b45ca, - 0x2443c4, - 0x30c704, - 0x30d84a, - 0x8bee5d02, - 0x24ff85, - 0x30f38a, - 0x30f2c5, - 0x3115c4, - 0x3116c6, - 0x311844, - 0x215186, - 0x8c22c902, - 0x2f8346, - 0x32b1c5, - 0x329847, - 0x3b4446, - 0x256d44, - 0x2dba07, - 0x337b86, - 0x20b085, - 0x20b087, - 0x3bc047, - 0x3bc04e, - 0x38cb86, - 0x221045, - 0x2050c7, - 0x207603, - 0x349047, - 0x208f45, - 0x217ec4, - 0x222782, - 0x22bdc7, - 0x3cb584, - 0x2ff104, - 0x24758b, - 0x21c903, - 0x291847, - 0x21c904, - 0x2ba647, - 0x22ac83, - 0x34e84d, - 0x3a4e08, - 0x8c6261c4, - 0x23ba85, - 0x312bc5, - 0x313003, - 0x8ca22082, - 0x315303, - 0x315703, - 0x388144, - 0x27e645, - 0x2146c7, - 0x32ee86, - 0x390b03, - 0x22550b, - 0x27e74b, - 0x2b2ccb, - 0x2d340b, - 0x2e458a, - 0x3709cb, + 0x287dc4, + 0x3d0847, + 0x2f0706, + 0x20fb07, + 0x227544, + 0x292445, + 0x2187c5, + 0x78214682, + 0x3b2f46, + 0x215943, + 0x21e0c2, + 0x21e0c6, + 0x78621542, + 0x78a19f82, + 0x298e05, + 0x78e47c82, + 0x79201942, + 0x324c85, + 0x2d3985, + 0x2a9385, + 0x79a1d043, + 0x24adc5, + 0x2e82c7, + 0x2f3505, + 0x202385, + 0x32b944, + 0x229a46, + 0x3dd844, + 0x79e008c2, + 0x7ab82d05, + 0x3c9447, + 0x3afe08, + 0x24d686, + 0x38bb4d, + 0x24d689, + 0x24d692, + 0x34cf05, + 0x37aa03, + 0x7ae06902, + 0x319b44, + 0x2145c3, + 0x38d005, + 0x30b405, + 0x7b20ff42, + 0x259243, + 0x7b62b902, + 0x7beca302, + 0x7c200082, + 0x2e08c5, + 0x2088c3, + 0x7c60fa02, + 0x7ca14302, + 0x3a4486, + 0x27ac8a, + 0x208c83, + 0x256203, + 0x2f6ac3, + 0x7de05402, + 0x8c218d82, + 0x8ca05782, + 0x217042, + 0x3cd2c9, + 0x2c80c4, + 0x2d6648, + 0x8cefbb02, + 0x8d60ff82, + 0x2c4e85, + 0x233b08, + 0x23c708, + 0x315b0c, + 0x237843, + 0x8da08842, + 0x8de00f02, + 0x3b9686, + 0x30df85, + 0x2dae43, + 0x252f86, + 0x30e0c6, + 0x27a383, + 0x310c83, + 0x311346, + 0x312bc4, + 0x263546, + 0x3b610a, + 0x23fbc4, + 0x313284, + 0x314aca, + 0x8e212f42, + 0x24cf45, + 0x31634a, + 0x316285, + 0x317c04, + 0x317d06, + 0x317e84, + 0x216486, + 0x8e615482, + 0x215486, + 0x251a45, + 0x3b2dc7, + 0x3b5f86, + 0x254f84, + 0x2db0c7, + 0x20a4c5, + 0x20a4c7, + 0x3b7147, + 0x3b714e, + 0x389606, + 0x22a785, + 0x205b07, + 0x207203, + 0x207207, + 0x21e905, + 0x225944, + 0x22a582, + 0x23db47, + 0x30b144, + 0x241b04, + 0x285f4b, + 0x21c283, + 0x2bc607, + 0x21c284, + 0x2bc907, + 0x229683, + 0x350f8d, + 0x3a0c48, + 0x8ea46384, + 0x246385, + 0x3194c5, + 0x319903, + 0x8ee25242, + 0x31c243, + 0x31d283, + 0x3b30c4, + 0x27cf45, + 0x2159c7, + 0x252146, + 0x38cdc3, + 0x22b34b, + 0x27350b, + 0x2ac28b, + 0x3cad8b, + 0x2e8fca, + 0x36f44b, + 0x39334b, + 0x3d950c, + 0x3dcb4b, + 0x31ddd1, + 0x31e20a, + 0x31e70b, + 0x31e9cc, + 0x31eccb, + 0x31ff4a, + 0x3206ca, + 0x321ece, + 0x32344b, + 0x32370a, + 0x324dd1, + 0x32520a, + 0x32570b, + 0x325c4e, + 0x326b4c, + 0x32738b, + 0x32764e, + 0x3279cc, + 0x32b40a, + 0x32c64c, + 0x8f32c94a, + 0x32d548, + 0x32e109, + 0x33204a, + 0x3322ca, + 0x33254b, + 0x334cce, + 0x335b91, + 0x341509, + 0x34174a, + 0x34244b, + 0x34634d, + 0x3471ca, + 0x348716, + 0x349a8b, + 0x34a80a, + 0x34ad8a, + 0x34c10b, + 0x34c989, + 0x351909, + 0x351e8d, + 0x35250b, + 0x35340b, + 0x353dcb, + 0x3543c9, + 0x354a0e, + 0x35520a, + 0x35608a, + 0x35698a, + 0x35724b, + 0x357a8b, + 0x35890d, + 0x35a04d, + 0x35a950, + 0x35ae0b, + 0x35b90c, + 0x35cecb, + 0x35ec0b, + 0x3602ce, + 0x3609cb, + 0x3609cd, + 0x36550b, + 0x365f8f, + 0x36634b, + 0x366b8a, + 0x3678c9, + 0x367f89, + 0x8f7689cb, + 0x368c8e, + 0x36900e, + 0x36cecb, + 0x36e00f, + 0x37024b, + 0x37050b, + 0x3707cb, + 0x370e8a, + 0x377889, + 0x37a00f, + 0x37e9cc, + 0x37ee0c, + 0x37f8ce, + 0x37fe4f, + 0x38020e, + 0x381310, + 0x38170f, + 0x3822ce, + 0x382e8c, + 0x383191, + 0x3835d2, + 0x384ad1, + 0x3852ce, + 0x38570b, + 0x38570e, + 0x385a8f, + 0x385e4e, + 0x3861d3, + 0x386691, + 0x386acc, + 0x386dce, + 0x38724c, + 0x387793, + 0x388650, + 0x38a34c, + 0x38a64c, + 0x38ab0b, + 0x38b0ce, + 0x38b5cb, + 0x38be8b, + 0x38d30c, + 0x39278a, + 0x392b4c, + 0x392e4c, + 0x393149, + 0x39494b, + 0x394c08, + 0x3953c9, + 0x3953cf, 0x396c8b, - 0x3d92cc, - 0x3da7cb, - 0x317351, - 0x31778a, - 0x317c8b, - 0x317f4c, - 0x31824b, - 0x3188ca, - 0x3191ca, - 0x31a0ce, - 0x31a98b, - 0x31ac4a, - 0x31c751, - 0x31cb8a, - 0x31d08b, - 0x31d5ce, - 0x31df0c, - 0x31e98b, - 0x31ec4e, - 0x31efcc, - 0x3222ca, - 0x32384c, - 0x8cf23b4a, - 0x324748, - 0x325309, - 0x333d0a, - 0x333f8a, - 0x33420b, - 0x3369ce, - 0x337651, - 0x342f49, - 0x34318a, - 0x343f8b, - 0x345aca, - 0x346f16, - 0x34828b, - 0x3498ca, - 0x349cca, - 0x34accb, - 0x34c109, - 0x34f1c9, - 0x34fc8d, - 0x35030b, - 0x35120b, - 0x351bcb, - 0x352709, - 0x352d4e, - 0x353dca, - 0x354c8a, - 0x3552ca, - 0x355b8b, - 0x3563cb, - 0x35724d, - 0x358bcd, - 0x359210, - 0x3596cb, - 0x35a24c, - 0x35b74b, - 0x35d48b, - 0x35eb4e, - 0x35f6cb, - 0x35f6cd, - 0x364c8b, - 0x36570f, - 0x365acb, - 0x36630a, - 0x368b49, - 0x369209, - 0x8d36a28b, - 0x36a54e, - 0x36e90b, - 0x36f58f, - 0x37208b, - 0x37234b, - 0x37260b, - 0x372e8a, - 0x378bc9, - 0x37d1cf, - 0x381d4c, - 0x38230c, - 0x38280e, - 0x382e0f, - 0x3831ce, - 0x383f10, - 0x38430f, - 0x384ece, - 0x385a8c, - 0x385d91, - 0x3861d2, - 0x388711, - 0x388f0e, - 0x38934b, - 0x38934e, - 0x3896cf, - 0x389a8e, - 0x389e13, - 0x38a2d1, - 0x38a70c, - 0x38aa0e, - 0x38ae8c, - 0x38b3d3, - 0x38bbd0, - 0x38d8cc, - 0x38dbcc, - 0x38e08b, - 0x38e64e, - 0x38eb4b, - 0x38f40b, - 0x3914cc, - 0x395f8a, - 0x39648c, - 0x39678c, - 0x396a89, - 0x3986cb, - 0x398988, - 0x399149, - 0x39914f, - 0x39a90b, - 0x8d79b24a, - 0x39d78c, - 0x39e94b, - 0x39ec09, - 0x39f388, - 0x39f94b, - 0x3a018b, - 0x3a0d0a, + 0x8fb9800a, + 0x399fcc, + 0x39b18b, + 0x39b449, + 0x39bbc8, + 0x39c18b, + 0x39c70b, + 0x39d28a, + 0x39d50b, + 0x39da0c, + 0x39e3c9, + 0x39e608, 0x3a0f8b, - 0x3a154c, - 0x3a2688, - 0x3a514b, - 0x3a80cb, - 0x3ab58e, - 0x3acccb, - 0x3af7cb, - 0x3bbbcb, - 0x3bbe89, - 0x3bc3cd, - 0x3ca50a, - 0x3cdb97, - 0x3cfd58, - 0x3d34c9, - 0x3d460b, - 0x3d50d4, - 0x3d55cb, - 0x3d5b4a, - 0x3d600a, - 0x3d628b, - 0x3d7250, - 0x3d7651, - 0x3d7c0a, - 0x3d88cd, - 0x3d8fcd, - 0x3dbd8b, - 0x3880c3, - 0x8db86943, - 0x2a9ec6, - 0x279c45, - 0x3911c7, - 0x334b06, - 0x1603a02, - 0x3d2049, - 0x3243c4, - 0x2e2608, - 0x21d503, - 0x313187, - 0x231442, - 0x2b1083, - 0x8de08c42, - 0x2cbb06, - 0x2ccf04, - 0x346604, - 0x36d203, - 0x8e6c8842, - 0x8ea1e244, - 0x276d87, - 0x8ee2ba82, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x1acac8, - 0x204783, + 0x3a3ccb, + 0x3a694e, + 0x3a7e4b, + 0x3aabcb, + 0x3b6ccb, + 0x3b6f89, + 0x3b74cd, + 0x3c9e8a, + 0x3cdd57, + 0x3cf418, + 0x3d41c9, + 0x3d530b, + 0x3d5814, + 0x3d5d0b, + 0x3d628a, + 0x3d694a, + 0x3d6bcb, + 0x3d7410, + 0x3d7811, + 0x3d7eca, + 0x3d8b0d, + 0x3d920d, + 0x3ddd8b, + 0x3b3043, + 0x8ff83d43, + 0x32af06, + 0x22ef05, + 0x307347, + 0x332e46, + 0x1602d42, + 0x2ab3c9, + 0x32d1c4, + 0x2e4d08, + 0x21dd43, + 0x319a87, + 0x22de82, + 0x2b05c3, + 0x902057c2, + 0x2cc446, + 0x2cdb04, + 0x347d04, + 0x346243, + 0x90ac91c2, + 0x90e2a444, + 0x273e47, + 0x9122a1c2, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x111148, + 0x20ca43, 0x2000c2, - 0xa7c88, - 0x203102, - 0x224943, - 0x211d83, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0x202443, - 0x33fed6, - 0x362e53, - 0x21f009, - 0x245b48, - 0x3bd489, - 0x30f506, - 0x3505d0, - 0x243713, - 0x2e6148, - 0x27abc7, - 0x27c4c7, - 0x2a3d0a, - 0x3426c9, - 0x3a2809, - 0x25078b, - 0x326546, - 0x28938a, - 0x220c06, - 0x323fc3, - 0x2dab45, - 0x3b9a08, - 0x23620d, - 0x2031cc, - 0x2fd587, - 0x31a40d, - 0x222584, - 0x23224a, - 0x23348a, - 0x23394a, - 0x23cc87, - 0x23e247, - 0x240a84, - 0x2877c6, - 0x32b384, - 0x2d8588, - 0x3a9409, - 0x2ceb86, - 0x2ceb88, - 0x243ecd, - 0x2cb2c9, - 0x30ad48, - 0x22a747, - 0x23904a, - 0x251ec6, - 0x25dec7, - 0x2d0e84, - 0x28f047, - 0x22494a, - 0x23f84e, - 0x26fbc5, - 0x28ef4b, - 0x222b09, - 0x207349, - 0x371187, - 0x3dc44a, - 0x2c1387, - 0x2f38c9, - 0x209f08, - 0x32c60b, - 0x2e1985, - 0x22ca0a, - 0x225289, - 0x36beca, - 0x2cdccb, - 0x3c6c8b, - 0x250515, - 0x2e59c5, - 0x22a7c5, - 0x2f2d0a, - 0x25970a, - 0x313b87, - 0x22a803, - 0x2b8188, - 0x2d928a, - 0x222186, - 0x25b6c9, - 0x28b748, - 0x2e2e04, - 0x38b189, - 0x2c20c8, - 0x2bc707, - 0x2e7646, - 0x3858c7, - 0x2c2dc7, - 0x23fe85, - 0x26fa0c, - 0x23ba85, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0x203102, - 0x22f743, - 0x20ce83, - 0x204783, - 0x23f7c3, - 0x22f743, - 0x20ce83, - 0x4783, - 0x26d843, - 0x23f7c3, - 0x1ca8c3, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0xa7c88, - 0x203102, - 0x22f743, - 0x22f747, - 0x20ce83, - 0x23f7c3, - 0x203102, + 0x9fe08, + 0x20c302, + 0x228b03, + 0x211543, + 0x20a803, + 0xca43, + 0x216603, + 0x20c603, + 0x33b8d6, + 0x363e93, + 0x3d06c9, + 0x322c48, + 0x3b85c9, + 0x3164c6, + 0x3527d0, + 0x20c013, + 0x2ebc08, + 0x27a947, + 0x286b07, + 0x2a4a4a, + 0x3291c9, + 0x28f509, + 0x24224b, + 0x2e73c6, + 0x28830a, + 0x222a86, + 0x32cdc3, + 0x256545, + 0x3a8908, + 0x233fcd, + 0x21fd0c, + 0x2eaac7, + 0x3dcdcd, + 0x225744, + 0x22fd8a, + 0x23084a, + 0x230d0a, + 0x20c307, + 0x23a907, + 0x23da84, + 0x287806, + 0x251c04, + 0x2d58c8, + 0x32ad09, + 0x2cf506, + 0x2cf508, + 0x240dcd, + 0x2cbc09, + 0x3910c8, + 0x240907, + 0x23750a, + 0x24e606, + 0x25b7c7, + 0x2fb704, + 0x20b6c7, + 0x228b0a, + 0x239d4e, + 0x277f05, + 0x3d7c0b, + 0x22b709, + 0x24d8c9, + 0x2c6607, + 0x3c138a, + 0x2c2cc7, + 0x2f9309, + 0x27b408, + 0x2e640b, + 0x2e2a45, + 0x22ad8a, + 0x22b0c9, + 0x33e68a, + 0x20460b, + 0x20b5cb, + 0x241fd5, + 0x2c1f85, + 0x240985, + 0x2f67ca, + 0x3dbb0a, + 0x31b687, + 0x233c43, + 0x2ba388, + 0x2d80ca, + 0x225346, + 0x2592c9, + 0x28a748, + 0x2dedc4, + 0x387549, + 0x2c3748, + 0x2c2407, + 0x382d06, + 0x3c9447, + 0x2b4607, + 0x23ca85, + 0x2e450c, + 0x246385, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0xca43, + 0x216603, + 0x20c302, + 0x22c0c3, + 0x20a803, + 0x20ca43, + 0x216603, + 0x22c0c3, + 0x20a803, + 0xca43, + 0x239503, + 0x216603, + 0x1ca243, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0xca43, + 0x216603, + 0x9fe08, + 0x20c302, + 0x22c0c3, + 0x22c0c7, + 0x20a803, + 0x216603, + 0x20c302, 0x201d02, - 0x2e63c2, - 0x2051c2, - 0x2090c2, - 0x2e4e02, - 0x92246, - 0x52449, - 0x481bbc3, - 0x891c7, - 0x50c3, - 0x112585, + 0x2ebe82, + 0x202cc2, + 0x202f82, + 0x2e5382, + 0x91746, + 0x4e9c9, + 0x481b443, + 0x88147, + 0x5b03, + 0x119045, 0xc1, - 0x522f743, - 0x234e83, - 0x20d343, - 0x224943, - 0x214503, - 0x211d83, - 0x2daa46, - 0x20ce83, - 0x23f7c3, - 0x2021c3, - 0xa7c88, - 0x3314c4, - 0x332e47, - 0x36d243, - 0x2e8204, - 0x2186c3, - 0x287e03, - 0x224943, - 0xe747, + 0x522c0c3, + 0x232c43, + 0x212483, + 0x228b03, + 0x214543, + 0x211543, + 0x2d9fc6, + 0x20a803, + 0x216603, + 0x20f803, + 0x9fe08, + 0x3443c4, + 0x374787, + 0x346283, + 0x2b3904, + 0x218c83, + 0x286243, + 0x228b03, + 0x176c87, 0x9c4, 0x11c3, - 0x1273c5, + 0x2b05, 0x2000c2, - 0x4af03, - 0x6603102, - 0x688b549, - 0x8bbcd, - 0x8cb4d, - 0x2e63c2, - 0x21b84, - 0x127409, + 0x48343, + 0x660c302, + 0x688a549, + 0x8abcd, + 0x8af0d, + 0x2ebe82, + 0x24e44, + 0x2b49, 0x2003c2, - 0x6e21a88, - 0xf2484, - 0xa7c88, - 0x1416702, + 0x6e24d48, + 0xf61c4, + 0x9fe08, + 0x1417c42, 0x14005c2, - 0x1416702, - 0x150c906, - 0x2314c3, - 0x271803, - 0x762f743, - 0x232244, - 0x7a34e83, - 0x8624943, - 0x203842, - 0x221b84, - 0x20ce83, - 0x301e03, + 0x1417c42, + 0x1513486, + 0x22df03, + 0x26fb43, + 0x762c0c3, + 0x22fd84, + 0x7a32c43, + 0x8628b03, + 0x203dc2, + 0x224e44, + 0x20a803, + 0x2e59c3, 0x201e02, - 0x23f7c3, - 0x218002, - 0x2faa83, - 0x205fc2, - 0x2a3903, - 0x28b803, - 0x202d02, - 0xa7c88, - 0x2314c3, - 0x20bb08, - 0x2802c2, - 0x7f01e03, + 0x216603, + 0x2185c2, + 0x301e43, + 0x204e82, + 0x203303, + 0x28a803, + 0x205842, + 0x9fe08, + 0x22df03, + 0x3c38c8, + 0x7ee59c3, 0x201e02, - 0x2faa83, - 0x205fc2, - 0x82a3903, - 0x28b803, - 0x202d02, - 0x254c07, - 0x234e89, - 0x2faa83, - 0x205fc2, - 0x2a3903, - 0x28b803, - 0x202d02, - 0x22f743, - 0x24af03, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x214503, - 0x211d83, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x20da42, - 0x214e03, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x24af03, - 0x203102, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x20ce83, - 0x23f7c3, - 0x207ac5, - 0x210782, + 0x301e43, + 0x204e82, + 0x8203303, + 0x28a803, + 0x205842, + 0x253c47, + 0x232c49, + 0x301e43, + 0x204e82, + 0x203303, + 0x28a803, + 0x205842, + 0x22c0c3, + 0x248343, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x214543, + 0x211543, + 0x217b84, + 0x20a803, + 0x216603, + 0x20b142, + 0x216103, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x248343, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x20a803, + 0x216603, + 0x204185, + 0x20ff42, 0x2000c2, - 0xa7c88, - 0x14441c8, - 0x13258a, - 0x224943, - 0x2042c1, + 0x9fe08, + 0x14470c8, + 0xf704a, + 0x228b03, + 0x203281, 0x2009c1, 0x200a01, 0x201301, 0x201281, - 0x205ac1, - 0x202881, - 0x220541, - 0x204341, + 0x207101, + 0x2027c1, + 0x2223c1, + 0x203bc1, 0x200001, 0x2000c1, 0x200201, - 0x129245, - 0xa7c88, + 0x12eb85, + 0x9fe08, 0x200101, 0x2015c1, 0x200501, @@ -2347,7067 +2337,7112 @@ var nodes = [...]uint32{ 0x200581, 0x2003c1, 0x200a81, - 0x216b41, + 0x209101, 0x200401, 0x200741, 0x2007c1, 0x200081, 0x200f01, - 0x202d01, + 0x205841, 0x201241, 0x2018c1, - 0x2086c1, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x203102, - 0x22f743, - 0x234e83, + 0x204981, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x20c302, + 0x22c0c3, + 0x232c43, 0x2003c2, - 0x23f7c3, - 0x1b583, - 0xe747, - 0x11e87, - 0x25786, - 0x36a8a, - 0x8ac88, - 0x56548, - 0x57007, - 0x1757c6, - 0xe0a45, - 0x1339c5, - 0x11d483, - 0x1c6b46, - 0xfd986, - 0x250784, - 0x3bd8c7, - 0xa7c88, - 0x2dbb04, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x3102, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x323d48, - 0x330684, - 0x234dc4, - 0x226804, - 0x367a07, - 0x2d7607, - 0x22f743, - 0x2375cb, - 0x316cca, - 0x326807, - 0x302288, - 0x32aac8, - 0x234e83, - 0x32d787, - 0x20d343, - 0x2083c8, - 0x20b5c9, - 0x221b84, - 0x214503, - 0x23b2c8, - 0x211d83, - 0x2d430a, - 0x2daa46, - 0x3aa987, - 0x20ce83, - 0x398446, - 0x271688, - 0x23f7c3, - 0x258f86, - 0x2e9b0d, - 0x2ec208, - 0x2f304b, - 0x3c6506, - 0x368587, - 0x212885, - 0x22914a, - 0x220205, - 0x23444a, - 0x210782, - 0x2050c3, - 0x2ff104, + 0x216603, + 0x1ae03, + 0x176c87, + 0x11647, + 0x39346, + 0x3484a, + 0x89988, + 0x53388, + 0x53f47, + 0xbdc06, + 0xe1145, + 0x175305, + 0x125b03, + 0x13686, + 0x3e006, + 0x242244, + 0x2f6d07, + 0x9fe08, + 0x2db1c4, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0xc302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x32cb48, + 0x345344, + 0x232b84, + 0x26bb44, + 0x3b9587, + 0x2d6b87, + 0x22c0c3, + 0x23560b, + 0x37400a, + 0x2ff007, + 0x308a08, + 0x2f7b48, + 0x232c43, + 0x2e6687, + 0x212483, + 0x204f48, + 0x209c89, + 0x224e44, + 0x214543, + 0x238cc8, + 0x211543, + 0x2d378a, + 0x2d9fc6, + 0x3a5d47, + 0x20a803, + 0x373846, + 0x26f9c8, + 0x216603, + 0x2433c6, + 0x2edf0d, + 0x2f0348, + 0x2f8a8b, + 0x20b186, + 0x3baac7, + 0x212605, + 0x3c554a, + 0x222085, + 0x2410ca, + 0x20ff42, + 0x205b03, + 0x241b04, 0x200006, - 0x3b2f83, - 0x2a7b83, - 0x24e8c3, - 0x2c5d43, - 0x2b5903, - 0x203082, - 0x2fcf85, - 0x2a9749, - 0x240503, - 0x21c183, - 0x224cc3, + 0x3ae643, + 0x29fd03, + 0x258783, + 0x20f643, + 0x373c83, + 0x203582, + 0x3abe85, + 0x2aad89, + 0x23d103, + 0x225843, + 0x215203, 0x200201, - 0x2e6f07, - 0x2d15c5, - 0x3a8343, - 0x3c6083, - 0x226804, - 0x327003, - 0x20f588, - 0x368d83, - 0x3097cd, - 0x38cc48, - 0x20bcc6, - 0x329143, - 0x391783, - 0x3acf43, - 0xc62f743, - 0x2346c8, - 0x2375c4, - 0x241183, + 0x2cfb07, + 0x2e0605, + 0x3a8843, + 0x3c7543, + 0x26bb44, + 0x2fef83, + 0x21b908, + 0x367b03, + 0x30f30d, + 0x3896c8, + 0x3c3a86, + 0x2fdec3, + 0x360cc3, + 0x38d5c3, + 0xc62c0c3, + 0x232488, + 0x235604, + 0x23e483, 0x200106, - 0x244988, - 0x27d8c3, - 0x229183, - 0x22f8c3, - 0x234e83, - 0x2199c3, - 0x250603, - 0x286583, - 0x3290c3, - 0x28e243, - 0x2227c3, - 0x38f685, - 0x252404, - 0x252d87, - 0x2b1d82, - 0x2562c3, - 0x259106, - 0x25ab43, - 0x25b203, - 0x279e43, - 0x376083, - 0x3311c3, - 0x298c07, - 0xca24943, - 0x249203, - 0x3d66c3, - 0x2083c3, - 0x214343, - 0x2f8683, - 0x3b9485, - 0x374ec3, + 0x241648, + 0x27c083, + 0x3c5583, + 0x22c243, + 0x232c43, + 0x2234c3, + 0x2420c3, + 0x284ac3, + 0x3313c3, + 0x28c603, + 0x20d643, + 0x38c105, + 0x24e984, + 0x24f307, + 0x2b12c2, + 0x252d83, + 0x256cc6, + 0x258283, + 0x258e03, + 0x277e03, + 0x2be4c3, + 0x3440c3, + 0x297e47, + 0xca28b03, + 0x2530c3, + 0x3d9e83, + 0x204f43, + 0x214383, + 0x2157c3, + 0x3c3345, + 0x372f03, 0x200e09, 0x201503, - 0x304c43, - 0xce37bc3, - 0x2bd483, - 0x21acc8, - 0x2a9686, - 0x375e46, - 0x29e046, - 0x38c287, - 0x222e43, - 0x225a83, - 0x211d83, - 0x28ad86, - 0x203282, - 0x2a2c03, - 0x33e985, - 0x20ce83, - 0x3104c7, - 0x1604783, - 0x271683, - 0x207c83, - 0x212ec3, - 0x209b43, - 0x23f7c3, - 0x20c586, - 0x326d46, - 0x37da83, - 0x2eb003, - 0x214e03, - 0x21c283, - 0x30a443, - 0x2f8c83, - 0x2fae43, - 0x216f45, - 0x259703, - 0x387b06, - 0x32b588, - 0x212c03, - 0x3be389, - 0x363348, - 0x215a48, - 0x21fc05, - 0x2ff34a, - 0x35fcca, - 0x3a128b, - 0x22ecc8, - 0x2ed043, - 0x390c43, - 0x2f2f83, - 0x305a48, - 0x3788c3, - 0x32ee04, - 0x20b102, - 0x25e943, + 0x30b703, + 0xce35c03, + 0x2c9343, + 0x219a08, + 0x2aacc6, + 0x2be286, + 0x2b1306, + 0x388d07, + 0x228503, + 0x238cc3, + 0x211543, + 0x289a86, + 0x21fdc2, + 0x28f543, + 0x33a385, + 0x20a803, + 0x316d07, + 0x160ca43, + 0x26f9c3, + 0x204343, + 0x230743, + 0x21d283, + 0x216603, + 0x20dc46, + 0x3b9d86, + 0x37a8c3, + 0x2ef183, + 0x216103, + 0x2275c3, + 0x310d03, + 0x2fd203, + 0x302203, + 0x3973c5, + 0x236bc3, + 0x236bc6, + 0x211f08, + 0x212983, + 0x212989, + 0x33f908, + 0x216f88, + 0x221105, + 0x22ceca, + 0x22e04a, + 0x237acb, + 0x23a5c8, + 0x2ed803, + 0x38cf03, + 0x2f9503, + 0x30e208, + 0x3606c3, + 0x2520c4, + 0x207442, + 0x25c283, 0x2007c3, - 0x222d03, - 0x254f83, - 0x2021c3, - 0x210782, - 0x22ab43, - 0x239383, - 0x30ca83, - 0x30e284, - 0x2ff104, - 0x3c6903, - 0xa7c88, + 0x228803, + 0x250d43, + 0x20f803, + 0x20ff42, + 0x229543, + 0x237843, + 0x313603, + 0x315504, + 0x241b04, + 0x3ced43, + 0x9fe08, 0x2000c2, 0x200ac2, - 0x203082, - 0x202602, + 0x203582, + 0x202542, 0x200202, 0x201ec2, - 0x255002, + 0x25a902, 0x201bc2, 0x200382, 0x200c42, - 0x32a2c2, - 0x204fc2, - 0x26ff42, + 0x252742, + 0x205a02, + 0x26bf42, 0x200a82, - 0x2e4e02, - 0x204ac2, + 0x2e5382, + 0x2161c2, 0x201c82, - 0x214e02, - 0x2b2002, - 0x2046c2, + 0x216102, + 0x228702, + 0x204d42, 0x200682, - 0x215742, - 0x203e42, + 0x216c82, 0x202442, - 0x205c82, - 0x234542, + 0x209482, + 0x202e42, + 0x2411c2, 0x201942, 0xc2, 0xac2, - 0x3082, - 0x2602, + 0x3582, + 0x2542, 0x202, 0x1ec2, - 0x55002, + 0x5a902, 0x1bc2, 0x382, 0xc42, - 0x12a2c2, - 0x4fc2, - 0x6ff42, + 0x52742, + 0x5a02, + 0x6bf42, 0xa82, - 0xe4e02, - 0x4ac2, + 0xe5382, + 0x161c2, 0x1c82, - 0x14e02, - 0xb2002, - 0x46c2, + 0x16102, + 0x28702, + 0x4d42, 0x682, - 0x15742, - 0x3e42, + 0x16c82, 0x2442, - 0x5c82, - 0x34542, + 0x9482, + 0x2e42, + 0x411c2, 0x1942, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x50c2, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x3102, - 0x203102, - 0x23f7c3, - 0xe62f743, - 0x224943, - 0x211d83, - 0x71003, - 0x228002, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x8c42, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x5b02, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0xc302, + 0x20c302, + 0x216603, + 0xe62c0c3, + 0x228b03, + 0x211543, + 0x6d9c3, + 0x22d7c2, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x57c2, 0x2001c2, - 0x143c845, - 0x129245, - 0x20bac2, - 0xa7c88, - 0x3102, - 0x2366c2, - 0x204482, - 0x20f782, - 0x211cc2, - 0x24dc02, - 0x1339c5, + 0x154da85, + 0x12eb85, + 0x208602, + 0x9fe08, + 0xc302, + 0x234482, + 0x204b02, + 0x21bb02, + 0x211482, + 0x239242, + 0x175305, 0x2016c2, 0x201e02, - 0x218782, + 0x218d42, 0x201dc2, - 0x204ac2, - 0x3a1642, + 0x2161c2, + 0x23d182, 0x201782, - 0x296d02, - 0xf731fc4, + 0x296542, + 0xf73f344, 0x142, - 0xe747, - 0x14f80d, - 0xe0ac9, - 0xd700b, - 0xe2f48, - 0x668c9, - 0x105546, - 0x224943, - 0xa7c88, + 0x176c87, + 0x1266cd, + 0xe11c9, + 0x11214b, + 0xe8188, + 0x643c9, + 0x10c246, + 0x228b03, + 0x9fe08, 0x9c4, 0x11c3, - 0x1273c5, - 0xa7c88, - 0xde387, - 0x57b06, - 0x127409, - 0xe50e, - 0x14bf47, + 0x2b05, + 0x9fe08, + 0xddc47, + 0x54c46, + 0x2b49, + 0x7b0e, + 0x14a647, 0x2000c2, - 0x250784, - 0x203102, - 0x22f743, + 0x242244, + 0x20c302, + 0x22c0c3, 0x201d02, - 0x234e83, - 0x143c3, + 0x232c43, + 0x14403, 0x200382, - 0x2dbb04, - 0x214503, - 0x249602, - 0x20ce83, + 0x2db1c4, + 0x214543, + 0x244502, + 0x20a803, 0x2003c2, - 0x23f7c3, - 0x22a7c6, - 0x3347cf, + 0x216603, + 0x240986, + 0x332b0f, 0x602, - 0x776243, - 0xa7c88, - 0x203102, - 0x20d343, - 0x224943, - 0x211d83, - 0x4783, - 0xe508, - 0x1428f0b, - 0x1540cca, - 0x152bd0a, - 0x1427bc7, - 0xa3dcb, - 0x178945, - 0x110209, - 0x129245, - 0xe747, - 0xef6c4, - 0x203102, - 0x22f743, - 0x224943, - 0x20ce83, + 0x6be683, + 0x9fe08, + 0x20c302, + 0x212483, + 0x228b03, + 0x211543, + 0xca43, + 0x7b08, + 0x15c2c4b, + 0x15642ca, + 0xf5009, + 0x15c534a, + 0x150bb87, + 0xa4b0b, + 0x160745, + 0x116a49, + 0x12eb85, + 0x176c87, + 0xf3644, + 0x20c302, + 0x22c0c3, + 0x228b03, + 0x20a803, 0x2000c2, 0x200c82, - 0x33d3c2, - 0x12a2f743, - 0x23e8c2, - 0x234e83, + 0x338dc2, + 0x12a2c0c3, + 0x23b182, + 0x232c43, 0x2014c2, - 0x2268c2, - 0x224943, - 0x203942, - 0x28bec2, - 0x21e202, + 0x26bc02, + 0x228b03, + 0x220482, + 0x288542, + 0x22a402, 0x200cc2, - 0x291f82, + 0x291482, 0x200802, 0x200d82, - 0x25ce02, - 0x27bc02, - 0x216842, - 0x15388c, - 0x2b2a02, - 0x2ea082, - 0x214682, - 0x242bc2, - 0x211d83, - 0x200bc2, - 0x20ce83, - 0x224a82, - 0x2d33c2, - 0x23f7c3, - 0x240582, - 0x202442, - 0x214d02, 0x2033c2, - 0x210b82, - 0x2e4542, - 0x214642, - 0x21ddc2, - 0x21d9c2, - 0x31ac4a, - 0x36630a, - 0x39c18a, - 0x3dd442, - 0x20fd02, - 0x3b9442, - 0x12e45889, - 0x13363c4a, - 0x1430787, - 0x13605102, - 0x14ed383, - 0x2542, - 0x163c4a, - 0x18b84e, - 0x23d544, - 0x77605, - 0x13e2f743, - 0x3f0c3, - 0x234e83, - 0x24f044, - 0x224943, - 0x221b84, - 0x214503, - 0x1405c9, - 0x1a2ac6, - 0x211d83, - 0xe3e84, - 0x176943, - 0x20ce83, - 0x7085, - 0x204783, - 0x23f7c3, - 0x143d444, - 0x259703, - 0x1069c4, - 0x2050c3, - 0xa7c88, - 0x176186, - 0x1575744, - 0x16d005, - 0x14bd0a, - 0x1237c2, - 0x1a7ac6, - 0x55e11, - 0x14645889, - 0x16d088, - 0x4e388, - 0x1c7bc7, - 0x3002, - 0xe31ce, - 0x12924b, - 0x1355cb, - 0x19c68a, - 0x892ca, - 0x26807, - 0xa7c88, - 0x114748, - 0x4e87, - 0x1b01530b, - 0x1b587, - 0x1c782, - 0x5d4c7, - 0x27f0a, - 0x5588f, - 0x3cb4f, - 0x291c2, - 0x3102, - 0x864c8, - 0xe3aca, - 0xdde8a, - 0x52b0a, - 0x18ca48, - 0xc288, - 0x5bb48, - 0xde348, - 0x16c848, - 0x7682, - 0x3c8cf, - 0xa1f8b, - 0x18d648, - 0x39dc7, + 0x21efc2, + 0x217d82, + 0xe550c, + 0x2b2182, + 0x2f10c2, + 0x215982, + 0x2450c2, + 0x211543, + 0x200bc2, + 0x20a803, + 0x228c42, + 0x25b002, + 0x216603, + 0x301b82, + 0x209482, + 0x216002, + 0x203382, + 0x210342, + 0x2e8f82, + 0x214682, + 0x22b902, + 0x21e202, + 0x32370a, + 0x366b8a, + 0x39914a, + 0x3de682, + 0x20e6c2, + 0x3c3302, + 0x12fda689, + 0x1328caca, + 0x142d1c7, + 0x136049c2, + 0x14bd543, + 0x2482, + 0x8caca, + 0x15d14e, + 0x249f84, + 0xf04c5, + 0x13e2c0c3, + 0x3b903, + 0x232c43, + 0x24b304, + 0x228b03, + 0x224e44, + 0x214543, + 0x13bfc9, + 0x8f7c6, + 0x211543, + 0xe88c4, + 0x2143, + 0x20a803, + 0x12abc5, + 0x20ca43, + 0x216603, + 0x1429b04, + 0x236bc3, + 0x10cbc4, + 0x205b03, + 0x9fe08, + 0xbe5c6, + 0x14bdb84, + 0x146045, + 0x14a40a, + 0x12c5c2, + 0x1454114d, + 0x1a36c6, + 0x8f11, + 0x14bda689, + 0x1460c8, + 0x4aa08, + 0x1b584807, + 0x2282, + 0x1da807, + 0xe840e, + 0x12eb8b, + 0x13390b, + 0x1a3f4a, + 0x8824a, + 0x6bb47, + 0x9fe08, + 0x11a9c8, + 0x58c7, + 0x1b81684b, + 0x1ae07, + 0x9582, + 0x2b80d, + 0x13e387, + 0x14ebca, + 0x1ce74f, + 0x1732cf, + 0x8cac2, + 0xc302, + 0x84a08, + 0x1bcfdc4c, + 0xe1cca, + 0xdd74a, + 0x4f08a, + 0x1894c8, + 0xd948, + 0x59748, + 0xddc08, + 0xe7688, + 0x81c2, + 0x14db0f, + 0xa24cb, + 0x18a0c8, + 0x67607, 0x168a, - 0x13a0cb, - 0x35309, - 0x49547, - 0xc188, - 0x15fe8c, - 0x1385c7, - 0xdad4a, - 0xfcc8, - 0x2578e, - 0x25f4e, - 0x2664b, - 0x296cb, - 0x2c0cb, - 0x2cf89, - 0x6cb8b, - 0x6d68d, - 0xdc28b, - 0xf990d, - 0xf9c8d, - 0xfd7ca, - 0xfef4b, - 0x3b8cb, - 0x3f545, - 0x1b424010, - 0x174cf, - 0x13218f, - 0x6e90d, - 0x140790, - 0x69102, - 0x1ba1ed48, - 0x11d08, - 0xa1150, - 0x11578e, - 0x1bf68d45, - 0x4e18b, - 0x13f6d0, - 0x55548, - 0xc38a, - 0x29889, - 0x63007, - 0x63347, - 0x63507, - 0x63d47, - 0x65147, + 0x11404b, + 0x330c9, + 0x44447, + 0xd848, + 0x2e20c, + 0x16c307, + 0x5674a, + 0xe688, + 0x6aace, + 0x6b28e, + 0x6b98b, + 0x1d2e8b, + 0x1cb64b, + 0xe3089, + 0xead0b, + 0x3934d, + 0x3b98b, + 0x3c10d, + 0x3c48d, + 0x3de4a, + 0x4194b, + 0x461cb, + 0x44845, + 0x1c026590, + 0x19794f, + 0x13f50f, + 0x6a44d, + 0x13c190, + 0x9802, + 0x1c7d0408, + 0x114c8, + 0x93110, + 0x11d30e, + 0x1cb67ac5, + 0x4a80b, + 0x13b0d0, + 0x515c8, + 0xda4a, + 0x1d3049, + 0x60907, + 0x60c47, + 0x60e07, + 0x61787, + 0x62b87, + 0x63107, + 0x63b87, + 0x640c7, + 0x64d07, + 0x65087, 0x65747, - 0x66087, - 0x665c7, - 0x67107, - 0x67487, - 0x67b47, - 0x67d07, - 0x67ec7, - 0x68087, - 0x69207, - 0x69ac7, - 0x6ac47, - 0x6b007, - 0x6b647, - 0x6b907, - 0x6bac7, - 0x6bdc7, - 0x6fe07, - 0x70007, - 0x703c7, - 0x70587, - 0x70747, - 0x71387, - 0x72987, - 0x72e07, - 0x73907, - 0x73bc7, - 0x73f47, - 0x74107, - 0x74507, - 0x755c7, - 0x75a07, - 0x75f87, - 0x76147, - 0x76307, - 0x76b87, - 0x77747, - 0x77c87, - 0x78207, - 0x783c7, - 0x78747, - 0x79347, - 0x4582, - 0x5bc4a, - 0xe3fc7, - 0x888c5, - 0xa6411, - 0x1b9e06, - 0xf5a8a, - 0x8634a, - 0x57b06, - 0xacf8b, + 0x65907, + 0x65ac7, + 0x65c87, + 0x664c7, + 0x67907, + 0x688c7, + 0x68c87, + 0x692c7, + 0x69587, + 0x69747, + 0x69a47, + 0x6be07, + 0x6c007, + 0x6cd87, + 0x6cf47, + 0x6d107, + 0x6f6c7, + 0x70a87, + 0x70f07, + 0x71647, + 0x71907, + 0x71c87, + 0x71e47, + 0x72247, + 0x72687, + 0x72a87, + 0x73007, + 0x731c7, + 0x73387, + 0x73c47, + 0x746c7, + 0x74c07, + 0x75207, + 0x753c7, + 0x75747, + 0x76847, + 0x4c02, + 0x5984a, + 0x13488, + 0x11a007, + 0x8a005, + 0xa7791, + 0x4886, + 0xfadca, + 0x8488a, + 0x54c46, + 0xacd8b, 0x642, - 0x31b11, - 0x1522c9, - 0x98009, - 0x5ce02, - 0x8268a, - 0xa8c49, - 0xa938f, - 0xa998e, - 0xac2c8, - 0x5dc2, - 0x175c89, - 0x19b74e, - 0x1c1f4c, - 0xe534f, - 0x1b380e, - 0x2b3cc, - 0x6d309, - 0x6ee11, - 0x6f3c8, - 0x139312, - 0x13a8cd, - 0x16028d, - 0x172b4b, - 0x4e555, - 0x53889, - 0x5ac8a, - 0x5f309, - 0x74a50, - 0x7574b, - 0x8678f, - 0x171dcb, - 0x1c998c, - 0x91ad0, - 0x9748a, - 0xa2acd, - 0xabf4e, - 0xadcca, - 0xb00cc, - 0xc2a94, - 0x151f51, - 0xb5b0b, - 0xb7d0f, - 0xb970d, - 0xb9f8e, - 0xbc5cc, - 0xbe58c, - 0xc278b, - 0xc334e, - 0xc3c10, - 0xc4a0b, - 0x170d8d, - 0x14388f, - 0xcbe4c, - 0xcea0e, - 0xcfc11, - 0xd830c, - 0xe0e07, - 0xeea0d, - 0xf6c0c, - 0x108c10, - 0x1ccf4d, - 0xfffc7, - 0x145d10, - 0x166548, - 0x1730cb, - 0xb184f, - 0x120648, - 0xf5c8d, - 0x103a10, - 0x17ef89, - 0x1c2b36c6, - 0xb4d43, - 0xba545, - 0x51b42, + 0x2f451, + 0xb6fc9, + 0x97249, + 0x33c2, + 0x198c0a, + 0xaa289, + 0xaa9cf, + 0xaafce, + 0xac0c8, + 0x4742, + 0xbe0c9, + 0x1b0ece, + 0xea24c, + 0xf4d0f, + 0x1aeece, + 0x26ccc, + 0xe3389, + 0xe3911, + 0xe3ec8, + 0x2e612, + 0x17f34d, + 0x1a054d, + 0x4abcb, + 0x58415, + 0x6dc89, + 0x7280a, + 0x7a089, + 0x80510, + 0x16ff8b, + 0x1a798f, + 0x9110b, + 0x9494c, + 0x99310, + 0xa9a4a, + 0xadccd, + 0xaf68e, + 0xafdca, + 0xc4a8c, + 0xb42d4, + 0xb6c51, + 0xb8e0b, + 0xb9f0f, + 0xbb38d, + 0xbf5ce, + 0xc22cc, + 0xc3e0c, + 0xc478b, + 0xc558e, + 0xc6110, + 0xc7dcb, + 0x11c78d, + 0x141d4f, + 0x16d38c, + 0xcf38e, + 0xd1151, + 0xd564c, + 0xde6c7, + 0xf2b0d, + 0xfc10c, + 0x110450, + 0x1cc44d, + 0x105687, + 0x147410, + 0x166dc8, + 0x1710cb, + 0xb0d8f, + 0x1432c8, + 0xfafcd, + 0x10a190, + 0x176b89, + 0x1ceb2d46, + 0xb3cc3, + 0xb90c5, + 0x4e082, 0x1b09, - 0x584ca, - 0x1c7397c6, - 0x1ca5d6c4, - 0x58e46, - 0x1d40a, - 0x81b0d, - 0x1cd68009, - 0x166c3, - 0x106cca, - 0xdd091, - 0xdd4c9, - 0xdde07, - 0xdeb88, - 0xdf187, - 0xe4088, - 0x3c9cb, - 0x125b89, - 0xe4810, - 0xe4ccc, - 0xe5808, - 0xe5c85, - 0xa088, - 0x10630a, - 0x139147, - 0x129f47, - 0x2f42, - 0x1403ca, - 0x14aac8, - 0x1c5009, - 0x79d05, - 0x11034a, - 0x8f30f, - 0x12284b, - 0x1b954c, - 0x146252, - 0x7ce85, - 0xe7948, - 0x4f34a, - 0x1d2f1585, - 0x1866cc, - 0x13d203, - 0x1a1642, - 0xfafcb, - 0xfc88a, - 0x14fcc0c, - 0x138948, - 0xf9ac8, - 0x1d74ab46, - 0x688c7, - 0x129c2, - 0x5fc2, - 0x4cb90, - 0x69387, - 0x3128f, - 0x1c6b46, - 0x15b10e, - 0x9640b, - 0x18fe88, - 0x356c9, - 0x17bf92, - 0x10ac0d, - 0x10b488, - 0xd6ec9, - 0x14c80d, - 0x19a249, - 0x5c8b, - 0x6bf48, + 0x5590a, + 0x1d22eac6, + 0x1d73e584, + 0x56286, + 0x1dc4a, + 0x6f0cd, + 0x1d9b9b89, + 0x17c03, + 0x11594a, + 0xdb911, + 0xdbd49, + 0xdd6c7, + 0xde408, + 0xde887, + 0x11a0c8, + 0x908b, + 0x12e989, + 0xe9250, + 0xe970c, + 0xea548, + 0xea8c5, 0x79148, - 0x7ccc8, - 0x7ffc9, - 0x801ca, - 0x872cc, - 0x3bb8a, - 0xe898a, - 0x10a487, - 0x4840d, - 0x6f6d1, - 0x1daba286, - 0x1b1c4b, - 0x1241cc, - 0x2eb08, - 0x47309, - 0x18058d, - 0x1a7cd0, - 0x17dbcd, - 0x13602, - 0x66dcd, - 0x4cc2, - 0x187c2, - 0x10a3ca, - 0x124ca, - 0xf598a, - 0x11308b, - 0x261cc, - 0x11424a, - 0x1144ce, - 0x18820d, - 0x1dddd305, - 0x12d5c8, - 0x8c42, - 0x14b7704e, - 0x15203f4e, - 0x15a0260a, - 0x1636ccce, - 0x16b21f4e, - 0x172fbe8c, - 0x1430787, - 0x1430789, - 0x14ed383, - 0x17bbeccc, - 0x18342d09, - 0x18b44d49, - 0x1934bb09, - 0x2542, - 0x176f91, - 0x3e91, - 0x254d, - 0x16cc11, - 0x121e91, - 0xfbdcf, - 0x1bec0f, - 0x142c4c, - 0x144c8c, - 0x14ba4c, - 0x16880d, - 0x6a395, - 0x7eb8c, - 0x135ccc, - 0x17ca50, - 0x1947cc, - 0x1a9b4c, - 0x1ae759, - 0x1b4c99, - 0x1b6c19, - 0x1bb6d4, - 0x1c3194, - 0x1c42d4, - 0x1c5614, - 0x5014, - 0x19a7ec49, - 0x1a1c4589, - 0x1ab35d89, - 0x14e6f5c9, - 0x2542, - 0x1566f5c9, - 0x2542, - 0x500a, - 0x2542, - 0x15e6f5c9, - 0x2542, - 0x500a, - 0x2542, - 0x1666f5c9, - 0x2542, - 0x16e6f5c9, - 0x2542, - 0x1766f5c9, - 0x2542, - 0x500a, - 0x2542, - 0x17e6f5c9, - 0x2542, - 0x500a, - 0x2542, - 0x1866f5c9, - 0x2542, - 0x18e6f5c9, - 0x2542, - 0x500a, - 0x2542, - 0x1966f5c9, - 0x2542, - 0x500a, - 0x2542, - 0x19e6f5c9, - 0x2542, - 0x1a66f5c9, - 0x2542, - 0x1ae6f5c9, - 0x2542, - 0x500a, - 0x2542, - 0x55e05, - 0x19c684, - 0x17704e, - 0x3f4e, - 0x7b4ce, - 0x260a, - 0x16ccce, - 0x121f4e, - 0xfbe8c, - 0x1beccc, - 0x142d09, - 0x144d49, - 0x14bb09, - 0x7ec49, - 0x1c4589, - 0x135d89, - 0x6a58d, - 0x194889, - 0x52c9, - 0x1497c4, - 0x1d7144, - 0x69104, - 0x154b84, - 0xa4084, - 0x2dd44, - 0x37dc4, - 0x4df04, - 0xfe484, - 0x15a1203, - 0xe3687, - 0x35fcc, - 0x31643, - 0x69102, - 0x188203, - 0x31643, - 0x90f43, - 0x7842, - 0x7848, - 0x125c07, - 0x7682, + 0x10eaca, + 0xc7c07, + 0x523c7, + 0x2f42, + 0x1de46bd5, + 0x13bdca, + 0x3d888, + 0x98b89, + 0x2efc5, + 0x116b8a, + 0x8d04f, + 0x12b98b, + 0x1c340c, + 0x147952, + 0x78005, + 0x1966c8, + 0x4b60a, + 0x1e2f5b85, + 0x183acc, + 0x138c03, + 0x190ec6, + 0x3d182, + 0x10238b, + 0x102dca, + 0x150314c, + 0x11848, + 0x3c2c8, + 0x1e63d906, + 0x12fec7, + 0xa982, + 0x4e82, + 0x4bdd0, + 0x66647, + 0x2dccf, + 0x13686, + 0x15c7ce, + 0x9588b, + 0x45948, + 0x33489, + 0xfe992, + 0x190f8d, + 0x111788, + 0x112009, + 0x17ab8d, + 0x1964c9, + 0x1d714b, + 0x69bc8, + 0x7ea48, + 0x80908, + 0x80d49, + 0x80f4a, + 0x8730c, + 0x4648a, + 0xec2ca, + 0x110d47, + 0x9f70a, + 0x13670d, + 0xe41d1, + 0x1eabf8c6, + 0x1ab70b, + 0x12cfcc, + 0x37908, + 0x61249, + 0x15b14d, + 0x1a38d0, + 0x17b8cd, + 0x14302, + 0x5cd8d, + 0x5402, + 0x18d82, + 0x110c8a, + 0x1d4ca, + 0xfacca, + 0x11998b, + 0x6b50c, + 0x11a4ca, + 0x11a74e, + 0x1b318d, + 0x1edde545, + 0x1dae88, + 0x57c2, + 0x14e85c3, + 0x14ebec0e, + 0x156037ce, + 0x15e0254a, + 0x16745d0e, + 0x16e8f9ce, + 0x1772b10c, + 0x142d1c7, + 0x142d1c9, + 0x14bd543, + 0x17f6ae8c, + 0x186e7b09, + 0x18ef8849, + 0x1974a209, + 0x2482, + 0xbeb51, + 0x3711, + 0x248d, + 0x145c51, + 0x8f911, + 0x12b04f, + 0x16adcf, + 0xe7a4c, + 0xf878c, + 0x14a14c, + 0x1dc00d, + 0x1015d5, + 0x661cc, + 0x7394c, + 0x1bad50, + 0x130d4c, + 0x133fcc, + 0x155a59, + 0x162919, + 0x199999, + 0x1b67d4, + 0x1c41d4, + 0x1d09d4, + 0x5a54, + 0x6b54, + 0x19e66289, + 0x1a5d0c89, + 0x1ae73a09, + 0x152e40c9, + 0x2482, + 0x15ae40c9, + 0x2482, + 0x5a4a, + 0x2482, + 0x162e40c9, + 0x2482, + 0x5a4a, + 0x2482, + 0x16ae40c9, + 0x2482, + 0x172e40c9, + 0x2482, + 0x17ae40c9, + 0x2482, + 0x5a4a, + 0x2482, + 0x182e40c9, + 0x2482, + 0x5a4a, + 0x2482, + 0x18ae40c9, + 0x2482, + 0x192e40c9, + 0x2482, + 0x5a4a, + 0x2482, + 0x19ae40c9, + 0x2482, + 0x5a4a, + 0x2482, + 0x1a2e40c9, + 0x2482, + 0x1aae40c9, + 0x2482, + 0x1b2e40c9, + 0x2482, + 0x5a4a, + 0x2482, + 0x1400401, + 0x8f05, + 0x1a3f44, + 0x1442303, + 0x15b08c3, + 0x14ef043, + 0xbec0e, + 0x37ce, + 0x7984e, + 0x254a, + 0x145d0e, + 0x8f9ce, + 0x12b10c, + 0x16ae8c, + 0xe7b09, + 0xf8849, + 0x14a209, + 0x66289, + 0x1d0c89, + 0x73a09, + 0x1017cd, + 0x5d09, + 0x6e09, + 0x14c004, + 0x1a5104, + 0x1b3644, + 0x1b5344, + 0xa4dc4, + 0x1a82c4, + 0x35e04, + 0x50fc4, + 0x13584, + 0x1587c03, + 0xbe9c7, + 0x33d8c, + 0x13583, + 0x9802, + 0x10bb86, + 0x1b3183, + 0x13583, + 0x9bb83, + 0x3f02, + 0x3f08, + 0xdff47, + 0x12ea07, + 0x81c2, 0x2000c2, - 0x203102, + 0x20c302, 0x201d02, - 0x2143c2, + 0x20c202, 0x200382, 0x2003c2, - 0x205fc2, - 0x22f743, - 0x234e83, - 0x224943, - 0x214343, - 0x20ce83, - 0x23f7c3, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x20ce83, - 0x23f7c3, - 0xb9c3, - 0x224943, - 0x21b84, + 0x204e82, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x214383, + 0x20a803, + 0x216603, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x20a803, + 0x216603, + 0x8503, + 0x228b03, + 0x24e44, 0x2000c2, - 0x24af03, - 0x2022f743, - 0x38fa87, - 0x224943, - 0x20e943, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x21d64a, - 0x22a7c5, - 0x214e03, - 0x21a602, - 0xa7c88, - 0xa7c88, - 0x3102, - 0x1379c2, - 0x20b67d8b, - 0x20e2f9c4, - 0x5d605, - 0xe745, - 0x100a86, - 0x2120e745, - 0x54f03, - 0x1668c3, + 0x248343, + 0x2122c0c3, + 0x38c507, + 0x228b03, + 0x20e403, + 0x217b84, + 0x20a803, + 0x216603, + 0x21de8a, + 0x240985, + 0x216103, + 0x219f82, + 0x9fe08, + 0x9fe08, + 0xc302, + 0x135f02, + 0x21bb990b, + 0x21e2c344, + 0x13e4c5, + 0x7d45, + 0xfdc46, + 0x22207d45, + 0x50cc3, + 0x93003, 0x9c4, 0x11c3, - 0x1273c5, - 0x129245, - 0xa7c88, - 0x1b587, - 0x2f743, - 0x21a3a407, + 0x2b05, + 0x12eb85, + 0x9fe08, + 0x1ae07, + 0x2c0c3, + 0x2c28d, + 0x22a380c7, 0x15c6, - 0x21d6cb05, - 0x3a507, - 0xac8a, - 0xab48, - 0xcb47, - 0x6624a, - 0x18e448, - 0x64bc7, - 0x1a63cf, - 0x3f147, - 0x4dd06, - 0x13f6d0, - 0x7338f, - 0x19209, - 0x58ec4, - 0x2203a5ce, - 0x3ad49, - 0x681c6, - 0x102ec9, - 0x190b46, - 0x1a8ac6, - 0x18d40c, - 0x13a2ca, - 0x35487, - 0x12184a, - 0x176749, - 0xe938c, - 0x1b920a, - 0x8970a, - 0x127409, - 0x58e46, - 0x3554a, - 0x10bb0a, - 0x9fcca, - 0x112349, - 0xdb6c8, - 0xdb946, - 0xe0fcd, - 0xbaf85, - 0x2275308c, - 0x14bf47, - 0x1015c9, - 0xb3207, - 0x103e14, - 0x10430b, - 0x39c0a, - 0x17be0a, - 0xa5a0d, - 0x1513289, - 0x10a9cc, - 0x10b28b, - 0xfcc3, - 0xfcc3, - 0x25786, - 0xfcc3, - 0x100a88, - 0x156b03, - 0x35685, - 0x1412703, - 0x52449, - 0x14cc0c3, - 0x146dbc7, - 0x74cc7, - 0x235c7a89, - 0xcd46, - 0x174f49, - 0x4af03, - 0xa7c88, - 0x3102, - 0x4f044, - 0x7b83, - 0x7ac5, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x21c183, - 0x22f743, - 0x234e83, - 0x20d343, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x2981c3, - 0x2050c3, - 0x21c183, - 0x250784, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x209983, - 0x251c7b85, - 0x142da83, - 0x22f743, - 0x234e83, - 0x2143c3, - 0x20d343, - 0x224943, - 0x221b84, + 0x22ce7945, + 0x1a9012, + 0x381c7, + 0xa0ca, + 0x9f88, + 0xe207, + 0x63d4a, + 0x18aec8, + 0x62607, + 0x18098f, + 0x43dc7, + 0x50dc6, + 0x13b0d0, + 0xc9fcf, + 0x20f09, + 0x56304, + 0x2303828e, + 0x11fb09, + 0x65dc6, + 0x109649, + 0x18ce06, + 0x1ba306, + 0x189e8c, + 0x11424a, + 0x33247, + 0x129b8a, + 0x143889, + 0xed38c, + 0x1ceb0a, + 0x7e54a, + 0x2b49, + 0x56286, + 0x3330a, + 0x11268a, + 0xa0d4a, + 0x127149, + 0xdad88, + 0xdb006, + 0xe208d, + 0xb9545, + 0x23754d4c, + 0x14a647, + 0x107849, + 0xa8c07, + 0x10a594, + 0x10aa8b, + 0x6744a, + 0xfe80a, + 0xa6d8d, + 0x1519b89, + 0x11154c, + 0x111e0b, + 0xe683, + 0xe683, + 0x39346, + 0xe683, + 0xfdc48, + 0x1581c3, + 0x33445, + 0x141d703, + 0x4e9c9, + 0x156d603, + 0x1439887, + 0x80787, + 0x245846c9, + 0xa6c6, + 0xbd389, + 0x48343, + 0x9fe08, + 0xc302, + 0x4b304, + 0x4243, + 0x4185, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x225843, + 0x22c0c3, + 0x232c43, + 0x212483, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x297403, + 0x205b03, + 0x225843, + 0x242244, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x21d0c3, + 0x261847c5, + 0x142bd43, + 0x22c0c3, + 0x232c43, + 0x214403, + 0x212483, + 0x228b03, + 0x224e44, 0x201143, - 0x225a83, - 0x211d83, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x214e03, - 0x25e1e383, - 0x146149, - 0x3102, - 0x3a8583, - 0x26a2f743, - 0x234e83, - 0x249843, - 0x224943, - 0x215cc3, - 0x225a83, - 0x23f7c3, - 0x2f16c3, - 0x39cb04, - 0xa7c88, - 0x2722f743, - 0x234e83, - 0x2ac383, - 0x224943, - 0x211d83, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x230e03, - 0xa7c88, - 0x27a2f743, - 0x234e83, - 0x20d343, - 0x204783, - 0x23f7c3, - 0xa7c88, - 0x1430787, - 0x24af03, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x129245, - 0xe747, - 0x10404b, - 0xdd8c4, - 0xbaf85, - 0x14441c8, - 0x1e00d, - 0x28e6fcc5, - 0x81b84, - 0x3102, - 0xd103, - 0x17ee85, - 0x28002, + 0x238cc3, + 0x211543, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x216103, + 0x26e20643, + 0x147849, + 0xc302, + 0x2ff843, + 0x27a2c0c3, + 0x232c43, + 0x244743, + 0x228b03, + 0x217203, + 0x238cc3, + 0x216603, + 0x2f5cc3, + 0x3a4e04, + 0x9fe08, + 0x2822c0c3, + 0x232c43, + 0x2ac183, + 0x228b03, + 0x211543, + 0x217b84, + 0x20a803, + 0x216603, + 0x22d843, + 0x9fe08, + 0x28a2c0c3, + 0x232c43, + 0x212483, + 0x20ca43, + 0x216603, + 0x9fe08, + 0x142d1c7, + 0x248343, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x217b84, + 0x20a803, + 0x216603, + 0x12eb85, + 0x176c87, + 0x10a7cb, + 0xdc144, + 0xb9545, + 0x14470c8, + 0x2a20d, + 0x29e352c5, + 0x46e44, + 0xc302, + 0x8303, + 0x176a85, + 0x2d7c2, 0x1dc2, - 0x326705, - 0xa7c88, - 0xfcc2, - 0x2a83, - 0x16264f, - 0x3102, - 0xf7806, - 0x28002, - 0x3248c8, - 0x250784, - 0x348806, - 0x34b906, - 0xa7c88, - 0x31a3c3, - 0x2c5c09, - 0x359a95, - 0x159a9f, - 0x22f743, - 0x3c2d52, - 0x172886, - 0x1825c5, - 0xc38a, - 0x29889, - 0x3c2b0f, - 0x2dbb04, - 0x36b785, - 0x304a10, - 0x245d47, - 0x204783, - 0x314d88, - 0x1324c6, - 0x29248a, - 0x203b04, - 0x2f0fc3, - 0x21a602, - 0x2eaa8b, - 0x4783, - 0x19fbc4, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0x2f8f83, - 0x203102, - 0x1a95c3, - 0x6d84, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x20e943, - 0x225283, - 0x23f7c3, - 0x4af03, - 0x203102, - 0x22f743, - 0x234e83, - 0x20ce83, - 0x4783, - 0x23f7c3, + 0x2e7585, + 0x9fe08, + 0x7e42, + 0xeec3, + 0x16368f, + 0xc302, + 0xfcac6, 0x2000c2, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0xe745, - 0x250784, - 0x22f743, - 0x234e83, - 0x346484, - 0x20ce83, - 0x23f7c3, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x144a49, - 0x22f743, - 0x234e83, - 0x20d343, - 0x2083c3, - 0x211d83, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x342644, - 0x221b84, - 0x20ce83, - 0x23f7c3, - 0x2050c3, - 0x203102, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x203843, - 0x45e83, - 0xe943, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x31ac4a, - 0x346cc9, - 0x35db4b, - 0x35e24a, - 0x36630a, - 0x37a0cb, - 0x39090a, - 0x395f8a, - 0x39c18a, - 0x39c40b, - 0x3bcf09, - 0x3c8bca, - 0x3c910b, - 0x3d588b, - 0x3da58a, - 0x22f743, - 0x234e83, - 0x20d343, - 0x211d83, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0x1872cb, - 0x5c848, - 0x14c944, - 0x3cb06, - 0xfda89, - 0xa7c88, - 0x22f743, - 0xc384, - 0x263004, - 0x213482, - 0x209c04, - 0x327905, - 0x21c183, - 0x250784, - 0x22f743, - 0x2375c4, - 0x234e83, - 0x24f044, - 0x2dbb04, - 0x221b84, - 0x225a83, - 0x20ce83, - 0x23f7c3, - 0x266f85, - 0x209983, - 0x214e03, - 0x252c43, - 0x23bb84, - 0x376104, - 0x375205, - 0xa7c88, - 0x331c04, - 0x3a8c46, - 0x327544, - 0x203102, - 0x346647, - 0x247947, - 0x24bd44, - 0x25a1c5, - 0x3cd145, - 0x230145, - 0x221b84, - 0x38c348, - 0x22a1c6, - 0x34de48, - 0x27bc45, - 0x2e1985, - 0x265e44, - 0x23f7c3, - 0x2f2484, - 0x378f06, - 0x22a8c3, - 0x23bb84, - 0x234545, + 0x248343, + 0x22c0c3, + 0x228b03, + 0x224e44, + 0x211543, + 0x217b84, + 0x20a803, + 0x216603, + 0x216103, + 0x2d7c2, + 0x32d6c8, + 0x242244, + 0x342bc6, + 0x34a006, + 0x9fe08, + 0x31f443, + 0x20f509, + 0x3046d5, + 0x1046df, + 0x22c0c3, + 0x11d07, + 0x330912, + 0x170a46, + 0x17f0c5, + 0xda4a, + 0x1d3049, + 0x3306cf, + 0x2db1c4, + 0x28ed85, + 0x30b4d0, + 0x322e47, + 0x20ca43, + 0x31b008, + 0xf6f86, + 0x280aca, + 0x224d04, + 0x2f55c3, + 0x219f82, + 0x2eec0b, + 0xca43, + 0x17d404, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0xca43, + 0x216603, + 0x2fd643, + 0x20c302, + 0x12aec3, + 0x12a8c4, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20e403, + 0x22b0c3, + 0x216603, + 0x48343, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x20a803, + 0xca43, + 0x216603, + 0x2000c2, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x7d45, + 0x242244, + 0x22c0c3, + 0x232c43, + 0x303f84, + 0x20a803, + 0x216603, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x133d89, + 0x22c0c3, + 0x232c43, + 0x212483, + 0x204f43, + 0x211543, + 0x20a803, + 0xca43, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x329144, + 0x224e44, + 0x20a803, + 0x216603, + 0x205b03, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x220383, + 0x63f43, + 0xe403, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x32370a, + 0x3484c9, + 0x35f2cb, + 0x35f9ca, + 0x366b8a, + 0x378e4b, + 0x38cbca, + 0x39278a, + 0x39914a, + 0x3993cb, + 0x3b8049, + 0x3c840a, + 0x3c894b, + 0x3d5fcb, + 0x3dc90a, + 0x22c0c3, + 0x232c43, + 0x212483, + 0x211543, + 0x20a803, + 0xca43, + 0x216603, + 0x920b, + 0x5a448, + 0x17acc4, + 0x91c6, + 0x3e109, + 0x9fe08, + 0x22c0c3, + 0xda44, + 0x260904, + 0x20aa02, + 0x217b84, + 0x203045, + 0x225843, + 0x242244, + 0x22c0c3, + 0x235604, + 0x232c43, + 0x24b304, + 0x2db1c4, + 0x224e44, + 0x238cc3, + 0x20a803, + 0x216603, + 0x25cf45, + 0x21d0c3, + 0x216103, + 0x24f1c3, + 0x246484, + 0x2be544, + 0x2bd645, + 0x9fe08, + 0x344b04, + 0x3ba486, + 0x202c84, + 0x20c302, + 0x347d47, + 0x243647, + 0x249204, + 0x238a05, + 0x3cc645, + 0x22cd85, + 0x224e44, + 0x388dc8, + 0x3db706, + 0x32bec8, + 0x27c8c5, + 0x2e2a45, + 0x340644, + 0x216603, + 0x2f61c4, + 0x377bc6, + 0x240a83, + 0x246484, + 0x2411c5, 0x201a84, - 0x248244, - 0x21a602, - 0x337e86, - 0x3b01c6, - 0x308005, + 0x336544, + 0x219f82, + 0x322706, + 0x3ab5c6, + 0x30df85, 0x2000c2, - 0x24af03, - 0x31203102, - 0x21eec4, + 0x248343, + 0x3260c302, + 0x3d0584, 0x200382, - 0x211d83, - 0x23c9c2, - 0x20ce83, + 0x211543, + 0x209082, + 0x20a803, 0x2003c2, - 0x2edc06, - 0x202443, - 0x2050c3, - 0xa7c88, - 0xa7c88, - 0x224943, - 0x71003, + 0x2f1d06, + 0x20c603, + 0x205b03, + 0x9fe08, + 0x9fe08, + 0x228b03, + 0x6d9c3, 0x2000c2, - 0x31e03102, - 0x224943, - 0x264983, + 0x3320c302, + 0x228b03, + 0x2623c3, 0x201143, - 0x22f9c4, - 0x20ce83, - 0x23f7c3, - 0xa7c88, + 0x22c344, + 0x20a803, + 0x216603, + 0x9fe08, 0x2000c2, - 0x32603102, - 0x22f743, - 0x20ce83, - 0x4783, - 0x23f7c3, + 0x33a0c302, + 0x22c0c3, + 0x20a803, + 0xca43, + 0x216603, 0x682, - 0x205842, - 0x210782, - 0x20e943, - 0x2e9343, + 0x206902, + 0x20ff42, + 0x20e403, + 0x2ed343, 0x2000c2, - 0x129245, - 0xa7c88, - 0xe747, - 0x203102, - 0x234e83, - 0x24f044, + 0x12eb85, + 0x9fe08, + 0x176c87, + 0x20c302, + 0x232c43, + 0x24b304, 0x2020c3, - 0x224943, - 0x2083c3, - 0x211d83, - 0x20ce83, - 0x2130c3, - 0x23f7c3, - 0x22a803, - 0x11f293, - 0x125d94, - 0x129245, - 0xe747, - 0x109706, - 0x113ccb, - 0x25786, - 0x56387, - 0x5a1c6, + 0x228b03, + 0x204f43, + 0x211543, + 0x20a803, + 0x213dc3, + 0x216603, + 0x233c43, + 0x1b8a13, + 0x127c94, + 0x12eb85, + 0x176c87, + 0x10f246, + 0x11b7cb, + 0x39346, + 0x531c7, + 0x38a06, 0x649, - 0xd39ca, - 0x8ab4d, - 0x14f50c, - 0x10c48a, - 0xf3dc8, - 0x1339c5, - 0xacc8, - 0x1c6b46, - 0x1c0ec6, - 0xfd986, + 0x160d4a, + 0x8984d, + 0x1263cc, + 0x11300a, + 0x45c88, + 0x175305, + 0xa108, + 0x13686, + 0x1be2c6, + 0x3e006, 0x602, - 0x269102, - 0x4284, - 0x90f46, - 0x187010, - 0x82e4e, - 0x2906, - 0x186dcc, - 0x33e5570b, - 0x129245, - 0x14420b, - 0x343c0e04, - 0x19c847, - 0x21fd1, - 0xfe30a, - 0x22f743, - 0x661c5, - 0x12a3c8, - 0x12984, - 0x586c5, - 0x3448e546, - 0xa6406, - 0xc1886, - 0x9224a, - 0x1a8383, - 0x34a436c4, - 0x52449, - 0x14dfc7, - 0x161ca, - 0x14cd7c9, + 0x209802, + 0x3b04, + 0x9bb86, + 0x184410, + 0x8170e, + 0x2846, + 0x1841cc, + 0x3537314b, + 0x12eb85, + 0x1426cb, + 0x357be204, + 0x1a4107, + 0x25191, + 0x11f54a, + 0x22c0c3, + 0x63cc5, + 0x1bd708, + 0x12704, + 0x55b05, + 0x3588c906, + 0xa7786, + 0xc14c6, + 0x9174a, + 0x1a8883, + 0x35e0bfc4, + 0x4e9c9, + 0x12c047, + 0x1770a, + 0x14ce3c9, 0x605, - 0xfd743, - 0x34f39847, - 0x7085, - 0x1563286, - 0xad04c, - 0xf4f88, - 0xeaccb, - 0x10f9cb, - 0x35249bcc, - 0x1405a83, - 0xbc288, - 0xeaf45, - 0xa1e09, - 0x113388, - 0x141d346, - 0x891c7, - 0x35780589, - 0xc6787, - 0x17894a, - 0x10af4d, - 0x7608, - 0x31643, - 0x1756c3, - 0x100a88, - 0xfe484, - 0x120b85, - 0xe3387, - 0x35a3c8c3, - 0x35f54206, - 0x362f2d04, - 0x366fca47, - 0x100a84, - 0x100a84, - 0x100a84, - 0x100a84, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, + 0xeac83, + 0x3622eb47, + 0x12abc5, + 0x153c6c6, + 0x153f846, + 0xace4c, + 0xfa308, + 0x3643d183, + 0xeee4b, + 0x118a4b, + 0x36a4528c, + 0x14070c3, + 0xbb048, + 0xef0c5, + 0xa2349, + 0x119c88, + 0x141db86, + 0x88147, + 0x36f5b149, + 0x117787, + 0x16074a, + 0x111acd, + 0x8148, + 0x13583, + 0xbdb03, + 0xfdc48, + 0x13584, + 0x1224c5, + 0x148d103, + 0xe85c7, + 0x372e85c3, + 0x377afc46, + 0x37af67c4, + 0x37f02f87, + 0xfdc44, + 0xfdc44, + 0xfdc44, + 0xfdc44, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, 0x2000c2, - 0x203102, - 0x224943, - 0x203842, - 0x20ce83, - 0x23f7c3, - 0x202443, - 0x382e0f, - 0x3831ce, - 0xa7c88, - 0x22f743, - 0x447c7, - 0x234e83, - 0x224943, - 0x214503, - 0x20ce83, - 0x23f7c3, - 0x2844, + 0x20c302, + 0x228b03, + 0x203dc2, + 0x20a803, + 0x216603, + 0x20c603, + 0x37fe4f, + 0x38020e, + 0x9fe08, + 0x22c0c3, + 0x41487, + 0x232c43, + 0x228b03, + 0x214543, + 0x20a803, + 0x216603, + 0x2784, 0x1304, - 0x131544, - 0x21c743, - 0x332907, - 0x202e82, - 0x2c9089, + 0x144444, + 0x21c0c3, + 0x374247, + 0x206082, + 0x26c3c9, 0x200ac2, - 0x24ce8b, - 0x29d7ca, - 0x268f09, + 0x24c0cb, + 0x29d88a, + 0x29e589, 0x200542, - 0x3be4c6, - 0x33ad55, - 0x24cfd5, - 0x3ad113, - 0x24d553, - 0x2197c2, - 0x21dbc5, - 0x32f1cc, - 0x2779cb, - 0x298645, - 0x202602, - 0x2fae02, - 0x393ac6, - 0x203002, - 0x37de46, - 0x20c60d, - 0x206e0c, - 0x224084, + 0x212ac6, + 0x38d7d5, + 0x24c215, + 0x231e53, + 0x24c793, + 0x212082, + 0x21e405, + 0x369e0c, + 0x27494b, + 0x297885, + 0x202542, + 0x299082, + 0x37bf46, + 0x202282, + 0x37bb46, + 0x20dccd, + 0x32a94c, + 0x226604, 0x200882, - 0x206c82, - 0x3396c8, + 0x20be02, + 0x22e9c8, 0x200202, - 0x305bc6, - 0x305bcf, - 0x397e50, - 0x3a3c04, - 0x33af15, - 0x3ad293, - 0x209843, - 0x34850a, - 0x206207, - 0x36a889, - 0x216087, - 0x21c342, + 0x30e386, + 0x30e38f, + 0x393f90, + 0x21f204, + 0x38d995, + 0x231fd3, + 0x21cf83, + 0x349d0a, + 0x208b87, + 0x369349, + 0x2175c7, + 0x227682, 0x200282, - 0x3b6906, - 0x204382, - 0xa7c88, - 0x208d42, - 0x209002, - 0x209007, - 0x268d07, - 0x268d11, - 0x217fc5, - 0x217fce, - 0x21a94f, - 0x21c782, - 0x398507, - 0x21cd88, - 0x205142, - 0x2bfa42, - 0x20f7c6, - 0x20f7cf, - 0x281750, - 0x22c542, - 0x207982, - 0x32b408, - 0x207983, - 0x25ed88, - 0x2e1d0d, - 0x280c03, - 0x34b748, - 0x280c0f, - 0x280fce, - 0x37baca, - 0x223111, - 0x223590, - 0x2c7bcd, - 0x2c7f0c, - 0x3a8407, - 0x348687, - 0x3488c9, - 0x21c302, + 0x3b4e46, + 0x203c02, + 0x9fe08, + 0x208082, + 0x208342, + 0x21e9c7, + 0x330307, + 0x330311, + 0x218585, + 0x21858e, + 0x21968f, + 0x209582, + 0x373907, + 0x21c708, + 0x205b82, + 0x2c1142, + 0x21bb46, + 0x21bb4f, + 0x269f10, + 0x22a8c2, + 0x204042, + 0x251c88, + 0x204043, + 0x25c6c8, + 0x2db50d, + 0x2094c3, + 0x3bc3c8, + 0x27f40f, + 0x27f7ce, + 0x2fe4ca, + 0x2da0d1, + 0x2da550, + 0x2dc90d, + 0x2dcc4c, + 0x2ff6c7, + 0x349e87, + 0x342c89, + 0x226702, 0x201ec2, - 0x257f8c, - 0x25828b, + 0x2553cc, + 0x2556cb, 0x200d42, - 0x2c2946, - 0x227f02, + 0x2c4946, + 0x202c82, 0x200482, - 0x2291c2, - 0x203102, - 0x22fb44, - 0x23a0c7, - 0x22ca82, - 0x23ffc7, - 0x241a47, - 0x227d02, - 0x231082, - 0x244685, - 0x224502, - 0x2e738e, - 0x38564d, - 0x234e83, - 0x28814e, - 0x3d1a0d, - 0x348cc3, + 0x28cac2, + 0x20c302, + 0x22c784, + 0x237d87, + 0x22ae02, + 0x23cbc7, + 0x23ed47, + 0x22e002, + 0x22dac2, + 0x241345, + 0x259dc2, + 0x382a4e, + 0x3c91cd, + 0x232c43, + 0x28658e, + 0x3d234d, + 0x32fe43, 0x202102, - 0x286204, - 0x24ab42, - 0x2072c2, - 0x39ee05, - 0x3a0887, - 0x2491c2, - 0x2143c2, - 0x24ec47, - 0x2527c8, - 0x2b1d82, - 0x27cf06, - 0x257e0c, - 0x25814b, - 0x208142, - 0x25f7cf, - 0x25fb90, - 0x25ff8f, - 0x260355, - 0x260894, - 0x260d8e, - 0x26110e, - 0x26148f, - 0x26184e, - 0x261bd4, - 0x2620d3, - 0x26258d, - 0x279509, - 0x28ce83, + 0x284744, + 0x24a542, + 0x2253c2, + 0x39b645, + 0x39ce07, + 0x243f82, + 0x20c202, + 0x24af07, + 0x24ed48, + 0x2b12c2, + 0x278086, + 0x25524c, + 0x25558b, + 0x203d42, + 0x25d0cf, + 0x25d490, + 0x25d88f, + 0x25dc55, + 0x25e194, + 0x25e68e, + 0x25ea0e, + 0x25ed8f, + 0x25f14e, + 0x25f4d4, + 0x25f9d3, + 0x25fe8d, + 0x276a09, + 0x28b243, 0x2020c2, - 0x35ac05, - 0x3ce486, + 0x35c2c5, + 0x3cfd46, 0x200382, - 0x2b5787, - 0x224943, + 0x3776c7, + 0x228b03, 0x200642, - 0x233b88, - 0x223351, - 0x223790, - 0x203702, - 0x28b387, + 0x231448, + 0x2da311, + 0x2da750, + 0x202b82, + 0x28a387, 0x201742, - 0x2a1687, - 0x251b42, - 0x3bde09, - 0x393a87, - 0x293348, - 0x28e386, - 0x2e9243, - 0x349345, - 0x212702, + 0x247f07, + 0x24e082, + 0x328c49, + 0x37bf07, + 0x296c48, + 0x28c746, + 0x28f303, + 0x28f305, + 0x21d702, 0x2004c2, - 0x3d7045, - 0x386b45, + 0x3b5245, + 0x383f45, 0x201b02, - 0x22cb43, - 0x344587, - 0x20ea47, + 0x22aec3, + 0x342a47, + 0x20c907, 0x201f82, 0x201f84, - 0x20fb43, - 0x2e64c9, - 0x20fb48, - 0x20e942, - 0x205542, - 0x2dcec7, - 0x2fa285, - 0x3635c8, - 0x227807, - 0x222303, - 0x290dc6, - 0x2c7a4d, - 0x2c7dcc, - 0x2d8a06, - 0x204482, - 0x2030c2, - 0x205982, - 0x280a8f, - 0x280e8e, - 0x3cd1c7, - 0x204802, - 0x31c445, - 0x31c446, - 0x21f382, + 0x20e503, + 0x2ebf89, + 0x20e508, + 0x203102, + 0x205f82, + 0x2eb887, + 0x3dd285, + 0x33fb88, + 0x34e347, + 0x21a7c3, + 0x29ba06, + 0x2dc78d, + 0x2dcb0c, + 0x2d5d46, + 0x204b02, + 0x21fc02, + 0x206a42, + 0x27f28f, + 0x27f68e, + 0x3cc6c7, + 0x206702, + 0x295d05, + 0x295d06, + 0x21d902, 0x200bc2, - 0x28fc06, - 0x20a643, - 0x20a646, - 0x2cb845, - 0x2cb84d, - 0x2cc255, - 0x2ccc8c, - 0x2cd00d, - 0x2cd352, - 0x204fc2, - 0x26ff42, - 0x202142, - 0x2fbc86, - 0x3c1e06, + 0x28d746, + 0x2062c3, + 0x206586, + 0x2cc185, + 0x2cc18d, + 0x2cc7d5, + 0x2cd88c, + 0x2cdc0d, + 0x2cdf52, + 0x205a02, + 0x26bf42, + 0x2050c2, + 0x3dbec6, + 0x3b0d86, 0x202f42, - 0x3ce506, - 0x218782, - 0x333105, - 0x2090c2, - 0x2e74c9, - 0x21980c, - 0x219b4b, + 0x3cfdc6, + 0x218d42, + 0x374a45, + 0x202f82, + 0x382b89, + 0x22330c, + 0x22364b, 0x2003c2, - 0x253188, + 0x24f708, 0x201902, 0x200a82, - 0x274246, - 0x26f545, + 0x271f86, + 0x2e4045, 0x200a87, - 0x222d85, - 0x277485, - 0x23cb02, - 0x20ad82, - 0x204ac2, - 0x2e5647, - 0x2edccd, - 0x2ee04c, - 0x3ac4c7, - 0x27ce82, + 0x228445, + 0x2563c5, + 0x2091c2, + 0x20a1c2, + 0x2161c2, + 0x3a7c87, + 0x2f1dcd, + 0x2f214c, + 0x243047, + 0x278002, 0x201c82, - 0x20da88, + 0x3c63c8, 0x201c88, - 0x2e2ac8, - 0x2f5c44, - 0x2c35c7, - 0x25d743, - 0x21a142, - 0x203b02, - 0x2ef7c9, - 0x225b87, - 0x214e02, - 0x274645, - 0x203542, - 0x228742, - 0x30b703, - 0x30b706, - 0x2f8c82, - 0x2faa02, + 0x32c1c8, + 0x2faf84, + 0x2c5807, + 0x33e603, + 0x223c42, + 0x212842, + 0x2f3749, + 0x26aec7, + 0x216102, + 0x272385, + 0x220082, + 0x20b182, + 0x2fd083, + 0x2fd086, + 0x2fd202, + 0x301b02, 0x200402, - 0x278f46, - 0x2e2087, - 0x214c02, + 0x36c686, + 0x2aba07, + 0x215f02, 0x200902, - 0x25ebcf, - 0x287f8d, - 0x39bb4e, - 0x3d188c, - 0x204542, - 0x2023c2, - 0x28e1c5, - 0x319386, + 0x25c50f, + 0x2863cd, + 0x3b12ce, + 0x3d21cc, + 0x204bc2, + 0x203d82, + 0x28c585, + 0x320886, 0x200b82, - 0x2046c2, + 0x204d42, 0x200682, - 0x227784, - 0x2e1b84, - 0x3580c6, - 0x205fc2, - 0x27c847, - 0x23df83, - 0x23df88, - 0x23e6c8, - 0x3729c7, - 0x24fb06, + 0x286744, + 0x2db384, + 0x359786, + 0x204e82, + 0x286e87, + 0x23bc03, + 0x23bc08, + 0x23f748, + 0x37f1c7, + 0x24e306, 0x201702, - 0x238f43, - 0x2ab4c7, - 0x30d6c6, - 0x2e4f85, - 0x2f5fc8, - 0x2026c2, - 0x3be287, - 0x234542, - 0x354282, - 0x205c42, - 0x21aac9, + 0x2183c3, + 0x2183c7, + 0x314946, + 0x2e7e85, + 0x2fb308, + 0x202602, + 0x3a9687, + 0x2411c2, + 0x293042, + 0x209442, + 0x219809, 0x201082, - 0xbe948, - 0x202a02, - 0x24d983, - 0x203c47, - 0x205202, - 0x21998c, - 0x219c8b, - 0x2d8a86, - 0x2fd685, - 0x244d02, + 0xc41c8, + 0x2021c2, + 0x2432c3, + 0x202247, + 0x205c42, + 0x22348c, + 0x22378b, + 0x2d5dc6, + 0x2eabc5, + 0x247c82, 0x201942, - 0x2bdbc6, - 0x229043, - 0x3423c7, - 0x282482, + 0x2bf146, + 0x236483, + 0x328ec7, + 0x235282, 0x2008c2, - 0x33abd5, - 0x24d195, - 0x3acfd3, - 0x24d6d3, - 0x248f47, - 0x259d91, - 0x25e050, - 0x2652d2, - 0x275191, - 0x277e08, - 0x277e10, - 0x29784f, - 0x29d593, - 0x2a6812, - 0x2a7e50, - 0x30014f, - 0x373352, - 0x3bc7d1, - 0x2b3813, - 0x2c0892, - 0x3a22cf, - 0x2cb4ce, - 0x2d47d2, - 0x2d51d1, - 0x2d94cf, - 0x2da2ce, - 0x2de751, - 0x2dfa90, - 0x2f8812, - 0x2eb451, - 0x2f5150, - 0x2f900f, - 0x2fc451, - 0x3018d0, - 0x35efc6, - 0x3cbf07, - 0x2137c7, + 0x38d655, + 0x24c3d5, + 0x231d13, + 0x24c913, + 0x37f647, + 0x25b951, + 0x262d10, + 0x274d92, + 0x2779d1, + 0x284bc8, + 0x284bd0, + 0x2d7c8f, + 0x29d653, + 0x29e352, + 0x29ffd0, + 0x2a7b8f, + 0x2a9e12, + 0x305811, + 0x371353, + 0x3b78d2, + 0x2b2e8f, + 0x2cbe0e, + 0x2cd412, + 0x2d3c51, + 0x2d430f, + 0x2d830e, + 0x2d9791, + 0x2de010, + 0x2df0d2, + 0x2e8a91, + 0x2ef5d0, + 0x2fa4cf, + 0x2fd6d1, + 0x3029d0, + 0x31bb46, + 0x3adfc7, + 0x20ce47, 0x201a42, - 0x283c05, - 0x304787, - 0x210782, - 0x20e802, - 0x22ab45, - 0x21e5c3, - 0x375b86, - 0x2ede8d, - 0x2ee1cc, - 0x2038c2, - 0x32f04b, - 0x27788a, - 0x21da8a, - 0x2bd149, - 0x2ecb4b, - 0x22794d, - 0x304e8c, - 0x27680a, - 0x272f8c, - 0x2788cb, - 0x29848c, - 0x2ef24e, - 0x2b458b, - 0x36e20c, - 0x2e1643, - 0x34c706, - 0x3c0dc2, - 0x2f6602, - 0x206603, - 0x205d42, - 0x21ed83, - 0x323386, - 0x260507, - 0x2d2b06, - 0x2e3c88, - 0x344408, - 0x315a46, + 0x2824c5, + 0x30b247, + 0x20ff42, + 0x207e02, + 0x229545, + 0x220883, + 0x2bdfc6, + 0x2f1f8d, + 0x2f22cc, + 0x217042, + 0x369c8b, + 0x27480a, + 0x21e2ca, + 0x2bc0c9, + 0x2f0c0b, + 0x34e48d, + 0x30b94c, + 0x25b3ca, + 0x27108c, + 0x2758cb, + 0x2976cc, + 0x31ce0e, + 0x36710b, + 0x2b1d4c, + 0x2e2703, + 0x37aa86, + 0x3bcb02, + 0x2fbb02, + 0x25a083, + 0x20ff82, + 0x233b03, + 0x324b86, + 0x25de07, + 0x2e0e06, + 0x2e1e88, + 0x3428c8, + 0x31d5c6, 0x200f02, - 0x3079cd, - 0x307d0c, - 0x30fb87, - 0x30c2c7, - 0x236942, - 0x215002, - 0x277dc2, - 0x27b2c2, - 0x336d56, - 0x33ead5, - 0x341c16, - 0x344f93, - 0x345652, - 0x356693, - 0x356dd2, - 0x3af0cf, - 0x3bf998, - 0x3c0897, - 0x3c13d9, - 0x3c2258, - 0x3c3698, - 0x3c47d7, - 0x3c5b17, - 0x3c70d6, - 0x3cad53, - 0x3cb695, - 0x3cc2d2, - 0x3cc753, - 0x203102, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x202443, + 0x30d94d, + 0x30dc8c, + 0x318c07, + 0x312e47, + 0x229942, + 0x216302, + 0x218342, + 0x279642, + 0x335056, + 0x33a4d5, + 0x33d6d6, + 0x346693, + 0x346d52, + 0x357d53, + 0x358492, + 0x3aa4cf, + 0x3bbb18, + 0x3bc5d7, + 0x3bdc19, + 0x3be7d8, + 0x3bf698, + 0x3c46d7, + 0x3c57d7, + 0x3c7016, + 0x3ca6d3, + 0x3cbc95, + 0x3cc992, + 0x3cce13, + 0x20c302, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x217b84, + 0x20a803, + 0x216603, + 0x20c603, 0x2000c2, - 0x203782, - 0x386948c5, - 0x38a89f05, - 0x38e78c06, - 0xa7c88, - 0x392b3e85, - 0x203102, + 0x203042, + 0x39e946c5, + 0x3a219305, + 0x3a675c06, + 0x9fe08, + 0x3aab3405, + 0x20c302, 0x201d02, - 0x3972c885, - 0x39a82105, - 0x39e83387, - 0x3a284089, - 0x3a638644, + 0x3aefedc5, + 0x3b280405, + 0x3b681c47, + 0x3ba82949, + 0x3bf064c4, 0x200382, 0x200642, - 0x3aa5f145, - 0x3ae99b89, - 0x3b336408, - 0x3b6b0985, - 0x3bb0ce07, - 0x3be20688, - 0x3c2e7805, - 0x3c63c586, - 0x3ca47a89, - 0x3cedb288, - 0x3d2c3188, - 0x3d69a1ca, - 0x3dba9704, - 0x3de08705, - 0x3e2bf288, - 0x3e601885, - 0x2131c2, - 0x3ea32003, - 0x3eea5146, - 0x3f26d148, - 0x3f602e46, - 0x3fa09148, - 0x3ff26406, - 0x40241f04, - 0x40608ac2, - 0x40fdb307, - 0x412acd84, - 0x4167b947, - 0x41b2b747, + 0x3c25aec5, + 0x3c6998c9, + 0x3cb34708, + 0x3ceafc45, + 0x3d313987, + 0x3d622508, + 0x3db11985, + 0x3de9a406, + 0x3e243789, + 0x3e6d1dc8, + 0x3eac45c8, + 0x3ee99f0a, + 0x3f277244, + 0x3f605285, + 0x3fac0b08, + 0x3fe01885, + 0x213ec2, + 0x40242a83, + 0x406a64c6, + 0x40b4f408, + 0x40e1f986, + 0x412dd348, + 0x41779b06, + 0x41a3f204, + 0x41e05642, + 0x427315c7, + 0x42aacb84, + 0x42e79cc7, + 0x433c4d87, 0x2003c2, - 0x41e9e485, - 0x42245a84, - 0x426d7fc7, - 0x42a31607, - 0x42e86046, - 0x43282bc5, - 0x43699c87, - 0x43adb108, - 0x43f2bac7, - 0x442b3489, - 0x446d4505, - 0x44b08a87, - 0x44e93f06, - 0x81b8b, - 0x45209d88, - 0x22034d, - 0x28bf09, - 0x2a8e4b, - 0x2ac48b, - 0x30f00b, - 0x30cb0b, - 0x31958b, - 0x31984b, - 0x319d89, - 0x31aecb, - 0x31b18b, - 0x31b70b, - 0x31ce0a, - 0x31d34a, - 0x31d94c, - 0x322b0b, - 0x3235ca, - 0x34340a, - 0x34cc8e, - 0x34d88e, - 0x34dc0a, - 0x34ffca, - 0x3509cb, - 0x350c8b, - 0x35190b, - 0x36ed0b, - 0x36f30a, - 0x36ffcb, - 0x37028a, - 0x37050a, - 0x37078a, - 0x3919cb, - 0x396f4b, - 0x39984e, - 0x399bcb, - 0x3a0a4b, - 0x3a19cb, - 0x3a540a, - 0x3a5689, - 0x3a58ca, - 0x3a75ca, - 0x3bf38b, - 0x3c93cb, - 0x3c9c8a, - 0x3ca78b, - 0x3d2f4b, - 0x3d9fcb, - 0x456849c8, - 0x45a8a2c9, - 0x45ea1c89, - 0x462e2608, - 0x357e45, - 0x209ec3, - 0x23d284, - 0x2c86c5, - 0x238386, - 0x23c305, - 0x289984, - 0x2b5688, - 0x312ec5, - 0x296184, - 0x3dc887, - 0x2a04ca, - 0x384bca, - 0x3cd2c7, - 0x218747, - 0x2decc7, - 0x27e007, - 0x35cf45, - 0x3cf6c6, - 0x33a747, - 0x32a7c4, - 0x2b6486, - 0x2ed886, - 0x3ce8c5, - 0x329d04, - 0x29b206, - 0x29f587, - 0x26c806, - 0x3daf07, - 0x27f503, - 0x3d3206, - 0x233105, - 0x283487, - 0x269c8a, - 0x233c84, - 0x218f88, - 0x346a89, - 0x2d2347, - 0x397806, - 0x36b848, - 0x203589, - 0x36aa44, - 0x35af84, - 0x2d5fc5, - 0x22af48, - 0x2c9ac7, - 0x2f7149, - 0x224d08, - 0x30e406, - 0x23d386, - 0x29bb48, - 0x373ac6, - 0x289f05, - 0x286106, - 0x27c1c8, - 0x280986, - 0x2405cb, - 0x366786, - 0x29d10d, - 0x3dc385, - 0x2acc46, - 0x202c45, - 0x367649, - 0x24c047, - 0x39cf08, - 0x292fc6, - 0x29c3c9, - 0x3bd346, - 0x269c05, - 0x2a2fc6, - 0x2bd946, - 0x2ce4c9, - 0x2bb546, - 0x2a01c7, - 0x2a3645, - 0x21a1c3, - 0x21a1c5, - 0x2ad647, - 0x32f846, - 0x3dc289, - 0x278c06, - 0x274886, - 0x3cf389, - 0x285b09, - 0x2a3bc7, - 0x3286c8, - 0x2a6249, - 0x283888, - 0x36eb86, - 0x2db485, - 0x31608a, - 0x274906, - 0x2096c6, - 0x2d2e45, - 0x253e48, - 0x2aa007, - 0x23190a, - 0x24f846, - 0x2f6245, - 0x2facc6, - 0x228987, - 0x3976c7, - 0x21b8c5, - 0x269dc5, - 0x2815c6, - 0x28e686, - 0x2a9cc6, - 0x2bf744, - 0x285089, - 0x28b146, - 0x2cf20a, - 0x21c588, - 0x308788, - 0x384bca, - 0x21b105, - 0x29f4c5, - 0x23b4c8, - 0x2bfc88, - 0x237187, - 0x2b7bc6, - 0x33cd48, - 0x20fec7, - 0x282d08, - 0x2b9e46, - 0x286e88, - 0x2991c6, - 0x27bdc7, - 0x2af486, - 0x29b206, - 0x26e40a, - 0x2d8b86, - 0x2db489, - 0x369786, - 0x2684ca, - 0x241f09, - 0x2ee686, - 0x2bbd04, - 0x35accd, - 0x28a547, - 0x32c386, - 0x2c3045, - 0x3bd3c5, - 0x393146, - 0x2d7e09, - 0x2ba7c7, - 0x27d386, - 0x2d0d06, - 0x289a09, - 0x289e44, - 0x242a84, - 0x327f08, - 0x265d46, - 0x2a30c8, - 0x2f7f88, - 0x32e307, - 0x3bb0c9, - 0x3b8c47, - 0x2b3d4a, - 0x2f028f, - 0x281e8a, - 0x28dfc5, - 0x27c405, - 0x2140c5, - 0x3ba6c7, - 0x228543, - 0x3288c8, - 0x25ce46, - 0x25cf49, - 0x2dbdc6, - 0x2ce307, - 0x29c189, - 0x39ce08, - 0x2d2f07, - 0x316fc3, - 0x357ec5, - 0x2284c5, - 0x2bf58b, + 0x4369e985, + 0x43a88bc4, + 0x43ed0e07, + 0x4423b747, + 0x44684586, + 0x44a81485, + 0x44e999c7, + 0x452d1c48, + 0x457c5107, + 0x45b48289, + 0x45ed3985, + 0x463102c7, + 0x46693d06, + 0x46e4b, + 0x46a7b288, + 0x2221cd, + 0x27d049, + 0x28858b, + 0x2aa48b, + 0x2b734b, + 0x31368b, + 0x320a8b, + 0x320d4b, + 0x321b89, + 0x32398b, + 0x323c4b, + 0x32430b, + 0x32548a, + 0x3259ca, + 0x325fcc, + 0x32bc4b, + 0x32c3ca, + 0x3419ca, + 0x34d0ce, + 0x35024e, + 0x3505ca, + 0x3521ca, + 0x352bcb, + 0x352e8b, + 0x353b0b, + 0x36d78b, + 0x36dd8a, + 0x36ea4b, + 0x36ed0a, + 0x36ef8a, + 0x36f20a, + 0x38decb, + 0x39360b, + 0x395ace, + 0x395e4b, + 0x39cfcb, + 0x39de8b, + 0x3a124a, + 0x3a14c9, + 0x3a170a, + 0x3a31ca, + 0x3bb50b, + 0x3c8c0b, + 0x3c960a, + 0x3ca10b, + 0x3d38cb, + 0x3dc34b, + 0x46e82f08, + 0x47288fc9, + 0x476a21c9, + 0x47ae4d08, + 0x359505, + 0x218e03, + 0x27e244, + 0x2abc05, + 0x306206, + 0x34d545, + 0x288844, + 0x3775c8, + 0x3197c5, + 0x295604, + 0x3c17c7, + 0x2a154a, + 0x381fca, + 0x3cc7c7, + 0x218d07, + 0x2de547, + 0x282bc7, + 0x35e6c5, + 0x3b0106, + 0x3b0347, + 0x3bdb04, + 0x2f1246, + 0x2f1146, + 0x3b06c5, + 0x355784, + 0x29af46, + 0x2a0607, + 0x26a746, + 0x31f207, + 0x27e303, + 0x39c446, + 0x251ec5, + 0x281d47, + 0x267aca, + 0x231544, + 0x220c88, + 0x310809, + 0x2cc587, + 0x38f346, + 0x28ee48, + 0x2200c9, + 0x369504, + 0x35c644, + 0x2d5085, + 0x225d48, + 0x2ca407, + 0x2f3249, + 0x228ec8, + 0x315686, + 0x229a46, + 0x29b888, + 0x371b06, + 0x219305, + 0x284646, + 0x27a648, + 0x27f186, + 0x25440b, + 0x292ec6, + 0x29d1cd, + 0x3c12c5, + 0x2aca46, + 0x210985, + 0x3b91c9, + 0x249507, + 0x3a4a48, + 0x314486, + 0x29c489, + 0x3b8486, + 0x267a45, + 0x215146, + 0x2c9006, + 0x2cee49, + 0x2b9b06, + 0x2a1247, + 0x2a4385, + 0x207683, + 0x223cc5, + 0x2affc7, + 0x36a486, + 0x3c11c9, + 0x275c06, + 0x279ec6, + 0x21a549, + 0x284049, + 0x2a4907, + 0x344e08, + 0x2a75c9, + 0x282148, + 0x3929c6, + 0x2dab45, + 0x278eca, + 0x279f46, + 0x21ce06, + 0x2d28c5, + 0x24ff08, + 0x2eb407, + 0x22f24a, + 0x24bb06, + 0x2f4745, + 0x302086, + 0x328687, + 0x38f207, + 0x21b145, + 0x267c05, + 0x269d86, + 0x26e4c6, + 0x27fdc6, + 0x226384, + 0x2835c9, + 0x28a146, + 0x2fd3ca, + 0x2278c8, + 0x30ffc8, + 0x381fca, + 0x223fc5, + 0x2a0545, + 0x3c1e08, + 0x2bcc08, + 0x266e07, + 0x226b86, + 0x338748, + 0x20e887, + 0x2815c8, + 0x2b8cc6, + 0x285308, + 0x298406, + 0x27ca47, + 0x3229c6, + 0x29af46, + 0x26ed4a, + 0x2d5ec6, + 0x2dab49, + 0x368506, + 0x21eb0a, + 0x23f209, + 0x2f2786, + 0x2baac4, + 0x35c38d, + 0x289247, + 0x2e6186, + 0x2c4485, + 0x3b8505, + 0x38fe46, + 0x2d0c49, + 0x2b7907, + 0x27bb46, + 0x2c9e46, + 0x2888c9, + 0x359a44, + 0x244f84, + 0x340e88, + 0x236846, + 0x2a3e08, + 0x2150c8, + 0x219447, + 0x3b5b89, + 0x27ffc7, + 0x2b32ca, + 0x2f420f, + 0x26f44a, + 0x28c385, + 0x27a885, + 0x214f05, + 0x21f147, + 0x267083, + 0x345008, + 0x20ef06, + 0x20f009, + 0x3cb186, + 0x2d0487, + 0x29c249, + 0x3a4948, + 0x2d2987, + 0x31da43, + 0x359585, + 0x3281c5, + 0x2261cb, 0x201944, - 0x302084, - 0x27a646, - 0x317187, - 0x39e38a, - 0x232087, - 0x3a8647, - 0x282105, - 0x3c2845, - 0x2725c9, - 0x29b206, - 0x231f0d, - 0x363505, - 0x2b6e03, - 0x204943, - 0x21ef45, - 0x35cbc5, - 0x36b848, - 0x27dcc7, - 0x242806, - 0x2a1906, - 0x22b6c5, - 0x235147, - 0x32de07, - 0x22a087, - 0x20878a, - 0x3d32c8, - 0x2bf744, - 0x280707, - 0x280447, - 0x350f06, - 0x298847, - 0x2d1348, - 0x2d3b88, - 0x24bf46, - 0x218988, - 0x2bb5c4, - 0x33a746, - 0x253a86, - 0x39d606, - 0x330946, - 0x21af84, - 0x27e0c6, - 0x2c1a86, - 0x29b5c6, - 0x231f06, - 0x204806, - 0x2457c6, - 0x242708, - 0x2b6308, - 0x2d72c8, - 0x23c508, - 0x23b446, - 0x20b3c5, - 0x21a186, - 0x2b0a05, - 0x395647, - 0x224dc5, - 0x20d443, - 0x3ceac5, - 0x22e384, - 0x204945, + 0x308804, + 0x278686, + 0x31dc07, + 0x39abca, + 0x242b07, + 0x2ff907, + 0x280405, + 0x3bfc85, + 0x26de89, + 0x29af46, + 0x24298d, + 0x33fac5, + 0x2b6243, + 0x23ffc3, + 0x3d0605, + 0x35e345, + 0x28ee48, + 0x27c487, + 0x244d06, + 0x2a1e46, + 0x229e05, + 0x232f07, + 0x2e6d07, + 0x3db5c7, + 0x20530a, + 0x39c508, + 0x226384, + 0x27ef07, + 0x27ec47, + 0x353106, + 0x297a87, + 0x2e0388, + 0x360f08, + 0x249406, + 0x218f48, + 0x2b9b84, + 0x3b0346, + 0x238786, + 0x3aa006, + 0x345606, + 0x219cc4, + 0x282c86, + 0x2c3106, + 0x29b306, + 0x22f846, + 0x3c6986, + 0x2e01c6, + 0x244c08, + 0x2b4d08, + 0x2d6848, + 0x34d748, + 0x3c1d86, + 0x209a85, + 0x223c86, + 0x2afcc5, + 0x391e47, + 0x228f85, + 0x20ba83, + 0x20ca85, + 0x230fc4, + 0x3c6ac5, 0x201903, - 0x3a3787, - 0x3436c8, - 0x3dafc6, - 0x2b4ecd, - 0x27c3c6, - 0x29ab85, - 0x21aac3, - 0x2bec49, - 0x289fc6, - 0x2969c6, - 0x282604, - 0x281e07, - 0x338446, - 0x2baa85, - 0x23c043, - 0x205b44, - 0x280606, - 0x3cf7c4, - 0x253b88, - 0x3d4a09, - 0x302a89, - 0x2a2eca, - 0x29370d, - 0x234007, - 0x3a8986, - 0x20adc4, - 0x284089, - 0x288c08, - 0x28a146, - 0x236d86, - 0x298847, - 0x2c1606, - 0x22d906, - 0x32ca06, - 0x32b7ca, - 0x220688, - 0x26ed05, - 0x36c209, - 0x2ca24a, - 0x2ffbc8, - 0x29ecc8, - 0x296948, - 0x2ad80c, - 0x351e45, - 0x2a1b88, - 0x2b7946, - 0x310e06, - 0x3a1c47, - 0x231f85, - 0x286285, - 0x302949, - 0x20d207, - 0x25cf05, - 0x238cc7, - 0x204943, - 0x2ca705, - 0x21a748, - 0x284e07, - 0x29eb89, - 0x2e2e05, - 0x3a6744, - 0x2a4448, - 0x3db447, - 0x2d30c8, - 0x3dd108, + 0x393907, + 0x36d1c8, + 0x31f2c6, + 0x376e0d, + 0x27a846, + 0x29a8c5, + 0x219803, + 0x2c04c9, + 0x359bc6, + 0x296206, + 0x398b84, + 0x26f3c7, + 0x36c186, + 0x2b7bc5, + 0x242943, + 0x3d7004, + 0x27ee06, + 0x238884, + 0x2e9f88, + 0x3befc9, + 0x309209, + 0x2a3c0a, + 0x2a54cd, + 0x2318c7, + 0x3ba1c6, + 0x20a204, + 0x282949, + 0x287b88, + 0x288e46, + 0x234b46, + 0x297a87, + 0x2c1246, + 0x34fc46, + 0x2ffa86, + 0x3c4e0a, + 0x222508, + 0x2e3805, + 0x33e9c9, + 0x2cab8a, + 0x305288, + 0x29f1c8, + 0x296188, + 0x2e710c, + 0x350805, + 0x2a20c8, + 0x2b5006, + 0x317646, + 0x3d8287, + 0x242a05, + 0x2847c5, + 0x3090c9, + 0x20ac07, + 0x20efc5, + 0x237187, + 0x23ffc3, + 0x2cb045, + 0x21ac08, + 0x283347, + 0x29f089, + 0x2dedc5, + 0x3ae2c4, + 0x2a5188, + 0x331707, + 0x2d2b48, + 0x3d36c8, 0x2adbc5, - 0x3baa86, - 0x24c3c6, - 0x2d6389, - 0x31c0c7, - 0x2b0e46, - 0x21ea07, - 0x202103, - 0x238644, - 0x2cf8c5, - 0x235284, - 0x2515c4, - 0x38c647, - 0x2675c7, - 0x27d544, - 0x29e9d0, - 0x36c407, - 0x3c2845, - 0x3303cc, - 0x206784, - 0x37f5c8, - 0x27bcc9, - 0x388d86, - 0x3134c8, - 0x23d044, - 0x27a948, - 0x3dbb06, - 0x26e288, - 0x29fb46, - 0x28ae8b, - 0x325045, - 0x2cf748, - 0x20f1c4, - 0x3d4e4a, - 0x29eb89, - 0x2af386, - 0x30e988, - 0x286685, - 0x2be1c4, - 0x37f4c6, - 0x229f48, - 0x2849c8, - 0x33d5c6, - 0x321104, - 0x316006, - 0x3b8cc7, - 0x27b847, - 0x29884f, - 0x329587, - 0x2ee747, - 0x31c305, - 0x377fc5, - 0x2a3889, - 0x2e6c46, - 0x38c885, - 0x285e07, - 0x3a1ec8, - 0x3cf845, - 0x2af486, - 0x21c3c8, - 0x202e4a, - 0x229c48, - 0x28f987, - 0x2f06c6, - 0x36c1c6, + 0x21f506, + 0x249886, + 0x2d5449, + 0x2b3f47, + 0x2b0386, + 0x3d00c7, + 0x205083, + 0x3064c4, + 0x2d8c85, + 0x233044, + 0x248d84, + 0x3890c7, + 0x2651c7, + 0x27bd04, + 0x29eed0, + 0x33ebc7, + 0x3bfc85, + 0x2f764c, + 0x32a2c4, + 0x2b2b48, + 0x27c949, + 0x385146, + 0x319dc8, + 0x270d84, + 0x278988, + 0x331dc6, + 0x26ebc8, + 0x2a0bc6, + 0x2d004b, + 0x32de45, + 0x2d8b08, + 0x213304, + 0x3bf40a, + 0x29f089, + 0x3228c6, + 0x225fc8, + 0x258305, + 0x2bfd44, + 0x2b2a46, + 0x3db488, + 0x282f08, + 0x338fc6, + 0x301104, + 0x278e46, + 0x280047, + 0x279bc7, + 0x297a8f, + 0x32eec7, + 0x2f2847, + 0x295bc5, + 0x376185, + 0x2a45c9, + 0x2d7886, + 0x389305, + 0x284347, + 0x2cd008, + 0x2f9c05, + 0x3229c6, + 0x227708, + 0x21f98a, + 0x3db188, + 0x28d4c7, + 0x2f4646, + 0x33e986, 0x2003c3, - 0x2060c3, - 0x2ca409, - 0x2a60c9, - 0x2b3386, - 0x2e2e05, - 0x218c08, - 0x30e988, - 0x373c48, - 0x32ca8b, - 0x2b5107, - 0x314bc9, - 0x298ac8, - 0x35bb44, - 0x39d248, - 0x291489, - 0x2b1145, - 0x3ba5c7, - 0x2386c5, - 0x2848c8, - 0x29474b, - 0x2999d0, - 0x2ac885, - 0x20f10c, - 0x2429c5, - 0x282183, - 0x2ef046, - 0x2c0d04, - 0x2af746, - 0x29f587, - 0x21c444, - 0x243108, - 0x32878d, - 0x30e845, - 0x234044, - 0x294e44, - 0x294e49, - 0x2c4008, - 0x325507, - 0x3dbb88, - 0x285148, - 0x27d685, - 0x211907, - 0x27d607, - 0x2c59c7, - 0x269dc9, - 0x32d909, - 0x20bdc6, - 0x2c8106, - 0x285ec6, - 0x34d0c5, - 0x3adbc4, - 0x3bff46, - 0x3c19c6, - 0x27d6c8, - 0x22864b, - 0x2658c7, - 0x20adc4, - 0x338386, - 0x2d1687, - 0x2453c5, - 0x333385, - 0x227044, - 0x32d886, - 0x3bffc8, - 0x284089, - 0x247086, - 0x288a08, - 0x2bab46, - 0x35c1c8, - 0x2b8c0c, - 0x27d546, - 0x29a84d, - 0x29accb, - 0x2a0285, - 0x32df47, - 0x2bb646, - 0x397588, - 0x20be49, - 0x3b2508, - 0x3c2845, - 0x32a507, - 0x283988, - 0x232b49, - 0x3380c6, - 0x27f74a, - 0x397308, - 0x3b234b, - 0x22090c, - 0x27aa48, - 0x27fdc6, - 0x211308, - 0x202ac7, - 0x2092c9, - 0x30cf4d, - 0x29b106, - 0x239808, - 0x2b61c9, - 0x2bf848, - 0x286f88, - 0x2c24cc, - 0x2c3787, - 0x2c44c7, - 0x269c05, - 0x2b91c7, - 0x3a1d88, - 0x37f546, - 0x246f0c, - 0x2f4408, - 0x2d0648, - 0x232e46, - 0x228247, - 0x20bfc4, - 0x23c508, - 0x315b4c, - 0x28844c, - 0x28e045, - 0x3ce947, - 0x321086, - 0x2281c6, - 0x367808, - 0x21d004, - 0x26c80b, - 0x27c98b, - 0x2f06c6, - 0x328607, - 0x331e05, - 0x273d05, - 0x26c946, - 0x286645, + 0x208a43, + 0x2cad49, + 0x2a7449, + 0x2b2946, + 0x2dedc5, + 0x2191c8, + 0x225fc8, + 0x371c88, + 0x2ffb0b, + 0x377047, + 0x31ae49, + 0x297d08, + 0x351c84, + 0x3a9c48, + 0x290cc9, + 0x2b0685, + 0x21f047, + 0x306545, + 0x282e08, + 0x29454b, + 0x299710, + 0x2ac685, + 0x21324c, + 0x244ec5, + 0x280483, + 0x31cc06, + 0x2c2644, + 0x288cc6, + 0x2a0607, + 0x212bc4, + 0x23ffc8, + 0x344ecd, + 0x31c485, + 0x231904, + 0x2a3484, + 0x2a3489, + 0x2af088, + 0x32e307, + 0x331e48, + 0x283688, + 0x27be45, + 0x2110c7, + 0x27bdc7, + 0x20f2c7, + 0x267c09, + 0x2e6809, + 0x3c3b86, + 0x2dce46, + 0x284406, + 0x323fc5, + 0x3af9c4, + 0x3bcb46, + 0x3bed86, + 0x27be88, + 0x32834b, + 0x2363c7, + 0x20a204, + 0x36c0c6, + 0x2e06c7, + 0x3da1c5, + 0x374cc5, + 0x227c84, + 0x2e6786, + 0x3bcbc8, + 0x282949, + 0x264806, + 0x287988, + 0x2b7c86, + 0x35d948, + 0x32170c, + 0x27bd06, + 0x29a58d, + 0x29aa0b, + 0x2a1305, + 0x2e6e47, + 0x2b9c06, + 0x38f0c8, + 0x3c3c09, + 0x307e48, + 0x3bfc85, + 0x3bd847, + 0x282248, + 0x3c0bc9, + 0x36be06, + 0x26470a, + 0x38ee48, + 0x307c8b, + 0x22278c, + 0x278a88, + 0x27e846, + 0x210ac8, + 0x21f607, + 0x21ca09, + 0x3983cd, + 0x29ae46, + 0x267048, + 0x2b4bc9, + 0x2c0f48, + 0x285408, + 0x2c3b4c, + 0x2c5107, + 0x2c5bc7, + 0x267a45, + 0x2c0d87, + 0x2ccec8, + 0x2b2ac6, + 0x2934cc, + 0x2f9688, + 0x2d1588, + 0x234d86, + 0x34ef07, + 0x3c3d84, + 0x34d748, + 0x28688c, + 0x289b8c, + 0x28c405, + 0x3b0747, + 0x301086, + 0x34ee86, + 0x3b9388, + 0x21c984, + 0x26a74b, + 0x286fcb, + 0x2f4646, + 0x344d47, + 0x28f405, + 0x271a45, + 0x26a886, + 0x2582c5, 0x201905, - 0x2ccac7, - 0x3c6349, - 0x28e844, - 0x25b245, - 0x30b645, - 0x3bae48, - 0x28d605, - 0x2a0ec9, - 0x2e8247, - 0x2e824b, - 0x2ee3c6, - 0x242449, - 0x329c48, - 0x2919c5, - 0x2c5ac8, - 0x32d948, - 0x264587, - 0x3db907, - 0x38c6c9, - 0x26e1c7, - 0x29cec9, - 0x308fcc, - 0x2b3388, - 0x2bb089, - 0x2bc447, - 0x285209, - 0x23bec7, - 0x220a08, - 0x202a05, - 0x33a6c6, - 0x2c3088, - 0x2f07c8, - 0x2ca109, + 0x2cec87, + 0x20afc9, + 0x26e684, + 0x258e45, + 0x2fcfc5, + 0x2e9d08, + 0x28b9c5, + 0x2bd109, + 0x2b3947, + 0x2b394b, + 0x2f24c6, + 0x244949, + 0x3556c8, + 0x291005, + 0x20f3c8, + 0x2e6848, + 0x261fc7, + 0x331bc7, + 0x389149, + 0x26eb07, + 0x29cf89, + 0x2fc3cc, + 0x348188, + 0x2b9649, + 0x2bb207, + 0x283749, + 0x2ff287, + 0x222888, + 0x3b5d45, + 0x3b02c6, + 0x2c44c8, + 0x2d7148, + 0x2caa49, 0x201947, - 0x274705, - 0x248809, - 0x2d66c6, - 0x293f04, - 0x35f406, - 0x26cfc8, - 0x2fa847, - 0x228848, - 0x218a49, - 0x32b087, - 0x2a0686, - 0x32e004, - 0x3ceb49, - 0x211788, - 0x232d07, - 0x22e7c6, - 0x228586, - 0x209644, - 0x36d946, - 0x2048c3, - 0x324bc9, - 0x325006, - 0x2acec5, - 0x2a1906, - 0x2ce885, - 0x283e08, - 0x369b87, - 0x2feac6, - 0x32c8c6, - 0x308788, - 0x2a3a07, - 0x29b145, - 0x29e7c8, - 0x3c97c8, - 0x397308, - 0x242885, - 0x33a746, - 0x302849, - 0x2d6204, - 0x2ce70b, - 0x22d60b, - 0x26ec09, - 0x204943, - 0x258c45, - 0x23d606, - 0x242dc8, - 0x2aae04, - 0x3dafc6, - 0x2088c9, - 0x2d0445, - 0x2cca06, - 0x3db446, - 0x214184, - 0x29ee4a, - 0x2ace08, - 0x2f07c6, - 0x245205, - 0x328487, - 0x35ce07, - 0x3baa84, - 0x22d847, - 0x224d84, - 0x224d86, - 0x210143, - 0x269dc5, - 0x2b1b05, - 0x369dc8, - 0x2808c5, - 0x27d289, - 0x23c347, - 0x23c34b, - 0x2a4f4c, - 0x2a554a, - 0x30ce07, - 0x202e03, - 0x38cd48, - 0x242a45, - 0x3cf8c5, - 0x357f84, - 0x220906, - 0x27bcc6, - 0x36d987, - 0x247d8b, - 0x21af84, - 0x2fd104, - 0x2b52c4, - 0x2ce186, - 0x21c444, - 0x22b048, - 0x357d85, - 0x21b745, - 0x373b87, - 0x32e049, - 0x35cbc5, - 0x39314a, - 0x2a3549, - 0x2afb0a, - 0x32b909, - 0x350204, - 0x2d0dc5, - 0x2c1708, - 0x2d808b, - 0x2d5fc5, - 0x2f8106, - 0x241b04, - 0x27d7c6, - 0x32af09, - 0x2d1787, - 0x278dc8, - 0x293a86, - 0x3b8c47, - 0x2849c8, - 0x3936c6, - 0x3c1c04, - 0x383507, - 0x371cc5, - 0x385207, - 0x23c584, - 0x2bb5c6, - 0x2ff8c8, - 0x29ae88, - 0x2f1d87, - 0x320dc8, - 0x299285, - 0x204784, - 0x384ac8, - 0x31c544, - 0x214045, - 0x2ffac4, - 0x20ffc7, - 0x28b207, - 0x285348, - 0x2d3246, - 0x280845, - 0x27d088, - 0x2516c8, - 0x2a2e09, - 0x22d906, - 0x231988, - 0x3d4cca, - 0x245448, - 0x2e7805, - 0x21a386, - 0x2a3408, - 0x32a5ca, - 0x2aaa07, - 0x289045, - 0x294108, - 0x3d2484, - 0x253ec6, - 0x2c4848, - 0x204806, - 0x3ca308, - 0x358587, - 0x3dc786, - 0x2bbd04, - 0x26c187, - 0x2b6784, - 0x32aec7, - 0x2af0cd, - 0x237205, - 0x2d7c0b, - 0x2886c6, - 0x253288, - 0x2430c4, - 0x23b646, - 0x280606, - 0x211647, - 0x29a50d, - 0x2f6a87, - 0x2b6d48, - 0x284245, - 0x37b488, - 0x2c9a46, - 0x299308, + 0x272445, + 0x336b09, + 0x2d3206, + 0x293d04, + 0x31bf86, + 0x34f288, + 0x3cbac7, + 0x328548, + 0x219009, + 0x2f8107, + 0x2a1706, + 0x2e6f04, + 0x20cb09, + 0x210f48, + 0x234c47, + 0x36b6c6, + 0x328286, + 0x21cd84, + 0x2f5206, + 0x20f0c3, + 0x32d9c9, + 0x32de06, + 0x2accc5, + 0x2a1e46, + 0x2cf205, + 0x2826c8, + 0x20edc7, + 0x238ec6, + 0x2fee06, + 0x30ffc8, + 0x2a4747, + 0x29ae85, + 0x29ecc8, + 0x3a77c8, + 0x38ee48, + 0x244d85, + 0x3b0346, + 0x308fc9, + 0x2d52c4, + 0x2cf08b, + 0x34f94b, + 0x2e3709, + 0x23ffc3, + 0x256085, + 0x2e48c6, + 0x245b08, + 0x304204, + 0x31f2c6, + 0x205449, + 0x2c2f05, + 0x2cebc6, + 0x331706, + 0x2191c4, + 0x29f34a, + 0x2acc08, + 0x2d7146, + 0x3c2785, + 0x344bc7, + 0x35e587, + 0x21f504, + 0x34fb87, + 0x228f44, + 0x228f46, + 0x20eb03, + 0x267c05, + 0x2b1045, + 0x32f108, + 0x27f0c5, + 0x27ba49, + 0x2a62c7, + 0x34d58b, + 0x2a62cc, + 0x2a68ca, + 0x313987, + 0x20cc43, + 0x3897c8, + 0x244f45, + 0x2f9c85, + 0x359644, + 0x222786, + 0x27c946, + 0x2f5247, + 0x33608b, + 0x219cc4, + 0x3ac004, + 0x2c9a44, + 0x2ce986, + 0x212bc4, + 0x225e48, + 0x359445, + 0x21afc5, + 0x371bc7, + 0x2e6f49, + 0x35e345, + 0x38fe4a, + 0x2a4289, + 0x2ae38a, + 0x3c4f49, + 0x352404, + 0x2c9f05, + 0x2c1348, + 0x2d0ecb, + 0x2d5085, + 0x215246, + 0x209744, + 0x27bf86, + 0x2f7f89, + 0x2e07c7, + 0x275dc8, + 0x2a5846, + 0x27ffc7, + 0x282f08, + 0x3903c6, + 0x3bd204, + 0x380547, + 0x36fe85, + 0x382607, + 0x29a404, + 0x2b9b86, + 0x304f88, + 0x29abc8, + 0x2f1887, + 0x31d6c8, + 0x2984c5, + 0x240004, + 0x381ec8, + 0x295e04, + 0x214e85, + 0x305184, + 0x20e987, + 0x28a207, + 0x283888, + 0x2d2cc6, + 0x27f045, + 0x27b848, + 0x248e88, + 0x2a3b49, + 0x34fc46, + 0x22f2c8, + 0x3bf28a, + 0x3da248, + 0x311985, + 0x223e86, + 0x2a4148, + 0x3bd90a, + 0x20d487, + 0x287fc5, + 0x293f08, + 0x2ab804, + 0x24ff86, + 0x2c5f48, + 0x3c6986, + 0x3c9c88, + 0x254747, + 0x3c16c6, + 0x2baac4, + 0x266847, + 0x2b5684, + 0x2f7f47, + 0x36bacd, + 0x266e85, + 0x2d0a4b, + 0x289e06, + 0x24f808, + 0x23ff84, + 0x3c1f86, + 0x27ee06, + 0x210e07, + 0x29a24d, + 0x2fbf87, + 0x2b6188, + 0x285585, + 0x26e048, + 0x2ca386, + 0x298548, + 0x22e4c6, + 0x2f73c7, + 0x283c09, + 0x35a447, + 0x289108, + 0x273d85, + 0x229e88, + 0x34edc5, + 0x26b045, + 0x34c4c5, + 0x215183, + 0x2846c4, + 0x294105, + 0x243789, + 0x36b5c6, + 0x2e0488, + 0x331985, + 0x2b7f47, + 0x3171ca, + 0x2ceb09, + 0x2c8f0a, + 0x2d68c8, + 0x236fcc, + 0x2843cd, + 0x30ad03, + 0x3c9b88, + 0x3d6fc5, + 0x21f746, + 0x3a47c6, + 0x35c045, + 0x3d01c9, + 0x28e9c5, + 0x27b848, + 0x257506, 0x360146, - 0x330147, - 0x2856c9, - 0x35fac7, - 0x28a408, - 0x276cc5, - 0x22b748, - 0x228105, - 0x225d05, - 0x34b085, - 0x24f543, - 0x286184, - 0x245505, - 0x247a89, - 0x36d746, - 0x2d1448, - 0x3db6c5, - 0x2b9087, - 0x31098a, - 0x2cc949, - 0x2bd84a, - 0x2d7348, - 0x238b0c, - 0x285e8d, - 0x3cc203, - 0x3ca208, - 0x205b05, - 0x202c06, - 0x39cc86, - 0x35a985, - 0x21eb09, - 0x36b3c5, - 0x27d088, - 0x2574c6, - 0x35e9c6, - 0x2a4309, - 0x3ab3c7, - 0x294a06, - 0x310908, - 0x39d508, - 0x2e2807, - 0x2c1c0e, - 0x2c9c85, - 0x232a45, - 0x204708, - 0x2e42c7, + 0x2a5049, + 0x3a6787, + 0x294806, + 0x317148, + 0x3a9f08, + 0x2e4f07, + 0x2c328e, + 0x2ca5c5, + 0x3c0ac5, + 0x3c6888, + 0x31a307, 0x200e42, - 0x2c2044, - 0x2af64a, - 0x232dc8, - 0x32da86, - 0x29c2c8, - 0x24c3c6, - 0x32f488, - 0x2b0e48, - 0x225cc4, - 0x2b9445, - 0x727544, - 0x727544, - 0x727544, - 0x208343, - 0x228406, - 0x27d546, - 0x29ff4c, - 0x204743, - 0x23cf46, - 0x21c4c4, - 0x289f48, - 0x208705, - 0x2af746, - 0x2bf388, - 0x2d9206, - 0x2fea46, - 0x3ae0c8, - 0x2cf947, - 0x26df89, - 0x31a70a, - 0x208744, - 0x224dc5, - 0x23d345, - 0x358206, - 0x234046, - 0x2a0a86, - 0x3cce06, - 0x26e0c4, - 0x26e0cb, - 0x224b84, - 0x2425c5, - 0x2affc5, - 0x32e3c6, - 0x204c88, - 0x285d47, - 0x324f84, - 0x25c6c3, - 0x3d1f85, - 0x35f2c7, - 0x285c4b, - 0x369cc7, - 0x2bf288, - 0x2b9587, - 0x26b786, - 0x28c1c8, - 0x272b0b, - 0x2c8606, - 0x20df49, - 0x272c85, - 0x316fc3, - 0x2cca06, - 0x358488, - 0x213603, - 0x28c7c3, - 0x209e86, - 0x24c3c6, - 0x379a8a, - 0x27fe05, - 0x28044b, - 0x2a184b, - 0x246183, - 0x20a043, - 0x2b3cc4, - 0x24c187, - 0x27aa44, - 0x289f44, - 0x2b77c4, - 0x245748, - 0x245148, - 0x206049, - 0x2d4588, - 0x2686c7, - 0x231f06, - 0x2d108f, - 0x2c9dc6, - 0x2d6b04, - 0x244f8a, - 0x35f1c7, - 0x2b6886, - 0x293f49, - 0x205fc5, - 0x369f05, - 0x206106, - 0x22b883, - 0x3d24c9, - 0x220806, - 0x218809, - 0x39e386, - 0x269dc5, - 0x28e445, - 0x20a703, - 0x24c2c8, - 0x3256c7, - 0x25ce44, - 0x289dc8, - 0x310b84, - 0x300f46, - 0x2ef046, - 0x23ebc6, - 0x2cf609, - 0x3cf845, - 0x29b206, - 0x2a1509, - 0x2c8886, - 0x2457c6, - 0x3a3b86, - 0x203685, - 0x2ffac6, - 0x330144, - 0x202a05, - 0x2c3084, - 0x2b76c6, - 0x3634c4, + 0x2c36c4, + 0x288bca, + 0x234d08, + 0x2e6986, + 0x29c388, + 0x249886, + 0x36a0c8, + 0x2b0388, + 0x26b004, + 0x2b8705, + 0x602c84, + 0x602c84, + 0x602c84, + 0x204ec3, + 0x328106, + 0x27bd06, + 0x2a0fcc, + 0x202f03, + 0x2cab86, + 0x21a9c4, + 0x359b48, + 0x205285, + 0x288cc6, + 0x2c0c08, + 0x2d8046, + 0x238e46, + 0x212bc8, + 0x2d8d07, + 0x26e8c9, + 0x32044a, + 0x2052c4, + 0x228f85, + 0x2f3205, + 0x3598c6, + 0x231906, + 0x2a1b06, + 0x3cc306, + 0x26ea04, + 0x26ea0b, + 0x228d44, + 0x244ac5, + 0x2af585, + 0x219506, + 0x3c6e08, + 0x284287, + 0x32dd84, + 0x25a2c3, + 0x2ab305, + 0x31be47, + 0x28418b, + 0x32f007, + 0x2c0b08, + 0x2bf447, + 0x269406, + 0x27d308, + 0x292a0b, + 0x2abb46, + 0x213a89, + 0x292b85, + 0x31da43, + 0x2cebc6, + 0x254648, + 0x214303, + 0x27d903, + 0x27b386, + 0x249886, + 0x37880a, + 0x27e885, + 0x27ec4b, + 0x2a1d8b, + 0x244043, + 0x206743, + 0x2b3244, + 0x249647, + 0x2546c4, + 0x219344, + 0x2b4e84, + 0x3da548, + 0x3c26c8, + 0x2089c9, + 0x2d3a08, + 0x34c747, + 0x22f846, + 0x2e00cf, + 0x2ca706, + 0x2d6044, + 0x3c250a, + 0x31bd47, + 0x2b5786, + 0x293d49, + 0x208945, + 0x32f245, + 0x208a86, + 0x229fc3, + 0x2ab849, + 0x222686, + 0x218dc9, + 0x39abc6, + 0x267c05, + 0x28c805, + 0x206643, + 0x249788, + 0x32e4c7, + 0x20ef04, + 0x3599c8, + 0x3173c4, + 0x356506, + 0x31cc06, + 0x23b486, + 0x2d89c9, + 0x2f9c05, + 0x29af46, + 0x247d89, + 0x2c9646, + 0x2e01c6, + 0x39f786, + 0x212185, + 0x305186, + 0x2f73c4, + 0x3b5d45, + 0x2c44c4, + 0x2b6b06, + 0x33fa84, 0x201a43, - 0x288cc5, - 0x235e48, - 0x22cdc7, - 0x2aae89, - 0x288f48, - 0x29b911, - 0x3db4ca, - 0x2f0607, - 0x2d3ec6, - 0x21c4c4, - 0x2c3188, - 0x3cf988, - 0x29baca, - 0x2a0c8d, - 0x2a2fc6, - 0x3ae1c6, - 0x26c246, - 0x21b747, - 0x2b6e05, - 0x3be587, - 0x289e85, - 0x2e8384, - 0x2adec6, - 0x33a587, - 0x3d21cd, - 0x2a3347, - 0x2b5588, - 0x27d389, - 0x21a286, - 0x338045, - 0x230344, - 0x26d0c6, - 0x3ba986, - 0x232f46, - 0x29cb48, - 0x219783, - 0x209e43, - 0x320405, - 0x35b006, - 0x2b0e05, - 0x293c88, - 0x29f74a, - 0x3bab84, - 0x289f48, - 0x296948, - 0x32e207, - 0x3db789, - 0x2bef88, - 0x284107, - 0x2b7a46, - 0x20480a, - 0x26d148, - 0x390e89, - 0x2c40c8, - 0x226c49, - 0x2d3d87, - 0x2f3bc5, - 0x32cc86, - 0x37f3c8, - 0x253408, - 0x339cc8, - 0x214188, - 0x2425c5, + 0x287c45, + 0x233c08, + 0x3d2cc7, + 0x304289, + 0x287ec8, + 0x29b651, + 0x33178a, + 0x2f4587, + 0x254886, + 0x21a9c4, + 0x2c45c8, + 0x2b5c48, + 0x29b80a, + 0x2bcecd, + 0x215146, + 0x212cc6, + 0x266906, + 0x21afc7, + 0x2b6245, + 0x251907, + 0x344ec5, + 0x2b3a84, + 0x206686, + 0x2269c7, + 0x2ab54d, + 0x2a4087, + 0x3774c8, + 0x27bb49, + 0x223d86, + 0x36bd85, + 0x23ae44, + 0x34f386, + 0x21f406, + 0x234e86, + 0x29cc08, + 0x223283, + 0x210e03, + 0x343085, + 0x35c6c6, + 0x2b0345, + 0x2a5a48, + 0x2a07ca, + 0x246b04, + 0x359b48, + 0x296188, + 0x219347, + 0x331a49, + 0x2c0808, + 0x2829c7, + 0x2b5106, + 0x3c698a, + 0x34f408, + 0x307009, + 0x2af148, + 0x227f89, + 0x361107, + 0x303505, + 0x2ffd06, + 0x2b2948, + 0x24f988, + 0x313c48, + 0x31c5c8, + 0x244ac5, 0x200d04, - 0x2347c8, - 0x241884, - 0x32b704, - 0x269dc5, - 0x2961c7, - 0x32de09, - 0x211447, - 0x2319c5, - 0x27a846, - 0x369406, - 0x202fc4, - 0x2a4646, - 0x27f244, - 0x292b46, - 0x32dbc6, - 0x213446, - 0x3c2845, - 0x293b47, - 0x202e03, - 0x269889, - 0x308588, - 0x283f84, - 0x283f8d, - 0x29af88, - 0x2ec008, - 0x390e06, - 0x2857c9, - 0x2cc949, - 0x32ac05, - 0x29f84a, - 0x25364a, - 0x27108c, - 0x271206, - 0x27b146, - 0x2ca646, - 0x39eec9, - 0x202e46, - 0x220a86, - 0x36b486, - 0x23c508, - 0x229c46, - 0x2d5acb, - 0x296345, - 0x21b745, - 0x27b945, - 0x327c86, - 0x2047c3, - 0x23eb46, - 0x2a32c7, - 0x2c3045, - 0x25ab85, - 0x3bd3c5, - 0x312906, - 0x32acc4, - 0x336306, - 0x2abc89, - 0x327b0c, - 0x2e80c8, - 0x229ec4, - 0x2ff7c6, - 0x2887c6, - 0x358488, - 0x30e988, - 0x327a09, - 0x328487, - 0x265a89, - 0x273dc6, - 0x22c644, - 0x205584, - 0x283704, - 0x2849c8, - 0x32dc4a, - 0x35cb46, - 0x36d607, - 0x385487, - 0x242545, - 0x2f70c4, - 0x291446, - 0x2b6e46, - 0x202a83, - 0x3083c7, - 0x3dd008, - 0x32ad4a, - 0x23d9c8, - 0x209148, - 0x363505, - 0x2a0385, - 0x2659c5, - 0x242906, - 0x390046, - 0x37b985, - 0x324e09, - 0x2f6ecc, - 0x380907, - 0x29bb48, - 0x296685, - 0x727544, - 0x2270c4, - 0x284f44, - 0x218606, - 0x2a268e, - 0x369f87, - 0x21b945, - 0x2d618c, - 0x3cb3c7, - 0x33a507, - 0x358fc9, - 0x219049, - 0x289045, - 0x308588, - 0x302849, - 0x3971c5, - 0x2c2f88, - 0x2bb2c6, - 0x384d46, - 0x241f04, - 0x290108, - 0x21a443, - 0x387344, - 0x3d2005, - 0x398bc7, - 0x22c405, - 0x3d4b89, - 0x2a4c0d, - 0x371086, - 0x3b9904, - 0x2b7b48, - 0x3c618a, - 0x221e07, - 0x326945, - 0x280883, - 0x2a1a0e, - 0x24c3cc, - 0x2ffcc7, - 0x2a2847, - 0x40b06207, - 0x1282c6, - 0x81b84, - 0x202e83, - 0x202e85, - 0x284f45, - 0x29c688, - 0x29a009, - 0x229dc6, - 0x27aa44, - 0x2f0546, - 0x2395cb, - 0x2c77cc, - 0x24f607, - 0x2d5d85, - 0x3c96c8, - 0x2e25c5, - 0x244f87, - 0x3db307, - 0x339b45, - 0x2047c3, - 0x210584, - 0x23d245, - 0x28e745, - 0x28e746, - 0x2a8a48, - 0x33a587, - 0x39cf86, - 0x209546, - 0x34afc6, - 0x239989, - 0x211a07, - 0x27f346, - 0x2c7946, - 0x3a9606, - 0x2acd45, - 0x208bc6, - 0x386605, - 0x28d688, - 0x295b4b, - 0x290cc6, - 0x3854c4, - 0x2d87c9, - 0x23c344, - 0x2bb248, - 0x35f507, - 0x286e84, - 0x2be3c8, - 0x2c42c4, - 0x2acd84, - 0x289d05, - 0x30e886, - 0x245687, - 0x2172c3, - 0x2a0745, - 0x273304, - 0x232a86, - 0x32ac88, - 0x320cc5, - 0x295809, - 0x248a05, - 0x23cf48, - 0x3d28c7, - 0x325108, - 0x2be007, - 0x2ee809, - 0x27df46, - 0x370c46, - 0x2a6384, - 0x2fd045, - 0x30724c, - 0x27b947, - 0x27c2c7, - 0x233c88, - 0x371086, - 0x2a3204, - 0x3415c4, - 0x38c549, - 0x2ca746, - 0x272647, - 0x211284, - 0x2a4746, - 0x37adc5, - 0x2d2d87, - 0x2d5a46, - 0x27f609, - 0x2e6e47, - 0x298847, - 0x2a4186, - 0x22e705, - 0x282b88, - 0x220688, - 0x2dccc6, - 0x320d05, - 0x2c5406, + 0x232588, + 0x23eb84, + 0x3c4d44, + 0x267c05, + 0x295647, + 0x2e6d09, + 0x210c07, + 0x21a5c5, + 0x278886, + 0x368186, + 0x213bc4, + 0x2a5386, + 0x27e044, + 0x292686, + 0x2e6ac6, + 0x214146, + 0x3bfc85, + 0x2a5907, + 0x20cc43, + 0x20a909, + 0x30fdc8, + 0x282844, + 0x28284d, + 0x29acc8, + 0x2f0148, + 0x306f86, + 0x283d09, + 0x2ceb09, + 0x2f7c85, + 0x2a08ca, + 0x26da4a, + 0x270c0c, + 0x270d86, + 0x2794c6, + 0x2caf86, + 0x39b709, + 0x21f986, + 0x222906, + 0x28ea86, + 0x34d748, + 0x31d6c6, + 0x2d4b8b, + 0x2957c5, + 0x21afc5, + 0x279cc5, + 0x340c06, + 0x215103, + 0x23b406, + 0x2a4007, + 0x2c4485, + 0x211e45, + 0x3b8505, + 0x33d006, + 0x2f7d44, + 0x334606, + 0x2a9789, + 0x340a8c, + 0x2b37c8, + 0x2a98c4, + 0x304e86, + 0x289f06, + 0x254648, + 0x225fc8, + 0x340989, + 0x344bc7, + 0x236589, + 0x271b06, + 0x2150c4, + 0x205fc4, + 0x281fc4, + 0x282f08, + 0x2e6b4a, + 0x35e2c6, + 0x36b487, + 0x382887, + 0x244a45, + 0x2f31c4, + 0x290c86, + 0x2b6286, + 0x20eec3, + 0x30fc07, + 0x3d35c8, + 0x2f7dca, + 0x345188, + 0x2dd348, + 0x33fac5, + 0x2a1405, + 0x2364c5, + 0x244e06, + 0x35cb06, + 0x2fe385, + 0x32dc09, + 0x2f2fcc, + 0x35b4c7, + 0x29b888, + 0x276705, + 0x602c84, + 0x229cc4, + 0x283484, + 0x218bc6, + 0x2a2d4e, + 0x32f2c7, + 0x21b1c5, + 0x2d524c, + 0x30af87, + 0x226947, + 0x22bb09, + 0x220d49, + 0x287fc5, + 0x30fdc8, + 0x308fc9, + 0x38ed05, + 0x2c43c8, + 0x2b9886, + 0x382146, + 0x23f204, + 0x28fe08, + 0x223f43, + 0x209284, + 0x2ab385, + 0x394e47, + 0x26bcc5, + 0x3bf149, + 0x2a5f8d, + 0x2c6506, + 0x3c37c4, + 0x226b08, + 0x20ae0a, + 0x21bf47, + 0x36ba05, + 0x2092c3, + 0x2a1f4e, + 0x24988c, + 0x305387, + 0x2a2f07, + 0x4230e9c7, + 0x14f0c6, + 0x46e44, + 0x210d83, + 0x21f9c5, + 0x283485, + 0x29c748, + 0x299d49, + 0x3db306, + 0x2546c4, + 0x2f44c6, + 0x266e0b, + 0x2dc50c, + 0x24b8c7, + 0x2d4e45, + 0x3a76c8, + 0x2e4cc5, + 0x3c2507, + 0x3315c7, + 0x22ee45, + 0x215103, + 0x20fd44, + 0x3cb985, + 0x26e585, + 0x26e586, + 0x2a8f48, + 0x2269c7, + 0x3a4ac6, + 0x21cc86, + 0x34c406, + 0x2671c9, + 0x2111c7, + 0x27e146, + 0x2dc686, + 0x277146, + 0x2acb45, + 0x205746, + 0x383a05, + 0x28ba48, + 0x29528b, + 0x2909c6, + 0x3828c4, + 0x2d5b09, + 0x2a62c4, + 0x2b9808, + 0x31c087, + 0x285304, + 0x2bff48, + 0x2c59c4, + 0x2acb84, + 0x398305, + 0x31c4c6, + 0x3da487, + 0x24e4c3, + 0x2a17c5, + 0x2fb684, + 0x3c0b06, + 0x2f7d08, + 0x3db085, + 0x294f49, + 0x313985, + 0x3736c8, + 0x21a887, + 0x32df08, + 0x2bfb87, + 0x2f2909, + 0x282b06, + 0x341c06, + 0x28ea84, + 0x3abf45, + 0x30d1cc, + 0x279cc7, + 0x27a747, + 0x231548, + 0x2c6506, + 0x2a3f44, + 0x34ab44, + 0x388fc9, + 0x2cb086, + 0x26df07, + 0x210a44, + 0x261606, + 0x3a4405, + 0x2d2807, + 0x2d4b06, + 0x2645c9, + 0x2cfa47, + 0x297a87, + 0x2a4ec6, + 0x261545, + 0x281448, + 0x222508, + 0x22fa46, + 0x3db0c5, + 0x2c7406, 0x2017c3, - 0x29c509, - 0x2a080e, - 0x2bdd48, - 0x310c88, - 0x2dcacb, - 0x295a46, - 0x326404, + 0x29c5c9, + 0x2a188e, + 0x2bf2c8, + 0x3174c8, + 0x22f84b, + 0x295186, + 0x379b04, + 0x238e44, + 0x2a198a, + 0x213147, + 0x27e205, + 0x213a89, + 0x2c31c5, + 0x3c4d87, + 0x230504, + 0x299187, + 0x214fc8, + 0x2cc646, + 0x2b9d09, + 0x2c090a, + 0x2130c6, + 0x29a806, + 0x2af505, + 0x396405, + 0x34bac7, + 0x242788, + 0x3a4348, + 0x26b006, + 0x28c885, + 0x23168e, + 0x226384, + 0x22f9c5, + 0x278209, + 0x2d7688, + 0x28d406, + 0x29e7cc, + 0x2a03d0, + 0x2a298f, + 0x2a44c8, + 0x313987, + 0x3bfc85, + 0x294105, + 0x3da309, + 0x294109, + 0x278f46, + 0x2d5107, + 0x3abe45, + 0x306a89, + 0x353186, + 0x21f7cd, + 0x281e89, + 0x219344, + 0x2bf048, + 0x232649, + 0x35e486, + 0x3899c5, + 0x341c06, + 0x275c89, + 0x27b108, + 0x209a85, + 0x28fe04, + 0x29e98b, + 0x35e345, + 0x245b86, + 0x284706, + 0x252a06, + 0x2a388b, + 0x295049, + 0x21cbc5, + 0x391d47, + 0x331706, + 0x212dc6, + 0x283208, + 0x2b5209, + 0x37728c, + 0x31bc48, + 0x317f06, + 0x338fc3, + 0x22d046, + 0x2a36c5, + 0x27fb48, + 0x28c286, + 0x2d2a48, + 0x242b85, + 0x292745, + 0x21a9c8, + 0x3a9dc7, + 0x3a4707, + 0x2f5247, + 0x319dc8, + 0x313ac8, + 0x2b5b46, + 0x2b6947, + 0x306387, + 0x2a358a, + 0x206383, + 0x340c06, + 0x231605, + 0x288bc4, + 0x27bb49, + 0x2f2884, + 0x202244, + 0x2a0c44, + 0x2a2f0b, + 0x32e407, + 0x2318c5, + 0x2981c8, + 0x278886, + 0x278888, + 0x27e7c6, + 0x28fd45, + 0x290005, + 0x2915c6, + 0x2937c8, + 0x293c88, + 0x27bd06, + 0x29800f, + 0x29c090, + 0x3c12c5, + 0x20cc43, + 0x22aa85, + 0x31ad88, + 0x294009, + 0x38ee48, + 0x2d4f08, + 0x31f888, + 0x32e4c7, + 0x278549, + 0x2d2c48, 0x285a84, - 0x2a090a, - 0x20f007, - 0x27f405, - 0x20df49, - 0x2c1b45, - 0x32b747, - 0x2329c4, - 0x297307, - 0x2f7e88, - 0x2d2406, - 0x2bb749, - 0x2bf08a, - 0x20ef86, - 0x29aac6, - 0x2aff45, - 0x39a185, - 0x31fa87, - 0x246d08, - 0x37ad08, - 0x225cc6, - 0x28e4c5, - 0x233dce, - 0x2bf744, - 0x29c605, - 0x27a1c9, - 0x2e6a48, - 0x28f8c6, - 0x29e2cc, - 0x29f350, - 0x2a22cf, - 0x2a3788, - 0x30ce07, - 0x3c2845, - 0x245505, - 0x245509, - 0x294309, - 0x316106, - 0x2d6047, - 0x2fcf45, - 0x237189, - 0x350f86, - 0x202c8d, - 0x2835c9, - 0x289f44, - 0x2bdac8, - 0x234889, - 0x35cd06, - 0x38cf45, - 0x370c46, - 0x278c89, - 0x212348, - 0x20b3c5, - 0x290104, - 0x29e48b, - 0x35cbc5, - 0x242e46, - 0x2861c6, - 0x32eb86, - 0x29524b, - 0x295909, - 0x209485, - 0x395547, - 0x3db446, - 0x3ae2c6, - 0x284cc8, - 0x22b1c9, - 0x2b534c, - 0x35f0c8, - 0x3118c6, - 0x33d5c3, - 0x2ff4c6, - 0x295085, - 0x281348, - 0x28dec6, - 0x2d2fc8, - 0x232105, - 0x29bc85, - 0x3d2a08, - 0x39d3c7, - 0x39cbc7, - 0x36d987, - 0x3134c8, - 0x358308, - 0x2d1bc6, - 0x2b7507, - 0x238507, - 0x294f4a, - 0x2292c3, - 0x327c86, - 0x22a005, - 0x245a84, - 0x27d389, - 0x2ee784, - 0x203c44, - 0x29fbc4, - 0x2a284b, - 0x325607, - 0x234005, - 0x298f88, - 0x27a846, - 0x27a848, - 0x27fd46, - 0x290045, - 0x290305, - 0x2920c6, - 0x293548, - 0x293e88, - 0x27d546, - 0x298dcf, - 0x29bfd0, - 0x3dc385, - 0x202e03, - 0x22c705, - 0x314b08, - 0x294209, - 0x397308, - 0x2d5e48, - 0x23aac8, - 0x3256c7, - 0x27a509, - 0x2d31c8, - 0x291204, - 0x29fa48, - 0x3baf09, - 0x2b87c7, - 0x2ad784, - 0x211508, - 0x29390a, - 0x2ddc86, - 0x2a2fc6, - 0x22d7c9, - 0x29f587, - 0x2cf488, - 0x2e21c8, - 0x209c08, - 0x249085, - 0x39af85, - 0x21b745, - 0x284f05, - 0x2b6007, - 0x2047c5, - 0x2c3045, - 0x2389c6, - 0x397247, - 0x2d7fc7, - 0x293c06, - 0x2d7885, - 0x242e46, - 0x2b9605, - 0x2bfb08, - 0x2fcec4, - 0x2c8906, - 0x323484, - 0x2be1c8, - 0x2c8a0a, - 0x27dccc, - 0x247f85, - 0x21b806, - 0x2b5506, - 0x3202c6, - 0x311944, - 0x39ca85, - 0x27ef87, - 0x29f609, - 0x2ce5c7, - 0x727544, - 0x727544, - 0x325485, - 0x216144, - 0x29dc8a, - 0x27a6c6, - 0x302644, - 0x3ce8c5, - 0x2b5a05, - 0x2b6d44, - 0x285e07, - 0x248987, - 0x2ce188, - 0x2c5508, - 0x20b3c9, - 0x31c548, - 0x29de4b, - 0x245644, - 0x3ae3c5, - 0x38c905, - 0x36d909, - 0x22b1c9, - 0x2d86c8, - 0x224b88, - 0x2dd504, - 0x288805, - 0x209ec3, - 0x3581c5, - 0x29b286, - 0x299e4c, - 0x211186, - 0x38ce46, - 0x28fb45, - 0x312988, - 0x30eb06, - 0x2d4046, - 0x2a2fc6, - 0x23d74c, - 0x38c9c4, - 0x34b10a, - 0x28fa88, - 0x299c87, - 0x273206, - 0x229e87, - 0x2f0145, - 0x22e7c6, - 0x366086, - 0x377e87, - 0x22ce84, - 0x2100c5, - 0x27a1c4, - 0x2e8407, - 0x27a408, - 0x27afca, - 0x283807, - 0x2ac947, - 0x30cd87, - 0x2e2709, - 0x299e4a, - 0x22c603, - 0x22cd85, - 0x213483, - 0x2b7809, - 0x3586c8, - 0x31c307, - 0x397409, - 0x220786, - 0x3296c8, - 0x3a3705, - 0x2517ca, - 0x328a49, - 0x24be09, - 0x3a1c47, - 0x3cfa89, - 0x213348, - 0x32f686, - 0x21b9c8, - 0x3c3e47, - 0x26e1c7, - 0x2a3547, - 0x2db108, - 0x2ff646, - 0x2936c5, - 0x27ef87, - 0x29a5c8, - 0x34af44, - 0x2cf0c4, - 0x294907, - 0x2b11c7, - 0x3026ca, - 0x32f606, - 0x37b28a, - 0x2c1f87, - 0x2bf507, - 0x210184, - 0x29cf84, - 0x2d2c86, - 0x3386c4, - 0x3386cc, - 0x302585, - 0x213fc9, - 0x23d0c4, - 0x2b6e05, - 0x3c6108, - 0x293f45, - 0x393146, - 0x294444, - 0x2ae3ca, - 0x31bfc6, - 0x24080a, - 0x32bac7, - 0x228985, - 0x22b885, - 0x24258a, - 0x339c05, - 0x2454c6, - 0x241884, + 0x2a0ac8, + 0x2e9dc9, + 0x2b7607, + 0x2b0104, + 0x210cc8, + 0x2a56ca, + 0x2fb906, + 0x215146, + 0x34fb09, + 0x2a0607, + 0x2d0308, + 0x230588, + 0x21d348, + 0x37f785, + 0x207685, + 0x21afc5, + 0x283445, + 0x2b4a07, + 0x244bc5, + 0x2c4485, + 0x3cfec6, + 0x38ed87, + 0x2d0e07, + 0x2a59c6, + 0x2d6e05, + 0x245b86, + 0x20ee45, + 0x2bca88, + 0x3abdc4, + 0x2c96c6, + 0x324c84, + 0x2bfd48, + 0x2c97ca, + 0x27c48c, + 0x336285, + 0x21b086, + 0x377446, + 0x28e886, + 0x317f84, + 0x3a4d85, + 0x27dd87, + 0x2a0689, + 0x2cef47, + 0x602c84, + 0x602c84, + 0x32e285, + 0x217684, + 0x29dd4a, + 0x278706, + 0x308dc4, + 0x3b06c5, + 0x2b41c5, + 0x2b6184, + 0x284347, + 0x336c87, + 0x2ce988, + 0x2c7508, + 0x209a89, + 0x295e08, + 0x29df0b, + 0x26f484, + 0x2921c5, + 0x389385, + 0x2f51c9, + 0x2b5209, + 0x2d5a08, + 0x228d48, + 0x219504, + 0x289f45, + 0x218e03, + 0x359885, + 0x29afc6, + 0x299b8c, + 0x210946, + 0x3898c6, + 0x28d685, + 0x33d088, + 0x3d83c6, + 0x254a06, + 0x215146, + 0x26368c, + 0x389444, + 0x34c54a, + 0x28d5c8, + 0x2999c7, + 0x2fb586, + 0x3db3c7, + 0x2f40c5, + 0x36b6c6, + 0x366906, + 0x376047, + 0x2c0604, + 0x20ea85, + 0x278204, + 0x2b3b07, + 0x278448, + 0x27934a, + 0x2820c7, + 0x2ac747, + 0x313907, + 0x2e4e09, + 0x299b8a, + 0x229a03, + 0x3d2c85, + 0x214183, + 0x2b4ec9, + 0x361248, + 0x295bc7, + 0x38ef49, + 0x222606, + 0x3b5e08, + 0x393885, + 0x248f8a, + 0x3b0a49, + 0x2492c9, + 0x3d8287, + 0x2b5d49, + 0x214048, + 0x36a2c6, + 0x21b248, + 0x212187, + 0x26eb07, + 0x2a4287, + 0x2d1c48, + 0x3cd4c6, + 0x2a5485, + 0x27dd87, + 0x29a308, + 0x34c384, + 0x2fd284, + 0x294707, + 0x2b0707, + 0x308e4a, + 0x36a246, + 0x32f70a, + 0x2c3607, + 0x226147, + 0x20eb44, + 0x29d044, + 0x2d2706, + 0x36c404, + 0x36c40c, + 0x308d05, + 0x214e09, + 0x2b3644, + 0x2b6245, + 0x20ad88, + 0x293d45, + 0x38fe46, + 0x294244, + 0x2ad88a, 0x2b3e46, - 0x31fb45, - 0x28df86, - 0x2f1d8c, - 0x2d9bca, - 0x253744, - 0x231f06, - 0x29f587, - 0x2d59c4, - 0x23c508, - 0x2e5046, - 0x385309, - 0x2cbc49, - 0x2b3489, - 0x2ce8c6, - 0x3c3f46, - 0x21bb07, - 0x324d48, - 0x3c3d49, - 0x325607, - 0x299106, - 0x3b8cc7, - 0x26c105, - 0x2bf744, - 0x21b6c7, - 0x2386c5, - 0x289c45, + 0x293a0a, + 0x3c5107, + 0x2d0145, + 0x229fc5, + 0x244a8a, + 0x293945, + 0x2a3c06, + 0x23eb84, + 0x2b33c6, + 0x34bb85, + 0x28c346, + 0x2f188c, + 0x26390a, + 0x26db44, + 0x22f846, + 0x2a0607, + 0x2d4a84, + 0x34d748, + 0x2e7f46, + 0x382709, + 0x2c20c9, + 0x348289, + 0x2cf246, + 0x212286, + 0x21b387, + 0x32db48, + 0x212089, + 0x32e407, + 0x298346, + 0x280047, + 0x2667c5, + 0x226384, + 0x21af47, + 0x306545, + 0x288b05, 0x200cc7, - 0x339a08, - 0x3c9646, - 0x29b40d, - 0x29c88f, - 0x2a184d, - 0x208904, - 0x235f46, - 0x2d9f88, - 0x36b445, - 0x295108, - 0x26444a, - 0x289f44, - 0x2ed986, - 0x2d6b87, - 0x21af87, - 0x2cfa09, - 0x21b985, - 0x2b6d44, - 0x2b938a, - 0x2beb49, - 0x3cfb87, - 0x2eecc6, - 0x35cd06, - 0x288746, - 0x3835c6, - 0x2d988f, - 0x2d9e49, - 0x229c46, - 0x38c186, - 0x324409, - 0x2b7607, - 0x222b43, - 0x23d8c6, - 0x2060c3, - 0x35a848, - 0x2a9d87, - 0x2a3989, - 0x2eeec8, - 0x39cd08, - 0x23c006, - 0x2110c9, - 0x380845, - 0x273204, - 0x2f3c87, - 0x39ef45, - 0x208904, - 0x2340c8, - 0x20f2c4, - 0x2b7347, - 0x343646, - 0x281685, - 0x2c40c8, - 0x35cbcb, - 0x308a87, - 0x242806, - 0x2c9e44, - 0x326386, - 0x269dc5, - 0x2386c5, - 0x282909, - 0x285a09, - 0x26e204, - 0x26e245, - 0x231f45, - 0x251646, - 0x308688, - 0x2c1086, - 0x3dce4b, - 0x388c0a, - 0x2be105, - 0x290386, - 0x25cb45, - 0x2e1fc5, - 0x296ac7, - 0x327f08, - 0x265a84, - 0x264046, - 0x293f06, - 0x213507, - 0x316f84, - 0x280606, - 0x3ba7c5, - 0x3ba7c9, - 0x20d344, - 0x2f7249, - 0x27d546, - 0x2c3848, - 0x231f45, - 0x385585, - 0x28df86, - 0x2b5249, - 0x219049, - 0x38cec6, - 0x2e6b48, - 0x2a4d48, - 0x25cb04, - 0x2b9c44, - 0x2b9c48, - 0x32c488, - 0x265b89, - 0x29b206, - 0x2a2fc6, - 0x33cc0d, - 0x3dafc6, - 0x2b8ac9, - 0x3bb285, - 0x206106, - 0x209d88, - 0x336245, - 0x238544, - 0x269dc5, - 0x285548, - 0x29da49, - 0x27a284, - 0x2bb5c6, - 0x39104a, - 0x2ffbc8, - 0x302849, - 0x26ad8a, - 0x397386, - 0x29ca48, - 0x244d45, - 0x28fd08, - 0x2f01c5, - 0x220649, - 0x33ef89, - 0x210642, - 0x272c85, - 0x273a46, - 0x27d487, - 0x245a85, - 0x2f6146, - 0x30c0c8, - 0x371086, - 0x2c15c9, - 0x27c3c6, - 0x284b48, - 0x38d285, - 0x2fe046, - 0x330248, - 0x2849c8, - 0x2d3c88, - 0x30e488, - 0x208bc4, - 0x23b083, - 0x2c1804, - 0x283a06, - 0x26c144, - 0x310bc7, - 0x2d3f49, - 0x2c8c85, - 0x2e21c6, - 0x23d8c6, - 0x2a888b, - 0x2b67c6, - 0x363746, - 0x2cc7c8, - 0x23d386, - 0x228783, - 0x2077c3, - 0x2bf744, - 0x231885, - 0x2ba987, - 0x27a408, - 0x27a40f, - 0x27ee8b, - 0x308488, - 0x2bb646, - 0x30878e, - 0x232ac3, - 0x2ba904, - 0x2b6745, - 0x2b6bc6, - 0x29154b, - 0x296286, - 0x21c449, - 0x281685, - 0x24fc08, - 0x208208, - 0x218f0c, - 0x2a2886, - 0x358206, - 0x2e2e05, - 0x28a1c8, - 0x27dcc5, - 0x35bb48, - 0x29e64a, - 0x2a1c89, - 0x727544, + 0x22ed08, + 0x3a7646, + 0x29b14d, + 0x29c94f, + 0x2a1d8d, + 0x205484, + 0x233d06, + 0x2d9448, + 0x28ea45, + 0x2a3748, + 0x261e8a, + 0x219344, + 0x2b53c6, + 0x2d60c7, + 0x219cc7, + 0x2d8dc9, + 0x21b205, + 0x2b6184, + 0x2b864a, + 0x2c03c9, + 0x2b5e47, + 0x2f2dc6, + 0x35e486, + 0x289e86, + 0x380606, + 0x2d868f, + 0x2d9309, + 0x31d6c6, + 0x388c06, + 0x32d209, + 0x2b6a47, + 0x214703, + 0x243846, + 0x208a43, + 0x35bf08, + 0x27fe87, + 0x2a46c9, + 0x31ca88, + 0x3a4848, + 0x2ff3c6, + 0x210889, + 0x35b405, + 0x22cf84, + 0x3035c7, + 0x39b785, + 0x205484, + 0x231988, + 0x20f104, + 0x2b6787, + 0x36d146, + 0x269e45, + 0x2af148, + 0x35e34b, + 0x3102c7, + 0x244d06, + 0x2ca784, + 0x379a86, + 0x267c05, + 0x306545, + 0x2811c9, + 0x283f49, + 0x26eb44, + 0x26eb85, + 0x22f885, + 0x248e06, + 0x30fec8, + 0x2c29c6, + 0x3d340b, + 0x384fca, + 0x2bfc85, + 0x290086, + 0x246805, + 0x2db7c5, + 0x296307, + 0x340e88, + 0x236584, + 0x261a86, + 0x293d06, + 0x214207, + 0x31da04, + 0x27ee06, + 0x21f245, + 0x21f249, + 0x212484, + 0x2f3349, + 0x27bd06, + 0x2c51c8, + 0x22f885, + 0x382985, + 0x28c346, + 0x377189, + 0x220d49, + 0x389946, + 0x2d7788, + 0x2a60c8, + 0x2467c4, + 0x2b8ac4, + 0x2b8ac8, + 0x2e6288, + 0x236689, + 0x29af46, + 0x215146, + 0x33860d, + 0x31f2c6, + 0x3215c9, + 0x202945, + 0x208a86, + 0x27b288, + 0x334545, + 0x3063c4, + 0x267c05, + 0x283a88, + 0x29db09, + 0x2782c4, + 0x2b9b86, + 0x3071ca, + 0x305288, + 0x308fc9, + 0x268a0a, + 0x38eec6, + 0x29cb08, + 0x3c22c5, + 0x28d848, + 0x2f4145, + 0x2224c9, + 0x33a989, + 0x20fe02, + 0x292b85, + 0x271786, + 0x27bc47, + 0x322b85, + 0x2fb486, + 0x312c48, + 0x2c6506, + 0x2c1209, + 0x27a846, + 0x283088, + 0x389d05, + 0x3ddc06, + 0x2f74c8, + 0x282f08, + 0x361008, + 0x315708, + 0x205744, + 0x21f543, + 0x2c1444, + 0x2822c6, + 0x266804, + 0x317407, + 0x254909, + 0x2c9a45, + 0x230586, + 0x243846, + 0x2a8d8b, + 0x2b56c6, + 0x33fd06, + 0x2ccd48, + 0x229a46, + 0x2bd1c3, + 0x203e83, + 0x226384, + 0x22f1c5, + 0x2b7ac7, + 0x278448, + 0x27844f, + 0x27dc8b, + 0x30fcc8, + 0x2b9c06, + 0x30ffce, + 0x244ec3, + 0x2b7a44, + 0x2b5645, + 0x2b6006, + 0x290d8b, + 0x295706, + 0x227789, + 0x269e45, + 0x24e408, + 0x204d88, + 0x220c0c, + 0x2a2f46, + 0x3598c6, + 0x2dedc5, + 0x288ec8, + 0x27c485, + 0x351c88, + 0x29eb4a, + 0x2a21c9, + 0x602c84, 0x2000c2, - 0x46a03102, + 0x4820c302, 0x200382, - 0x221b84, - 0x205982, - 0x346484, - 0x208ac2, - 0x4783, + 0x224e44, + 0x206a42, + 0x303f84, + 0x205642, + 0xca43, 0x2003c2, - 0x202442, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x24af03, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x20ce83, - 0x23f7c3, - 0x232d43, - 0x250784, - 0x22f743, - 0x2375c4, - 0x234e83, - 0x2dbb04, - 0x224943, - 0x245d47, - 0x211d83, - 0x204783, - 0x314d88, - 0x23f7c3, - 0x29248b, - 0x2f0fc3, - 0x22a7c6, - 0x21a602, - 0x2eaa8b, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x23f7c3, - 0x203a83, - 0x207cc3, + 0x209482, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x248343, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x20a803, + 0x216603, + 0x234c83, + 0x242244, + 0x22c0c3, + 0x235604, + 0x232c43, + 0x2db1c4, + 0x228b03, + 0x322e47, + 0x211543, + 0x20ca43, + 0x31b008, + 0x216603, + 0x280acb, + 0x2f55c3, + 0x240986, + 0x219f82, + 0x2eec0b, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x216603, + 0x221003, + 0x204383, 0x2000c2, - 0xa7c88, - 0x217285, - 0x238748, - 0x2f9448, - 0x203102, - 0x342585, - 0x3b8e07, + 0x9fe08, + 0x397705, + 0x3065c8, + 0x2e2bc8, + 0x20c302, + 0x329085, + 0x3bfd47, 0x201bc2, - 0x243307, + 0x2401c7, 0x200382, - 0x256d07, - 0x375509, - 0x2c93c8, - 0x209a89, - 0x20ba42, - 0x3bb387, - 0x2dc944, - 0x3b8ec7, - 0x388b07, - 0x25bd02, - 0x211d83, - 0x204fc2, - 0x208ac2, + 0x254f47, + 0x2bd949, + 0x26c708, + 0x21d1c9, + 0x208582, + 0x3b04c7, + 0x3880c4, + 0x3bfe07, + 0x384ec7, + 0x259902, + 0x211543, + 0x205a02, + 0x205642, 0x2003c2, - 0x204ac2, + 0x2161c2, 0x200902, - 0x202442, - 0x20a745, - 0x20f805, - 0x3102, - 0x34e83, - 0x22f743, - 0x234e83, - 0x211343, - 0x224943, - 0x2083c3, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x8d43, + 0x209482, + 0x2d6405, + 0x21bb85, + 0xc302, + 0x32c43, + 0x22c0c3, + 0x232c43, + 0x210b03, + 0x228b03, + 0x204f43, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x8083, 0x101, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x214503, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x2158c3, - 0x49c27bc6, - 0x3c8c3, - 0xca085, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x203102, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x39c2, - 0xa7c88, - 0x123fc3, - 0x4783, - 0x71003, - 0x46cc4, - 0x1421004, - 0xe29c5, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x214543, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x216e03, + 0x4b50bb86, + 0xe85c3, + 0xca9c5, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x82c2, + 0x9fe08, + 0x12cdc3, + 0xca43, + 0x6d9c3, + 0x42744, + 0x142a744, + 0xe50c5, 0x2000c2, - 0x395904, - 0x22f743, - 0x234e83, - 0x224943, - 0x250483, - 0x230145, - 0x214503, - 0x20e943, - 0x20ce83, - 0x22c483, - 0x23f7c3, - 0x202443, - 0x250803, - 0x2050c3, + 0x392104, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x241f43, + 0x22cd85, + 0x214543, + 0x20e403, + 0x20a803, + 0x24bbc3, + 0x216603, + 0x20c603, + 0x2422c3, + 0x205b03, 0x5c2, - 0x28002, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, + 0x2d7c2, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, 0x2000c2, - 0x24af03, - 0x203102, - 0x234e83, - 0x224943, - 0x221b84, - 0x20ce83, - 0x23f7c3, - 0x202442, - 0xa7c88, - 0x224943, - 0x71003, - 0xa7c88, - 0x71003, - 0x271803, - 0x22f743, - 0x232244, - 0x234e83, - 0x224943, - 0x203842, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x203842, - 0x225a83, - 0x20ce83, - 0x23f7c3, - 0x2e9343, - 0x202443, + 0x248343, + 0x20c302, + 0x232c43, + 0x228b03, + 0x224e44, + 0x20a803, + 0x216603, + 0x209482, + 0x9fe08, + 0x228b03, + 0x6d9c3, + 0x9fe08, + 0x6d9c3, + 0x26fb43, + 0x22c0c3, + 0x22fd84, + 0x232c43, + 0x228b03, + 0x203dc2, + 0x211543, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x203dc2, + 0x238cc3, + 0x20a803, + 0x216603, + 0x2ed343, + 0x20c603, 0x2000c2, - 0x203102, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x22a7c5, - 0x112406, - 0x250784, - 0x21a602, - 0xa7c88, + 0x20c302, + 0x228b03, + 0x20a803, + 0x216603, + 0x240985, + 0x127206, + 0x242244, + 0x219f82, + 0x9fe08, 0x2000c2, - 0x129245, - 0x1cb88, - 0x133c43, - 0x203102, - 0x4e495d86, - 0xc284, - 0x10404b, - 0x369c6, - 0x11e87, - 0x234e83, - 0x4a308, - 0x4a30b, - 0x4a78b, - 0x4ac8b, - 0x4afcb, - 0x4b28b, - 0x4b6cb, - 0x1c6986, - 0x224943, - 0x34c5, - 0x128c44, - 0x20ff83, - 0x10e2c7, - 0xdf604, - 0x70144, - 0x20ce83, - 0x18cfc6, - 0xb40c4, - 0x71003, - 0x23f7c3, - 0x2f2484, - 0x125c07, - 0x112009, - 0x103e08, - 0x127304, - 0xfd986, - 0x7608, - 0x68c45, - 0x7909, - 0x31e43, - 0x129245, - 0x203102, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x204783, - 0x23f7c3, - 0x2f0fc3, - 0x21a602, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x214343, - 0x209c04, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x2dbb04, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x22a7c6, - 0x234e83, - 0x224943, - 0x3fc83, - 0x71003, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x129245, - 0x11e87, - 0x4b83, - 0x31e43, - 0xa7c88, - 0x224943, - 0x22f743, - 0x234e83, - 0x224943, - 0x5ee03, - 0x20ce83, - 0x23f7c3, - 0x51a2f743, - 0x234e83, - 0x20ce83, - 0x23f7c3, - 0xa7c88, + 0x12eb85, + 0x1c508, + 0x175583, + 0x20c302, + 0x4fd40486, + 0xd944, + 0x10a7cb, + 0x34786, + 0x11647, + 0x1b8dc9, + 0x232c43, + 0x47508, + 0x4750b, + 0x4798b, + 0x480cb, + 0x4840b, + 0x486cb, + 0x48b0b, + 0x7386, + 0x228b03, + 0x20005, + 0x2a44, + 0x20e943, + 0x115547, + 0xded04, + 0x6c144, + 0x20a803, + 0x189a46, + 0x194584, + 0x6d9c3, + 0x216603, + 0x2f61c4, + 0x12ea07, + 0x126e09, + 0x10a588, + 0x52c84, + 0x3e006, + 0x8148, + 0x130245, + 0x3fc9, + 0x2f783, + 0x12eb85, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20ca43, + 0x216603, + 0x2f55c3, + 0x219f82, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x214383, + 0x217b84, + 0x20a803, + 0xca43, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x2db1c4, + 0x228b03, + 0x20a803, + 0x216603, + 0x240986, + 0x232c43, + 0x228b03, + 0x3a183, + 0x6d9c3, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x12eb85, + 0x11647, + 0x7883, + 0x2f783, + 0x9fe08, + 0x228b03, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x5c743, + 0x20a803, + 0x216603, + 0x5322c0c3, + 0x232c43, + 0x20a803, + 0x216603, + 0x9fe08, 0x2000c2, - 0x203102, - 0x22f743, - 0x224943, - 0x20ce83, + 0x20c302, + 0x22c0c3, + 0x228b03, + 0x20a803, 0x2003c2, - 0x23f7c3, - 0x33f4c7, - 0x2c5d4b, - 0x2171c3, - 0x315dc8, - 0x324ac7, - 0x206686, - 0x213a45, - 0x3426c9, - 0x211b08, - 0x37e609, - 0x3a5f50, - 0x37e60b, - 0x2e3949, - 0x204b83, - 0x2eb149, - 0x233646, - 0x23364c, - 0x217348, - 0x3d7e08, - 0x3759c9, - 0x2b828e, - 0x3752cb, - 0x32cecc, - 0x21c183, - 0x28764c, - 0x3c7709, - 0x302187, - 0x234dcc, - 0x2b238a, - 0x23d544, - 0x3b27cd, - 0x287508, - 0x35460d, - 0x30d5c6, - 0x25078b, - 0x312189, - 0x38c407, - 0x2fb986, - 0x3be009, - 0x32a88a, - 0x31a548, - 0x2f0bc4, - 0x391e47, - 0x23b747, - 0x330ac4, - 0x215dc4, - 0x331609, - 0x268309, - 0x28dc48, - 0x2ed2c5, - 0x20b985, - 0x2045c6, - 0x3b2689, - 0x2646cd, - 0x2f8208, - 0x2044c7, - 0x213ac8, - 0x23ae06, - 0x3a1344, - 0x284505, - 0x3c3c46, - 0x3c4d44, - 0x3c7607, - 0x3d030a, - 0x20d144, - 0x20eec6, - 0x212fc9, - 0x212fcf, - 0x213ccd, - 0x214886, - 0x21c790, - 0x21cb86, - 0x21d287, - 0x21e347, - 0x21e34f, - 0x21f549, - 0x223f06, - 0x224f07, - 0x224f08, - 0x226e89, - 0x3b9c48, - 0x3ac987, - 0x217283, - 0x22f5c6, - 0x3c5448, - 0x2b854a, - 0x387589, - 0x211c43, - 0x342486, - 0x263e8a, - 0x2ec387, - 0x301fca, - 0x366ece, - 0x21f686, - 0x30f8c7, - 0x22d3c6, - 0x243e86, - 0x39ad8b, - 0x216c8a, - 0x2c638d, - 0x3c4007, - 0x267788, - 0x267789, - 0x26778f, - 0x2ab00c, - 0x269509, - 0x2d368e, - 0x245e4a, - 0x228e06, - 0x3009c6, - 0x31b40c, - 0x31dc0c, - 0x337a48, - 0x35f9c7, - 0x237085, - 0x22adc4, - 0x32fa8e, - 0x264b44, - 0x320907, - 0x3d5d8a, - 0x22de54, - 0x22f00f, - 0x21e508, - 0x22f488, - 0x36174d, - 0x36174e, - 0x22f909, - 0x2309c8, - 0x2309cf, - 0x234acc, - 0x234acf, - 0x235c87, - 0x237eca, - 0x2467cb, - 0x2392c8, - 0x23b187, - 0x25e68d, - 0x32d486, - 0x3b2986, - 0x23e9c9, - 0x259788, - 0x243c88, - 0x243c8e, - 0x2c5e47, - 0x2f6645, - 0x246a85, - 0x20a544, - 0x206946, - 0x28db48, - 0x332f43, - 0x2f190e, - 0x25ea48, - 0x2a5ccb, - 0x2719c7, - 0x225b05, - 0x2877c6, - 0x2aeb87, - 0x3139c8, - 0x268a49, - 0x3cbc05, - 0x288d08, - 0x217b46, - 0x3a79ca, - 0x32f989, - 0x234e89, - 0x234e8b, - 0x33dd48, - 0x330989, - 0x2ed386, - 0x36baca, - 0x2b4aca, - 0x2380cc, - 0x3448c7, - 0x2c91ca, - 0x34a50b, - 0x34a519, - 0x323088, - 0x22a845, - 0x25e846, - 0x2167c9, - 0x2c98c6, - 0x387cca, - 0x211d06, - 0x2227c4, - 0x2cb1cd, - 0x331247, - 0x2227c9, - 0x249845, - 0x249a88, - 0x24a0c9, - 0x24bd44, - 0x24c9c7, - 0x24c9c8, - 0x24db87, - 0x266708, - 0x2529c7, - 0x338285, - 0x25928c, - 0x259989, - 0x2def0a, - 0x3ab249, - 0x2eb249, - 0x38bf4c, - 0x25c58b, - 0x25dbc8, - 0x25ef88, - 0x262984, - 0x286b48, - 0x287dc9, - 0x2b2447, - 0x213206, - 0x29fd87, - 0x291009, - 0x31f6cb, - 0x326207, - 0x390347, - 0x32bc07, - 0x354584, - 0x354585, - 0x2db805, - 0x3577cb, - 0x3b7bc4, - 0x34fa88, - 0x2f478a, - 0x217c07, - 0x3d7a47, - 0x290852, - 0x292a46, - 0x231b06, - 0x31fe4e, - 0x293286, - 0x2967c8, - 0x296e0f, - 0x3549c8, - 0x39b9c8, - 0x343b4a, - 0x343b51, - 0x2a48ce, - 0x20228a, - 0x20228c, - 0x230bc7, - 0x230bd0, - 0x3c1a48, - 0x2a4ac5, - 0x2af8ca, - 0x3c4d8c, - 0x29944d, - 0x3c1cc6, - 0x3c1cc7, - 0x3c1ccc, - 0x3ced4c, - 0x31540c, - 0x2b028b, - 0x38f704, - 0x22d944, - 0x2b1c49, - 0x341647, - 0x39ff49, - 0x2b4909, - 0x2b2047, - 0x2b2206, - 0x2b2209, - 0x2b2603, - 0x37118a, - 0x316987, - 0x36c5cb, - 0x2c620a, - 0x2dc9c4, - 0x37c586, - 0x283a89, - 0x338544, - 0x2f630a, - 0x242b05, - 0x2bfe85, - 0x2bfe8d, - 0x2c01ce, - 0x2c1945, - 0x33e186, - 0x22a3c7, - 0x25950a, - 0x2dafc6, - 0x2e8fc4, - 0x3b2b47, - 0x2cd98b, - 0x266407, - 0x24e444, - 0x310fc6, - 0x310fcd, - 0x2ddfcc, - 0x20cd46, - 0x2f840a, - 0x26ce06, - 0x230448, - 0x380b87, - 0x2bd50a, - 0x23ef46, - 0x203743, - 0x203746, - 0x3c52c8, - 0x2b1dca, - 0x287107, - 0x287108, - 0x2d3344, - 0x28fe87, - 0x2d6748, - 0x29bcc8, - 0x272788, - 0x2d1cca, - 0x2e1985, - 0x2e1c07, - 0x2566d3, - 0x26b306, - 0x376588, + 0x216603, + 0x33aec7, + 0x20f64b, + 0x20c003, + 0x278c08, + 0x32d8c7, + 0x32a1c6, + 0x20d0c5, + 0x3291c9, + 0x2112c8, + 0x37b649, + 0x3a1d90, + 0x37b64b, + 0x2e1b49, + 0x207883, + 0x2ef2c9, + 0x230a06, + 0x230a0c, + 0x3977c8, + 0x3d80c8, + 0x2bde09, + 0x2ba48e, + 0x2bd70b, + 0x2fff4c, + 0x225843, + 0x28768c, + 0x3ce3c9, + 0x308907, + 0x232b8c, + 0x2b18ca, + 0x249f84, + 0x30810d, + 0x287548, + 0x3cee4d, + 0x314846, + 0x24224b, + 0x326f89, + 0x388e87, + 0x369a86, + 0x373a89, + 0x2f790a, + 0x3dcf08, + 0x2f4c84, + 0x38e347, + 0x2417c7, + 0x345784, + 0x217304, + 0x344509, + 0x251789, + 0x28c008, + 0x2eda85, + 0x2084c5, + 0x204c46, + 0x307fc9, + 0x26210d, + 0x215348, + 0x204b47, + 0x20d148, + 0x263e46, + 0x237b84, + 0x285845, + 0x3c4c46, + 0x3c5d44, + 0x3ce2c7, + 0x3d558a, + 0x20ab44, + 0x213006, + 0x213cc9, + 0x213ccf, + 0x214b0d, + 0x215b86, + 0x21c110, + 0x21c506, + 0x21dac7, + 0x220607, + 0x22060f, 0x221349, - 0x2431c8, - 0x23c08b, - 0x39d088, - 0x287cc4, - 0x3d2b06, - 0x319406, - 0x30e6c9, - 0x3d7fc7, - 0x259388, - 0x29be46, + 0x226486, + 0x226fc7, + 0x226fc8, + 0x227ac9, + 0x3a8b48, + 0x311007, + 0x20b383, + 0x22bf46, + 0x298fc8, + 0x2ba74a, + 0x2094c9, + 0x211403, + 0x328f86, + 0x2618ca, + 0x23a747, + 0x30874a, + 0x34018e, + 0x221486, + 0x318947, + 0x34f706, + 0x240d86, + 0x20748b, + 0x39710a, + 0x27630d, + 0x212347, + 0x265388, + 0x265389, + 0x26538f, + 0x30440c, + 0x263289, + 0x3d28ce, + 0x322f4a, + 0x3c2b46, + 0x2fdb86, + 0x31ef4c, + 0x32018c, + 0x322208, + 0x35a347, + 0x37c545, + 0x2297c4, + 0x36a6ce, + 0x262584, + 0x329687, + 0x39d78a, + 0x3d3b54, + 0x3d64cf, + 0x2207c8, + 0x22be08, + 0x3625cd, + 0x3625ce, + 0x22c289, + 0x22d408, + 0x22d40f, + 0x23288c, + 0x23288f, + 0x233a47, + 0x235f0a, + 0x23d64b, + 0x237788, + 0x238b87, + 0x25bfcd, + 0x330106, + 0x3082c6, + 0x23b289, + 0x3dbb88, + 0x240b88, + 0x240b8e, + 0x20f747, + 0x2fbb45, + 0x242505, + 0x207a84, + 0x32a486, + 0x28bf08, + 0x374883, + 0x2e16ce, + 0x25c388, + 0x2a704b, + 0x26fd07, + 0x26ae45, + 0x287806, + 0x2aeb47, + 0x31b4c8, + 0x34b8c9, + 0x3cc205, + 0x287c88, + 0x222e86, + 0x3a35ca, + 0x36a5c9, + 0x232c49, + 0x232c4b, + 0x339748, + 0x345649, + 0x2edb46, + 0x28f0ca, + 0x36764a, + 0x23610c, + 0x368807, + 0x26c50a, + 0x2e5b0b, + 0x2e5b19, + 0x324888, + 0x240a05, + 0x25c186, + 0x217d09, + 0x26cc06, + 0x236d8a, + 0x2114c6, + 0x20d644, + 0x2cbb0d, + 0x344147, + 0x20d649, + 0x244745, + 0x245148, + 0x2472c9, + 0x249204, + 0x249e87, + 0x249e88, + 0x24a2c7, + 0x264208, + 0x24ef47, + 0x36bfc5, + 0x256e4c, + 0x257309, + 0x2d908a, + 0x3a6609, + 0x2ef3c9, + 0x3889cc, + 0x25a18b, + 0x25ad08, + 0x25c8c8, + 0x260284, + 0x284fc8, + 0x286209, + 0x2b1987, + 0x213f06, + 0x2a0e07, + 0x29bc49, + 0x20624b, + 0x35cd07, + 0x216687, + 0x3c5247, + 0x3cedc4, + 0x3cedc5, + 0x2daec5, + 0x358e8b, + 0x3b40c4, + 0x326948, + 0x2f9a0a, + 0x222f47, + 0x3c8e87, + 0x290552, + 0x292586, + 0x22f446, + 0x28e40e, + 0x296b86, + 0x296008, + 0x29664f, + 0x3cf208, + 0x3b1148, + 0x34200a, + 0x342011, + 0x2a5c4e, + 0x2536ca, + 0x2536cc, + 0x22d607, + 0x22d610, + 0x3bee08, + 0x2a5e45, + 0x2aee4a, + 0x3c5d8c, + 0x29868d, + 0x3b0c46, + 0x3b0c47, + 0x3b0c4c, + 0x3bd2cc, + 0x36f70c, + 0x2c4c4b, + 0x38c184, + 0x2e5bc4, + 0x2b1189, + 0x34abc7, + 0x37d789, + 0x367489, + 0x2b1587, + 0x2b1746, + 0x2b1749, + 0x2b1b43, + 0x2c660a, + 0x373cc7, + 0x3c05cb, + 0x27618a, + 0x388144, + 0x32fd06, + 0x282349, + 0x36c284, + 0x2f480a, + 0x245005, + 0x2c16c5, + 0x2c16cd, + 0x2c1a0e, + 0x2c1585, + 0x339b86, + 0x240587, + 0x3db90a, + 0x2569c6, + 0x37c044, + 0x30ed87, + 0x2ee38b, + 0x263f07, + 0x24aac4, + 0x27a306, + 0x27a30d, + 0x2dd88c, + 0x20a6c6, + 0x21554a, + 0x229886, + 0x2147c8, + 0x35b747, + 0x2c93ca, + 0x23b006, + 0x212243, + 0x220286, + 0x298e48, + 0x22fb0a, + 0x2d2dc7, + 0x2d2dc8, + 0x25af84, + 0x290ac7, + 0x2d3288, + 0x292788, + 0x2f1b08, + 0x2b808a, + 0x2e2a45, + 0x2db407, + 0x253513, + 0x268f86, + 0x3dabc8, + 0x224609, + 0x240088, + 0x2ff44b, + 0x3a4bc8, + 0x2b92c4, + 0x21aac6, + 0x320906, + 0x31c309, + 0x2c9207, + 0x256f48, + 0x2a1c06, 0x200bc4, - 0x3a5005, - 0x2cef08, + 0x3a0e45, + 0x2cf888, 0x201d8a, - 0x2cae48, - 0x2d0246, - 0x29cc4a, - 0x28e8c8, - 0x2d57c8, - 0x2d6d48, - 0x2d7546, - 0x2da186, - 0x3aad0c, - 0x2da650, - 0x2a2c05, - 0x3547c8, - 0x3b48d0, - 0x3547d0, - 0x3a5dce, - 0x3aa98e, - 0x3aa994, - 0x3b164f, - 0x3b1a06, - 0x202151, - 0x330b93, - 0x331008, - 0x32efc5, - 0x316308, - 0x383a45, - 0x33580c, - 0x295f49, - 0x22ac09, - 0x2fa547, - 0x265e49, - 0x387887, - 0x35cfc6, - 0x284307, - 0x204005, - 0x208d83, - 0x23fc83, - 0x210484, - 0x34290d, - 0x34944f, + 0x2cb788, + 0x2d0846, + 0x29cd0a, + 0x26e708, + 0x2d4888, + 0x2d6288, + 0x2d6ac6, + 0x2d9646, + 0x3a60cc, + 0x2d9bd0, + 0x2ade05, + 0x3b6408, + 0x3b6410, + 0x3cf010, + 0x3a1c0e, + 0x3a5d4e, + 0x3a5d54, + 0x3ad7cf, + 0x3adb86, + 0x345851, + 0x343a93, + 0x343f08, + 0x369c05, + 0x27aa88, + 0x2097c5, + 0x329d8c, + 0x229189, + 0x229609, + 0x3dd547, + 0x340649, + 0x236947, + 0x35e746, + 0x285647, + 0x203885, + 0x2080c3, + 0x23a183, + 0x20fc44, + 0x30128d, + 0x34bc8f, 0x200c05, - 0x335706, - 0x212b07, - 0x2170c7, - 0x207b46, - 0x207b4b, - 0x2a5705, - 0x25af46, - 0x300847, - 0x252ec9, - 0x21fcc6, - 0x389205, - 0x36820b, - 0x3a8f06, - 0x207f45, - 0x241d88, - 0x292808, - 0x2a77cc, - 0x2a77d0, - 0x3524c9, - 0x2b2b47, - 0x34e14b, - 0x2e59c6, - 0x3ac84a, - 0x306a4b, - 0x2e85ca, - 0x2e8846, - 0x2e9205, - 0x3249c6, - 0x27c588, - 0x2fa60a, - 0x3613dc, - 0x2f108c, - 0x2f1388, - 0x22a7c5, - 0x38ef47, - 0x2b7ec6, - 0x367985, - 0x216b46, - 0x207d08, - 0x2bedc7, - 0x2b8188, - 0x26b3ca, - 0x212c0c, - 0x3331c9, - 0x2e2347, - 0x227784, - 0x246b46, - 0x39b54a, - 0x2b4a05, - 0x215a4c, - 0x219408, - 0x28eb48, - 0x227d4c, - 0x3d2c4c, - 0x2dc509, - 0x2dc747, - 0x35b44c, - 0x220284, - 0x24baca, - 0x309ccc, - 0x25204b, - 0x25450b, - 0x254c06, - 0x257c47, - 0x230e07, - 0x230e0f, - 0x303551, - 0x2e03d2, - 0x25a48d, - 0x25a48e, - 0x25a7ce, - 0x3b1808, - 0x3b1812, - 0x262b08, - 0x221987, - 0x250bca, - 0x2a86c8, - 0x293245, - 0x2b5e4a, - 0x21cf07, - 0x2e6804, + 0x333a46, + 0x212887, + 0x397547, + 0x204206, + 0x20420b, + 0x2a6a85, + 0x258b46, + 0x305f87, + 0x24f449, + 0x2211c6, + 0x3855c5, + 0x3ba74b, + 0x3b0946, + 0x2137c5, + 0x23f088, + 0x291988, + 0x29f94c, + 0x29f950, + 0x2a2749, + 0x2b71c7, + 0x2b22cb, + 0x2c1f86, + 0x310eca, + 0x3da94b, + 0x30cc4a, + 0x2eca86, + 0x2ed205, + 0x32d7c6, + 0x286bc8, + 0x3dd60a, + 0x36225c, + 0x2f568c, + 0x2f5988, + 0x240985, + 0x38b9c7, + 0x2ba0c6, + 0x3b9505, + 0x218086, + 0x2043c8, + 0x2c0647, + 0x2ba388, + 0x26904a, + 0x3a978c, + 0x374b09, + 0x3a9a07, + 0x286744, + 0x2425c6, + 0x300b4a, + 0x367585, + 0x216f8c, + 0x21a0c8, + 0x2e4ac8, + 0x34ea0c, + 0x35a64c, + 0x387c89, + 0x387ec7, + 0x370b8c, + 0x222104, + 0x24a04a, + 0x30f80c, + 0x25038b, + 0x250a0b, + 0x253c46, + 0x256b07, + 0x22d847, + 0x22d84f, + 0x309cd1, + 0x2dfa92, + 0x257bcd, + 0x257bce, + 0x257f0e, + 0x3ad988, + 0x3ad992, + 0x260408, + 0x224c47, + 0x24d44a, + 0x2a95c8, + 0x296b45, + 0x2b484a, + 0x21c887, + 0x2e99c4, 0x201783, - 0x237b05, - 0x343dc7, - 0x306547, - 0x29964e, - 0x31e1cd, - 0x3372c9, - 0x248405, - 0x356b83, - 0x34bf46, - 0x25b545, - 0x2a5f08, - 0x321b09, - 0x25e885, - 0x25e88f, - 0x2d9047, - 0x2138c5, - 0x27238a, - 0x3dc646, - 0x2f3f49, - 0x38200c, - 0x3cbd09, - 0x205b86, - 0x2f458c, - 0x33d6c6, - 0x3013c8, - 0x301cc6, - 0x340fc6, - 0x2b6944, - 0x315343, - 0x318f4a, - 0x32bf11, - 0x26c5ca, - 0x25c9c5, - 0x27e1c7, - 0x257107, - 0x2d6844, - 0x2d684b, - 0x209908, - 0x2bdbc6, - 0x233d05, - 0x322804, - 0x234449, + 0x235b45, + 0x342287, + 0x355047, + 0x29888e, + 0x3355cd, + 0x33c809, + 0x319c85, + 0x358243, + 0x34a646, + 0x259145, + 0x2a7288, + 0x21e489, + 0x25c1c5, + 0x25c1cf, + 0x2d2547, + 0x20cf45, + 0x2706ca, + 0x3c1586, + 0x245e09, + 0x37818c, + 0x3addc9, + 0x3d7046, + 0x2f980c, + 0x3390c6, + 0x307648, + 0x2e5a06, + 0x3645c6, + 0x2b5844, + 0x31c283, + 0x221a4a, + 0x3037d1, + 0x26344a, + 0x246685, + 0x25a5c7, + 0x254047, + 0x2d3384, + 0x2d338b, + 0x21d048, + 0x2bf146, + 0x2315c5, + 0x32b944, + 0x2410c9, 0x2008c4, - 0x243ac7, - 0x349b05, - 0x349b07, - 0x320085, - 0x2535c3, - 0x221848, - 0x31650a, - 0x2172c3, - 0x2172ca, - 0x279006, - 0x25e60f, - 0x3d16c9, - 0x2f1890, - 0x2f7908, - 0x2d0749, - 0x29a347, - 0x310f4f, - 0x3977c4, - 0x2dbb84, - 0x21ca06, - 0x3ac686, - 0x2e7e8a, - 0x250346, - 0x398f87, - 0x30a7c8, - 0x30a9c7, - 0x30be87, - 0x30d84a, - 0x30c78b, - 0x32b1c5, - 0x2e0008, - 0x21b803, - 0x3c02cc, - 0x361acf, - 0x236e8d, - 0x257707, - 0x337409, - 0x22bac7, - 0x240b48, - 0x22e04c, - 0x287bc8, - 0x23ba88, - 0x328d4e, - 0x347494, - 0x3479a4, - 0x35e78a, - 0x37eacb, - 0x387944, - 0x387949, - 0x2eda08, - 0x247245, - 0x332a4a, - 0x291287, - 0x21f004, - 0x24af03, - 0x22f743, - 0x2375c4, - 0x234e83, - 0x224943, - 0x221b84, - 0x214503, - 0x211d83, - 0x2da646, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x214e03, + 0x20c3c7, + 0x34cf05, + 0x34cf07, + 0x28e645, + 0x247d03, + 0x224b08, + 0x27ac8a, + 0x24e4c3, + 0x39774a, + 0x36c746, + 0x25bf4f, + 0x3d2009, + 0x2e1650, + 0x2fcbc8, + 0x2d1689, + 0x29a087, + 0x27a28f, + 0x38f304, + 0x2db244, + 0x21c386, + 0x243206, + 0x2ed5ca, + 0x252f86, + 0x395207, + 0x311348, + 0x311547, + 0x312a07, + 0x314aca, + 0x31330b, + 0x251a45, + 0x2df6c8, + 0x20ae83, + 0x3bcd4c, + 0x37c2cf, + 0x3c0d8d, + 0x257747, + 0x33c949, + 0x2312c7, + 0x267e48, + 0x3d3d4c, + 0x2b91c8, + 0x246388, + 0x33104e, + 0x348c94, + 0x3491a4, + 0x35ff0a, + 0x37bccb, + 0x236a04, + 0x236a09, + 0x2b5448, + 0x242d05, + 0x37438a, + 0x285b07, + 0x322c44, + 0x248343, + 0x22c0c3, + 0x235604, + 0x232c43, + 0x228b03, + 0x224e44, + 0x214543, + 0x211543, + 0x2d9bc6, + 0x217b84, + 0x20a803, + 0x216603, + 0x216103, 0x2000c2, - 0x24af03, - 0x203102, - 0x22f743, - 0x2375c4, - 0x234e83, - 0x224943, - 0x214503, - 0x2da646, - 0x20ce83, - 0x23f7c3, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x20d343, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x209c04, - 0x20ce83, - 0x23f7c3, + 0x248343, + 0x20c302, + 0x22c0c3, + 0x235604, + 0x232c43, + 0x228b03, + 0x214543, + 0x2d9bc6, + 0x20a803, + 0x216603, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x212483, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x217b84, + 0x20a803, + 0x216603, 0x2000c2, - 0x24e8c3, - 0x203102, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x207982, - 0x247502, - 0x203102, - 0x22f743, - 0x2037c2, + 0x258783, + 0x20c302, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x204042, + 0x209382, + 0x20c302, + 0x22c0c3, + 0x207902, 0x2005c2, - 0x221b84, - 0x346484, - 0x2254c2, - 0x209c04, + 0x224e44, + 0x303f84, + 0x22b302, + 0x217b84, 0x2003c2, - 0x23f7c3, - 0x214e03, - 0x254c06, - 0x210782, - 0x204cc2, - 0x222082, - 0x5421f943, - 0x54602283, - 0x57a46, - 0x57a46, - 0x250784, - 0x204783, - 0x8d9ca, - 0x14b54c, - 0x18840c, - 0xc9e8d, - 0x129245, - 0x8d14c, - 0x26807, - 0xd886, - 0x14a08, - 0x1b587, - 0x20048, - 0x19458a, - 0x109547, - 0x5528d385, - 0xdd949, - 0x3670b, - 0x1872cb, - 0x1c7a88, - 0x11f09, - 0x153a4a, - 0x17f08e, - 0x8f58d, - 0x1442fcb, - 0xdde8a, - 0xc284, - 0x5b086, - 0x12a3c8, - 0x18d648, - 0x39dc7, - 0xac85, - 0x10607, - 0x35309, - 0x1385c7, - 0xfcc8, - 0x229c9, - 0x48cc4, - 0x49945, - 0x16388e, - 0x18d2cd, - 0x11d08, - 0x556a1146, - 0x561669c8, - 0x772c8, - 0x13f6d0, - 0x5504c, - 0x636c7, - 0x64a07, - 0x6a8c7, - 0x73747, - 0x4582, - 0x113707, - 0x16e4c, - 0x17ba45, - 0x126bc7, - 0xa7686, - 0xa8c49, - 0xac2c8, - 0x5dc2, + 0x216603, + 0x216103, + 0x253c46, + 0x20ff42, + 0x205402, + 0x225242, + 0x55a08683, + 0x55e2d603, + 0x54b86, + 0x54b86, + 0x242244, + 0x20ca43, + 0x14114d, + 0x8bd8a, + 0x1bc1cc, + 0x1b338c, + 0xca7cd, + 0x12eb85, + 0x8b50c, + 0x6bb47, + 0xbec6, + 0x15d08, + 0x1ae07, + 0x21ec8, + 0x19974a, + 0x10f087, + 0x56a8b745, + 0xdc1c9, + 0x56c344cb, + 0x920b, + 0x1846c8, + 0x14dd89, + 0x6828a, + 0xe56ce, + 0x7d4d, + 0x2c28d, + 0x143fe8b, + 0xdd74a, + 0xd944, + 0x58c86, + 0x1bd708, + 0x18a0c8, + 0x67607, + 0xa0c5, + 0xfdc7, + 0x330c9, + 0x16c307, + 0xe688, + 0x2b5c9, + 0x4a444, + 0x4d185, + 0x13fe4e, + 0x189d4d, + 0x114c8, + 0x57293106, + 0x57d72f88, + 0x74388, + 0x13b0d0, + 0x510cc, + 0x60fc7, + 0x62447, + 0x68607, + 0x71487, + 0x4c02, + 0x122587, + 0x1972cc, + 0xfe445, + 0x35147, + 0xa8946, + 0xaa289, + 0xac0c8, + 0x4742, 0x5c2, - 0x190b46, - 0x1a87cb, - 0x1a8ac6, - 0x175f44, - 0x133a87, + 0x18ce06, + 0x1ba00b, + 0x1ba306, + 0xbe384, + 0x1753c7, + 0xe3389, + 0x6dc89, + 0x1432c8, + 0x48902, + 0x191f89, + 0xbac8, + 0xe9a8a, + 0x38909, + 0x52946, + 0xce3c9, + 0xdd6c7, + 0xdde09, + 0xdef08, + 0xe0f87, + 0xe29c9, + 0xe8ec5, + 0xe9250, + 0x155886, + 0x175305, + 0x114587, + 0x3950d, + 0x3ef85, + 0xef1c6, + 0xef9c7, + 0xf61d8, + 0x11848, + 0xbe7ca, + 0xa982, + 0x507ca, + 0x6284d, + 0x2e42, + 0x13686, + 0x9d488, + 0xabe4a, + 0x45948, 0x6d309, - 0x53889, - 0x120648, - 0x4b4c2, - 0x195789, - 0xd488, - 0xe7cca, - 0x12eac6, - 0xcd7c9, - 0xdde07, - 0xde549, - 0xdf8c8, - 0xe0887, - 0xe1909, - 0xe4485, - 0xe4810, - 0x1bb506, - 0x1339c5, - 0x930c7, - 0x6d84d, - 0x41c85, - 0xeb046, - 0xeb887, - 0xf2498, - 0x138948, - 0x17638a, - 0x129c2, - 0x542ca, - 0x64e0d, - 0x5c82, - 0x1c6b46, - 0x9d3c8, - 0x18fe88, - 0x70949, - 0x10b488, - 0x74e4e, - 0x70b88, - 0x14bf47, - 0x56766904, - 0xecd4d, - 0xfc9c5, - 0x1769c8, - 0x1ac248, - 0x105546, - 0x13602, - 0x72d04, - 0x64cc6, - 0xfd986, - 0x56934b0b, - 0x8c42, + 0x111788, + 0x7768e, + 0x6d548, + 0x14a647, + 0x58293044, + 0x14e70d, + 0x102f05, + 0x3148, + 0x42dc8, + 0x10c246, + 0x14302, + 0x92c04, + 0x62706, + 0x3e006, + 0x58532e4b, + 0x57c2, 0x401, - 0x5d807, - 0x10d203, - 0x55af2d04, - 0x55e98183, + 0x81, + 0x5a947, + 0x8d9c3, + 0x576f67c4, + 0x57a973c3, 0xc1, - 0x1cf0c6, + 0x1a286, 0xc1, 0x201, - 0x1cf0c6, - 0x10d203, - 0x50803, - 0x81b84, - 0x305c7, - 0x50c7, - 0x145d285, - 0x4ff04, - 0x63807, - 0x3102, - 0x23d544, - 0x22f743, - 0x24f044, - 0x221b84, - 0x20ce83, - 0x221205, - 0x2158c3, - 0x259703, - 0x207ac5, - 0x2050c3, - 0x6e83, - 0x57a2f743, - 0x234e83, - 0x4f044, + 0x1a286, + 0x8d9c3, + 0x422c3, + 0x46e44, + 0x14947, + 0x5b07, + 0x153e145, + 0x4cec4, + 0x61107, + 0xc302, + 0x249f84, + 0x22c0c3, + 0x24b304, + 0x224e44, + 0x20a803, + 0x2244c5, + 0x216e03, + 0x236bc3, + 0x204185, + 0x205b03, + 0xdd43, + 0x5962c0c3, + 0x232c43, + 0x4b304, 0x20c3, - 0x224943, + 0x228b03, 0x200181, - 0xe943, - 0x211d83, - 0x346484, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x202443, - 0xa7c88, + 0xe403, + 0x211543, + 0x303f84, + 0x217b84, + 0x20a803, + 0x4bbc3, + 0x216603, + 0x20c603, + 0x9fe08, 0x2000c2, - 0x24af03, - 0x203102, - 0x22f743, - 0x234e83, - 0x20d343, + 0x248343, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x212483, 0x2005c2, - 0x221b84, - 0x214503, - 0x211d83, - 0x20ce83, - 0x204783, - 0x23f7c3, - 0x2050c3, - 0xa7c88, - 0x1daa47, - 0x3102, - 0x1a4f85, - 0x5518f, - 0xd8ec6, - 0x14441c8, - 0x10b88e, - 0x58a06dc2, - 0x324048, - 0x28e106, - 0x250086, - 0x305fc7, - 0x58e00c82, - 0x593d1548, - 0x210eca, - 0x263148, + 0x224e44, + 0x214543, + 0x211543, + 0x20a803, + 0x20ca43, + 0x216603, + 0x205b03, + 0x17c204, + 0x9fe08, + 0x103c87, + 0xc302, + 0x1a0dc5, + 0x5120f, + 0xd23c6, + 0x14470c8, + 0x11240e, + 0x5a631802, + 0x32ce48, + 0x28c4c6, + 0x24d046, + 0x30e787, + 0x5aa00c82, + 0x5afd1e88, + 0x21068a, + 0x260a48, 0x200ac2, - 0x3167c9, - 0x32b207, - 0x213186, - 0x221589, - 0x2e1d44, - 0x206586, - 0x2c5144, - 0x295a04, - 0x258c89, - 0x309a06, - 0x2270c5, - 0x267345, - 0x22fe87, - 0x2c2207, - 0x292c84, - 0x35aa06, - 0x2f3705, - 0x20fe45, - 0x25ca85, - 0x2b0587, - 0x271805, - 0x24a549, - 0x321605, - 0x313b04, - 0x2daf07, - 0x32e50e, - 0x36afc9, - 0x31fd09, - 0x344706, - 0x240288, - 0x244b0b, - 0x36950c, - 0x34d146, - 0x32cd87, - 0x2b3f45, - 0x215dca, - 0x28dd49, + 0x3c0409, + 0x251a87, + 0x213e86, + 0x224849, + 0x2db544, + 0x3c0306, + 0x2c7144, + 0x203584, + 0x2560c9, + 0x30f546, + 0x229cc5, + 0x264f45, + 0x22cac7, + 0x2c3887, + 0x2f53c4, + 0x35c0c6, + 0x2f9145, + 0x20e805, + 0x246745, + 0x2c4f47, + 0x26fb45, + 0x247749, + 0x329945, + 0x31b604, + 0x256907, + 0x33ed4e, + 0x343689, + 0x28e2c9, + 0x33de06, + 0x23ce88, + 0x3c208b, + 0x36828c, + 0x324046, + 0x2ffe07, + 0x2b34c5, + 0x21730a, + 0x28c109, 0x2013c9, - 0x3d6746, - 0x300605, - 0x246e05, - 0x354009, - 0x25cc0b, - 0x3a9786, - 0x352886, - 0x2044c4, - 0x26de46, - 0x2f66c8, - 0x3ba3c6, - 0x2aa506, - 0x3ce108, - 0x3d4887, - 0x3d6509, - 0x3d9a85, - 0xa7c88, - 0x3cbb84, - 0x30c404, - 0x20b805, - 0x345409, - 0x220d87, - 0x220d8b, - 0x223b8a, - 0x2293c5, - 0x5960f7c2, - 0x2c60c7, - 0x59a2a9c8, - 0x3d6987, - 0x2c8445, - 0x34678a, - 0x3102, - 0x27b24b, - 0x27f0ca, - 0x24a9c6, - 0x207683, - 0x2aee0d, - 0x3ade4c, - 0x3dcb8d, - 0x232985, - 0x27bf05, - 0x332f87, - 0x20a3c9, - 0x210dc6, - 0x2501c5, - 0x2ea2c8, - 0x26dd43, - 0x2f9748, - 0x26dd48, - 0x2c71c7, - 0x36aac8, - 0x3adc49, - 0x2d0f07, - 0x2c58c7, - 0x25d108, - 0x29b744, - 0x29b747, - 0x30d4c8, - 0x35ee06, - 0x37c6cf, - 0x26d507, - 0x35a506, - 0x2dc885, - 0x222203, - 0x248b47, - 0x38b103, - 0x24e006, - 0x24fe06, - 0x251286, - 0x295605, - 0x266703, - 0x395408, - 0x38de49, - 0x39da0b, - 0x251408, - 0x252685, - 0x253d85, - 0x59eb1d82, - 0x2843c9, - 0x221c07, - 0x25afc5, - 0x258b87, - 0x25a346, - 0x383485, - 0x25b38b, - 0x25dbc4, - 0x262d05, - 0x262e47, - 0x279746, - 0x279b85, - 0x286d47, - 0x287947, - 0x2d7f44, - 0x28cf4a, - 0x28ed48, - 0x244dc9, - 0x36a0c5, - 0x2b42c6, - 0x2f688a, - 0x267246, - 0x22e407, - 0x2c954d, - 0x2a5249, - 0x36b2c5, - 0x321d07, - 0x32e908, - 0x330008, - 0x3491c7, - 0x367306, - 0x2195c7, - 0x24f243, - 0x309984, - 0x380f85, - 0x3aa087, - 0x3afcc9, - 0x226488, - 0x22e305, - 0x249204, - 0x25dd85, - 0x266acd, + 0x3d9f06, + 0x305d45, + 0x242885, + 0x355449, + 0x2468cb, + 0x2772c6, + 0x354546, + 0x204b44, + 0x239b06, + 0x2fbbc8, + 0x3bc0c6, + 0x2eb006, + 0x3cf9c8, + 0x3d6e47, + 0x3d9cc9, + 0x3de005, + 0x9fe08, + 0x3cc184, + 0x312f84, + 0x208345, + 0x346b09, + 0x222c07, + 0x222c0b, + 0x225a4a, + 0x2290c5, + 0x5b20b382, + 0x20ebc7, + 0x5b6293c8, + 0x328887, + 0x2dd185, + 0x347e8a, + 0xc302, + 0x2795cb, + 0x27deca, + 0x247bc6, + 0x2081c3, + 0x291f0d, + 0x3c084c, + 0x3c1acd, + 0x2304c5, + 0x27cb85, + 0x3748c7, + 0x207909, + 0x210586, + 0x252e05, + 0x2ec888, + 0x239a03, + 0x2e2ec8, + 0x239a08, + 0x2c8907, + 0x369588, + 0x3afa49, + 0x2fb787, + 0x20f1c7, + 0x33dfc8, + 0x29b484, + 0x29b487, + 0x314748, + 0x360586, + 0x3c3e4f, + 0x22a5c7, + 0x35bbc6, + 0x388005, + 0x2253c3, + 0x243c47, + 0x3874c3, + 0x24a686, + 0x24cdc6, + 0x24db06, + 0x294d45, + 0x264203, + 0x391c08, + 0x38a8c9, + 0x39a24b, + 0x24dc88, + 0x24ec05, + 0x24fe45, + 0x5bab12c2, + 0x285709, + 0x224ec7, + 0x258bc5, + 0x255fc7, + 0x257a86, + 0x3804c5, + 0x258f8b, + 0x25ad04, + 0x260605, + 0x260747, + 0x276c46, + 0x277085, + 0x2851c7, + 0x285cc7, + 0x2d0d84, + 0x28b30a, + 0x28cd48, + 0x3c2349, + 0x394785, + 0x32f406, + 0x2fbd8a, + 0x264e46, + 0x231047, + 0x26c88d, + 0x2a65c9, + 0x390885, + 0x36ac47, + 0x252788, + 0x2f7288, + 0x3a8d07, + 0x3affc6, + 0x2230c7, + 0x24b503, + 0x30f4c4, + 0x37dc05, + 0x3a5447, + 0x3ab0c9, + 0x26b7c8, + 0x230f45, + 0x2530c4, + 0x24de45, + 0x25ca8d, 0x200cc2, - 0x2b71c6, - 0x259b86, - 0x2f8d0a, - 0x394dc6, - 0x39b485, - 0x2c5605, - 0x2c5607, - 0x3a780c, - 0x27714a, - 0x290506, - 0x202fc5, - 0x26dc86, - 0x290687, - 0x292e86, - 0x29550c, - 0x2216c9, - 0x5a3cf547, - 0x2971c5, - 0x2971c6, - 0x297c08, - 0x2bcd85, - 0x2a5985, - 0x2a6c88, - 0x2a6e8a, - 0x5a67bc02, - 0x5aa05942, - 0x2fd185, - 0x26c143, - 0x22bf08, - 0x20bbc3, - 0x2a7104, - 0x2f408b, - 0x3ce688, - 0x31be08, - 0x5af26609, - 0x2ad349, + 0x2b6606, + 0x2d7a86, + 0x301bca, + 0x3915c6, + 0x398245, + 0x2c7605, + 0x2c7607, + 0x3a340c, + 0x27420a, + 0x290206, + 0x21fb05, + 0x239946, + 0x290387, + 0x292d06, + 0x294c4c, + 0x224989, + 0x5be1a707, + 0x296a05, + 0x296a06, + 0x296e48, + 0x245785, + 0x2a6d05, + 0x2a7f48, + 0x2a814a, + 0x5c21efc2, + 0x5c606a02, + 0x3ac085, + 0x266803, + 0x23dc88, + 0x245f43, + 0x2a83c4, + 0x245f4b, + 0x368688, + 0x2b2788, + 0x5cae7489, + 0x2ad149, 0x2adb06, - 0x2ae808, - 0x2aea09, - 0x2afd86, - 0x2aff05, - 0x249346, - 0x2b0749, - 0x2ba387, - 0x2fdf06, - 0x21d0c7, - 0x36c987, - 0x21fac4, - 0x5b338c49, - 0x367bc8, - 0x3d1448, - 0x239f07, - 0x2ca906, - 0x204a09, - 0x250047, - 0x36744a, - 0x37b0c8, - 0x20cf87, - 0x20ed46, - 0x28c74a, - 0x2ff188, - 0x2e68c5, - 0x227385, - 0x355107, - 0x311c49, - 0x3179cb, - 0x36dec8, - 0x321689, - 0x251b47, - 0x2bc08c, - 0x2bc94c, - 0x2bcc4a, - 0x2bcecc, - 0x2c4cc8, - 0x2c4ec8, - 0x2c50c4, - 0x2c6949, - 0x2c6b89, - 0x2c6dca, - 0x2c7049, - 0x2c7387, - 0x3d6d4c, - 0x20d986, - 0x2c8f08, - 0x267306, - 0x3a35c6, - 0x36b1c7, - 0x36bd08, - 0x206b4b, - 0x3d6847, - 0x258949, - 0x27e309, - 0x2845c7, - 0x2c5384, + 0x2ae7c8, + 0x2ae9c9, + 0x2af346, + 0x2af4c5, + 0x244246, + 0x2afa09, + 0x2bf9c7, + 0x3ddac6, + 0x2dd507, + 0x2e77c7, + 0x208804, + 0x5ce11b49, + 0x3b9748, + 0x3d1d88, + 0x267747, + 0x2cb246, + 0x3c6b89, + 0x24d007, + 0x3b8fca, + 0x32f548, + 0x3bd087, + 0x3c1086, + 0x27d88a, + 0x241b88, + 0x2d7505, + 0x228345, + 0x3359c7, + 0x316049, + 0x31828b, + 0x354048, + 0x3299c9, + 0x24e087, + 0x2bae4c, + 0x2bb8cc, + 0x2bbbca, + 0x2bbe4c, + 0x2c6cc8, + 0x2c6ec8, + 0x2c70c4, + 0x2c8089, + 0x2c82c9, + 0x2c850a, + 0x2c8789, + 0x2c8ac7, + 0x3b4f4c, + 0x3c62c6, + 0x26c248, + 0x264f06, + 0x38ebc6, + 0x390787, + 0x39f348, + 0x32a68b, + 0x3da007, + 0x255d89, + 0x25a709, + 0x285907, + 0x2c7384, 0x200fc7, - 0x2fe8c6, - 0x20e3c6, - 0x2f85c5, - 0x3d8108, - 0x295e44, - 0x295e46, - 0x27700b, - 0x371489, - 0x23aec6, - 0x2aa709, - 0x20b8c6, + 0x2cfec6, + 0x20c7c6, + 0x215705, + 0x2ce588, + 0x340544, + 0x340546, + 0x2740cb, + 0x2c6909, + 0x31fc86, + 0x2eb209, + 0x208406, 0x201f88, - 0x20fb43, - 0x300785, - 0x21bdc9, - 0x221d85, - 0x353404, - 0x2785c6, - 0x237485, - 0x2553c6, - 0x310047, - 0x34a406, - 0x22c7cb, - 0x36b9c7, - 0x247c46, - 0x2dcd86, - 0x22ff46, - 0x292c49, - 0x2f200a, - 0x2bdec5, - 0x3a900d, - 0x2a6f86, - 0x2f4986, - 0x2f1786, - 0x2303c5, - 0x2e4b07, - 0x225dc7, - 0x275c0e, - 0x211d83, - 0x2ca8c9, - 0x333449, - 0x22fbc7, - 0x26bc07, - 0x2a0b85, - 0x22e8c5, - 0x5b73174f, - 0x2d0987, - 0x2d0b48, - 0x2d2284, - 0x2d2586, - 0x5ba46b02, - 0x2d77c6, - 0x2da646, - 0x33360e, - 0x2f958a, - 0x3d1cc6, - 0x21ae4a, - 0x3dc989, - 0x23e105, - 0x3b21c8, - 0x31e486, - 0x29e0c8, - 0x2fbb08, - 0x27ad0b, - 0x3060c5, - 0x271888, - 0x3ce24c, - 0x2c8307, - 0x250b06, - 0x2fa0c8, - 0x206808, - 0x5be4dc02, - 0x20634b, - 0x3d9c89, - 0x28d809, - 0x21bc47, - 0x3a8d48, - 0x5c39b048, - 0x20c8cb, - 0x3204c9, - 0x25c24d, - 0x320ec8, - 0x28c948, - 0x5c601e02, - 0x31fc44, - 0x5ca28002, - 0x3b1fc6, - 0x5ce06ec2, - 0x2ee48a, - 0x2a5806, - 0x26c9c8, - 0x3c11c8, - 0x255d06, - 0x32d286, - 0x2f7686, - 0x2a5e85, - 0x23a104, - 0x5d229a44, - 0x357fc6, - 0x298687, - 0x5d60d5c7, - 0x38d08b, - 0x3d6b89, - 0x27bf4a, - 0x2039c4, - 0x2c5748, - 0x2fdccd, - 0x2efb09, - 0x2efd48, - 0x2effc9, - 0x2f2484, - 0x246684, - 0x39f245, - 0x36988b, - 0x3ce606, - 0x357e05, - 0x2dc089, - 0x35aac8, - 0x229bc4, - 0x215f49, - 0x3d2685, - 0x2c2248, - 0x2c5f87, - 0x320108, - 0x283c86, - 0x3b9b07, - 0x2df3c9, - 0x368389, - 0x207fc5, - 0x2af585, - 0x5da0a202, - 0x3138c4, - 0x212e85, - 0x305ec6, - 0x312845, - 0x2bac47, - 0x2eedc5, - 0x21dd04, - 0x3447c6, - 0x250247, - 0x2331c6, - 0x318745, - 0x20b208, - 0x28e305, - 0x20e8c7, - 0x21f309, - 0x3715ca, - 0x226987, - 0x22698c, - 0x227086, - 0x23f649, - 0x3826c5, - 0x38fc08, - 0x225003, - 0x2ed345, - 0x2fe585, - 0x27da07, - 0x5de01482, - 0x2ea607, - 0x2e5b06, - 0x37e946, - 0x2e9086, - 0x206746, - 0x2fed88, - 0x316445, - 0x35a5c7, - 0x35a5cd, + 0x20e503, + 0x305ec5, + 0x21b649, + 0x21bec5, + 0x380d84, + 0x2755c6, + 0x2354c5, + 0x207f06, + 0x316887, + 0x34b4c6, + 0x22ab4b, + 0x28efc7, + 0x243946, + 0x272506, + 0x22cb86, + 0x2f5389, + 0x2b884a, + 0x2f9d45, + 0x22850d, + 0x2a8246, + 0x23aec6, + 0x2e1546, + 0x214745, + 0x2e9547, + 0x26b107, + 0x272c8e, + 0x211543, + 0x2cb209, + 0x374d89, + 0x22c807, + 0x269887, + 0x292905, + 0x36b7c5, + 0x5d34464f, + 0x2d18c7, + 0x2d1a88, + 0x2d1fc4, + 0x2d2286, + 0x5d642582, + 0x2d6d46, + 0x2d9bc6, + 0x374f4e, + 0x2e2d0a, + 0x3d2606, + 0x219b8a, + 0x3c18c9, + 0x23bd85, + 0x307b08, + 0x335886, + 0x2b1388, + 0x3dbd48, + 0x27b58b, + 0x30e885, + 0x26fbc8, + 0x3cfb0c, + 0x2dd047, + 0x24d386, + 0x3dd0c8, + 0x32a348, + 0x5da39242, + 0x208ccb, + 0x3de209, + 0x28bbc9, + 0x21b4c7, + 0x3ba588, + 0x5de07748, + 0x20df8b, + 0x343149, + 0x259e4d, + 0x31d7c8, + 0x27da88, + 0x5e201e02, + 0x3c75c4, + 0x5e62d7c2, + 0x3aba86, + 0x5ea06302, + 0x2f258a, + 0x2a6b86, + 0x26a908, + 0x3be5c8, + 0x3c0206, + 0x300306, + 0x2fc946, + 0x2a7205, + 0x237dc4, + 0x5efd3204, + 0x359686, + 0x2978c7, + 0x5f20bc07, + 0x389b0b, + 0x328a89, + 0x27cbca, + 0x220504, + 0x2c7748, + 0x3dd88d, + 0x2f3a89, + 0x2f3cc8, + 0x2f3f49, + 0x2f61c4, + 0x23d504, + 0x39ba85, + 0x275f4b, + 0x368606, + 0x3594c5, + 0x3cb449, + 0x35c188, + 0x2a4984, + 0x217489, + 0x306845, + 0x2c38c8, + 0x20f887, + 0x28e6c8, + 0x282546, + 0x3a8a07, + 0x2deac9, + 0x3ba8c9, + 0x213845, + 0x322ac5, + 0x5f61df02, + 0x31b3c4, + 0x230705, + 0x30e686, + 0x33cf45, + 0x2b7d87, + 0x2f2ec5, + 0x276c84, + 0x33dec6, + 0x252e87, + 0x251f86, + 0x3ac605, + 0x2098c8, + 0x28c6c5, + 0x20e387, + 0x21d889, + 0x2c6a4a, + 0x227cc7, + 0x227ccc, + 0x229c86, + 0x241d49, + 0x38c685, + 0x2456c8, + 0x202e43, + 0x2edb05, + 0x3a94c5, + 0x27c1c7, + 0x5fa01482, + 0x2ee787, + 0x2e8746, + 0x37fcc6, + 0x2ecbc6, + 0x32a286, + 0x239188, + 0x27abc5, + 0x35bc87, + 0x35bc8d, 0x201783, - 0x20de45, - 0x272147, - 0x2ea948, - 0x271d05, - 0x215048, - 0x39fe46, - 0x2ddb07, - 0x2c8e45, - 0x306146, - 0x395985, - 0x210b8a, - 0x2f3ac6, - 0x26e607, - 0x2d0505, - 0x383d47, - 0x3b2ac4, - 0x353386, - 0x3b2105, - 0x2177cb, - 0x2fe749, - 0x24e9ca, - 0x208048, - 0x304588, - 0x313f4c, - 0x382c47, - 0x308288, - 0x309f88, - 0x30f645, - 0x354eca, - 0x356b89, - 0x5e202302, - 0x3c2a06, - 0x227bc4, - 0x2bd2c9, - 0x3050c9, - 0x2769c7, - 0x2ef507, - 0x2b4789, - 0x2d1ec8, - 0x2d1ecf, - 0x219fc6, - 0x2dd60b, - 0x25b885, - 0x25b887, - 0x3794c9, - 0x2108c6, - 0x215ec7, - 0x2e0745, - 0x232884, - 0x380a46, - 0x220f44, - 0x2b6587, - 0x2b8e88, - 0x5e700508, - 0x300c85, - 0x300dc7, - 0x323209, - 0x206104, - 0x241848, - 0x5ea696c8, - 0x2d6844, - 0x2e6308, - 0x2fba44, - 0x3299c9, - 0x3a9305, - 0x5ee1a602, - 0x21a005, - 0x2e5145, - 0x32fe48, - 0x235ac7, - 0x5f2008c2, - 0x229b85, - 0x2d5646, - 0x233306, - 0x313888, - 0x315108, - 0x312806, - 0x3414c6, - 0x3dab09, - 0x37e886, - 0x21078b, - 0x316705, - 0x2a8606, - 0x3be9c8, - 0x335b86, - 0x339f46, - 0x21550a, - 0x20a80a, - 0x25f505, - 0x391307, - 0x2f5f46, - 0x5f6038c2, - 0x272287, - 0x23be05, - 0x2f6804, - 0x2f6805, - 0x2038c6, - 0x274347, - 0x21ca05, - 0x20a984, - 0x2d29c8, - 0x33a005, - 0x3c8e07, - 0x3d36c5, - 0x210ac5, - 0x26f1c4, - 0x26f1c9, - 0x2f3548, - 0x23a886, - 0x3bad86, - 0x28c486, - 0x5fb056c8, - 0x3058c7, - 0x30670d, - 0x306f4c, - 0x307549, - 0x307789, - 0x5ff77902, - 0x3d1203, + 0x3c6785, + 0x270487, + 0x2eeac8, + 0x270045, + 0x216348, + 0x37d686, + 0x2dc387, + 0x2c9c05, + 0x30e906, + 0x392185, + 0x21034a, + 0x303406, + 0x26ef47, + 0x2c2fc5, + 0x308407, + 0x30ed04, + 0x380d06, + 0x307a45, + 0x397c4b, + 0x2cfd49, + 0x25888a, + 0x2138c8, + 0x38d108, + 0x30bd0c, + 0x30c747, + 0x30fac8, + 0x316608, + 0x3186c5, + 0x3562ca, + 0x358249, + 0x5fe03a42, + 0x206146, + 0x25c1c4, + 0x2f0e09, + 0x25b589, + 0x2712c7, + 0x31d0c7, + 0x367309, + 0x2b8288, + 0x2b828f, + 0x223ac6, + 0x2dbe8b, + 0x259485, + 0x259487, + 0x36c889, + 0x210086, + 0x217407, + 0x2dfe05, + 0x2303c4, + 0x35b606, + 0x222dc4, + 0x2f1347, + 0x321988, + 0x60305c48, + 0x306cc5, + 0x306e07, + 0x324a09, + 0x208a84, + 0x23eb48, + 0x607c2e88, + 0x2d3384, + 0x2ebdc8, + 0x369b44, + 0x34b6c9, + 0x214685, + 0x60a19f82, + 0x223b05, + 0x2e8045, + 0x36aa88, + 0x233887, + 0x60e008c2, + 0x3d3345, + 0x2d4706, + 0x23e306, + 0x31b388, + 0x3192c8, + 0x33cf06, + 0x34aa46, + 0x303d49, + 0x37fc06, + 0x20ff4b, + 0x32a105, + 0x2a9506, + 0x2f8548, + 0x34df46, + 0x313ec6, + 0x216a4a, + 0x2d64ca, + 0x24fb45, + 0x307487, + 0x2fb286, + 0x61217042, + 0x2705c7, + 0x2ff1c5, + 0x2fbd04, + 0x2fbd05, + 0x220406, + 0x272087, + 0x21c385, + 0x25b644, + 0x2e0cc8, + 0x313f85, + 0x3c8647, + 0x3d43c5, + 0x210285, + 0x2c4e84, + 0x2e3cc9, + 0x2f8f88, + 0x238546, + 0x2e9c46, + 0x27d5c6, + 0x6170c3c8, + 0x30c5c7, + 0x30c90d, + 0x30cecc, + 0x30d4c9, + 0x30d709, + 0x61b75ac2, + 0x3d1b43, 0x2010c3, - 0x2fe985, - 0x3aa18a, - 0x341386, - 0x244545, - 0x311304, - 0x31130b, - 0x3344cc, - 0x334dcc, - 0x3350d5, - 0x335fcd, - 0x33b44f, - 0x33b812, - 0x33bc8f, - 0x33c052, - 0x33c4d3, - 0x33c98d, - 0x33cf4d, - 0x33d2ce, - 0x33d84e, - 0x33df4c, - 0x33e30c, - 0x33e74b, - 0x33f1ce, - 0x33fad2, - 0x34114c, - 0x341810, - 0x34d412, - 0x34e4cc, - 0x34eb8d, - 0x34eecc, - 0x3514d1, - 0x352a0d, - 0x35584d, - 0x355e4a, - 0x3560cc, - 0x35758c, - 0x357b0c, - 0x3588cc, - 0x35bd53, - 0x35c3d0, - 0x35c7d0, - 0x35d14d, - 0x35d74c, - 0x35e4c9, - 0x360a4d, - 0x360d93, - 0x362211, - 0x362a13, - 0x363ecf, - 0x36428c, - 0x36458f, - 0x36494d, - 0x364f4f, - 0x365310, - 0x365d8e, - 0x36d30e, - 0x36e510, - 0x36efcd, - 0x36f94e, - 0x36fccc, - 0x371853, - 0x3737ce, - 0x373e50, - 0x374251, - 0x37468f, - 0x374a53, - 0x37748d, - 0x3777cf, - 0x377b8e, - 0x378110, - 0x378509, - 0x379710, - 0x379d0f, - 0x37a38f, - 0x37a752, - 0x37ce4e, - 0x37d84d, - 0x37dfcd, - 0x37e30d, - 0x37f7cd, - 0x37fb0d, - 0x37fe50, - 0x38024b, - 0x380d4c, - 0x3810cc, - 0x3816cc, - 0x3819ce, - 0x390510, - 0x392012, - 0x39248b, - 0x3927ce, - 0x392b4e, - 0x3933ce, - 0x39384b, - 0x60393f56, - 0x394acd, - 0x394f54, - 0x395c4d, - 0x397995, - 0x39950d, - 0x399e8f, - 0x39a54f, - 0x39dccf, - 0x39e08e, - 0x39e60d, - 0x3a0491, - 0x3a2d8c, - 0x3a308c, - 0x3a338b, - 0x3a394c, - 0x3a3fcf, - 0x3a4392, - 0x3a4a4d, - 0x3a5b4c, - 0x3a684c, - 0x3a6b4d, - 0x3a6e8f, - 0x3a724e, - 0x3a9e4c, - 0x3aa40d, - 0x3aa74b, - 0x3ab00c, - 0x3ab90d, - 0x3abc4e, - 0x3abfc9, - 0x3ad753, - 0x3aed8d, - 0x3af48d, - 0x3afa8c, - 0x3aff0e, - 0x3b060f, - 0x3b09cc, - 0x3b0ccd, - 0x3b100f, - 0x3b13cc, - 0x3b2d0c, - 0x3b31cc, - 0x3b34cc, - 0x3b3b8d, - 0x3b3ed2, - 0x3b52cc, - 0x3b55cc, - 0x3b58d1, - 0x3b5d0f, - 0x3b60cf, - 0x3b6493, - 0x3b724e, - 0x3b75cf, - 0x3b798c, - 0x607b7cce, - 0x3b804f, - 0x3b8416, - 0x3b9f92, - 0x3bcc0c, - 0x3befcf, - 0x3bf64d, - 0x3c7e8f, - 0x3c824c, - 0x3c854d, - 0x3c888d, - 0x3c9f0e, - 0x3caa4c, - 0x3cd48c, - 0x3cd790, - 0x3d0591, - 0x3d09cb, - 0x3d0e0c, - 0x3d110e, - 0x3d3b11, - 0x3d3f4e, - 0x3d42cd, - 0x3d830b, - 0x3d8c0f, - 0x3d95d4, - 0x203942, - 0x203942, - 0x226a83, - 0x203942, - 0x226a83, - 0x203942, - 0x207a82, - 0x249385, - 0x3d380c, - 0x203942, - 0x203942, - 0x207a82, - 0x203942, - 0x298285, - 0x3715c5, - 0x203942, - 0x203942, - 0x209002, - 0x298285, - 0x336789, - 0x361f0c, - 0x203942, - 0x203942, - 0x203942, - 0x203942, - 0x249385, - 0x203942, - 0x203942, - 0x203942, - 0x203942, - 0x209002, - 0x336789, - 0x203942, - 0x203942, - 0x203942, - 0x3715c5, - 0x203942, - 0x3715c5, - 0x361f0c, - 0x3d380c, - 0x24af03, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x20ce83, - 0x23f7c3, - 0x61309b07, - 0x1c780f, - 0x131308, - 0x74f84, - 0x4783, - 0x1a2108, - 0x5184, + 0x2cff85, + 0x3a554a, + 0x33cdc6, + 0x23fd45, + 0x317944, + 0x31794b, + 0x33280c, + 0x33310c, + 0x333415, + 0x3342cd, + 0x336e4f, + 0x337212, + 0x33768f, + 0x337a52, + 0x337ed3, + 0x33838d, + 0x33894d, + 0x338cce, + 0x33924e, + 0x33994c, + 0x339d0c, + 0x33a14b, + 0x33abce, + 0x33b4d2, + 0x33cb8c, + 0x33d2d0, + 0x34fdd2, + 0x350c0c, + 0x3512cd, + 0x35160c, + 0x3536d1, + 0x3546cd, + 0x356f0d, + 0x35750a, + 0x35778c, + 0x358c4c, + 0x3591cc, + 0x359d4c, + 0x35d4d3, + 0x35db50, + 0x35df50, + 0x35e8cd, + 0x35eecc, + 0x35fc49, + 0x3618cd, + 0x361c13, + 0x363251, + 0x363a53, + 0x36474f, + 0x364b0c, + 0x364e0f, + 0x3651cd, + 0x3657cf, + 0x365b90, + 0x36660e, + 0x36b18e, + 0x36cad0, + 0x36da4d, + 0x36e3ce, + 0x36e74c, + 0x36fa13, + 0x37180e, + 0x371e90, + 0x372291, + 0x3726cf, + 0x372a93, + 0x37564d, + 0x37598f, + 0x375d4e, + 0x3762d0, + 0x3766c9, + 0x378490, + 0x378a8f, + 0x37910f, + 0x3794d2, + 0x379c8e, + 0x37a68d, + 0x37b00d, + 0x37b34d, + 0x37c70d, + 0x37ca4d, + 0x37cd90, + 0x37d18b, + 0x37d9cc, + 0x37dd4c, + 0x37e34c, + 0x37e64e, + 0x38c7d0, + 0x38e512, + 0x38e98b, + 0x38f4ce, + 0x38f84e, + 0x3900ce, + 0x39054b, + 0x61f909d6, + 0x3912cd, + 0x391754, + 0x39244d, + 0x393ad5, + 0x39578d, + 0x39610f, + 0x3968cf, + 0x39a50f, + 0x39a8ce, + 0x39ae4d, + 0x39ca11, + 0x39eb0c, + 0x39ee0c, + 0x39f10b, + 0x39f54c, + 0x39fbcf, + 0x39ff92, + 0x3a088d, + 0x3a198c, + 0x3a244c, + 0x3a274d, + 0x3a2a8f, + 0x3a2e4e, + 0x3a520c, + 0x3a57cd, + 0x3a5b0b, + 0x3a63cc, + 0x3a6ccd, + 0x3a700e, + 0x3a7389, + 0x3a83d3, + 0x3aa18d, + 0x3aa88d, + 0x3aae8c, + 0x3ab30e, + 0x3ac78f, + 0x3acb4c, + 0x3ace4d, + 0x3ad18f, + 0x3ad54c, + 0x3ae3cc, + 0x3ae88c, + 0x3aeb8c, + 0x3af24d, + 0x3af592, + 0x3b164c, + 0x3b194c, + 0x3b1c51, + 0x3b208f, + 0x3b244f, + 0x3b2813, + 0x3b374e, + 0x3b3acf, + 0x3b3e8c, + 0x623b41ce, + 0x3b454f, + 0x3b4916, + 0x3b5452, + 0x3b7d4c, + 0x3bb14f, + 0x3bb7cd, + 0x3c76cf, + 0x3c7a8c, + 0x3c7d8d, + 0x3c80cd, + 0x3c988e, + 0x3ca3cc, + 0x3cd64c, + 0x3cd950, + 0x3d0ed1, + 0x3d130b, + 0x3d174c, + 0x3d1a4e, + 0x3d4811, + 0x3d4c4e, + 0x3d4fcd, + 0x3d854b, + 0x3d8e4f, + 0x3d9814, + 0x220482, + 0x220482, + 0x227dc3, + 0x220482, + 0x227dc3, + 0x220482, + 0x204142, + 0x244285, + 0x3d450c, + 0x220482, + 0x220482, + 0x204142, + 0x220482, + 0x2974c5, + 0x2c6a45, + 0x220482, + 0x220482, + 0x208342, + 0x2974c5, + 0x334a89, + 0x362f4c, + 0x220482, + 0x220482, + 0x220482, + 0x220482, + 0x244285, + 0x220482, + 0x220482, + 0x220482, + 0x220482, + 0x208342, + 0x334a89, + 0x220482, + 0x220482, + 0x220482, + 0x2c6a45, + 0x220482, + 0x2c6a45, + 0x362f4c, + 0x3d450c, + 0x248343, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x20a803, + 0x216603, + 0x62f0f647, + 0x1ce4cf, + 0x144208, + 0x6704, + 0xca43, + 0xcd248, + 0x5bc4, 0x2000c2, - 0x61a03102, - 0x241183, - 0x2539c4, + 0x6360c302, + 0x23e483, + 0x259844, 0x2020c3, - 0x2d4704, - 0x231b06, - 0x3c6f83, - 0x3cb504, - 0x25f205, - 0x211d83, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0x21d64a, - 0x254c06, - 0x392ecc, - 0xa7c88, - 0x203102, - 0x22f743, - 0x234e83, - 0x224943, - 0x225a83, - 0x2da646, - 0x20ce83, - 0x23f7c3, - 0x214e03, - 0x31e43, - 0xa8248, - 0x625bdb45, - 0x49d07, - 0x129245, - 0x187409, - 0xe2c2, - 0x1b448a, - 0x63383985, - 0x129245, - 0x26807, - 0x70a88, - 0x574e, - 0x8a7d2, - 0x116acb, - 0x109646, - 0x6368d385, - 0x63a8d38c, - 0x16b647, - 0xe747, - 0x14f64a, - 0x3dbd0, - 0x16cb05, - 0x10404b, - 0x18d648, - 0x39dc7, - 0x13a0cb, - 0x35309, - 0x49547, - 0x1385c7, - 0x1a99c7, - 0x36906, - 0xfcc8, - 0x64025786, - 0x18fdc7, - 0x146086, - 0x18d2cd, - 0x138e10, - 0x64469102, - 0x11d08, - 0x40cd0, - 0x18468c, - 0x64b8edcd, - 0x5ba48, - 0x5becb, - 0x6b1c7, - 0x17b589, - 0x57b06, - 0x97e08, - 0x5ce02, - 0x8268a, - 0x2c287, - 0x126bc7, - 0xa8c49, - 0xac2c8, - 0x34c5, - 0x190b46, - 0x1a8ac6, - 0xf0c4e, - 0x1b20e, - 0x2d28f, - 0x6d309, - 0x53889, - 0x8220b, - 0x94b4f, - 0xb0b0c, - 0xbb94b, - 0xdee48, - 0x110647, - 0x15ddc8, - 0x191c4b, - 0x198d4c, - 0x19f54c, - 0x1a3ccc, - 0xb138d, - 0x120648, - 0xea082, - 0x195789, - 0xf3dc8, - 0x1961cb, - 0xcab06, - 0xd4f4b, - 0x13f60b, - 0xdfe8a, - 0xe0a45, - 0xe4810, - 0xe5f86, - 0x129e06, - 0x1339c5, - 0x930c7, - 0xf7d08, - 0xeb887, - 0xebb47, - 0x1c7cc7, - 0xbf9c6, - 0x1b1e0a, - 0xa7b0a, - 0x1c6b46, - 0xab84d, - 0x18fe88, - 0x10b488, - 0xd6ec9, - 0xbaf85, - 0x1b030c, - 0xb158b, - 0x190d44, - 0x105309, - 0x105546, - 0x4ab06, - 0x1b9006, - 0x4cc2, - 0xfd986, - 0x1762cb, - 0x111e87, - 0x8c42, - 0xcc705, - 0x22f04, + 0x2d3b84, + 0x22f446, + 0x20b8c3, + 0x30b0c4, + 0x398685, + 0x211543, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x21de8a, + 0x253c46, + 0x38fbcc, + 0x9fe08, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x238cc3, + 0x2d9bc6, + 0x20a803, + 0x216603, + 0x216103, + 0x2f783, + 0xa9148, + 0x641c6005, + 0x453c7, + 0x12eb85, + 0x9349, + 0xc6c2, + 0x1b5fca, + 0x64f9e785, + 0x12eb85, + 0x6bb47, + 0x6d448, + 0x680e, + 0x894d2, + 0x173e0b, + 0x10f186, + 0x6528b745, + 0x6568b74c, + 0x8ec47, + 0x176c87, + 0x12650a, + 0x3a210, + 0xe7945, + 0x10a7cb, + 0x18a0c8, + 0x67607, + 0x11404b, + 0x330c9, + 0x44447, + 0x16c307, + 0x77507, + 0x346c6, + 0xe688, + 0x65c39346, + 0x45887, + 0x147786, + 0x189d4d, + 0xc78d0, + 0x66009802, + 0x114c8, + 0x67fd0, + 0x181a8c, + 0x6678b84d, + 0x59648, + 0x59acb, + 0x68e47, + 0x6e149, + 0x54c46, + 0x97048, + 0x33c2, + 0x198c0a, + 0x1cb807, + 0x35147, + 0xaa289, + 0xac0c8, + 0x20005, + 0x18ce06, + 0x1ba306, + 0x100d4e, + 0x240ce, + 0x14f5cf, + 0xe3389, + 0x6dc89, + 0x19878b, + 0xa318f, + 0x15090c, + 0xc010b, + 0xd8fc8, + 0x116e87, + 0x15f548, + 0x18e14b, + 0x194fcc, + 0x19bd8c, + 0x19f8cc, + 0xb08cd, + 0x1432c8, + 0xf10c2, + 0x191f89, + 0x45c88, + 0x19e10b, + 0xcb446, + 0xd408b, + 0x13b00b, + 0xdf54a, + 0xe1145, + 0xe9250, + 0xeba46, + 0x52286, + 0x175305, + 0x114587, + 0xd6fc8, + 0xef9c7, + 0xefc87, + 0x184907, + 0xc10c6, + 0x1ab8ca, + 0x9fc8a, + 0x13686, + 0xad44d, + 0x45948, + 0x111788, + 0x112009, + 0xb9545, + 0x1a214c, + 0xb0acb, + 0x1cab84, + 0x10c009, + 0x10c246, + 0x4a506, + 0x1bff46, + 0x5402, + 0x3e006, + 0xbe70b, + 0x118547, + 0x57c2, + 0xccc85, + 0x63444, 0x101, - 0x54283, - 0x63e6c306, - 0x98183, + 0x50343, + 0x65a669c6, + 0x973c3, 0x382, - 0x22b04, + 0x2b704, 0xac2, - 0x50784, + 0x42244, 0x882, - 0x4602, + 0x4c82, 0x19c2, - 0x1c342, - 0x7982, - 0x8d382, + 0x27682, + 0x4042, + 0x8b742, 0xd42, - 0x291c2, - 0x38142, - 0x24502, - 0x7682, - 0x50002, - 0x34e83, + 0x8cac2, + 0x36182, + 0x59dc2, + 0x81c2, + 0x4cfc2, + 0x32c43, 0x942, 0x1bc2, - 0x143c2, - 0x8142, + 0xc202, + 0x3d42, 0x642, - 0x33702, - 0x5dc2, + 0x30ac2, + 0x4742, 0x1cc2, 0xf42, 0x5c2, - 0x14503, + 0x14543, 0x1742, - 0x51c2, - 0x4b4c2, - 0x51b42, - 0xe942, - 0x5542, - 0x65c2, - 0x30c2, - 0x5982, - 0x127e02, - 0x6ff42, - 0x3c9c2, - 0xce83, + 0x2cc2, + 0x48902, + 0x4e082, + 0x3102, + 0x5f82, + 0x17002, + 0x1fc02, + 0x6a42, + 0x140d82, + 0x6bf42, + 0x9082, + 0xa803, 0x602, - 0x4dc02, + 0x39242, 0x2f42, - 0xdbc2, - 0x7f45, - 0x7702, - 0x3542, - 0x3e903, + 0x23242, + 0x137c5, + 0x8242, + 0x20082, + 0x3b1c3, 0x682, - 0x129c2, - 0x5c82, + 0xa982, + 0x2e42, 0x1702, 0x1782, 0x8c2, - 0x13602, - 0x4cc2, - 0xe745, - 0x64e07a82, - 0x652cc0c3, - 0x31643, - 0x65607a82, - 0x31643, - 0x83107, - 0x20b7c3, + 0x14302, + 0x5402, + 0x7d45, + 0x66a04142, + 0x66f6d603, + 0x13583, + 0x67204142, + 0x13583, + 0x819c7, + 0x209e83, 0x2000c2, - 0x22f743, - 0x234e83, - 0x20d343, + 0x22c0c3, + 0x232c43, + 0x212483, 0x2005c3, - 0x225a83, - 0x20ce83, - 0x204783, - 0x23f7c3, - 0x2981c3, - 0xf6585, - 0xd103, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x20d343, - 0x211d83, - 0x20ce83, - 0x204783, - 0x71003, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, + 0x238cc3, + 0x20a803, + 0x20ca43, + 0x216603, + 0x297403, + 0xfba85, + 0x8303, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x212483, + 0x211543, + 0x20a803, + 0x20ca43, + 0x6d9c3, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, 0x200181, - 0x211d83, - 0x20ce83, - 0x22c483, - 0x23f7c3, - 0x177384, - 0x24af03, - 0x22f743, - 0x234e83, - 0x211d03, - 0x20d343, - 0x35b003, - 0x207c03, - 0x2a57c3, - 0x228c43, - 0x224943, - 0x221b84, - 0x20ce83, - 0x23f7c3, - 0x2050c3, - 0x330684, - 0x22cf03, - 0x1c183, - 0x3c5243, - 0x3226c8, - 0x28c784, + 0x211543, + 0x20a803, + 0x24bbc3, + 0x216603, + 0xbef44, + 0x248343, + 0x22c0c3, + 0x232c43, + 0x20d083, + 0x212483, + 0x35c6c3, + 0x2042c3, + 0x2a6b43, + 0x20edc3, + 0x228b03, + 0x224e44, + 0x20a803, + 0x216603, + 0x205b03, + 0x345344, + 0x25cc83, + 0x25843, + 0x2287c3, + 0x32b808, + 0x27d8c4, 0x20020a, - 0x23ac46, - 0x123004, - 0x38e307, - 0x21e64a, - 0x219e89, - 0x3b4307, - 0x3b894a, - 0x24af03, - 0x2fd20b, - 0x228b89, - 0x2d6645, - 0x3b3007, - 0x3102, - 0x22f743, - 0x224507, - 0x26e885, - 0x2c5249, - 0x234e83, - 0x375106, - 0x2c4683, - 0xe5b83, - 0x10ed86, - 0x1327c6, - 0x1c6f07, - 0x217d86, - 0x21c385, - 0x3d9b47, - 0x30bcc7, - 0x68224943, - 0x34e707, - 0x3b9103, - 0x20afc5, - 0x221b84, - 0x271508, - 0x37d54c, - 0x2b28c5, - 0x2a53c6, - 0x2243c7, - 0x2e2407, - 0x25f607, - 0x263b48, - 0x30dccf, - 0x21a0c5, - 0x241287, - 0x2085c7, - 0x2a724a, - 0x2ea109, - 0x319ac5, - 0x31b98a, - 0x148f06, - 0xbb447, - 0x2c4705, - 0x3926c4, - 0x255c46, - 0xc8506, - 0x384907, - 0x2e9f87, - 0x36ac88, - 0x218305, - 0x26e786, - 0x225c8, - 0x2aa485, - 0xaa646, - 0x22e585, - 0x26cd44, - 0x3d2747, - 0x2febca, - 0x248108, - 0x32f706, - 0x25a83, - 0x2e1985, - 0x320ac6, - 0x3d6f86, - 0x3338c6, - 0x211d83, - 0x3a4cc7, - 0x208545, - 0x20ce83, - 0x2e014d, - 0x204783, - 0x36ad88, - 0x210504, - 0x279a45, - 0x2a7146, - 0x3981c6, - 0x2a8507, - 0x25c107, - 0x28ba85, - 0x23f7c3, - 0x2e41c7, - 0x310749, - 0x37b709, - 0x32a04a, - 0x23cb02, - 0x20af84, - 0x39a444, - 0x2e9e47, - 0x2ea4c8, - 0x2ec7c9, - 0x20dd09, - 0x2ed507, - 0xfab89, - 0x34b446, - 0xf09c6, - 0x2f2484, - 0x2f2a8a, - 0x2f57c8, - 0x2f7549, - 0x2f7b06, - 0x2b6ec5, - 0x247fc8, - 0x2caf4a, - 0x252c43, - 0x330806, - 0x2ed607, - 0x2aa905, - 0x39c985, - 0x22a8c3, - 0x23bb84, - 0x227345, - 0x287a47, - 0x2f3685, - 0x2f1c46, - 0x1017c5, - 0x289e43, - 0x3d1d89, - 0x27980c, - 0x2b994c, - 0x2d4d48, - 0x2abdc7, - 0x301e48, - 0x102487, - 0x302cca, - 0x30338b, - 0x228cc8, - 0x3982c8, - 0x22a2c6, - 0x28c345, - 0x33db4a, - 0x2cc105, - 0x21a602, - 0x2c8d07, - 0x250e06, - 0x378e85, - 0x3cb209, - 0x2120c5, - 0x31c245, - 0x3be6c9, - 0x320a06, - 0x3c0148, - 0x269f83, - 0x208e06, - 0x278506, - 0x311a45, - 0x311a49, - 0x21de09, - 0x28c0c7, - 0x114944, - 0x314947, - 0x20dc09, - 0x21e845, - 0x3a208, - 0x348a05, - 0x2fb885, - 0x3869c9, - 0x202602, - 0x22cd04, + 0x31fa06, + 0x124804, + 0x38ad87, + 0x22090a, + 0x223989, + 0x3b2c87, + 0x3b588a, + 0x248343, + 0x3ac10b, + 0x3c28c9, + 0x2d3185, + 0x3ae6c7, + 0xc302, + 0x22c0c3, + 0x3c3187, + 0x26a3c5, + 0x2c7249, + 0x232c43, + 0x2bd546, + 0x2c5d83, + 0xcfe03, + 0x115f06, + 0x13f146, + 0xb847, + 0x21e686, + 0x2276c5, + 0x3de0c7, + 0x312847, + 0x69e28b03, + 0x350e47, + 0x3c0043, + 0x20a405, + 0x224e44, + 0x26f848, + 0x37a38c, + 0x2b2045, + 0x2a6746, + 0x3c3047, + 0x3a9ac7, + 0x243a87, + 0x24fc48, + 0x314f4f, + 0x223bc5, + 0x23e587, + 0x205147, + 0x2a850a, + 0x2ec6c9, + 0x31e445, + 0x320fca, + 0xbc7c6, + 0xb9a07, + 0x2c5e05, + 0x2ed104, + 0x3c0146, + 0xdd246, + 0x381d07, + 0x2f0fc7, + 0x369748, + 0x2188c5, + 0x26a2c6, + 0x25788, + 0x2eaf85, + 0xeb146, + 0x2311c5, + 0x28b084, + 0x306907, + 0x238fca, + 0x336408, + 0x36a346, + 0x38cc3, + 0x2e2a45, + 0x322406, + 0x3b5186, + 0x375206, + 0x211543, + 0x3a0b07, + 0x2050c5, + 0x20a803, + 0x2df80d, + 0x20ca43, + 0x369848, + 0x20fcc4, + 0x276f45, + 0x2a8406, + 0x394306, + 0x2a9407, + 0x259d07, + 0x28aa85, + 0x216603, + 0x31a207, + 0x316f89, + 0x26e2c9, + 0x2524ca, + 0x2091c2, + 0x20a3c4, + 0x302604, + 0x2ee247, + 0x2ee648, + 0x2f0889, + 0x3c6649, + 0x2f1507, + 0x101f49, + 0x21ee46, + 0xf4a86, + 0x2f61c4, + 0x22c50a, + 0x2fab08, + 0x2fc809, + 0x2fcdc6, + 0x2b6305, + 0x3362c8, + 0x2cb88a, + 0x24f1c3, + 0x3454c6, + 0x2f1607, + 0x31f785, + 0x3a4245, + 0x240a83, + 0x246484, + 0x228305, + 0x285dc7, + 0x2f90c5, + 0x2f6a46, + 0x11ba45, + 0x359a43, + 0x3d26c9, + 0x276d0c, + 0x2bb5cc, + 0x39e908, + 0x2a98c7, + 0x3085c8, + 0x108c07, + 0x30944a, + 0x309b0b, + 0x3c2a08, + 0x394408, + 0x3db806, + 0x27d485, + 0x33954a, + 0x36d645, + 0x219f82, + 0x2c9ac7, + 0x24d686, + 0x377b45, + 0x30adc9, + 0x27ae85, + 0x295b05, + 0x2f8249, + 0x322346, + 0x329788, + 0x267dc3, + 0x21e7c6, + 0x275506, + 0x318085, + 0x318089, + 0x2bc409, + 0x27d207, + 0x11abc4, + 0x31abc7, + 0x3c6549, + 0x220b05, + 0x37ec8, + 0x342dc5, + 0x28e1c5, + 0x383dc9, + 0x202542, + 0x3d2c04, 0x201e82, 0x201742, - 0x2fb305, - 0x322d88, - 0x2baec5, - 0x2c7543, - 0x2c7545, - 0x2d79c3, - 0x2075c2, - 0x3dba44, - 0x28e843, + 0x2e5285, + 0x324588, + 0x2b9485, + 0x2c8c83, + 0x2c8c85, + 0x2d6f43, + 0x2071c2, + 0x331d04, + 0x26e683, 0x200a82, - 0x3bd804, - 0x2e77c3, - 0x203b02, - 0x2baf43, - 0x2fe504, - 0x2f7c83, - 0x256c84, - 0x205fc2, - 0x214d03, - 0x21af43, - 0x2026c2, - 0x354282, - 0x21dc49, - 0x210242, - 0x28b304, - 0x205e02, - 0x247e44, - 0x34b404, - 0x32ecc4, - 0x204cc2, - 0x229f02, - 0x2dc6c3, - 0x303143, - 0x22e684, - 0x26a004, - 0x2d0384, - 0x2ed784, - 0x314ac3, - 0x245a43, - 0x348e84, - 0x316f44, - 0x317086, - 0x224682, - 0x3102, - 0x41c83, - 0x203102, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, + 0x3b8944, + 0x311943, + 0x212842, + 0x2b9503, + 0x213604, + 0x2fcf43, + 0x254ec4, + 0x204e82, + 0x216003, + 0x219c83, + 0x202602, + 0x293042, + 0x2bc249, + 0x20fa02, + 0x28a304, + 0x20d542, + 0x336144, + 0x21ee04, + 0x252b44, + 0x205402, + 0x23b4c2, + 0x387e43, + 0x298cc3, + 0x2614c4, + 0x28dcc4, + 0x2d0984, + 0x2f1784, + 0x31ad43, + 0x300b03, + 0x2bc744, + 0x31d9c4, + 0x31db06, + 0x20b582, + 0xc302, + 0x3ef83, + 0x20c302, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, 0x2000c2, - 0x24af03, - 0x22f743, - 0x234e83, - 0x2053c3, - 0x224943, - 0x221b84, - 0x21df04, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x214e03, - 0x2f3044, - 0x324003, - 0x2a96c3, - 0x37db04, - 0x348806, - 0x20fc03, - 0x129245, - 0xe747, - 0x26f503, - 0x69a49648, - 0x250603, - 0x2b5943, - 0x20b003, - 0x225a83, - 0x3542c5, - 0x1b2fc3, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x207703, - 0x231283, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x214503, - 0x20ce83, - 0x281184, - 0x71003, - 0x23f7c3, - 0x2b7ec4, - 0x129245, - 0x2c1185, - 0xe747, - 0x203102, + 0x248343, + 0x22c0c3, + 0x232c43, + 0x205e03, + 0x228b03, + 0x224e44, + 0x2bc504, + 0x217b84, + 0x20a803, + 0x216603, + 0x216103, + 0x2f8a84, + 0x32ce03, + 0x2aad03, + 0x37a944, + 0x342bc6, + 0x20e5c3, + 0x12eb85, + 0x176c87, + 0x2e4003, + 0x6b644548, + 0x2420c3, + 0x2b4103, + 0x20a443, + 0x238cc3, + 0x3afd05, + 0x1ae683, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x208243, + 0x22dcc3, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x214543, + 0x20a803, + 0x27f984, + 0x6d9c3, + 0x216603, + 0x2ba0c4, + 0x12eb85, + 0x2c2ac5, + 0x176c87, + 0x20c302, 0x201d02, 0x200382, - 0x208ac2, - 0x4783, + 0x205642, + 0xca43, 0x2003c2, 0x1244, - 0x22f743, - 0x2375c4, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x209c04, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0x202443, - 0x250784, - 0xa7c88, - 0x22f743, - 0x204783, - 0xd103, - 0x14cfc4, - 0x23d544, - 0xa7c88, - 0x22f743, - 0x24f044, - 0x221b84, - 0x204783, + 0x22c0c3, + 0x235604, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x217b84, + 0x20a803, + 0xca43, + 0x216603, + 0x20c603, + 0x242244, + 0x9fe08, + 0x22c0c3, + 0x20ca43, + 0x8303, + 0x123ec4, + 0x249f84, + 0x9fe08, + 0x22c0c3, + 0x24b304, + 0x224e44, + 0x20ca43, 0x201e02, - 0x71003, - 0x23f7c3, - 0x259703, - 0x3bb84, - 0x207ac5, - 0x21a602, - 0x376243, - 0x127409, - 0xde2c6, - 0x148b08, + 0x6d9c3, + 0x216603, + 0x236bc3, + 0x46484, + 0x204185, + 0x219f82, + 0x2be683, + 0x2b49, + 0xddb86, + 0x142ec8, 0x2000c2, - 0xa7c88, - 0x203102, - 0x234e83, - 0x224943, + 0x9fe08, + 0x20c302, + 0x232c43, + 0x228b03, 0x2005c2, - 0x4783, - 0x23f7c3, - 0x4f02, + 0xca43, + 0x216603, + 0x5942, 0x82, + 0xc2, + 0x1b5a47, + 0x13dc09, + 0x7be83, + 0x9fe08, + 0x27643, + 0x6ef26287, + 0x2c0c3, + 0x6048, + 0x32c43, + 0x28b03, + 0x3a086, + 0x14543, + 0x96448, + 0xc53c8, + 0x79046, + 0x11543, + 0xce788, + 0xb7e03, + 0x6f0e23c6, + 0xea185, + 0x32e47, + 0xa803, + 0x21803, + 0x16603, + 0xb142, + 0x17d48a, + 0x4e03, + 0xe5343, + 0xfe804, + 0x114d4b, + 0x115308, + 0x91482, + 0x1451207, + 0x153efc7, + 0x14c8d48, + 0x151d403, + 0x10044b, + 0x8582, + 0x12ea07, + 0x10cbc4, 0x2000c2, - 0x1b8b07, - 0x142149, - 0x7d6c3, - 0xa7c88, - 0x1c303, - 0x6d34f3c7, - 0x2f743, - 0x1c2908, - 0x234e83, - 0x224943, - 0x3fb86, - 0x214503, - 0x96c08, - 0xc3a48, - 0x116206, - 0x211d83, - 0xcdf88, - 0xbacc3, - 0x6d4e1306, - 0xe5285, - 0x35087, - 0xce83, - 0x444c3, - 0x3f7c3, - 0xda42, - 0x19fc4a, - 0x8283, - 0xfb3c3, - 0x2fca44, - 0x10dacb, - 0x10e088, - 0x91f82, - 0x1455187, - 0x152e787, - 0x14c7608, - 0x1515883, - 0x12708b, - 0xba42, - 0x125c07, - 0x1069c4, - 0x2000c2, - 0x203102, - 0x2375c4, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x225a83, - 0x20ce83, - 0x23f7c3, - 0x228743, - 0x202443, - 0x31e43, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, + 0x20c302, + 0x235604, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x238cc3, + 0x20a803, + 0x216603, + 0x2ba0c3, + 0x20c603, + 0x2f783, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, 0x602, - 0xd103, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x225a83, - 0x20ce83, - 0x23f7c3, - 0x210782, + 0x8303, + 0x28b03, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x238cc3, + 0x20a803, + 0x216603, + 0x20ff42, 0x2000c1, 0x2000c2, 0x200201, - 0x33b542, - 0xa7c88, - 0x21c785, + 0x336f42, + 0x9fe08, + 0x21c105, 0x200101, - 0x2f743, - 0x32244, + 0x2c0c3, + 0x2fd84, 0x2015c1, 0x200501, 0x2014c1, - 0x249302, - 0x38b104, - 0x249303, + 0x244202, + 0x3874c4, + 0x244203, 0x200041, 0x200801, 0x200181, 0x200701, - 0x3535c7, - 0x31e5cf, - 0x30eec6, + 0x2f6b87, + 0x380f4f, + 0x3cac46, 0x2004c1, - 0x34d006, + 0x323f06, 0x200bc1, 0x200581, - 0x3d854e, + 0x3d878e, 0x2003c1, - 0x23f7c3, + 0x216603, 0x200a81, - 0x22d185, - 0x20da42, - 0x22a7c5, + 0x2e3285, + 0x20b142, + 0x240985, 0x200401, 0x200741, 0x2007c1, - 0x21a602, + 0x219f82, 0x200081, - 0x202d01, + 0x205841, 0x201241, 0x2018c1, - 0x2086c1, - 0x52449, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x2158c3, - 0x22f743, - 0x224943, - 0x91ec8, - 0x211d83, - 0x20ce83, - 0x71283, - 0x23f7c3, - 0x14e8c08, - 0x7608, - 0x129245, - 0xa7c88, - 0x4783, - 0x129245, - 0x45344, - 0x40f88, - 0x46cc4, - 0xbd485, - 0x52449, - 0x14e8c0a, - 0xa7c88, - 0x71003, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x21c183, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x2dbb04, - 0x23f7c3, - 0x266f85, - 0x316504, - 0x22f743, - 0x234e83, - 0x224943, - 0x205982, - 0x20ce83, - 0x23f7c3, - 0x2443, - 0xa834a, - 0x113284, - 0x119f46, - 0x24af03, - 0x22f743, - 0x234e83, - 0x224943, - 0x20ce83, - 0x23f7c3, - 0x203102, - 0x22f743, - 0x2327c9, - 0x234e83, - 0x2aca09, - 0x224943, - 0x211d83, - 0x20ce83, - 0x18cfc4, - 0x4783, - 0x23f7c3, - 0x2f2288, - 0x230287, - 0x207ac5, - 0x1d0c08, - 0x1b8b07, - 0xea74a, - 0x71acb, - 0x14d247, - 0x40148, - 0x138a8a, - 0x1cf188, - 0x142149, - 0x27207, - 0x38887, - 0x127d48, - 0x1c2908, - 0x4154f, - 0x16705, - 0x190347, - 0x3fb86, - 0x44407, - 0x119c06, - 0x96c08, - 0x9f046, - 0x120807, - 0x121409, - 0x1c0607, - 0xb2689, - 0xbbc09, - 0xc0f06, - 0xc3a48, - 0xc2385, - 0x7ba8a, - 0xcdf88, - 0xbacc3, - 0xd8d08, - 0x35087, - 0x16c105, - 0x7f950, - 0x444c3, - 0x71003, - 0x121287, - 0x196c5, - 0xebe48, - 0x67705, - 0xfb3c3, - 0x176b88, - 0x1c67c6, - 0x1ae489, - 0xaec07, - 0x1276cb, - 0x701c4, - 0x104e04, - 0x10dacb, - 0x10e088, - 0x10ec87, - 0x129245, - 0x22f743, - 0x234e83, - 0x20d343, - 0x23f7c3, - 0x23f343, - 0x224943, - 0x71003, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x8234b, + 0x204981, + 0x4e9c9, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x216e03, + 0x22c0c3, + 0x228b03, + 0x913c8, + 0x211543, + 0x20a803, + 0x70e03, + 0x216603, + 0x14ecd48, + 0x8148, + 0x12eb85, + 0x9fe08, + 0xca43, + 0x12eb85, + 0x1da144, + 0x116c8, + 0x42744, + 0xc9345, + 0x4e9c9, + 0x14ecd4a, + 0x9fe08, + 0x6d9c3, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x225843, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x2db1c4, + 0x216603, + 0x25cf45, + 0x27ac84, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x206a42, + 0x20a803, + 0x216603, + 0xc603, + 0xa924a, + 0x119b84, + 0x121d46, + 0x248343, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x20a803, + 0x216603, + 0x20c302, + 0x22c0c3, + 0x230309, + 0x232c43, + 0x2ac809, + 0x228b03, + 0x211543, + 0x20a803, + 0x189a44, + 0xca43, + 0x216603, + 0x2f5fc8, + 0x23ad87, + 0x204185, + 0x1d1548, + 0x1b5a47, + 0xee8ca, + 0x6fe0b, + 0x124147, + 0x3cd48, + 0x1198a, + 0x1a348, + 0x13dc09, + 0x281c7, + 0x106707, + 0x140cc8, + 0x6048, + 0x3e84f, + 0x17c45, + 0x16687, + 0x3a086, + 0x3fc07, + 0x11e586, + 0x96448, + 0x9f546, + 0x129587, + 0x143489, + 0x1a4ec7, + 0x9be49, + 0xba9c9, + 0xc2846, + 0xc53c8, + 0xc3a05, + 0x7c70a, + 0xce788, + 0xb7e03, + 0xd7348, + 0x32e47, + 0x13e8c5, + 0x64910, + 0x21803, + 0x6d9c3, + 0x129407, + 0x231c5, + 0xeff88, + 0x65305, + 0xe5343, + 0x3308, + 0xb446, + 0x92289, + 0xaebc7, + 0x2e0b, + 0x6c1c4, + 0x10b8c4, + 0x114d4b, + 0x115308, + 0x115e07, + 0x12eb85, + 0x22c0c3, + 0x232c43, + 0x212483, + 0x216603, + 0x23bf03, + 0x228b03, + 0x6d9c3, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x1988cb, 0x2000c2, - 0x203102, - 0x23f7c3, - 0xa7c88, - 0x3102, + 0x20c302, + 0x216603, + 0x9fe08, + 0x133d89, + 0xc302, 0x2000c2, - 0x203102, + 0x20c302, 0x200382, 0x2005c2, - 0x204802, - 0x20ce83, - 0x135706, + 0x206702, + 0x20a803, + 0x133a46, 0x2003c2, - 0x3bb84, + 0x46484, 0x2000c2, - 0x24af03, - 0x203102, - 0x22f743, - 0x234e83, + 0x248343, + 0x20c302, + 0x22c0c3, + 0x232c43, 0x200382, - 0x224943, - 0x214503, - 0x211d83, - 0x209c04, - 0x20ce83, - 0x2130c3, - 0x4783, - 0x23f7c3, - 0x2fca44, - 0x2050c3, - 0x224943, - 0x203102, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x204783, - 0x23f7c3, - 0x3bd0c7, - 0x22f743, - 0x27d8c7, - 0x35df46, - 0x20a8c3, - 0x2143c3, - 0x224943, - 0x2083c3, - 0x221b84, - 0x39b5c4, - 0x30f746, - 0x202143, - 0x20ce83, - 0x23f7c3, - 0x266f85, - 0x3283c4, - 0x34fb43, - 0x2c6703, - 0x2c8d07, - 0x2c5f05, - 0x22f743, - 0x234e83, - 0x224943, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x772fc18c, - 0x4ddc7, - 0xdd286, - 0x930c7, - 0x1a29c5, - 0x206c82, - 0x38ffc3, - 0x206203, - 0x24af03, - 0x77e2f743, - 0x2037c2, - 0x234e83, + 0x228b03, + 0x214543, + 0x211543, + 0x217b84, + 0x20a803, + 0x213dc3, + 0xca43, + 0x216603, + 0x2fe804, + 0x205b03, + 0x228b03, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x20ca43, + 0x216603, + 0x3b8207, + 0x22c0c3, + 0x27c087, + 0x35f6c6, + 0x216b03, + 0x214403, + 0x228b03, + 0x204f43, + 0x224e44, + 0x300bc4, + 0x3187c6, + 0x218f83, + 0x20a803, + 0x216603, + 0x25cf45, + 0x34f1c4, + 0x326a03, + 0x276683, + 0x2c9ac7, + 0x20f805, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x211543, + 0x20a803, + 0x216603, + 0x14803, + 0x7970270c, + 0x50e87, + 0xbe846, + 0x114587, + 0x8f6c5, + 0x20be02, + 0x245a83, + 0x208b83, + 0x248343, + 0x7a22c0c3, + 0x207902, + 0x232c43, 0x2020c3, - 0x224943, - 0x221b84, + 0x228b03, + 0x224e44, 0x201143, - 0x21a0c3, - 0x211d83, - 0x209c04, - 0x78205682, - 0x20ce83, - 0x23f7c3, - 0x209983, - 0x222f03, - 0x20cf03, - 0x210782, - 0x2050c3, - 0xa7c88, - 0x224943, - 0xd103, - 0x21f004, - 0x24af03, - 0x203102, - 0x22f743, - 0x2375c4, - 0x234e83, - 0x224943, - 0x221b84, - 0x214503, - 0x3bac04, - 0x346484, - 0x2da646, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x214e03, - 0x250e06, - 0x36b8b, - 0x25786, - 0x6da0a, - 0x112d0a, - 0xa7c88, - 0x222584, - 0x7962f743, - 0x320c84, - 0x234e83, - 0x2d7004, - 0x224943, - 0x203843, - 0x211d83, - 0x20ce83, - 0x71003, - 0x23f7c3, - 0xa1c3, - 0x349f4b, - 0x3c8bca, - 0x3da28c, - 0xe1708, + 0x223bc3, + 0x211543, + 0x217b84, + 0x7a612b02, + 0x20a803, + 0x216603, + 0x21d0c3, + 0x22ce03, + 0x20a883, + 0x20ff42, + 0x205b03, + 0x9fe08, + 0x228b03, + 0x8303, + 0x322c44, + 0x248343, + 0x20c302, + 0x22c0c3, + 0x235604, + 0x232c43, + 0x228b03, + 0x224e44, + 0x214543, + 0x246b84, + 0x303f84, + 0x2d9bc6, + 0x217b84, + 0x20a803, + 0x216603, + 0x216103, + 0x24d686, + 0x3494b, + 0x39346, + 0x396ca, + 0x11960a, + 0x9fe08, + 0x225744, + 0x7ba2c0c3, + 0x3db044, + 0x232c43, + 0x26e144, + 0x228b03, + 0x220383, + 0x211543, + 0x20a803, + 0x6d9c3, + 0x216603, + 0x47203, + 0x34b00b, + 0x3c840a, + 0x3dc60c, + 0xe27c8, 0x2000c2, - 0x203102, + 0x20c302, 0x200382, - 0x230145, - 0x221b84, - 0x205982, - 0x211d83, - 0x346484, - 0x208ac2, + 0x22cd85, + 0x224e44, + 0x206a42, + 0x211543, + 0x303f84, + 0x205642, 0x2003c2, - 0x202442, - 0x210782, - 0x4af03, - 0x47502, - 0x2be789, - 0x340e48, - 0x2247c9, - 0x21f909, - 0x2ab2ca, - 0x318c0a, - 0x214c42, - 0x2291c2, - 0x3102, - 0x22f743, - 0x22ca82, - 0x241446, - 0x37a202, + 0x209482, + 0x20ff42, + 0x48343, + 0x9382, + 0x2c4009, + 0x364448, + 0x228989, + 0x208649, + 0x2181ca, + 0x22170a, + 0x203cc2, + 0x28cac2, + 0xc302, + 0x22c0c3, + 0x22ae02, + 0x23e746, + 0x378f82, 0x201682, - 0x271e4e, - 0x214d4e, - 0x281447, - 0x20ce07, - 0x24f302, - 0x234e83, - 0x224943, - 0x207282, + 0x27018e, + 0x21604e, + 0x27fc47, + 0x20a787, + 0x24b5c2, + 0x232c43, + 0x228b03, + 0x20d602, 0x2005c2, - 0x14343, - 0x2377cf, - 0x238902, - 0x2b4407, - 0x36e087, - 0x2b6a07, - 0x2d198c, - 0x2d26cc, - 0x21ecc4, - 0x39f08a, - 0x214c82, - 0x251b42, - 0x2bd784, + 0x14383, + 0x23580f, + 0x23ea82, + 0x366f87, + 0x2b1bc7, + 0x354207, + 0x2b590c, + 0x2e09cc, + 0x3d0384, + 0x39b8ca, + 0x211902, + 0x24e082, + 0x2bce04, 0x200702, - 0x2b0602, - 0x2d2904, - 0x2131c2, - 0x20e942, - 0xe943, - 0x29f0c7, - 0x23a9c5, - 0x2065c2, - 0x244384, - 0x327e02, - 0x2e1488, - 0x20ce83, - 0x379208, + 0x2c4fc2, + 0x2e0c04, + 0x213ec2, + 0x203102, + 0xe403, + 0x29f5c7, + 0x238685, + 0x217002, + 0x23fb84, + 0x340d82, + 0x2e2548, + 0x20a803, + 0x377ec8, 0x201fc2, - 0x21ee85, - 0x398ac6, - 0x23f7c3, - 0x207702, - 0x2eca07, - 0xda42, - 0x3a4905, - 0x321185, - 0x205d02, - 0x20ba82, - 0x2097ca, - 0x28b90a, - 0x287542, - 0x29fc44, - 0x205202, - 0x20ae48, - 0x208c02, - 0x301148, - 0x309407, - 0x30a189, - 0x2e5d02, - 0x30ffc5, - 0x36d845, - 0x2183cb, - 0x30fccc, - 0x22c588, - 0x325a48, - 0x224682, - 0x2a85c2, + 0x3d0545, + 0x394d46, + 0x216603, + 0x208242, + 0x2f0ac7, + 0xb142, + 0x212ec5, + 0x301185, + 0x216442, + 0x2085c2, + 0x21cf0a, + 0x28a90a, + 0x287582, + 0x2a0cc4, + 0x205c42, + 0x20a288, + 0x205782, + 0x356708, + 0xf01, + 0x30ef47, + 0x310a49, + 0x212f42, + 0x316805, + 0x3b0205, + 0x21898b, + 0x318d4c, + 0x22a908, + 0x32e848, + 0x20b582, + 0x2a94c2, 0x2000c2, - 0xa7c88, - 0x203102, - 0x22f743, + 0x9fe08, + 0x20c302, + 0x22c0c3, 0x200382, - 0x208ac2, - 0x4783, + 0x205642, + 0xca43, 0x2003c2, - 0x23f7c3, - 0x202442, + 0x216603, + 0x209482, 0x2000c2, - 0x129245, - 0x7aa03102, - 0x7b224943, - 0x20e943, - 0x205982, - 0x20ce83, - 0x3bb643, - 0x7b63f7c3, - 0x2e9343, - 0x283206, - 0x1602443, - 0x129245, - 0x1355cb, - 0xa7c88, - 0x7ae8c588, - 0x895c7, - 0x70887, - 0x1339c5, - 0x1e00d, - 0x3f982, - 0x10e682, - 0xa910a, - 0x8b747, - 0x1bfc4, - 0x1c003, - 0x1b9084, - 0x7be048c2, - 0x7c200ac2, - 0x7c603002, - 0x7ca04182, - 0x7ce09fc2, - 0x7d207982, - 0xe747, - 0x7d603102, - 0x7da31082, - 0x7de1f642, - 0x7e207682, - 0x214d43, - 0x12984, - 0x239043, - 0x7e60e382, - 0x5ba48, - 0x7ea02ec2, - 0x4f947, - 0x7ee00042, - 0x7f200d82, - 0x7f600182, - 0x7fa03842, - 0x7fe00f42, - 0x802005c2, - 0xd6585, - 0x24f543, - 0x338544, - 0x80600702, - 0x80a01882, - 0x80e04b42, - 0x7c68b, - 0x81200c42, - 0x81a49602, - 0x81e05982, - 0x82204802, - 0x8261f382, - 0x82a00bc2, - 0x82e04fc2, - 0x8326ff42, - 0x83605682, - 0x83a04bc2, - 0x83e08ac2, - 0x84216e02, - 0x8463d2c2, - 0x84a24a82, - 0xb40c4, - 0x2163c3, - 0x84e00ec2, - 0x85210482, - 0x85602f82, - 0x85a006c2, - 0x85e003c2, - 0x86200a82, - 0x824c7, - 0x86614e02, - 0x86a023c2, - 0x86e02442, - 0x87214d02, - 0x1b030c, - 0x87644d02, - 0x87a20302, - 0x87e02742, - 0x882038c2, - 0x88600f02, - 0x88a77dc2, - 0x88e02d02, - 0x8921c902, - 0x89678882, - 0x89a79482, - 0x247502, + 0x12eb85, + 0x7ce0c302, + 0x7d628b03, + 0x20e403, + 0x206a42, + 0x20a803, + 0x3559c3, + 0x7da16603, + 0x2ed343, + 0x281ac6, + 0x160c603, + 0x12eb85, + 0x13390b, + 0x9fe08, + 0x7d27d6c8, + 0x7e407, + 0x6d247, + 0x175305, + 0x2a20d, + 0x39e82, + 0x115902, + 0xaa74a, + 0x8a747, + 0x27304, + 0x27343, + 0x1bffc4, + 0x7e204ec2, + 0x7e600ac2, + 0x7ea02282, + 0x7ee03342, + 0x7f209bc2, + 0x7f604042, + 0x176c87, + 0x7fa0c302, + 0x7fe2dac2, + 0x80221442, + 0x806081c2, + 0x216043, + 0x12704, + 0x236cc3, + 0x80a0c782, + 0x59648, + 0x80e076c2, + 0x4bc07, + 0x81200042, + 0x81600d82, + 0x81a00182, + 0x81e03dc2, + 0x82200f42, + 0x826005c2, + 0xd30c5, + 0x215183, + 0x36c284, + 0x82a00702, + 0x82e01882, + 0x83203c42, + 0x86ccb, + 0x83600c42, + 0x83e44502, + 0x84206a42, + 0x84606702, + 0x84a1d902, + 0x84e00bc2, + 0x85205a02, + 0x8566bf42, + 0x85a12b02, + 0x85e04f82, + 0x86205642, + 0x86636002, + 0x86a6f802, + 0x86e28c42, + 0x194584, + 0x217903, + 0x87200ec2, + 0x8760fc42, + 0x87a0ad82, + 0x87e006c2, + 0x882003c2, + 0x88600a82, + 0x198a47, + 0x88a16102, + 0x88e03d82, + 0x89209482, + 0x89616002, + 0x1a214c, + 0x89a47c82, + 0x89e22182, + 0x8a202682, + 0x8a617042, + 0x8aa00f02, + 0x8ae18342, + 0x8b205842, + 0x8b60b902, + 0x8ba75882, + 0x8be369c2, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x15cc3, - 0x247502, + 0x17203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, - 0x81601143, - 0x215cc3, - 0x354344, - 0x2246c6, - 0x2f8f83, - 0x247502, + 0x217203, + 0x209382, + 0x83a01143, + 0x217203, + 0x3afd84, + 0x228886, + 0x2fd643, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x3758c9, - 0x247502, - 0x3d31c3, - 0x2bbf03, - 0x32fdc5, + 0x217203, + 0x2bdd09, + 0x209382, + 0x39c403, + 0x2bacc3, + 0x36aa05, 0x2020c3, 0x201143, - 0x215cc3, - 0x2a2c03, - 0x229143, - 0x23c689, - 0x247502, + 0x217203, + 0x28f543, + 0x221a43, + 0x34d8c9, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, + 0x217203, + 0x209382, 0x201143, - 0x215cc3, - 0x247502, - 0x247502, + 0x217203, + 0x209382, + 0x209382, 0x201143, - 0x215cc3, - 0x8a22f743, - 0x234e83, - 0x21fb43, - 0x211d83, - 0x20ce83, - 0x4783, - 0x23f7c3, - 0xa7c88, - 0x203102, - 0x22f743, - 0x20ce83, - 0x23f7c3, - 0x22f743, - 0x234e83, - 0x224943, - 0x8ace63c2, - 0x211d83, - 0x20ce83, - 0x4783, - 0x23f7c3, + 0x217203, + 0x8c62c0c3, + 0x232c43, + 0x208883, + 0x211543, + 0x20a803, + 0xca43, + 0x216603, + 0x9fe08, + 0x20c302, + 0x22c0c3, + 0x20a803, + 0x216603, + 0xbdb82, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x8d0ebe82, + 0x211543, + 0x20a803, + 0xca43, + 0x216603, 0x15c1, - 0x23d544, - 0x203102, - 0x22f743, + 0x249f84, + 0x20c302, + 0x22c0c3, 0x200983, - 0x234e83, - 0x24f044, - 0x20d343, - 0x224943, - 0x221b84, - 0x214503, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x259703, - 0x207ac5, - 0x229143, - 0x2050c3, - 0x4783, - 0x203102, - 0x22f743, + 0x232c43, + 0x24b304, + 0x212483, + 0x228b03, + 0x224e44, + 0x214543, + 0x211543, + 0x20a803, + 0x216603, + 0x236bc3, + 0x204185, + 0x221a43, + 0x205b03, + 0xca43, + 0x20c302, + 0x22c0c3, 0x201143, - 0x20ce83, - 0x23f7c3, + 0x20a803, + 0x216603, 0x2000c2, - 0x24af03, - 0xa7c88, - 0x22f743, - 0x234e83, - 0x224943, - 0x231b06, - 0x221b84, - 0x214503, - 0x209c04, - 0x20ce83, - 0x23f7c3, - 0x214e03, - 0x22f743, - 0x234e83, - 0x20ce83, - 0x23f7c3, - 0x28002, + 0x248343, + 0x9fe08, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x22f446, + 0x224e44, + 0x214543, + 0x217b84, + 0x20a803, + 0x216603, + 0x216103, + 0x22c0c3, + 0x232c43, + 0x20a803, + 0x216603, + 0x2d7c2, 0x1942, - 0x144e8c7, - 0x56107, - 0x22f743, - 0x25786, - 0x234e83, - 0x224943, - 0xe2cc6, - 0x20ce83, - 0x23f7c3, - 0x322548, - 0x325889, - 0x342f49, - 0x34c4c8, - 0x39abc8, - 0x39abc9, - 0x31ac4a, - 0x35e24a, - 0x395f8a, - 0x39c18a, - 0x3c8bca, - 0x3d588b, - 0x24638d, - 0x368e4f, - 0x276490, - 0x3605cd, - 0x3813cc, - 0x39becb, - 0x70a88, - 0xe6208, - 0x166745, - 0x14891c7, - 0xcc705, + 0x1458787, + 0x141347, + 0x22c0c3, + 0x39346, + 0x232c43, + 0x228b03, + 0xe7d46, + 0x20a803, + 0x216603, + 0x32b688, + 0x32e689, + 0x341509, + 0x34cd48, + 0x396f48, + 0x396f49, + 0x32370a, + 0x35f9ca, + 0x39278a, + 0x39914a, + 0x3c840a, + 0x3d5fcb, + 0x23d20d, + 0x367bcf, + 0x25b050, + 0x36144d, + 0x37e04c, + 0x398e8b, + 0x6d448, + 0xebcc8, + 0x92e85, + 0x1488147, + 0xccc85, 0x2000c2, - 0x2c5d45, - 0x20e903, - 0x8e203102, - 0x234e83, - 0x224943, - 0x391807, - 0x20b003, - 0x211d83, - 0x20ce83, - 0x22c483, - 0x2130c3, - 0x20b3c3, - 0x204783, - 0x23f7c3, - 0x254c06, - 0x21a602, - 0x2050c3, - 0xa7c88, + 0x20f645, + 0x20e3c3, + 0x9060c302, + 0x232c43, + 0x228b03, + 0x3d4007, + 0x20a443, + 0x211543, + 0x20a803, + 0x24bbc3, + 0x213dc3, + 0x209a83, + 0x20ca43, + 0x216603, + 0x253c46, + 0x219f82, + 0x205b03, + 0x9fe08, 0x2000c2, - 0x24af03, - 0x203102, - 0x22f743, - 0x234e83, - 0x224943, - 0x221b84, - 0x211d83, - 0x20ce83, - 0x23f7c3, - 0x202443, - 0x56107, - 0xba42, - 0x127404, - 0x15c8f86, + 0x248343, + 0x20c302, + 0x22c0c3, + 0x232c43, + 0x228b03, + 0x224e44, + 0x211543, + 0x20a803, + 0x216603, + 0x20c603, + 0x141347, + 0x8582, + 0x2b44, + 0x15c87c6, 0x2000c2, - 0x203102, - 0x224943, - 0x211d83, - 0x23f7c3, + 0x20c302, + 0x228b03, + 0x211543, + 0x216603, } // children is the list of nodes' children, the parent's wildcard bit and the @@ -9427,576 +9462,585 @@ var children = [...]uint32{ 0x40000000, 0x50000000, 0x60000000, - 0x1820602, - 0x1824608, - 0x1828609, - 0x184c60a, - 0x19a8613, - 0x19c066a, - 0x19d4670, - 0x19ec675, - 0x1a0c67b, - 0x1a24683, - 0x1a3c689, - 0x1a5468f, - 0x1a58695, - 0x1a80696, - 0x1a846a0, - 0x1a9c6a1, - 0x1aa06a7, - 0x1aa46a8, - 0x1ae06a9, - 0x1ae46b8, - 0x61aec6b9, - 0x21af46bb, - 0x1b3c6bd, + 0x17f85f8, + 0x17fc5fe, + 0x18005ff, + 0x1824600, + 0x1980609, + 0x1998660, + 0x19ac666, + 0x19c466b, + 0x19e4671, + 0x19fc679, + 0x1a1467f, + 0x1a2c685, + 0x1a3068b, + 0x1a5868c, + 0x1a5c696, + 0x1a74697, + 0x1a7869d, + 0x1a7c69e, + 0x1ab869f, + 0x1abc6ae, + 0x61ac46af, + 0x21acc6b1, + 0x1b146b3, + 0x1b186c5, + 0x1b3c6c6, 0x1b406cf, - 0x1b686d0, - 0x1b6c6da, - 0x1b706db, - 0x1b846dc, - 0x1b886e1, - 0x1bb86e2, - 0x1bd46ee, - 0x1bfc6f5, - 0x1c0c6ff, - 0x1c10703, - 0x1ca8704, - 0x1cbc72a, - 0x1cd072f, - 0x1d08734, - 0x1d18742, - 0x1d2c746, - 0x1d4474b, - 0x1de8751, - 0x1fec77a, - 0x1ff07fb, - 0x205c7fc, - 0x20c8817, - 0x20e0832, - 0x20f4838, - 0x20f883d, - 0x210083e, - 0x2114840, - 0x2118845, - 0x2134846, - 0x218484d, - 0x2188861, - 0x2218c862, - 0x21a8863, - 0x21ac86a, - 0x21b086b, - 0x21d486c, - 0x2214875, - 0x2218885, - 0x6221c886, - 0x2234887, - 0x225488d, - 0x2260895, - 0x2270898, - 0x232489c, - 0x23288c9, - 0x223388ca, - 0x2233c8ce, - 0x223448cf, - 0x239c8d1, - 0x23a08e7, - 0x28948e8, - 0x2293ca25, + 0x1b446d0, + 0x1b586d1, + 0x1b5c6d6, + 0x1b8c6d7, + 0x1ba86e3, + 0x1bd06ea, + 0x1be06f4, + 0x1be46f8, + 0x1c7c6f9, + 0x1c9071f, + 0x1ca4724, + 0x1cdc729, + 0x1cec737, + 0x1d0073b, + 0x1d18740, + 0x1dbc746, + 0x1fc076f, + 0x1fc47f0, + 0x20307f1, + 0x209c80c, + 0x20b4827, + 0x20c882d, + 0x20cc832, + 0x20d4833, + 0x20e8835, + 0x20ec83a, + 0x210883b, + 0x2158842, + 0x215c856, + 0x22160857, + 0x217c858, + 0x218085f, + 0x2184860, + 0x21a8861, + 0x21e886a, + 0x21ec87a, + 0x621f087b, + 0x220887c, + 0x222c882, + 0x223888b, + 0x224888e, + 0x22fc892, + 0x23008bf, + 0x223108c0, + 0x223148c4, + 0x2231c8c5, + 0x23748c7, + 0x23788dd, + 0x288c8de, + 0x2890a23, + 0x22938a24, + 0x2293ca4e, 0x22940a4f, - 0x22944a50, - 0x22950a51, - 0x22954a54, - 0x22960a55, + 0x2294ca50, + 0x22950a53, + 0x2295ca54, + 0x22960a57, 0x22964a58, 0x22968a59, 0x2296ca5a, 0x22970a5b, - 0x22974a5c, - 0x22980a5d, - 0x22984a60, - 0x22990a61, + 0x2297ca5c, + 0x22980a5f, + 0x2298ca60, + 0x22990a63, 0x22994a64, 0x22998a65, - 0x2299ca66, - 0x229a8a67, - 0x229aca6a, - 0x229b8a6b, + 0x229a4a66, + 0x229a8a69, + 0x229b4a6a, + 0x229b8a6d, 0x229bca6e, 0x229c0a6f, - 0x229c4a70, - 0x29c8a71, - 0x229cca72, - 0x229d8a73, - 0x229dca76, + 0x29c4a70, + 0x229c8a71, + 0x229d4a72, + 0x229d8a75, + 0x29dca76, 0x29e4a77, - 0x2a28a79, - 0x22a48a8a, - 0x22a4ca92, - 0x22a50a93, - 0x22a58a94, + 0x629f0a79, + 0x2a34a7c, + 0x22a54a8d, + 0x22a58a95, 0x22a5ca96, - 0x2a60a97, - 0x22a64a98, + 0x22a64a97, 0x22a68a99, - 0x22a6ca9a, - 0x2a74a9b, - 0x2a78a9d, - 0x2a7ca9e, - 0x2a98a9f, - 0x2ab0aa6, - 0x2ab4aac, - 0x2ac4aad, - 0x2ad0ab1, - 0x2b04ab4, - 0x2b08ac1, - 0x2b20ac2, - 0x22b28ac8, - 0x22b2caca, - 0x22b34acb, - 0x2c24acd, - 0x22c28b09, - 0x2c30b0a, - 0x2c34b0c, - 0x22c38b0d, - 0x2c3cb0e, - 0x2c54b0f, + 0x2a6ca9a, + 0x22a70a9b, + 0x22a74a9c, + 0x22a78a9d, + 0x22a7ca9e, + 0x2a84a9f, + 0x2a8caa1, + 0x2a90aa3, + 0x2aacaa4, + 0x2ac4aab, + 0x2ac8ab1, + 0x2ad8ab2, + 0x2ae4ab6, + 0x2b18ab9, + 0x2b1cac6, + 0x2b34ac7, + 0x22b3cacd, + 0x22b40acf, + 0x22b48ad0, + 0x2c40ad2, + 0x22c44b10, + 0x2c4cb11, + 0x2c50b13, + 0x22c54b14, 0x2c58b15, - 0x2c5cb16, - 0x2c60b17, - 0x2c78b18, - 0x2c8cb1e, - 0x2cb4b23, - 0x2cd4b2d, - 0x2cd8b35, - 0x62cdcb36, - 0x2d10b37, - 0x2d14b44, - 0x22d18b45, - 0x2d1cb46, - 0x2d44b47, - 0x2d48b51, - 0x2d6cb52, - 0x2d70b5b, - 0x2d84b5c, - 0x2d88b61, + 0x2c70b16, + 0x2c74b1c, + 0x2c78b1d, + 0x2c7cb1e, + 0x2c94b1f, + 0x2ca8b25, + 0x2cd0b2a, + 0x2cf0b34, + 0x2cf4b3c, + 0x62cf8b3d, + 0x2d2cb3e, + 0x2d30b4b, + 0x22d34b4c, + 0x2d38b4d, + 0x2d60b4e, + 0x2d64b58, + 0x2d88b59, 0x2d8cb62, - 0x2dacb63, - 0x2dc8b6b, - 0x2dccb72, - 0x22dd0b73, - 0x2dd4b74, - 0x2dd8b75, - 0x2ddcb76, - 0x2de4b77, - 0x2df8b79, - 0x2dfcb7e, - 0x2e00b7f, - 0x2e04b80, - 0x2e74b81, - 0x2e78b9d, - 0x2e7cb9e, - 0x2e9cb9f, - 0x2eb0ba7, - 0x2ec4bac, - 0x2edcbb1, - 0x2ef8bb7, - 0x2f10bbe, - 0x2f14bc4, - 0x2f2cbc5, - 0x2f48bcb, - 0x2f4cbd2, - 0x2f6cbd3, - 0x2f8cbdb, - 0x2fa8be3, - 0x300cbea, - 0x3028c03, - 0x3038c0a, - 0x303cc0e, - 0x3054c0f, - 0x3098c15, - 0x3118c26, - 0x3148c46, - 0x314cc52, - 0x3158c53, - 0x3178c56, - 0x317cc5e, - 0x31a0c5f, - 0x31a8c68, - 0x31e4c6a, - 0x3234c79, - 0x3238c8d, - 0x323cc8e, - 0x3304c8f, - 0x23308cc1, - 0x2330ccc2, - 0x3310cc3, - 0x23314cc4, - 0x23318cc5, - 0x2331ccc6, - 0x2332ccc7, - 0x23330ccb, - 0x23334ccc, - 0x23338ccd, - 0x2333ccce, - 0x3354ccf, - 0x3378cd5, - 0x3398cde, - 0x3a04ce6, - 0x3a10e81, - 0x3a30e84, - 0x3bf0e8c, - 0x3cc0efc, - 0x3d30f30, - 0x3d88f4c, - 0x3e70f62, - 0x3ec8f9c, - 0x3f04fb2, - 0x4000fc1, - 0x40cd000, - 0x4165033, - 0x41f5059, - 0x425907d, - 0x4491096, - 0x4549124, - 0x4615152, - 0x4661185, - 0x46e9198, - 0x47251ba, - 0x47751c9, - 0x47ed1dd, - 0x647f11fb, - 0x647f51fc, - 0x647f91fd, - 0x48751fe, - 0x48d121d, - 0x494d234, - 0x49c5253, - 0x4a45271, - 0x4ab1291, - 0x4bdd2ac, - 0x4c352f7, - 0x64c3930d, - 0x4cd130e, - 0x4cd9334, - 0x24cdd336, - 0x4d65337, - 0x4db1359, - 0x4e1936c, - 0x4ec1386, - 0x4f893b0, - 0x4ff13e2, - 0x51053fc, - 0x65109441, - 0x6510d442, - 0x5169443, - 0x51c545a, - 0x5255471, - 0x52d1495, - 0x53154b4, - 0x53f94c5, - 0x542d4fe, - 0x548d50b, - 0x5501523, - 0x5589540, - 0x55c9562, - 0x5639572, - 0x6563d58e, - 0x566558f, - 0x5669599, - 0x568159a, - 0x569d5a0, - 0x56e15a7, - 0x56f15b8, - 0x57095bc, - 0x57815c2, - 0x57895e0, - 0x57a55e2, - 0x57b95e9, - 0x57d55ee, - 0x58015f5, - 0x5805600, - 0x580d601, - 0x5821603, - 0x5841608, - 0x5851610, - 0x585d614, - 0x5899617, - 0x58a1626, - 0x58b5628, - 0x58d962d, - 0x58e5636, - 0x58ed639, - 0x591163b, - 0x5935644, - 0x594d64d, - 0x5951653, - 0x5959654, - 0x595d656, - 0x59f9657, - 0x59fd67e, - 0x5a0167f, - 0x5a05680, - 0x5a29681, - 0x5a4d68a, - 0x5a69693, - 0x5a7d69a, - 0x5a9169f, - 0x5a996a4, - 0x5aa16a6, - 0x5aa96a8, - 0x5ac16aa, - 0x5ad16b0, - 0x5ad56b4, - 0x5af16b5, - 0x63796bc, - 0x63b18de, - 0x63dd8ec, - 0x63f98f7, - 0x64198fe, - 0x6439906, - 0x647d90e, - 0x648591f, - 0x26489921, - 0x2648d922, - 0x6495923, - 0x665d925, - 0x26661997, - 0x26671998, - 0x2667999c, - 0x2668599e, - 0x66899a1, - 0x266919a2, - 0x66999a4, - 0x66a99a6, - 0x66d19aa, - 0x67099b4, - 0x670d9c2, - 0x67459c3, - 0x67659d1, - 0x72bd9d9, - 0x72c1caf, - 0x72c5cb0, - 0x272c9cb1, - 0x72cdcb2, - 0x272d1cb3, - 0x72d5cb4, - 0x272e1cb5, - 0x72e5cb8, - 0x72e9cb9, - 0x272edcba, - 0x72f1cbb, - 0x272f9cbc, - 0x72fdcbe, - 0x7301cbf, - 0x27311cc0, - 0x7315cc4, - 0x7319cc5, - 0x731dcc6, - 0x7321cc7, - 0x27325cc8, - 0x7329cc9, - 0x732dcca, - 0x7331ccb, + 0x2da0b63, + 0x2da4b68, + 0x2da8b69, + 0x2dc8b6a, + 0x2de4b72, + 0x2de8b79, + 0x22decb7a, + 0x2df0b7b, + 0x2df4b7c, + 0x2df8b7d, + 0x2e00b7e, + 0x2e14b80, + 0x2e18b85, + 0x2e1cb86, + 0x2e44b87, + 0x2e48b91, + 0x2ebcb92, + 0x2ec0baf, + 0x2ec4bb0, + 0x2ee4bb1, + 0x2ef8bb9, + 0x2f0cbbe, + 0x2f24bc3, + 0x2f40bc9, + 0x2f58bd0, + 0x2f5cbd6, + 0x2f74bd7, + 0x2f90bdd, + 0x2f94be4, + 0x2fb4be5, + 0x2fd4bed, + 0x2ff0bf5, + 0x3054bfc, + 0x3070c15, + 0x3080c1c, + 0x3084c20, + 0x309cc21, + 0x30e0c27, + 0x3160c38, + 0x3190c58, + 0x3194c64, + 0x31a0c65, + 0x31c0c68, + 0x31c4c70, + 0x31e8c71, + 0x31f0c7a, + 0x322cc7c, + 0x327cc8b, + 0x3280c9f, + 0x3284ca0, + 0x3354ca1, + 0x23358cd5, + 0x2335ccd6, + 0x3360cd7, + 0x23364cd8, + 0x23368cd9, + 0x336ccda, + 0x23370cdb, + 0x23380cdc, + 0x23384ce0, + 0x23388ce1, + 0x2338cce2, + 0x23390ce3, + 0x33a8ce4, + 0x33cccea, + 0x33eccf3, + 0x3a58cfb, + 0x3a64e96, + 0x3a84e99, + 0x3c44ea1, + 0x3d14f11, + 0x3d84f45, + 0x3ddcf61, + 0x3ec4f77, + 0x3f1cfb1, + 0x3f58fc7, + 0x4054fd6, + 0x4121015, + 0x41b9048, + 0x424906e, + 0x42ad092, + 0x44e50ab, + 0x459d139, + 0x4669167, + 0x46b519a, + 0x473d1ad, + 0x47791cf, + 0x47c91de, + 0x48411f2, + 0x64845210, + 0x64849211, + 0x6484d212, + 0x48c9213, + 0x4925232, + 0x49a1249, + 0x4a19268, + 0x4a99286, + 0x4b052a6, + 0x4c312c1, + 0x4c8930c, + 0x64c8d322, + 0x4d25323, + 0x4d2d349, + 0x24d3134b, + 0x4db934c, + 0x4e0536e, + 0x4e6d381, + 0x4f1539b, + 0x4fdd3c5, + 0x50453f7, + 0x5159411, + 0x6515d456, + 0x65161457, + 0x51bd458, + 0x521946f, + 0x52a9486, + 0x53254aa, + 0x53694c9, + 0x544d4da, + 0x5481513, + 0x54e1520, + 0x5555538, + 0x55dd555, + 0x561d577, + 0x568d587, + 0x656915a3, + 0x56b95a4, + 0x56bd5ae, + 0x56d55af, + 0x56f15b5, + 0x57355bc, + 0x57455cd, + 0x575d5d1, + 0x57d55d7, + 0x57dd5f5, + 0x57f95f7, + 0x580d5fe, + 0x5829603, + 0x585560a, + 0x5859615, + 0x5861616, + 0x5875618, + 0x589561d, + 0x58a5625, + 0x58b1629, + 0x58ed62c, + 0x58f563b, + 0x590963d, + 0x592d642, + 0x593964b, + 0x594164e, + 0x5965650, + 0x5989659, + 0x59a1662, + 0x59a5668, + 0x59ad669, + 0x59b166b, + 0x5a5166c, + 0x5a55694, + 0x5a59695, + 0x5a5d696, + 0x5a81697, + 0x5aa56a0, + 0x5ac16a9, + 0x5ad56b0, + 0x5ae96b5, + 0x5af16ba, + 0x5af96bc, + 0x5b016be, + 0x5b196c0, + 0x5b296c6, + 0x5b2d6ca, + 0x5b496cb, + 0x63d16d2, + 0x64098f4, + 0x6435902, + 0x645190d, + 0x6471914, + 0x649191c, + 0x64d5924, + 0x64dd935, + 0x264e1937, + 0x264e5938, + 0x64ed939, + 0x66c593b, + 0x266c99b1, + 0x66cd9b2, + 0x266dd9b3, + 0x266e59b7, + 0x266f19b9, + 0x66f59bc, + 0x266fd9bd, + 0x67059bf, + 0x67159c1, + 0x673d9c5, + 0x67799cf, + 0x677d9de, + 0x67b59df, + 0x67d99ed, + 0x73319f6, 0x7335ccc, - 0x2733dccd, + 0x7339ccd, + 0x2733dcce, 0x7341ccf, - 0x7345cd0, + 0x27345cd0, 0x7349cd1, - 0x2734dcd2, - 0x7351cd3, - 0x27359cd4, - 0x2735dcd6, - 0x7379cd7, - 0x7391cde, - 0x27395ce4, - 0x73d9ce5, - 0x73ddcf6, - 0x7401cf7, - 0x740dd00, - 0x7411d03, - 0x7415d04, - 0x75d1d05, - 0x275d5d74, - 0x275ddd75, - 0x275e1d77, - 0x275e5d78, - 0x75edd79, - 0x76c9d7b, - 0x276d5db2, - 0x276d9db5, - 0x276dddb6, - 0x276e1db7, - 0x76e5db8, - 0x7711db9, - 0x7715dc4, - 0x7719dc5, - 0x773ddc6, - 0x7749dcf, - 0x7769dd2, - 0x776ddda, - 0x77a5ddb, - 0x7a55de9, - 0x7b11e95, - 0x7b15ec4, - 0x7b19ec5, - 0x7b2dec6, - 0x7b61ecb, - 0x7b99ed8, - 0x27b9dee6, - 0x7bb9ee7, - 0x7be1eee, - 0x7be5ef8, - 0x7c09ef9, - 0x7c25f02, - 0x7c4df09, - 0x7c5df13, - 0x7c61f17, - 0x7c65f18, - 0x7c9df19, - 0x7ca9f27, - 0x7cd1f2a, - 0x7d51f34, - 0x27d55f54, - 0x7d65f55, - 0x7d75f59, - 0x7d91f5d, - 0x7db1f64, - 0x7db5f6c, - 0x7dc9f6d, - 0x7dddf72, - 0x7de1f77, - 0x7de5f78, - 0x7e05f79, - 0x7eadf81, - 0x7eb1fab, - 0x7ecdfac, - 0x7ef1fb3, - 0x7ef5fbc, - 0x7efdfbd, - 0x7f19fbf, - 0x7f21fc6, - 0x7f35fc8, - 0x7f55fcd, - 0x7f71fd5, - 0x7f7dfdc, - 0x7f95fdf, - 0x7fcdfe5, - 0x80a1ff3, - 0x80a6028, - 0x80ba029, - 0x80c202e, - 0x80da030, - 0x80de036, - 0x80ea037, - 0x80ee03a, - 0x80f203b, - 0x811603c, - 0x8156045, - 0x815a055, - 0x817a056, - 0x81ca05e, - 0x81ea072, - 0x281ee07a, - 0x81f607b, - 0x824e07d, - 0x8252093, - 0x8256094, - 0x825a095, - 0x829e096, - 0x82ae0a7, - 0x82ee0ab, - 0x82f20bb, - 0x83220bc, - 0x846a0c8, - 0x849211a, - 0x84c2124, - 0x84e2130, - 0x284ea138, - 0x84f213a, - 0x84fe13c, - 0x861213f, - 0x861e184, - 0x862a187, - 0x863618a, - 0x864218d, - 0x864e190, - 0x865a193, - 0x8666196, - 0x8672199, - 0x867e19c, - 0x868a19f, - 0x86961a2, + 0x27355cd2, + 0x7359cd5, + 0x735dcd6, + 0x27361cd7, + 0x7365cd8, + 0x2736dcd9, + 0x7371cdb, + 0x7375cdc, + 0x27385cdd, + 0x7389ce1, + 0x738dce2, + 0x7391ce3, + 0x7395ce4, + 0x27399ce5, + 0x739dce6, + 0x73a1ce7, + 0x73a5ce8, + 0x73a9ce9, + 0x273b1cea, + 0x73b5cec, + 0x73b9ced, + 0x73bdcee, + 0x273c1cef, + 0x73c5cf0, + 0x273cdcf1, + 0x273d1cf3, + 0x73edcf4, + 0x7405cfb, + 0x27409d01, + 0x744dd02, + 0x7451d13, + 0x7475d14, + 0x7481d1d, + 0x7485d20, + 0x7489d21, + 0x7645d22, + 0x27649d91, + 0x27651d92, + 0x27655d94, + 0x27659d95, + 0x7661d96, + 0x773dd98, + 0x27749dcf, + 0x2774ddd2, + 0x27751dd3, + 0x27755dd4, + 0x7759dd5, + 0x7785dd6, + 0x7789de1, + 0x778dde2, + 0x77b1de3, + 0x77bddec, + 0x77dddef, + 0x77e1df7, + 0x7819df8, + 0x7ac9e06, + 0x7b85eb2, + 0x7b89ee1, + 0x7b8dee2, + 0x7ba1ee3, + 0x7bd5ee8, + 0x7c0def5, + 0x27c11f03, + 0x7c2df04, + 0x7c55f0b, + 0x7c59f15, + 0x7c7df16, + 0x7c99f1f, + 0x7cc1f26, + 0x7cd1f30, + 0x7cd5f34, + 0x7cd9f35, + 0x7d11f36, + 0x7d1df44, + 0x7d45f47, + 0x7dc5f51, + 0x27dc9f71, + 0x7dd9f72, + 0x7de9f76, + 0x7e05f7a, + 0x7e25f81, + 0x7e29f89, + 0x7e3df8a, + 0x7e51f8f, + 0x7e55f94, + 0x7e59f95, + 0x7e5df96, + 0x7e7df97, + 0x7f25f9f, + 0x7f29fc9, + 0x7f45fca, + 0x7f69fd1, + 0x7f6dfda, + 0x7f75fdb, + 0x7f91fdd, + 0x7f99fe4, + 0x7fadfe6, + 0x7fcdfeb, + 0x7fe9ff3, + 0x7ff5ffa, + 0x800dffd, + 0x8046003, + 0x811a011, + 0x811e046, + 0x8132047, + 0x813a04c, + 0x815204e, + 0x8156054, + 0x8162055, + 0x8166058, + 0x816a059, + 0x816e05a, + 0x819205b, + 0x81d2064, + 0x81d6074, + 0x81f6075, + 0x824607d, + 0x826a091, + 0x2826e09a, + 0x827609b, + 0x82ce09d, + 0x82d20b3, + 0x82d60b4, + 0x82da0b5, + 0x831e0b6, + 0x832e0c7, + 0x836e0cb, + 0x83720db, + 0x83a20dc, + 0x84ee0e8, + 0x851613b, + 0x8546145, + 0x8566151, + 0x2856e159, + 0x857615b, + 0x858215d, + 0x8696160, 0x86a21a5, 0x86ae1a8, - 0x86b61ab, - 0x86c21ad, - 0x86ce1b0, - 0x86da1b3, - 0x86e61b6, - 0x86f21b9, - 0x86fe1bc, - 0x870a1bf, - 0x87161c2, - 0x87221c5, - 0x872e1c8, - 0x873a1cb, - 0x87661ce, - 0x87721d9, - 0x877e1dc, - 0x878a1df, - 0x87961e2, - 0x87a21e5, - 0x87aa1e8, - 0x87b61ea, - 0x87c21ed, - 0x87ce1f0, - 0x87da1f3, - 0x87e61f6, - 0x87f21f9, - 0x87fe1fc, - 0x880a1ff, - 0x8816202, - 0x8822205, - 0x882e208, + 0x86ba1ab, + 0x86c61ae, + 0x86d21b1, + 0x86de1b4, + 0x86ea1b7, + 0x86f61ba, + 0x87021bd, + 0x870e1c0, + 0x871a1c3, + 0x87261c6, + 0x87321c9, + 0x873a1cc, + 0x87461ce, + 0x87521d1, + 0x875e1d4, + 0x876a1d7, + 0x87761da, + 0x87821dd, + 0x878e1e0, + 0x879a1e3, + 0x87a61e6, + 0x87b21e9, + 0x87be1ec, + 0x87ea1ef, + 0x87f61fa, + 0x88021fd, + 0x880e200, + 0x881a203, + 0x8826206, + 0x882e209, 0x883a20b, 0x884620e, - 0x884e211, - 0x885a213, - 0x8866216, - 0x8872219, - 0x887e21c, - 0x888a21f, - 0x8896222, - 0x88a2225, - 0x88ae228, - 0x88b222b, + 0x8852211, + 0x885e214, + 0x886a217, + 0x887621a, + 0x888221d, + 0x888e220, + 0x889a223, + 0x88a6226, + 0x88b2229, 0x88be22c, - 0x88da22f, - 0x88de236, - 0x88ee237, - 0x890e23b, - 0x8912243, - 0x8956244, - 0x895a255, - 0x896e256, - 0x89a225b, - 0x89b2268, - 0x89ba26c, - 0x89de26e, - 0x89f6277, - 0x8a0e27d, - 0x8a26283, - 0x8a3a289, - 0x28a8228e, - 0x8a862a0, - 0x8ab22a1, - 0x8ac22ac, - 0x8ad62b0, + 0x88ca22f, + 0x88d2232, + 0x88de234, + 0x88ea237, + 0x88f623a, + 0x890223d, + 0x890e240, + 0x891a243, + 0x8926246, + 0x8932249, + 0x893624c, + 0x894224d, + 0x895e250, + 0x8962257, + 0x8972258, + 0x899625c, + 0x899a265, + 0x89de266, + 0x89e2277, + 0x89f6278, + 0x8a2a27d, + 0x8a3a28a, + 0x8a4228e, + 0x8a66290, + 0x8a7e299, + 0x8a9629f, + 0x8aae2a5, + 0x8ac22ab, + 0x28b0a2b0, + 0x8b0e2c2, + 0x8b3a2c3, + 0x8b4a2ce, + 0x8b5e2d2, } -// max children 571 (capacity 1023) -// max text offset 30545 (capacity 32767) +// max children 580 (capacity 1023) +// max text offset 30618 (capacity 32767) // max text length 36 (capacity 63) -// max hi 8885 (capacity 16383) -// max lo 8880 (capacity 16383) +// max hi 8919 (capacity 16383) +// max lo 8914 (capacity 16383) diff --git a/vendor/modules.txt b/vendor/modules.txt index 4f3775dfa22..d5e19797511 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -44,7 +44,7 @@ github.com/Azure/azure-amqp-common-go/v3/internal/tracing github.com/Azure/azure-amqp-common-go/v3/rpc github.com/Azure/azure-amqp-common-go/v3/sas github.com/Azure/azure-amqp-common-go/v3/uuid -# github.com/Azure/azure-event-hubs-go/v3 v3.1.0 +# github.com/Azure/azure-event-hubs-go/v3 v3.1.2 github.com/Azure/azure-event-hubs-go/v3 github.com/Azure/azure-event-hubs-go/v3/atom github.com/Azure/azure-event-hubs-go/v3/eph @@ -52,7 +52,7 @@ github.com/Azure/azure-event-hubs-go/v3/persist github.com/Azure/azure-event-hubs-go/v3/storage # github.com/Azure/azure-pipeline-go v0.2.1 github.com/Azure/azure-pipeline-go/pipeline -# github.com/Azure/azure-sdk-for-go v37.1.0+incompatible +# github.com/Azure/azure-sdk-for-go v40.4.0+incompatible github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources @@ -60,16 +60,16 @@ github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage github.com/Azure/azure-sdk-for-go/version # github.com/Azure/azure-storage-blob-go v0.8.0 github.com/Azure/azure-storage-blob-go/azblob -# github.com/Azure/go-amqp v0.12.6 +# github.com/Azure/go-amqp v0.12.7 github.com/Azure/go-amqp github.com/Azure/go-amqp/internal/testconn # github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm -# github.com/Azure/go-autorest/autorest v0.9.4 +# github.com/Azure/go-autorest/autorest v0.10.0 github.com/Azure/go-autorest/autorest github.com/Azure/go-autorest/autorest/azure -# github.com/Azure/go-autorest/autorest/adal v0.8.1 +# github.com/Azure/go-autorest/autorest/adal v0.8.2 github.com/Azure/go-autorest/autorest/adal # github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 github.com/Azure/go-autorest/autorest/azure/auth @@ -662,7 +662,7 @@ github.com/mitchellh/gox github.com/mitchellh/hashstructure # github.com/mitchellh/iochan v1.0.0 github.com/mitchellh/iochan -# github.com/mitchellh/mapstructure v1.1.2 +# github.com/mitchellh/mapstructure v1.2.0 github.com/mitchellh/mapstructure # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd github.com/modern-go/concurrent @@ -838,7 +838,7 @@ go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore go.uber.org/zap/zaptest/observer -# golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 +# golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 golang.org/x/crypto/blake2b golang.org/x/crypto/cast5 golang.org/x/crypto/ed25519 @@ -861,7 +861,7 @@ golang.org/x/exp/cmd/apidiff # golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f golang.org/x/lint golang.org/x/lint/golint -# golang.org/x/net v0.0.0-20200202094626-16171245cfb2 +# golang.org/x/net v0.0.0-20200301022130-244492dfa37a golang.org/x/net/bpf golang.org/x/net/context golang.org/x/net/context/ctxhttp From be8866cd0b788e3f1562311e1a4a63223e59e855 Mon Sep 17 00:00:00 2001 From: Mariana Date: Thu, 19 Mar 2020 16:05:36 +0100 Subject: [PATCH 14/16] upgrade --- go.mod | 13 +- .../github.com/Azure/azure-sdk-for-go/LICENSE | 2 +- .../mgmt/2017-04-01/eventhub/client.go | 3 +- .../2017-04-01/eventhub/consumergroups.go | 15 +- .../eventhub/disasterrecoveryconfigs.go | 34 +- .../mgmt/2017-04-01/eventhub/eventhubs.go | 36 +- .../mgmt/2017-04-01/eventhub/namespaces.go | 54 +- .../mgmt/2017-04-01/eventhub/operations.go | 6 +- .../mgmt/2017-04-01/eventhub/regions.go | 6 +- .../mgmt/2019-06-01/insights/actiongroups.go | 24 +- .../2019-06-01/insights/activitylogalerts.go | 22 +- .../mgmt/2019-06-01/insights/activitylogs.go | 6 +- .../2019-06-01/insights/alertruleincidents.go | 10 +- .../mgmt/2019-06-01/insights/alertrules.go | 21 +- .../2019-06-01/insights/autoscalesettings.go | 22 +- .../mgmt/2019-06-01/insights/baselines.go | 6 +- .../mgmt/2019-06-01/insights/client.go | 3 +- .../2019-06-01/insights/diagnosticsettings.go | 16 +- .../insights/diagnosticsettingscategory.go | 10 +- .../2019-06-01/insights/eventcategories.go | 6 +- .../mgmt/2019-06-01/insights/logprofiles.go | 18 +- .../mgmt/2019-06-01/insights/metricalerts.go | 21 +- .../2019-06-01/insights/metricalertsstatus.go | 10 +- .../2019-06-01/insights/metricbaseline.go | 9 +- .../2019-06-01/insights/metricdefinitions.go | 7 +- .../2019-06-01/insights/metricnamespaces.go | 7 +- .../mgmt/2019-06-01/insights/metrics.go | 6 +- .../mgmt/2019-06-01/insights/models.go | 8 +- .../mgmt/2019-06-01/insights/operations.go | 6 +- .../insights/scheduledqueryrules.go | 22 +- .../2019-06-01/insights/tenantactivitylogs.go | 7 +- .../mgmt/2019-06-01/insights/vminsights.go | 6 +- .../mgmt/2019-03-01/resources/client.go | 3 +- .../resources/deploymentoperations.go | 16 +- .../mgmt/2019-03-01/resources/deployments.go | 54 +- .../mgmt/2019-03-01/resources/groups.go | 24 +- .../mgmt/2019-03-01/resources/models.go | 74 +- .../mgmt/2019-03-01/resources/operations.go | 6 +- .../mgmt/2019-03-01/resources/providers.go | 15 +- .../mgmt/2019-03-01/resources/resources.go | 133 +- .../mgmt/2019-03-01/resources/tags.go | 18 +- .../mgmt/2017-10-01/storage/accounts.go | 36 +- .../storage/mgmt/2017-10-01/storage/client.go | 3 +- .../mgmt/2017-10-01/storage/operations.go | 6 +- .../storage/mgmt/2017-10-01/storage/skus.go | 6 +- .../storage/mgmt/2017-10-01/storage/usage.go | 6 +- .../Azure/azure-sdk-for-go/version/version.go | 2 +- vendor/github.com/Azure/go-amqp/client.go | 28 - .../Azure/go-autorest/autorest/adal/token.go | 7 +- .../go-autorest/autorest/authorization.go | 31 +- .../autorest/authorization_storage.go | 3 - .../Azure/go-autorest/autorest/azure/async.go | 12 +- .../Azure/go-autorest/autorest/client.go | 23 - .../Azure/go-autorest/autorest/go.mod | 2 +- .../Azure/go-autorest/autorest/go.sum | 4 +- .../Azure/go-autorest/autorest/sender.go | 25 +- .../Azure/go-autorest/autorest/utility.go | 11 - .../Azure/go-autorest/autorest/version.go | 2 +- .../mitchellh/mapstructure/.travis.yml | 1 - .../mitchellh/mapstructure/CHANGELOG.md | 8 - .../github.com/mitchellh/mapstructure/go.mod | 2 - .../mitchellh/mapstructure/mapstructure.go | 210 +- .../x/crypto/openpgp/packet/packet.go | 67 +- .../golang.org/x/crypto/sha3/xor_unaligned.go | 11 - .../x/crypto/ssh/terminal/terminal.go | 13 +- vendor/golang.org/x/net/http2/http2.go | 6 + vendor/golang.org/x/net/http2/server.go | 11 +- vendor/golang.org/x/net/http2/transport.go | 3 + vendor/golang.org/x/net/ipv4/helper.go | 17 +- vendor/golang.org/x/net/ipv4/sys_asmreq.go | 3 - vendor/golang.org/x/net/ipv6/helper.go | 1 + vendor/golang.org/x/net/publicsuffix/table.go | 19102 ++++++++-------- vendor/modules.txt | 14 +- 73 files changed, 10081 insertions(+), 10380 deletions(-) diff --git a/go.mod b/go.mod index b2bcd975a13..280fc6a2675 100644 --- a/go.mod +++ b/go.mod @@ -11,12 +11,11 @@ require ( code.cloudfoundry.org/go-loggregator v7.4.0+incompatible code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a // indirect github.com/Azure/azure-event-hubs-go/v3 v3.1.2 - github.com/Azure/azure-sdk-for-go v40.4.0+incompatible + github.com/Azure/azure-sdk-for-go v37.1.0+incompatible github.com/Azure/azure-storage-blob-go v0.8.0 - github.com/Azure/go-amqp v0.12.7 // indirect github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect - github.com/Azure/go-autorest/autorest v0.10.0 - github.com/Azure/go-autorest/autorest/adal v0.8.2 + github.com/Azure/go-autorest/autorest v0.9.4 + github.com/Azure/go-autorest/autorest/adal v0.8.1 github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 github.com/Azure/go-autorest/autorest/date v0.2.0 github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 @@ -114,7 +113,7 @@ require ( github.com/miekg/dns v1.1.15 github.com/mitchellh/gox v1.0.1 github.com/mitchellh/hashstructure v0.0.0-20170116052023-ab25296c0f51 - github.com/mitchellh/mapstructure v1.2.0 + github.com/mitchellh/mapstructure v1.1.2 github.com/morikuni/aec v1.0.0 // indirect github.com/oklog/ulid v1.3.1 github.com/opencontainers/go-digest v1.0.0-rc1.0.20190228220655-ac19fd6e7483 // indirect @@ -145,9 +144,9 @@ require ( go.uber.org/atomic v1.3.1 go.uber.org/multierr v1.1.1-0.20170829224307-fb7d312c2c04 go.uber.org/zap v1.7.1 - golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 + golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f - golang.org/x/net v0.0.0-20200301022130-244492dfa37a + golang.org/x/net v0.0.0-20200202094626-16171245cfb2 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e golang.org/x/sys v0.0.0-20200102141924-c96a22e43c9c diff --git a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE index 047555ec7e5..af39a91e703 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE +++ b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 Microsoft Corporation + Copyright 2016 Microsoft Corporation 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/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go index 7be22d87dce..87055b6514c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/client.go @@ -41,8 +41,7 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewWithBaseURI creates an instance of the BaseClient client. func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go index 472eb4d59ee..4dd76088081 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go @@ -36,8 +36,7 @@ func NewConsumerGroupsClient(subscriptionID string) ConsumerGroupsClient { return NewConsumerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client. func NewConsumerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerGroupsClient { return ConsumerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -125,7 +124,8 @@ func (client ConsumerGroupsClient) CreateOrUpdatePreparer(ctx context.Context, r // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -221,7 +221,8 @@ func (client ConsumerGroupsClient) DeletePreparer(ctx context.Context, resourceG // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -316,7 +317,8 @@ func (client ConsumerGroupsClient) GetPreparer(ctx context.Context, resourceGrou // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -429,7 +431,8 @@ func (client ConsumerGroupsClient) ListByEventHubPreparer(ctx context.Context, r // ListByEventHubSender sends the ListByEventHub request. The method will close the // http.Response Body if it receives an error. func (client ConsumerGroupsClient) ListByEventHubSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByEventHubResponder handles the response to the ListByEventHub request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go index 9fba41a5e88..3a202f057d5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go @@ -36,9 +36,7 @@ func NewDisasterRecoveryConfigsClient(subscriptionID string) DisasterRecoveryCon return NewDisasterRecoveryConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client using a -// custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, -// Azure stack). +// NewDisasterRecoveryConfigsClientWithBaseURI creates an instance of the DisasterRecoveryConfigsClient client. func NewDisasterRecoveryConfigsClientWithBaseURI(baseURI string, subscriptionID string) DisasterRecoveryConfigsClient { return DisasterRecoveryConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -119,7 +117,8 @@ func (client DisasterRecoveryConfigsClient) BreakPairingPreparer(ctx context.Con // BreakPairingSender sends the BreakPairing request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) BreakPairingSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // BreakPairingResponder handles the response to the BreakPairing request. The method always @@ -209,7 +208,8 @@ func (client DisasterRecoveryConfigsClient) CheckNameAvailabilityPreparer(ctx co // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -303,7 +303,8 @@ func (client DisasterRecoveryConfigsClient) CreateOrUpdatePreparer(ctx context.C // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -394,7 +395,8 @@ func (client DisasterRecoveryConfigsClient) DeletePreparer(ctx context.Context, // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -484,7 +486,8 @@ func (client DisasterRecoveryConfigsClient) FailOverPreparer(ctx context.Context // FailOverSender sends the FailOver request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) FailOverSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // FailOverResponder handles the response to the FailOver request. The method always @@ -574,7 +577,8 @@ func (client DisasterRecoveryConfigsClient) GetPreparer(ctx context.Context, res // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -669,7 +673,8 @@ func (client DisasterRecoveryConfigsClient) GetAuthorizationRulePreparer(ctx con // GetAuthorizationRuleSender sends the GetAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) GetAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always @@ -756,7 +761,8 @@ func (client DisasterRecoveryConfigsClient) ListPreparer(ctx context.Context, re // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -885,7 +891,8 @@ func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesPreparer(ctx c // ListAuthorizationRulesSender sends the ListAuthorizationRules request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always @@ -1017,7 +1024,8 @@ func (client DisasterRecoveryConfigsClient) ListKeysPreparer(ctx context.Context // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client DisasterRecoveryConfigsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListKeysResponder handles the response to the ListKeys request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go index 214d8c946d5..d9b70ccb444 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go @@ -36,8 +36,7 @@ func NewEventHubsClient(subscriptionID string) EventHubsClient { return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client. func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -137,7 +136,8 @@ func (client EventHubsClient) CreateOrUpdatePreparer(ctx context.Context, resour // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -153,8 +153,7 @@ func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (resu return } -// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub. Creation/update -// of the AuthorizationRule will take a few seconds to take effect. +// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub. // Parameters: // resourceGroupName - name of the resource group within the azure subscription. // namespaceName - the Namespace name @@ -239,7 +238,8 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRulePreparer(ctx contex // CreateOrUpdateAuthorizationRuleSender sends the CreateOrUpdateAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) CreateOrUpdateAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always @@ -330,7 +330,8 @@ func (client EventHubsClient) DeletePreparer(ctx context.Context, resourceGroupN // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -424,7 +425,8 @@ func (client EventHubsClient) DeleteAuthorizationRulePreparer(ctx context.Contex // DeleteAuthorizationRuleSender sends the DeleteAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) DeleteAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteAuthorizationRuleResponder handles the response to the DeleteAuthorizationRule request. The method always @@ -514,7 +516,8 @@ func (client EventHubsClient) GetPreparer(ctx context.Context, resourceGroupName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -609,7 +612,8 @@ func (client EventHubsClient) GetAuthorizationRulePreparer(ctx context.Context, // GetAuthorizationRuleSender sends the GetAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) GetAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always @@ -701,7 +705,8 @@ func (client EventHubsClient) ListAuthorizationRulesPreparer(ctx context.Context // ListAuthorizationRulesSender sends the ListAuthorizationRules request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) ListAuthorizationRulesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always @@ -845,7 +850,8 @@ func (client EventHubsClient) ListByNamespacePreparer(ctx context.Context, resou // ListByNamespaceSender sends the ListByNamespace request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByNamespaceResponder handles the response to the ListByNamespace request. The method always @@ -977,7 +983,8 @@ func (client EventHubsClient) ListKeysPreparer(ctx context.Context, resourceGrou // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListKeysResponder handles the response to the ListKeys request. The method always @@ -1075,7 +1082,8 @@ func (client EventHubsClient) RegenerateKeysPreparer(ctx context.Context, resour // RegenerateKeysSender sends the RegenerateKeys request. The method will close the // http.Response Body if it receives an error. func (client EventHubsClient) RegenerateKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go index 33a18ba85eb..919bea875af 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go @@ -36,8 +36,7 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -107,7 +106,8 @@ func (client NamespacesClient) CheckNameAvailabilityPreparer(ctx context.Context // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -204,8 +204,9 @@ func (client NamespacesClient) CreateOrUpdatePreparer(ctx context.Context, resou // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future NamespacesCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -306,7 +307,8 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(ctx conte // CreateOrUpdateAuthorizationRuleSender sends the CreateOrUpdateAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CreateOrUpdateAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always @@ -395,7 +397,8 @@ func (client NamespacesClient) CreateOrUpdateNetworkRuleSetPreparer(ctx context. // CreateOrUpdateNetworkRuleSetSender sends the CreateOrUpdateNetworkRuleSet request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) CreateOrUpdateNetworkRuleSetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateNetworkRuleSetResponder handles the response to the CreateOrUpdateNetworkRuleSet request. The method always @@ -475,8 +478,9 @@ func (client NamespacesClient) DeletePreparer(ctx context.Context, resourceGroup // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) DeleteSender(req *http.Request) (future NamespacesDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -570,7 +574,8 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(ctx context.Conte // DeleteAuthorizationRuleSender sends the DeleteAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) DeleteAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteAuthorizationRuleResponder handles the response to the DeleteAuthorizationRule request. The method always @@ -655,7 +660,8 @@ func (client NamespacesClient) GetPreparer(ctx context.Context, resourceGroupNam // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -745,7 +751,8 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(ctx context.Context, // GetAuthorizationRuleSender sends the GetAuthorizationRule request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetAuthorizationRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always @@ -831,7 +838,8 @@ func (client NamespacesClient) GetMessagingPlanPreparer(ctx context.Context, res // GetMessagingPlanSender sends the GetMessagingPlan request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetMessagingPlanSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetMessagingPlanResponder handles the response to the GetMessagingPlan request. The method always @@ -917,7 +925,8 @@ func (client NamespacesClient) GetNetworkRuleSetPreparer(ctx context.Context, re // GetNetworkRuleSetSender sends the GetNetworkRuleSet request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) GetNetworkRuleSetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetNetworkRuleSetResponder handles the response to the GetNetworkRuleSet request. The method always @@ -989,7 +998,8 @@ func (client NamespacesClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -1113,7 +1123,8 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(ctx context.Contex // ListAuthorizationRulesSender sends the ListAuthorizationRules request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListAuthorizationRulesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always @@ -1232,7 +1243,8 @@ func (client NamespacesClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -1359,7 +1371,8 @@ func (client NamespacesClient) ListKeysPreparer(ctx context.Context, resourceGro // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListKeysResponder handles the response to the ListKeys request. The method always @@ -1446,7 +1459,8 @@ func (client NamespacesClient) ListNetworkRuleSetsPreparer(ctx context.Context, // ListNetworkRuleSetsSender sends the ListNetworkRuleSets request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) ListNetworkRuleSetsSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListNetworkRuleSetsResponder handles the response to the ListNetworkRuleSets request. The method always @@ -1576,7 +1590,8 @@ func (client NamespacesClient) RegenerateKeysPreparer(ctx context.Context, resou // RegenerateKeysSender sends the RegenerateKeys request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) RegenerateKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always @@ -1666,7 +1681,8 @@ func (client NamespacesClient) UpdatePreparer(ctx context.Context, resourceGroup // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client NamespacesClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go index 3198ceb45d1..e2a19e4ef24 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go @@ -35,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -93,7 +92,8 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go index 576fa3ab535..4a936843735 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go @@ -36,8 +36,7 @@ func NewRegionsClient(subscriptionID string) RegionsClient { return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -108,7 +107,8 @@ func (client RegionsClient) ListBySkuPreparer(ctx context.Context, sku string) ( // ListBySkuSender sends the ListBySku request. The method will close the // http.Response Body if it receives an error. func (client RegionsClient) ListBySkuSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListBySkuResponder handles the response to the ListBySku request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go index 71a2fd337e3..d7d55d29ad4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/actiongroups.go @@ -36,8 +36,7 @@ func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -115,7 +114,8 @@ func (client ActionGroupsClient) CreateOrUpdatePreparer(ctx context.Context, res // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -191,7 +191,8 @@ func (client ActionGroupsClient) DeletePreparer(ctx context.Context, resourceGro // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -276,7 +277,8 @@ func (client ActionGroupsClient) EnableReceiverPreparer(ctx context.Context, res // EnableReceiverSender sends the EnableReceiver request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) EnableReceiverSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // EnableReceiverResponder handles the response to the EnableReceiver request. The method always @@ -351,7 +353,8 @@ func (client ActionGroupsClient) GetPreparer(ctx context.Context, resourceGroupN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -425,7 +428,8 @@ func (client ActionGroupsClient) ListByResourceGroupPreparer(ctx context.Context // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -496,7 +500,8 @@ func (client ActionGroupsClient) ListBySubscriptionIDPreparer(ctx context.Contex // ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always @@ -575,7 +580,8 @@ func (client ActionGroupsClient) UpdatePreparer(ctx context.Context, resourceGro // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ActionGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go index ab43adfe136..ed927c20655 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogalerts.go @@ -36,9 +36,7 @@ func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -117,7 +115,8 @@ func (client ActivityLogAlertsClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -193,7 +192,8 @@ func (client ActivityLogAlertsClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -268,7 +268,8 @@ func (client ActivityLogAlertsClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -342,7 +343,8 @@ func (client ActivityLogAlertsClient) ListByResourceGroupPreparer(ctx context.Co // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -413,7 +415,8 @@ func (client ActivityLogAlertsClient) ListBySubscriptionIDPreparer(ctx context.C // ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always @@ -492,7 +495,8 @@ func (client ActivityLogAlertsClient) UpdatePreparer(ctx context.Context, resour // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogAlertsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go index 9188a5e8f52..60e31eca2b5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/activitylogs.go @@ -35,8 +35,7 @@ func NewActivityLogsClient(subscriptionID string) ActivityLogsClient { return NewActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewActivityLogsClientWithBaseURI creates an instance of the ActivityLogsClient client. func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogsClient { return ActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -119,7 +118,8 @@ func (client ActivityLogsClient) ListPreparer(ctx context.Context, filter string // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ActivityLogsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go index b82137bb33f..86569442a22 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertruleincidents.go @@ -35,9 +35,7 @@ func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,7 +102,8 @@ func (client AlertRuleIncidentsClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AlertRuleIncidentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -180,7 +179,8 @@ func (client AlertRuleIncidentsClient) ListByAlertRulePreparer(ctx context.Conte // ListByAlertRuleSender sends the ListByAlertRule request. The method will close the // http.Response Body if it receives an error. func (client AlertRuleIncidentsClient) ListByAlertRuleSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByAlertRuleResponder handles the response to the ListByAlertRule request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go index bcf0ffa0b7c..34239f106a8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/alertrules.go @@ -36,8 +36,7 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. func NewAlertRulesClientWithBaseURI(baseURI string, subscriptionID string) AlertRulesClient { return AlertRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -115,7 +114,8 @@ func (client AlertRulesClient) CreateOrUpdatePreparer(ctx context.Context, resou // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -191,7 +191,8 @@ func (client AlertRulesClient) DeletePreparer(ctx context.Context, resourceGroup // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -266,7 +267,8 @@ func (client AlertRulesClient) GetPreparer(ctx context.Context, resourceGroupNam // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -340,7 +342,8 @@ func (client AlertRulesClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -411,7 +414,8 @@ func (client AlertRulesClient) ListBySubscriptionPreparer(ctx context.Context) ( // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -490,7 +494,8 @@ func (client AlertRulesClient) UpdatePreparer(ctx context.Context, resourceGroup // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AlertRulesClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go index d801640c589..450ade01118 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/autoscalesettings.go @@ -36,9 +36,7 @@ func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -115,7 +113,8 @@ func (client AutoscaleSettingsClient) CreateOrUpdatePreparer(ctx context.Context // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -191,7 +190,8 @@ func (client AutoscaleSettingsClient) DeletePreparer(ctx context.Context, resour // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -266,7 +266,8 @@ func (client AutoscaleSettingsClient) GetPreparer(ctx context.Context, resourceG // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -341,7 +342,8 @@ func (client AutoscaleSettingsClient) ListByResourceGroupPreparer(ctx context.Co // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -450,7 +452,8 @@ func (client AutoscaleSettingsClient) ListBySubscriptionPreparer(ctx context.Con // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -566,7 +569,8 @@ func (client AutoscaleSettingsClient) UpdatePreparer(ctx context.Context, resour // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AutoscaleSettingsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go index 3e763f4abe5..990d564d1c7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/baselines.go @@ -35,8 +35,7 @@ func NewBaselinesClient(subscriptionID string) BaselinesClient { return NewBaselinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewBaselinesClientWithBaseURI creates an instance of the BaselinesClient client. func NewBaselinesClientWithBaseURI(baseURI string, subscriptionID string) BaselinesClient { return BaselinesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -137,7 +136,8 @@ func (client BaselinesClient) ListPreparer(ctx context.Context, resourceURI stri // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client BaselinesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go index 557e8413f01..5ed388022a2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/client.go @@ -41,8 +41,7 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewWithBaseURI creates an instance of the BaseClient client. func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go index efe6c33b6b1..3b607d4d819 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettings.go @@ -35,9 +35,7 @@ func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,7 +102,8 @@ func (client DiagnosticSettingsClient) CreateOrUpdatePreparer(ctx context.Contex // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -179,7 +178,8 @@ func (client DiagnosticSettingsClient) DeletePreparer(ctx context.Context, resou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -253,7 +253,8 @@ func (client DiagnosticSettingsClient) GetPreparer(ctx context.Context, resource // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -326,7 +327,8 @@ func (client DiagnosticSettingsClient) ListPreparer(ctx context.Context, resourc // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go index 5c9ed250454..587b7f562de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/diagnosticsettingscategory.go @@ -35,9 +35,7 @@ func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettin return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client -// using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign -// clouds, Azure stack). +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -101,7 +99,8 @@ func (client DiagnosticSettingsCategoryClient) GetPreparer(ctx context.Context, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsCategoryClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -174,7 +173,8 @@ func (client DiagnosticSettingsCategoryClient) ListPreparer(ctx context.Context, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DiagnosticSettingsCategoryClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go index 68a74514678..b09fb63c688 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/eventcategories.go @@ -35,8 +35,7 @@ func NewEventCategoriesClient(subscriptionID string) EventCategoriesClient { return NewEventCategoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewEventCategoriesClientWithBaseURI creates an instance of the EventCategoriesClient client. func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string) EventCategoriesClient { return EventCategoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -93,7 +92,8 @@ func (client EventCategoriesClient) ListPreparer(ctx context.Context) (*http.Req // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client EventCategoriesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go index 6f46c7d9f68..e96cea0a618 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/logprofiles.go @@ -36,8 +36,7 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -117,7 +116,8 @@ func (client LogProfilesClient) CreateOrUpdatePreparer(ctx context.Context, logP // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -191,7 +191,8 @@ func (client LogProfilesClient) DeletePreparer(ctx context.Context, logProfileNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -264,7 +265,8 @@ func (client LogProfilesClient) GetPreparer(ctx context.Context, logProfileName // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -335,7 +337,8 @@ func (client LogProfilesClient) ListPreparer(ctx context.Context) (*http.Request // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -412,7 +415,8 @@ func (client LogProfilesClient) UpdatePreparer(ctx context.Context, logProfileNa // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client LogProfilesClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go index 16398347e8a..055a96e3ed3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalerts.go @@ -36,8 +36,7 @@ func NewMetricAlertsClient(subscriptionID string) MetricAlertsClient { return NewMetricAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewMetricAlertsClientWithBaseURI creates an instance of the MetricAlertsClient client. func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsClient { return MetricAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -118,7 +117,8 @@ func (client MetricAlertsClient) CreateOrUpdatePreparer(ctx context.Context, res // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -194,7 +194,8 @@ func (client MetricAlertsClient) DeletePreparer(ctx context.Context, resourceGro // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -269,7 +270,8 @@ func (client MetricAlertsClient) GetPreparer(ctx context.Context, resourceGroupN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -343,7 +345,8 @@ func (client MetricAlertsClient) ListByResourceGroupPreparer(ctx context.Context // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -414,7 +417,8 @@ func (client MetricAlertsClient) ListBySubscriptionPreparer(ctx context.Context) // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -493,7 +497,8 @@ func (client MetricAlertsClient) UpdatePreparer(ctx context.Context, resourceGro // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go index 2673f9d7fc9..04617c64355 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricalertsstatus.go @@ -35,9 +35,7 @@ func NewMetricAlertsStatusClient(subscriptionID string) MetricAlertsStatusClient return NewMetricAlertsStatusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewMetricAlertsStatusClientWithBaseURI creates an instance of the MetricAlertsStatusClient client. func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID string) MetricAlertsStatusClient { return MetricAlertsStatusClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -102,7 +100,8 @@ func (client MetricAlertsStatusClient) ListPreparer(ctx context.Context, resourc // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsStatusClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -180,7 +179,8 @@ func (client MetricAlertsStatusClient) ListByNamePreparer(ctx context.Context, r // ListByNameSender sends the ListByName request. The method will close the // http.Response Body if it receives an error. func (client MetricAlertsStatusClient) ListByNameSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByNameResponder handles the response to the ListByName request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go index 7195cd1b274..d12bd9d4f2b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricbaseline.go @@ -36,8 +36,7 @@ func NewMetricBaselineClient(subscriptionID string) MetricBaselineClient { return NewMetricBaselineClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client using a custom endpoint. -// Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewMetricBaselineClientWithBaseURI creates an instance of the MetricBaselineClient client. func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) MetricBaselineClient { return MetricBaselineClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -112,7 +111,8 @@ func (client MetricBaselineClient) CalculateBaselinePreparer(ctx context.Context // CalculateBaselineSender sends the CalculateBaseline request. The method will close the // http.Response Body if it receives an error. func (client MetricBaselineClient) CalculateBaselineSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // CalculateBaselineResponder handles the response to the CalculateBaseline request. The method always @@ -211,7 +211,8 @@ func (client MetricBaselineClient) GetPreparer(ctx context.Context, resourceURI // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client MetricBaselineClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go index 2e4a8073953..29a5bbee531 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricdefinitions.go @@ -35,9 +35,7 @@ func NewMetricDefinitionsClient(subscriptionID string) MetricDefinitionsClient { return NewMetricDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewMetricDefinitionsClientWithBaseURI creates an instance of the MetricDefinitionsClient client. func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) MetricDefinitionsClient { return MetricDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,7 +101,8 @@ func (client MetricDefinitionsClient) ListPreparer(ctx context.Context, resource // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricDefinitionsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go index 887572a511f..5ff2cdaa2de 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metricnamespaces.go @@ -35,9 +35,7 @@ func NewMetricNamespacesClient(subscriptionID string) MetricNamespacesClient { return NewMetricNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewMetricNamespacesClientWithBaseURI creates an instance of the MetricNamespacesClient client. func NewMetricNamespacesClientWithBaseURI(baseURI string, subscriptionID string) MetricNamespacesClient { return MetricNamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -103,7 +101,8 @@ func (client MetricNamespacesClient) ListPreparer(ctx context.Context, resourceU // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricNamespacesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go index df0dfb564b8..f1952a3fe2a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/metrics.go @@ -35,8 +35,7 @@ func NewMetricsClient(subscriptionID string) MetricsClient { return NewMetricsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewMetricsClientWithBaseURI creates an instance of the MetricsClient client. func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsClient { return MetricsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -146,7 +145,8 @@ func (client MetricsClient) ListPreparer(ctx context.Context, resourceURI string // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client MetricsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go index 072db4706ac..effcd2f083e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/models.go @@ -3403,8 +3403,8 @@ type Metric struct { type MetricAlertAction struct { // ActionGroupID - the id of the action group to use. ActionGroupID *string `json:"actionGroupId,omitempty"` - // WebHookProperties - The properties of a webhook object. - WebHookProperties map[string]*string `json:"webHookProperties"` + // WebhookProperties - The properties of a webhook object. + WebhookProperties map[string]*string `json:"webhookProperties"` } // MarshalJSON is the custom marshaler for MetricAlertAction. @@ -3413,8 +3413,8 @@ func (maa MetricAlertAction) MarshalJSON() ([]byte, error) { if maa.ActionGroupID != nil { objectMap["actionGroupId"] = maa.ActionGroupID } - if maa.WebHookProperties != nil { - objectMap["webHookProperties"] = maa.WebHookProperties + if maa.WebhookProperties != nil { + objectMap["webhookProperties"] = maa.WebhookProperties } return json.Marshal(objectMap) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go index 71df71aff3f..bd8af5c238d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/operations.go @@ -35,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -92,7 +91,8 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go index 1791a6252cc..b4bb9bca5dd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/scheduledqueryrules.go @@ -36,9 +36,7 @@ func NewScheduledQueryRulesClient(subscriptionID string) ScheduledQueryRulesClie return NewScheduledQueryRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewScheduledQueryRulesClientWithBaseURI creates an instance of the ScheduledQueryRulesClient client. func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID string) ScheduledQueryRulesClient { return ScheduledQueryRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -120,7 +118,8 @@ func (client ScheduledQueryRulesClient) CreateOrUpdatePreparer(ctx context.Conte // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -196,7 +195,8 @@ func (client ScheduledQueryRulesClient) DeletePreparer(ctx context.Context, reso // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -271,7 +271,8 @@ func (client ScheduledQueryRulesClient) GetPreparer(ctx context.Context, resourc // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -350,7 +351,8 @@ func (client ScheduledQueryRulesClient) ListByResourceGroupPreparer(ctx context. // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -427,7 +429,8 @@ func (client ScheduledQueryRulesClient) ListBySubscriptionPreparer(ctx context.C // ListBySubscriptionSender sends the ListBySubscription request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always @@ -506,7 +509,8 @@ func (client ScheduledQueryRulesClient) UpdatePreparer(ctx context.Context, reso // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ScheduledQueryRulesClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go index 6ddebcb2ba8..23739ed5d28 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/tenantactivitylogs.go @@ -35,9 +35,7 @@ func NewTenantActivityLogsClient(subscriptionID string) TenantActivityLogsClient return NewTenantActivityLogsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewTenantActivityLogsClientWithBaseURI creates an instance of the TenantActivityLogsClient client. func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) TenantActivityLogsClient { return TenantActivityLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -121,7 +119,8 @@ func (client TenantActivityLogsClient) ListPreparer(ctx context.Context, filter // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client TenantActivityLogsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go index 7f4c2fcf35b..76178c59cd2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights/vminsights.go @@ -35,8 +35,7 @@ func NewVMInsightsClient(subscriptionID string) VMInsightsClient { return NewVMInsightsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewVMInsightsClientWithBaseURI creates an instance of the VMInsightsClient client. func NewVMInsightsClientWithBaseURI(baseURI string, subscriptionID string) VMInsightsClient { return VMInsightsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -99,7 +98,8 @@ func (client VMInsightsClient) GetOnboardingStatusPreparer(ctx context.Context, // GetOnboardingStatusSender sends the GetOnboardingStatus request. The method will close the // http.Response Body if it receives an error. func (client VMInsightsClient) GetOnboardingStatusSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // GetOnboardingStatusResponder handles the response to the GetOnboardingStatus request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go index 39f90ff0970..2b25d2191e9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/client.go @@ -41,8 +41,7 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewWithBaseURI creates an instance of the BaseClient client. func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go index 1b53e4a6eb2..7b0413e9395 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deploymentoperations.go @@ -36,9 +36,7 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -117,7 +115,8 @@ func (client DeploymentOperationsClient) GetPreparer(ctx context.Context, resour // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -201,7 +200,8 @@ func (client DeploymentOperationsClient) GetAtSubscriptionScopePreparer(ctx cont // GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always @@ -294,7 +294,8 @@ func (client DeploymentOperationsClient) ListPreparer(ctx context.Context, resou // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -418,7 +419,8 @@ func (client DeploymentOperationsClient) ListAtSubscriptionScopePreparer(ctx con // ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentOperationsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go index 6d74104fe76..b65dff16bbd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/deployments.go @@ -36,8 +36,7 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,7 +96,8 @@ func (client DeploymentsClient) CalculateTemplateHashPreparer(ctx context.Contex // CalculateTemplateHashSender sends the CalculateTemplateHash request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CalculateTemplateHashSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // CalculateTemplateHashResponder handles the response to the CalculateTemplateHash request. The method always @@ -187,7 +187,8 @@ func (client DeploymentsClient) CancelPreparer(ctx context.Context, resourceGrou // CancelSender sends the Cancel request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CancelSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CancelResponder handles the response to the Cancel request. The method always @@ -270,7 +271,8 @@ func (client DeploymentsClient) CancelAtSubscriptionScopePreparer(ctx context.Co // CancelAtSubscriptionScopeSender sends the CancelAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CancelAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CancelAtSubscriptionScopeResponder handles the response to the CancelAtSubscriptionScope request. The method always @@ -358,7 +360,8 @@ func (client DeploymentsClient) CheckExistencePreparer(ctx context.Context, reso // CheckExistenceSender sends the CheckExistence request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckExistenceResponder handles the response to the CheckExistence request. The method always @@ -439,7 +442,8 @@ func (client DeploymentsClient) CheckExistenceAtSubscriptionScopePreparer(ctx co // CheckExistenceAtSubscriptionScopeSender sends the CheckExistenceAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CheckExistenceAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckExistenceAtSubscriptionScopeResponder handles the response to the CheckExistenceAtSubscriptionScope request. The method always @@ -531,8 +535,9 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(ctx context.Context, reso // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CreateOrUpdateSender(req *http.Request) (future DeploymentsCreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -624,8 +629,9 @@ func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopePreparer(ctx co // CreateOrUpdateAtSubscriptionScopeSender sends the CreateOrUpdateAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) CreateOrUpdateAtSubscriptionScopeSender(req *http.Request) (future DeploymentsCreateOrUpdateAtSubscriptionScopeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -719,8 +725,9 @@ func (client DeploymentsClient) DeletePreparer(ctx context.Context, resourceGrou // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) DeleteSender(req *http.Request) (future DeploymentsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -805,8 +812,9 @@ func (client DeploymentsClient) DeleteAtSubscriptionScopePreparer(ctx context.Co // DeleteAtSubscriptionScopeSender sends the DeleteAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) DeleteAtSubscriptionScopeSender(req *http.Request) (future DeploymentsDeleteAtSubscriptionScopeFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -898,7 +906,8 @@ func (client DeploymentsClient) ExportTemplatePreparer(ctx context.Context, reso // ExportTemplateSender sends the ExportTemplate request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ExportTemplateResponder handles the response to the ExportTemplate request. The method always @@ -980,7 +989,8 @@ func (client DeploymentsClient) ExportTemplateAtSubscriptionScopePreparer(ctx co // ExportTemplateAtSubscriptionScopeSender sends the ExportTemplateAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ExportTemplateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ExportTemplateAtSubscriptionScopeResponder handles the response to the ExportTemplateAtSubscriptionScope request. The method always @@ -1068,7 +1078,8 @@ func (client DeploymentsClient) GetPreparer(ctx context.Context, resourceGroupNa // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -1150,7 +1161,8 @@ func (client DeploymentsClient) GetAtSubscriptionScopePreparer(ctx context.Conte // GetAtSubscriptionScopeSender sends the GetAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) GetAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetAtSubscriptionScopeResponder handles the response to the GetAtSubscriptionScope request. The method always @@ -1232,7 +1244,8 @@ func (client DeploymentsClient) ListAtSubscriptionScopePreparer(ctx context.Cont // ListAtSubscriptionScopeSender sends the ListAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ListAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAtSubscriptionScopeResponder handles the response to the ListAtSubscriptionScope request. The method always @@ -1362,7 +1375,8 @@ func (client DeploymentsClient) ListByResourceGroupPreparer(ctx context.Context, // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -1499,7 +1513,8 @@ func (client DeploymentsClient) ValidatePreparer(ctx context.Context, resourceGr // ValidateSender sends the Validate request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ValidateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ValidateResponder handles the response to the Validate request. The method always @@ -1592,7 +1607,8 @@ func (client DeploymentsClient) ValidateAtSubscriptionScopePreparer(ctx context. // ValidateAtSubscriptionScopeSender sends the ValidateAtSubscriptionScope request. The method will close the // http.Response Body if it receives an error. func (client DeploymentsClient) ValidateAtSubscriptionScopeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ValidateAtSubscriptionScopeResponder handles the response to the ValidateAtSubscriptionScope request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go index 96a71282273..a74460950c0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/groups.go @@ -36,8 +36,7 @@ func NewGroupsClient(subscriptionID string) GroupsClient { return NewGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewGroupsClientWithBaseURI creates an instance of the GroupsClient client. func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient { return GroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -108,7 +107,8 @@ func (client GroupsClient) CheckExistencePreparer(ctx context.Context, resourceG // CheckExistenceSender sends the CheckExistence request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) CheckExistenceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckExistenceResponder handles the response to the CheckExistence request. The method always @@ -199,7 +199,8 @@ func (client GroupsClient) CreateOrUpdatePreparer(ctx context.Context, resourceG // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -276,8 +277,9 @@ func (client GroupsClient) DeletePreparer(ctx context.Context, resourceGroupName // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) DeleteSender(req *http.Request) (future GroupsDeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -366,7 +368,8 @@ func (client GroupsClient) ExportTemplatePreparer(ctx context.Context, resourceG // ExportTemplateSender sends the ExportTemplate request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) ExportTemplateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ExportTemplateResponder handles the response to the ExportTemplate request. The method always @@ -448,7 +451,8 @@ func (client GroupsClient) GetPreparer(ctx context.Context, resourceGroupName st // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -530,7 +534,8 @@ func (client GroupsClient) ListPreparer(ctx context.Context, filter string, top // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -653,7 +658,8 @@ func (client GroupsClient) UpdatePreparer(ctx context.Context, resourceGroupName // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client GroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go index 7b5ea2e58ff..5a354d58968 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/models.go @@ -839,68 +839,6 @@ func (gr GenericResource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } -// GenericResourceExpanded resource information. -type GenericResourceExpanded struct { - // CreatedTime - READ-ONLY; The created time of the resource. This is only present if requested via the $expand query parameter. - CreatedTime *date.Time `json:"createdTime,omitempty"` - // ChangedTime - READ-ONLY; The changed time of the resource. This is only present if requested via the $expand query parameter. - ChangedTime *date.Time `json:"changedTime,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. This is only present if requested via the $expand query parameter. - ProvisioningState *string `json:"provisioningState,omitempty"` - // Plan - The plan of the resource. - Plan *Plan `json:"plan,omitempty"` - // Properties - The resource properties. - Properties interface{} `json:"properties,omitempty"` - // Kind - The kind of the resource. - Kind *string `json:"kind,omitempty"` - // ManagedBy - ID of the resource that manages this resource. - ManagedBy *string `json:"managedBy,omitempty"` - // Sku - The SKU of the resource. - Sku *Sku `json:"sku,omitempty"` - // Identity - The identity of the resource. - Identity *Identity `json:"identity,omitempty"` - // ID - READ-ONLY; Resource ID - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type - Type *string `json:"type,omitempty"` - // Location - Resource location - Location *string `json:"location,omitempty"` - // Tags - Resource tags - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for GenericResourceExpanded. -func (gre GenericResourceExpanded) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if gre.Plan != nil { - objectMap["plan"] = gre.Plan - } - if gre.Properties != nil { - objectMap["properties"] = gre.Properties - } - if gre.Kind != nil { - objectMap["kind"] = gre.Kind - } - if gre.ManagedBy != nil { - objectMap["managedBy"] = gre.ManagedBy - } - if gre.Sku != nil { - objectMap["sku"] = gre.Sku - } - if gre.Identity != nil { - objectMap["identity"] = gre.Identity - } - if gre.Location != nil { - objectMap["location"] = gre.Location - } - if gre.Tags != nil { - objectMap["tags"] = gre.Tags - } - return json.Marshal(objectMap) -} - // GenericResourceFilter resource filter. type GenericResourceFilter struct { // ResourceType - The resource type. @@ -1209,12 +1147,12 @@ type IdentityUserAssignedIdentitiesValue struct { type ListResult struct { autorest.Response `json:"-"` // Value - An array of resources. - Value *[]GenericResourceExpanded `json:"value,omitempty"` + Value *[]GenericResource `json:"value,omitempty"` // NextLink - READ-ONLY; The URL to use for getting the next set of results. NextLink *string `json:"nextLink,omitempty"` } -// ListResultIterator provides access to a complete listing of GenericResourceExpanded values. +// ListResultIterator provides access to a complete listing of GenericResource values. type ListResultIterator struct { i int page ListResultPage @@ -1265,9 +1203,9 @@ func (iter ListResultIterator) Response() ListResult { // Value returns the current value or a zero-initialized value if the // iterator has advanced beyond the end of the collection. -func (iter ListResultIterator) Value() GenericResourceExpanded { +func (iter ListResultIterator) Value() GenericResource { if !iter.page.NotDone() { - return GenericResourceExpanded{} + return GenericResource{} } return iter.page.Values()[iter.i] } @@ -1294,7 +1232,7 @@ func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, err autorest.WithBaseURL(to.String(lr.NextLink))) } -// ListResultPage contains a page of GenericResourceExpanded values. +// ListResultPage contains a page of GenericResource values. type ListResultPage struct { fn func(context.Context, ListResult) (ListResult, error) lr ListResult @@ -1339,7 +1277,7 @@ func (page ListResultPage) Response() ListResult { } // Values returns the slice of values for the current page or nil if there are no values. -func (page ListResultPage) Values() []GenericResourceExpanded { +func (page ListResultPage) Values() []GenericResource { if page.lr.IsEmpty() { return nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go index d51d47fedcb..b5a4f9cddbb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/operations.go @@ -35,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -93,7 +92,8 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go index 0e5d9ac8052..e9fff221c87 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/providers.go @@ -35,8 +35,7 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -104,7 +103,8 @@ func (client ProvidersClient) GetPreparer(ctx context.Context, resourceProviderN // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -187,7 +187,8 @@ func (client ProvidersClient) ListPreparer(ctx context.Context, top *int32, expa // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -298,7 +299,8 @@ func (client ProvidersClient) RegisterPreparer(ctx context.Context, resourceProv // RegisterSender sends the Register request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) RegisterSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // RegisterResponder handles the response to the Register request. The method always @@ -372,7 +374,8 @@ func (client ProvidersClient) UnregisterPreparer(ctx context.Context, resourcePr // UnregisterSender sends the Unregister request. The method will close the // http.Response Body if it receives an error. func (client ProvidersClient) UnregisterSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UnregisterResponder handles the response to the Unregister request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go index 511ab472b8b..a473370f6cd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/resources.go @@ -36,8 +36,7 @@ func NewClient(subscriptionID string) Client { return NewClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientWithBaseURI creates an instance of the Client client using a custom endpoint. Use this when interacting -// with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewClientWithBaseURI creates an instance of the Client client. func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { return Client{NewWithBaseURI(baseURI, subscriptionID)} } @@ -50,8 +49,7 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { // parentResourcePath - the parent resource identity. // resourceType - the resource type. // resourceName - the name of the resource to check whether it exists. -// APIVersion - the API version to use for the operation. -func (client Client) CheckExistence(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result autorest.Response, err error) { +func (client Client) CheckExistence(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckExistence") defer func() { @@ -70,7 +68,7 @@ func (client Client) CheckExistence(ctx context.Context, resourceGroupName strin return result, validation.NewError("resources.Client", "CheckExistence", err.Error()) } - req, err := client.CheckExistencePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) + req, err := client.CheckExistencePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistence", nil, "Failure preparing request") return @@ -92,7 +90,7 @@ func (client Client) CheckExistence(ctx context.Context, resourceGroupName strin } // CheckExistencePreparer prepares the CheckExistence request. -func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { +func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -102,6 +100,7 @@ func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -117,7 +116,8 @@ func (client Client) CheckExistencePreparer(ctx context.Context, resourceGroupNa // CheckExistenceSender sends the CheckExistence request. The method will close the // http.Response Body if it receives an error. func (client Client) CheckExistenceSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckExistenceResponder handles the response to the CheckExistence request. The method always @@ -137,8 +137,7 @@ func (client Client) CheckExistenceResponder(resp *http.Response) (result autore // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -// APIVersion - the API version to use for the operation. -func (client Client) CheckExistenceByID(ctx context.Context, resourceID string, APIVersion string) (result autorest.Response, err error) { +func (client Client) CheckExistenceByID(ctx context.Context, resourceID string) (result autorest.Response, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckExistenceByID") defer func() { @@ -149,7 +148,7 @@ func (client Client) CheckExistenceByID(ctx context.Context, resourceID string, tracing.EndSpan(ctx, sc, err) }() } - req, err := client.CheckExistenceByIDPreparer(ctx, resourceID, APIVersion) + req, err := client.CheckExistenceByIDPreparer(ctx, resourceID) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CheckExistenceByID", nil, "Failure preparing request") return @@ -171,11 +170,12 @@ func (client Client) CheckExistenceByID(ctx context.Context, resourceID string, } // CheckExistenceByIDPreparer prepares the CheckExistenceByID request. -func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { +func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -191,7 +191,8 @@ func (client Client) CheckExistenceByIDPreparer(ctx context.Context, resourceID // CheckExistenceByIDSender sends the CheckExistenceByID request. The method will close the // http.Response Body if it receives an error. func (client Client) CheckExistenceByIDSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // CheckExistenceByIDResponder handles the response to the CheckExistenceByID request. The method always @@ -213,9 +214,8 @@ func (client Client) CheckExistenceByIDResponder(resp *http.Response) (result au // parentResourcePath - the parent resource identity. // resourceType - the resource type of the resource to create. // resourceName - the name of the resource to create. -// APIVersion - the API version to use for the operation. // parameters - parameters for creating or updating the resource. -func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result CreateOrUpdateFuture, err error) { +func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (result CreateOrUpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate") defer func() { @@ -237,7 +237,7 @@ func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName strin return result, validation.NewError("resources.Client", "CreateOrUpdate", err.Error()) } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters) + req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdate", nil, "Failure preparing request") return @@ -253,7 +253,7 @@ func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName strin } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) { +func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -263,6 +263,7 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -280,8 +281,9 @@ func (client Client) CreateOrUpdatePreparer(ctx context.Context, resourceGroupNa // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -307,9 +309,8 @@ func (client Client) CreateOrUpdateResponder(resp *http.Response) (result Generi // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -// APIVersion - the API version to use for the operation. // parameters - create or update resource parameters. -func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result CreateOrUpdateByIDFuture, err error) { +func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, parameters GenericResource) (result CreateOrUpdateByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdateByID") defer func() { @@ -327,7 +328,7 @@ func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, return result, validation.NewError("resources.Client", "CreateOrUpdateByID", err.Error()) } - req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceID, APIVersion, parameters) + req, err := client.CreateOrUpdateByIDPreparer(ctx, resourceID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "CreateOrUpdateByID", nil, "Failure preparing request") return @@ -343,11 +344,12 @@ func (client Client) CreateOrUpdateByID(ctx context.Context, resourceID string, } // CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request. -func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) { +func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -365,8 +367,9 @@ func (client Client) CreateOrUpdateByIDPreparer(ctx context.Context, resourceID // CreateOrUpdateByIDSender sends the CreateOrUpdateByID request. The method will close the // http.Response Body if it receives an error. func (client Client) CreateOrUpdateByIDSender(req *http.Request) (future CreateOrUpdateByIDFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -395,8 +398,7 @@ func (client Client) CreateOrUpdateByIDResponder(resp *http.Response) (result Ge // parentResourcePath - the parent resource identity. // resourceType - the resource type. // resourceName - the name of the resource to delete. -// APIVersion - the API version to use for the operation. -func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result DeleteFuture, err error) { +func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result DeleteFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete") defer func() { @@ -415,7 +417,7 @@ func (client Client) Delete(ctx context.Context, resourceGroupName string, resou return result, validation.NewError("resources.Client", "Delete", err.Error()) } - req, err := client.DeletePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) + req, err := client.DeletePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "Delete", nil, "Failure preparing request") return @@ -431,7 +433,7 @@ func (client Client) Delete(ctx context.Context, resourceGroupName string, resou } // DeletePreparer prepares the Delete request. -func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { +func (client Client) DeletePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -441,6 +443,7 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -456,8 +459,9 @@ func (client Client) DeletePreparer(ctx context.Context, resourceGroupName strin // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -482,8 +486,7 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -// APIVersion - the API version to use for the operation. -func (client Client) DeleteByID(ctx context.Context, resourceID string, APIVersion string) (result DeleteByIDFuture, err error) { +func (client Client) DeleteByID(ctx context.Context, resourceID string) (result DeleteByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.DeleteByID") defer func() { @@ -494,7 +497,7 @@ func (client Client) DeleteByID(ctx context.Context, resourceID string, APIVersi tracing.EndSpan(ctx, sc, err) }() } - req, err := client.DeleteByIDPreparer(ctx, resourceID, APIVersion) + req, err := client.DeleteByIDPreparer(ctx, resourceID) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "DeleteByID", nil, "Failure preparing request") return @@ -510,11 +513,12 @@ func (client Client) DeleteByID(ctx context.Context, resourceID string, APIVersi } // DeleteByIDPreparer prepares the DeleteByID request. -func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { +func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -530,8 +534,9 @@ func (client Client) DeleteByIDPreparer(ctx context.Context, resourceID string, // DeleteByIDSender sends the DeleteByID request. The method will close the // http.Response Body if it receives an error. func (client Client) DeleteByIDSender(req *http.Request) (future DeleteByIDFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -559,8 +564,7 @@ func (client Client) DeleteByIDResponder(resp *http.Response) (result autorest.R // parentResourcePath - the parent resource identity. // resourceType - the resource type of the resource. // resourceName - the name of the resource to get. -// APIVersion - the API version to use for the operation. -func (client Client) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (result GenericResource, err error) { +func (client Client) Get(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result GenericResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get") defer func() { @@ -579,7 +583,7 @@ func (client Client) Get(ctx context.Context, resourceGroupName string, resource return result, validation.NewError("resources.Client", "Get", err.Error()) } - req, err := client.GetPreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion) + req, err := client.GetPreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "Get", nil, "Failure preparing request") return @@ -601,7 +605,7 @@ func (client Client) Get(ctx context.Context, resourceGroupName string, resource } // GetPreparer prepares the Get request. -func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string) (*http.Request, error) { +func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -611,6 +615,7 @@ func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -626,7 +631,8 @@ func (client Client) GetPreparer(ctx context.Context, resourceGroupName string, // GetSender sends the Get request. The method will close the // http.Response Body if it receives an error. func (client Client) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetResponder handles the response to the Get request. The method always @@ -647,8 +653,7 @@ func (client Client) GetResponder(resp *http.Response) (result GenericResource, // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -// APIVersion - the API version to use for the operation. -func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion string) (result GenericResource, err error) { +func (client Client) GetByID(ctx context.Context, resourceID string) (result GenericResource, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetByID") defer func() { @@ -659,7 +664,7 @@ func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion tracing.EndSpan(ctx, sc, err) }() } - req, err := client.GetByIDPreparer(ctx, resourceID, APIVersion) + req, err := client.GetByIDPreparer(ctx, resourceID) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "GetByID", nil, "Failure preparing request") return @@ -681,11 +686,12 @@ func (client Client) GetByID(ctx context.Context, resourceID string, APIVersion } // GetByIDPreparer prepares the GetByID request. -func (client Client) GetByIDPreparer(ctx context.Context, resourceID string, APIVersion string) (*http.Request, error) { +func (client Client) GetByIDPreparer(ctx context.Context, resourceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -701,7 +707,8 @@ func (client Client) GetByIDPreparer(ctx context.Context, resourceID string, API // GetByIDSender sends the GetByID request. The method will close the // http.Response Body if it receives an error. func (client Client) GetByIDSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // GetByIDResponder handles the response to the GetByID request. The method always @@ -730,8 +737,8 @@ func (client Client) GetByIDResponder(resp *http.Response) (result GenericResour // use $filter=tagName eq 'tag1' and tagValue eq 'Value1'

You can use some properties together when // filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and // plan/name, identity and identity/principalId. -// expand - comma-separated list of additional properties to be included in the response. Valid values include -// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. +// expand - the $expand query parameter. You can expand createdTime and changedTime. For example, to expand +// both properties, use $expand=changedTime,createdTime // top - the number of results to return. If null is passed, returns all resource groups. func (client Client) List(ctx context.Context, filter string, expand string, top *int32) (result ListResultPage, err error) { if tracing.IsEnabled() { @@ -797,7 +804,8 @@ func (client Client) ListPreparer(ctx context.Context, filter string, expand str // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client Client) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -864,8 +872,8 @@ func (client Client) ListComplete(ctx context.Context, filter string, expand str // use $filter=tagName eq 'tag1' and tagValue eq 'Value1'

You can use some properties together when // filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and // plan/name, identity and identity/principalId. -// expand - comma-separated list of additional properties to be included in the response. Valid values include -// `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. +// expand - the $expand query parameter. You can expand createdTime and changedTime. For example, to expand +// both properties, use $expand=changedTime,createdTime // top - the number of results to return. If null is passed, returns all resources. func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, expand string, top *int32) (result ListResultPage, err error) { if tracing.IsEnabled() { @@ -940,7 +948,8 @@ func (client Client) ListByResourceGroupPreparer(ctx context.Context, resourceGr // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client Client) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -1058,8 +1067,9 @@ func (client Client) MoveResourcesPreparer(ctx context.Context, sourceResourceGr // MoveResourcesSender sends the MoveResources request. The method will close the // http.Response Body if it receives an error. func (client Client) MoveResourcesSender(req *http.Request) (future MoveResourcesFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -1086,9 +1096,8 @@ func (client Client) MoveResourcesResponder(resp *http.Response) (result autores // parentResourcePath - the parent resource identity. // resourceType - the resource type of the resource to update. // resourceName - the name of the resource to update. -// APIVersion - the API version to use for the operation. // parameters - parameters for updating the resource. -func (client Client) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (result UpdateFuture, err error) { +func (client Client) Update(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (result UpdateFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update") defer func() { @@ -1107,7 +1116,7 @@ func (client Client) Update(ctx context.Context, resourceGroupName string, resou return result, validation.NewError("resources.Client", "Update", err.Error()) } - req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, APIVersion, parameters) + req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "Update", nil, "Failure preparing request") return @@ -1123,7 +1132,7 @@ func (client Client) Update(ctx context.Context, resourceGroupName string, resou } // UpdatePreparer prepares the Update request. -func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, APIVersion string, parameters GenericResource) (*http.Request, error) { +func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "parentResourcePath": parentResourcePath, "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1133,6 +1142,7 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1150,8 +1160,9 @@ func (client Client) UpdatePreparer(ctx context.Context, resourceGroupName strin // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -1177,9 +1188,8 @@ func (client Client) UpdateResponder(resp *http.Response) (result GenericResourc // resourceID - the fully qualified ID of the resource, including the resource name and resource type. Use the // format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} -// APIVersion - the API version to use for the operation. // parameters - update resource parameters. -func (client Client) UpdateByID(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (result UpdateByIDFuture, err error) { +func (client Client) UpdateByID(ctx context.Context, resourceID string, parameters GenericResource) (result UpdateByIDFuture, err error) { if tracing.IsEnabled() { ctx = tracing.StartSpan(ctx, fqdn+"/Client.UpdateByID") defer func() { @@ -1190,7 +1200,7 @@ func (client Client) UpdateByID(ctx context.Context, resourceID string, APIVersi tracing.EndSpan(ctx, sc, err) }() } - req, err := client.UpdateByIDPreparer(ctx, resourceID, APIVersion, parameters) + req, err := client.UpdateByIDPreparer(ctx, resourceID, parameters) if err != nil { err = autorest.NewErrorWithError(err, "resources.Client", "UpdateByID", nil, "Failure preparing request") return @@ -1206,11 +1216,12 @@ func (client Client) UpdateByID(ctx context.Context, resourceID string, APIVersi } // UpdateByIDPreparer prepares the UpdateByID request. -func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, APIVersion string, parameters GenericResource) (*http.Request, error) { +func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, parameters GenericResource) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceId": resourceID, } + const APIVersion = "2019-03-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1228,8 +1239,9 @@ func (client Client) UpdateByIDPreparer(ctx context.Context, resourceID string, // UpdateByIDSender sends the UpdateByID request. The method will close the // http.Response Body if it receives an error. func (client Client) UpdateByIDSender(req *http.Request) (future UpdateByIDFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) var resp *http.Response - resp, err = client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -1317,8 +1329,9 @@ func (client Client) ValidateMoveResourcesPreparer(ctx context.Context, sourceRe // ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the // http.Response Body if it receives an error. func (client Client) ValidateMoveResourcesSender(req *http.Request) (future ValidateMoveResourcesFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go index 3a315c02973..bb2b96320ae 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources/tags.go @@ -35,8 +35,7 @@ func NewTagsClient(subscriptionID string) TagsClient { return NewTagsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewTagsClientWithBaseURI creates an instance of the TagsClient client. func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient { return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -100,7 +99,8 @@ func (client TagsClient) CreateOrUpdatePreparer(ctx context.Context, tagName str // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -176,7 +176,8 @@ func (client TagsClient) CreateOrUpdateValuePreparer(ctx context.Context, tagNam // CreateOrUpdateValueSender sends the CreateOrUpdateValue request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) CreateOrUpdateValueSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CreateOrUpdateValueResponder handles the response to the CreateOrUpdateValue request. The method always @@ -250,7 +251,8 @@ func (client TagsClient) DeletePreparer(ctx context.Context, tagName string) (*h // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -325,7 +327,8 @@ func (client TagsClient) DeleteValuePreparer(ctx context.Context, tagName string // DeleteValueSender sends the DeleteValue request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) DeleteValueSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteValueResponder handles the response to the DeleteValue request. The method always @@ -396,7 +399,8 @@ func (client TagsClient) ListPreparer(ctx context.Context) (*http.Request, error // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client TagsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go index 36a6d3ff3be..7700b6b273d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/accounts.go @@ -36,8 +36,7 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -109,7 +108,8 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(ctx context.Context, // CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always @@ -207,8 +207,9 @@ func (client AccountsClient) CreatePreparer(ctx context.Context, resourceGroupNa // CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCreateFuture, err error) { + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) var resp *http.Response - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) + resp, err = autorest.SendWithSender(client, req, sd...) if err != nil { return } @@ -302,7 +303,8 @@ func (client AccountsClient) DeletePreparer(ctx context.Context, resourceGroupNa // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // DeleteResponder handles the response to the Delete request. The method always @@ -391,7 +393,8 @@ func (client AccountsClient) GetPropertiesPreparer(ctx context.Context, resource // GetPropertiesSender sends the GetProperties request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) GetPropertiesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // GetPropertiesResponder handles the response to the GetProperties request. The method always @@ -463,7 +466,8 @@ func (client AccountsClient) ListPreparer(ctx context.Context) (*http.Request, e // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always @@ -557,7 +561,8 @@ func (client AccountsClient) ListAccountSASPreparer(ctx context.Context, resourc // ListAccountSASSender sends the ListAccountSAS request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListAccountSASSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListAccountSASResponder handles the response to the ListAccountSAS request. The method always @@ -641,7 +646,8 @@ func (client AccountsClient) ListByResourceGroupPreparer(ctx context.Context, re // ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always @@ -730,7 +736,8 @@ func (client AccountsClient) ListKeysPreparer(ctx context.Context, resourceGroup // ListKeysSender sends the ListKeys request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListKeysSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListKeysResponder handles the response to the ListKeys request. The method always @@ -826,7 +833,8 @@ func (client AccountsClient) ListServiceSASPreparer(ctx context.Context, resourc // ListServiceSASSender sends the ListServiceSAS request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) ListServiceSASSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListServiceSASResponder handles the response to the ListServiceSAS request. The method always @@ -920,7 +928,8 @@ func (client AccountsClient) RegenerateKeyPreparer(ctx context.Context, resource // RegenerateKeySender sends the RegenerateKey request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) RegenerateKeySender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // RegenerateKeyResponder handles the response to the RegenerateKey request. The method always @@ -1017,7 +1026,8 @@ func (client AccountsClient) UpdatePreparer(ctx context.Context, resourceGroupNa // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client AccountsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // UpdateResponder handles the response to the Update request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go index abba376eda8..2be951c81f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/client.go @@ -41,8 +41,7 @@ func New(subscriptionID string) BaseClient { return NewWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewWithBaseURI creates an instance of the BaseClient client. func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { return BaseClient{ Client: autorest.NewClientWithUserAgent(UserAgent()), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go index 1c53ff4a443..eb1434d0770 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/operations.go @@ -35,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -92,7 +91,8 @@ func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + sd := autorest.GetSendDecorators(req.Context(), autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go index fa842a2a34e..cf469d1dba1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/skus.go @@ -35,8 +35,7 @@ func NewSkusClient(subscriptionID string) SkusClient { return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSkusClientWithBaseURI creates an instance of the SkusClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewSkusClientWithBaseURI creates an instance of the SkusClient client. func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -96,7 +95,8 @@ func (client SkusClient) ListPreparer(ctx context.Context) (*http.Request, error // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client SkusClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go index 87c19e995fe..4d66508587f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage/usage.go @@ -35,8 +35,7 @@ func NewUsageClient(subscriptionID string) UsageClient { return NewUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageClientWithBaseURI creates an instance of the UsageClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). +// NewUsageClientWithBaseURI creates an instance of the UsageClient client. func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClient { return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -96,7 +95,8 @@ func (client UsageClient) ListPreparer(ctx context.Context) (*http.Request, erro // ListSender sends the List request. The method will close the // http.Response Body if it receives an error. func (client UsageClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) + sd := autorest.GetSendDecorators(req.Context(), azure.DoRetryWithRegistration(client.Client)) + return autorest.SendWithSender(client, req, sd...) } // ListResponder handles the response to the List request. The method always diff --git a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go index dd586a91262..672e7e77a9b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/version/version.go @@ -18,4 +18,4 @@ package version // Changes may cause incorrect behavior and will be lost if the code is regenerated. // Number contains the semantic version of this SDK. -const Number = "v40.4.0" +const Number = "v37.1.0" diff --git a/vendor/github.com/Azure/go-amqp/client.go b/vendor/github.com/Azure/go-amqp/client.go index ea1bde7ed56..e06f0ffb8d9 100644 --- a/vendor/github.com/Azure/go-amqp/client.go +++ b/vendor/github.com/Azure/go-amqp/client.go @@ -1810,20 +1810,6 @@ func LinkTargetExpiryPolicy(p ExpiryPolicy) LinkOption { } } -// LinkTargetTimeout sets the duration that an expiring target will be retained. -// -// Default: 0. -func LinkTargetTimeout(timeout uint32) LinkOption { - return func(l *link) error { - if l.target == nil { - l.target = new(target) - } - l.target.Timeout = timeout - - return nil - } -} - // LinkSourceDurability sets the source durability policy. // // Default: DurabilityNone. @@ -1861,20 +1847,6 @@ func LinkSourceExpiryPolicy(p ExpiryPolicy) LinkOption { } } -// LinkSourceTimeout sets the duration that an expiring source will be retained. -// -// Default: 0. -func LinkSourceTimeout(timeout uint32) LinkOption { - return func(l *link) error { - if l.source == nil { - l.source = new(source) - } - l.source.Timeout = timeout - - return nil - } -} - // Receiver receives messages on a single AMQP link. type Receiver struct { link *link // underlying link diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go index b65b2c8b206..33bbd6ea150 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ b/vendor/github.com/Azure/go-autorest/autorest/adal/token.go @@ -24,7 +24,6 @@ import ( "encoding/json" "errors" "fmt" - "io" "io/ioutil" "math" "net/http" @@ -249,7 +248,7 @@ func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalTo "sub": spt.inner.ClientID, "jti": base64.URLEncoding.EncodeToString(jti), "nbf": time.Now().Unix(), - "exp": time.Now().Add(24 * time.Hour).Unix(), + "exp": time.Now().Add(time.Hour * 24).Unix(), } signedString, err := token.SignedString(secret.PrivateKey) @@ -973,10 +972,6 @@ func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http delay := time.Duration(0) for attempt < maxAttempts { - if resp != nil && resp.Body != nil { - io.Copy(ioutil.Discard, resp.Body) - resp.Body.Close() - } resp, err = sender.Do(req) // we want to retry if err is not nil or the status code is in the list of retry codes if err == nil && !responseHasStatusCode(resp, retries...) { diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go index f43e1a6ed5a..54e87b5b648 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization.go @@ -171,21 +171,20 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { removeRequestBody(&rCopy) resp, err := bacb.sender.Do(&rCopy) - if err != nil { - return r, err - } - DrainResponseBody(resp) - if resp.StatusCode == 401 && hasBearerChallenge(resp.Header) { - bc, err := newBearerChallenge(resp.Header) - if err != nil { - return r, err - } - if bacb.callback != nil { - ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) + if err == nil && resp.StatusCode == 401 { + defer resp.Body.Close() + if hasBearerChallenge(resp) { + bc, err := newBearerChallenge(resp) if err != nil { return r, err } - return Prepare(r, ba.WithAuthorization()) + if bacb.callback != nil { + ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) + if err != nil { + return r, err + } + return Prepare(r, ba.WithAuthorization()) + } } } } @@ -195,8 +194,8 @@ func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { } // returns true if the HTTP response contains a bearer challenge -func hasBearerChallenge(header http.Header) bool { - authHeader := header.Get(bearerChallengeHeader) +func hasBearerChallenge(resp *http.Response) bool { + authHeader := resp.Header.Get(bearerChallengeHeader) if len(authHeader) == 0 || strings.Index(authHeader, bearer) < 0 { return false } @@ -207,8 +206,8 @@ type bearerChallenge struct { values map[string]string } -func newBearerChallenge(header http.Header) (bc bearerChallenge, err error) { - challenge := strings.TrimSpace(header.Get(bearerChallengeHeader)) +func newBearerChallenge(resp *http.Response) (bc bearerChallenge, err error) { + challenge := strings.TrimSpace(resp.Header.Get(bearerChallengeHeader)) trimmedChallenge := challenge[len(bearer)+1:] // challenge is a set of key=value pairs that are comma delimited diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go index b844a3df418..33e5f127017 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go +++ b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go @@ -104,9 +104,6 @@ func (sk *SharedKeyAuthorizer) WithAuthorization() PrepareDecorator { } sk, err := buildSharedKey(sk.accountName, sk.accountKey, r, sk.keyType) - if err != nil { - return r, err - } return Prepare(r, WithHeader(headerAuthorization, sk)) }) } diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go index c5fc511f67c..1cb41cbeb1b 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go +++ b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go @@ -258,17 +258,7 @@ func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) { if err != nil { return nil, err } - resp, err := sender.Do(req) - if err == nil && resp.Body != nil { - // copy the body and close it so callers don't have to - defer resp.Body.Close() - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - return resp, err - } - resp.Body = ioutil.NopCloser(bytes.NewReader(b)) - } - return resp, err + return sender.Do(req) } type pollingTracker interface { diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go index e04f9fd4ecd..1c6a0617a1f 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/client.go +++ b/vendor/github.com/Azure/go-autorest/autorest/client.go @@ -179,11 +179,6 @@ type Client struct { // Set to true to skip attempted registration of resource providers (false by default). SkipResourceProviderRegistration bool - - // SendDecorators can be used to override the default chain of SendDecorators. - // This can be used to specify things like a custom retry SendDecorator. - // Set this to an empty slice to use no SendDecorators. - SendDecorators []SendDecorator } // NewClientWithUserAgent returns an instance of a Client with the UserAgent set to the passed @@ -303,21 +298,3 @@ func (c Client) ByInspecting() RespondDecorator { } return c.ResponseInspector } - -// Send sends the provided http.Request using the client's Sender or the default sender. -// It returns the http.Response and possible error. It also accepts a, possibly empty, -// default set of SendDecorators used when sending the request. -// SendDecorators have the following precedence: -// 1. In a request's context via WithSendDecorators() -// 2. Specified on the client in SendDecorators -// 3. The default values specified in this method -func (c Client) Send(req *http.Request, decorators ...SendDecorator) (*http.Response, error) { - if c.SendDecorators != nil { - decorators = c.SendDecorators - } - inCtx := req.Context().Value(ctxSendDecorators{}) - if sd, ok := inCtx.([]SendDecorator); ok { - decorators = sd - } - return SendWithSender(c, req, decorators...) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.mod b/vendor/github.com/Azure/go-autorest/autorest/go.mod index 499c56de48a..6f1fcd4a4db 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.mod +++ b/vendor/github.com/Azure/go-autorest/autorest/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/go-autorest/autorest go 1.12 require ( - github.com/Azure/go-autorest/autorest/adal v0.8.2 + github.com/Azure/go-autorest/autorest/adal v0.8.0 github.com/Azure/go-autorest/autorest/mocks v0.3.0 github.com/Azure/go-autorest/logger v0.1.0 github.com/Azure/go-autorest/tracing v0.5.0 diff --git a/vendor/github.com/Azure/go-autorest/autorest/go.sum b/vendor/github.com/Azure/go-autorest/autorest/go.sum index 37398d1d48a..e0d94da0a25 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/go.sum +++ b/vendor/github.com/Azure/go-autorest/autorest/go.sum @@ -1,8 +1,8 @@ github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= +github.com/Azure/go-autorest/autorest/adal v0.8.0 h1:CxTzQrySOxDnKpLjFJeZAS5Qrv/qFPkgLjx5bOAi//I= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM= diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go index 704f3e55e08..5e595d7b1a3 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/sender.go +++ b/vendor/github.com/Azure/go-autorest/autorest/sender.go @@ -243,7 +243,6 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { if err != nil { return resp, err } - DrainResponseBody(resp) resp, err = s.Do(rr.Request()) if err == nil { return resp, err @@ -257,12 +256,6 @@ func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { } } -// Count429AsRetry indicates that a 429 response should be included as a retry attempt. -var Count429AsRetry = true - -// Max429Delay is the maximum duration to wait between retries on a 429 if no Retry-After header was received. -var Max429Delay time.Duration - // DoRetryForStatusCodes returns a SendDecorator that retries for specified statusCodes for up to the specified // number of attempts, exponentially backing off between requests using the supplied backoff // time.Duration (which may be zero). Retrying may be canceled by cancelling the context on the http.Request. @@ -270,7 +263,7 @@ var Max429Delay time.Duration func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) SendDecorator { return func(s Sender) Sender { return SenderFunc(func(r *http.Request) (*http.Response, error) { - return doRetryForStatusCodesImpl(s, r, Count429AsRetry, attempts, backoff, 0, codes...) + return doRetryForStatusCodesImpl(s, r, false, attempts, backoff, 0, codes...) }) } } @@ -282,7 +275,7 @@ func DoRetryForStatusCodes(attempts int, backoff time.Duration, codes ...int) Se func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, codes ...int) SendDecorator { return func(s Sender) Sender { return SenderFunc(func(r *http.Request) (*http.Response, error) { - return doRetryForStatusCodesImpl(s, r, Count429AsRetry, attempts, backoff, cap, codes...) + return doRetryForStatusCodesImpl(s, r, true, attempts, backoff, cap, codes...) }) } } @@ -290,12 +283,11 @@ func DoRetryForStatusCodesWithCap(attempts int, backoff, cap time.Duration, code func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempts int, backoff, cap time.Duration, codes ...int) (resp *http.Response, err error) { rr := NewRetriableRequest(r) // Increment to add the first call (attempts denotes number of retries) - for attempt, delayCount := 0, 0; attempt < attempts+1; { + for attempt := 0; attempt < attempts+1; { err = rr.Prepare() if err != nil { return } - DrainResponseBody(resp) resp, err = s.Do(rr.Request()) // we want to retry if err is not nil (e.g. transient network failure). note that for failed authentication // resp and err will both have a value, so in this case we don't want to retry as it will never succeed. @@ -303,12 +295,7 @@ func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempt return resp, err } delayed := DelayWithRetryAfter(resp, r.Context().Done()) - // if this was a 429 set the delay cap as specified. - // applicable only in the absence of a retry-after header. - if resp != nil && resp.StatusCode == http.StatusTooManyRequests { - cap = Max429Delay - } - if !delayed && !DelayForBackoffWithCap(backoff, cap, delayCount, r.Context().Done()) { + if !delayed && !DelayForBackoffWithCap(backoff, cap, attempt, r.Context().Done()) { return resp, r.Context().Err() } // when count429 == false don't count a 429 against the number @@ -316,9 +303,6 @@ func doRetryForStatusCodesImpl(s Sender, r *http.Request, count429 bool, attempt if count429 || (resp == nil || resp.StatusCode != http.StatusTooManyRequests) { attempt++ } - // delay count is tracked separately from attempts to - // ensure that 429 participates in exponential back-off - delayCount++ } return resp, err } @@ -363,7 +347,6 @@ func DoRetryForDuration(d time.Duration, backoff time.Duration) SendDecorator { if err != nil { return resp, err } - DrainResponseBody(resp) resp, err = s.Do(rr.Request()) if err == nil { return resp, err diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go index 67baab2cee2..27f824f544b 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/utility.go +++ b/vendor/github.com/Azure/go-autorest/autorest/utility.go @@ -20,7 +20,6 @@ import ( "encoding/xml" "fmt" "io" - "io/ioutil" "net" "net/http" "net/url" @@ -227,13 +226,3 @@ func IsTemporaryNetworkError(err error) bool { } return false } - -// DrainResponseBody reads the response body then closes it. -func DrainResponseBody(resp *http.Response) error { - if resp != nil && resp.Body != nil { - _, err := io.Copy(ioutil.Discard, resp.Body) - resp.Body.Close() - return err - } - return nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go index 2bf84cc8f48..6c1d865668d 100644 --- a/vendor/github.com/Azure/go-autorest/autorest/version.go +++ b/vendor/github.com/Azure/go-autorest/autorest/version.go @@ -19,7 +19,7 @@ import ( "runtime" ) -const number = "v14.0.0" +const number = "v13.3.2" var ( userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", diff --git a/vendor/github.com/mitchellh/mapstructure/.travis.yml b/vendor/github.com/mitchellh/mapstructure/.travis.yml index b122a8e3d9f..1689c7d7355 100644 --- a/vendor/github.com/mitchellh/mapstructure/.travis.yml +++ b/vendor/github.com/mitchellh/mapstructure/.travis.yml @@ -6,4 +6,3 @@ go: script: - go test - - go test -bench . -benchmem diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md index 970dce4e0e1..3b3cb723f81 100644 --- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md +++ b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md @@ -1,11 +1,3 @@ -## 1.2.0 - -* Added support to capture unused values in a field using the `",remain"` value - in the mapstructure tag. There is an example to showcase usage. -* Added `DecoderConfig` option to always squash embedded structs -* `json.Number` can decode into `uint` types -* Empty slices are preserved and not replaced with nil slices - ## 1.1.2 * Fix error when decode hook decodes interface implementation into interface diff --git a/vendor/github.com/mitchellh/mapstructure/go.mod b/vendor/github.com/mitchellh/mapstructure/go.mod index a03ae973088..d2a71256208 100644 --- a/vendor/github.com/mitchellh/mapstructure/go.mod +++ b/vendor/github.com/mitchellh/mapstructure/go.mod @@ -1,3 +1 @@ module github.com/mitchellh/mapstructure - -go 1.14 diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go index 968abf935ed..256ee63fbf3 100644 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go @@ -1,109 +1,10 @@ -// Package mapstructure exposes functionality to convert one arbitrary -// Go type into another, typically to convert a map[string]interface{} -// into a native Go structure. +// Package mapstructure exposes functionality to convert an arbitrary +// map[string]interface{} into a native Go structure. // // The Go structure can be arbitrarily complex, containing slices, // other structs, etc. and the decoder will properly decode nested // maps and so on into the proper structures in the native Go struct. // See the examples to see what the decoder is capable of. -// -// The simplest function to start with is Decode. -// -// Field Tags -// -// When decoding to a struct, mapstructure will use the field name by -// default to perform the mapping. For example, if a struct has a field -// "Username" then mapstructure will look for a key in the source value -// of "username" (case insensitive). -// -// type User struct { -// Username string -// } -// -// You can change the behavior of mapstructure by using struct tags. -// The default struct tag that mapstructure looks for is "mapstructure" -// but you can customize it using DecoderConfig. -// -// Renaming Fields -// -// To rename the key that mapstructure looks for, use the "mapstructure" -// tag and set a value directly. For example, to change the "username" example -// above to "user": -// -// type User struct { -// Username string `mapstructure:"user"` -// } -// -// Embedded Structs and Squashing -// -// Embedded structs are treated as if they're another field with that name. -// By default, the two structs below are equivalent when decoding with -// mapstructure: -// -// type Person struct { -// Name string -// } -// -// type Friend struct { -// Person -// } -// -// type Friend struct { -// Person Person -// } -// -// This would require an input that looks like below: -// -// map[string]interface{}{ -// "person": map[string]interface{}{"name": "alice"}, -// } -// -// If your "person" value is NOT nested, then you can append ",squash" to -// your tag value and mapstructure will treat it as if the embedded struct -// were part of the struct directly. Example: -// -// type Friend struct { -// Person `mapstructure:",squash"` -// } -// -// Now the following input would be accepted: -// -// map[string]interface{}{ -// "name": "alice", -// } -// -// DecoderConfig has a field that changes the behavior of mapstructure -// to always squash embedded structs. -// -// Remainder Values -// -// If there are any unmapped keys in the source value, mapstructure by -// default will silently ignore them. You can error by setting ErrorUnused -// in DecoderConfig. If you're using Metadata you can also maintain a slice -// of the unused keys. -// -// You can also use the ",remain" suffix on your tag to collect all unused -// values in a map. The field with this tag MUST be a map type and should -// probably be a "map[string]interface{}" or "map[interface{}]interface{}". -// See example below: -// -// type Friend struct { -// Name string -// Other map[string]interface{} `mapstructure:",remain"` -// } -// -// Given the input below, Other would be populated with the other -// values that weren't used (everything but "name"): -// -// map[string]interface{}{ -// "name": "bob", -// "address": "123 Maple St.", -// } -// -// Other Configuration -// -// mapstructure is highly configurable. See the DecoderConfig struct -// for other features and options that are supported. package mapstructure import ( @@ -179,14 +80,6 @@ type DecoderConfig struct { // WeaklyTypedInput bool - // Squash will squash embedded structs. A squash tag may also be - // added to an individual struct field using a tag. For example: - // - // type Parent struct { - // Child `mapstructure:",squash"` - // } - Squash bool - // Metadata is the struct that will contain extra metadata about // the decoding. If this is nil, then no metadata will be tracked. Metadata *Metadata @@ -545,7 +438,6 @@ func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) er func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error { dataVal := reflect.Indirect(reflect.ValueOf(data)) dataKind := getKind(dataVal) - dataType := dataVal.Type() switch { case dataKind == reflect.Int: @@ -577,18 +469,6 @@ func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) e } else { return fmt.Errorf("cannot parse '%s' as uint: %s", name, err) } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Int64() - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - if i < 0 && !d.config.WeaklyTypedInput { - return fmt.Errorf("cannot parse '%s', %d overflows uint", - name, i) - } - val.SetUint(uint64(i)) default: return fmt.Errorf( "'%s' expected type '%s', got unconvertible type '%s'", @@ -809,20 +689,17 @@ func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val re keyName = tagParts[0] } - // If Squash is set in the config, we squash the field down. - squash := d.config.Squash && v.Kind() == reflect.Struct // If "squash" is specified in the tag, we squash the field down. - if !squash { - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break - } - } - if squash && v.Kind() != reflect.Struct { - return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) + squash := false + for _, tag := range tagParts[1:] { + if tag == "squash" { + squash = true + break } } + if squash && v.Kind() != reflect.Struct { + return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) + } switch v.Kind() { // this is an embedded struct, so handle it differently @@ -928,8 +805,8 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) valElemType := valType.Elem() sliceType := reflect.SliceOf(valElemType) - // If we have a non array/slice type then we first attempt to convert. - if dataValKind != reflect.Array && dataValKind != reflect.Slice { + valSlice := val + if valSlice.IsNil() || d.config.ZeroFields { if d.config.WeaklyTypedInput { switch { // Slice and array we use the normal logic @@ -956,17 +833,18 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) } } - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - } + // Check input type + if dataValKind != reflect.Array && dataValKind != reflect.Slice { + return fmt.Errorf( + "'%s': source data must be an array or slice, got %s", name, dataValKind) - // If the input value is nil, then don't allocate since empty != nil - if dataVal.IsNil() { - return nil - } + } + + // If the input value is empty, then don't allocate since non-nil != nil + if dataVal.Len() == 0 { + return nil + } - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { // Make a new slice to hold our result, same size as the original data. valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) } @@ -1127,11 +1005,6 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e field reflect.StructField val reflect.Value } - - // remainField is set to a valid field set with the "remain" tag if - // we are keeping track of remaining values. - var remainField *field - fields := []field{} for len(structs) > 0 { structVal := structs[0] @@ -1144,21 +1017,13 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e fieldKind := fieldType.Type.Kind() // If "squash" is specified in the tag, we squash the field down. - squash := d.config.Squash && fieldKind == reflect.Struct - remain := false - - // We always parse the tags cause we're looking for other tags too + squash := false tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") for _, tag := range tagParts[1:] { if tag == "squash" { squash = true break } - - if tag == "remain" { - remain = true - break - } } if squash { @@ -1171,14 +1036,8 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e continue } - // Build our field - fieldCurrent := field{fieldType, structVal.Field(i)} - if remain { - remainField = &fieldCurrent - } else { - // Normal struct field, store it away - fields = append(fields, field{fieldType, structVal.Field(i)}) - } + // Normal struct field, store it away + fields = append(fields, field{fieldType, structVal.Field(i)}) } } @@ -1244,25 +1103,6 @@ func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) e } } - // If we have a "remain"-tagged field and we have unused keys then - // we put the unused keys directly into the remain field. - if remainField != nil && len(dataValKeysUnused) > 0 { - // Build a map of only the unused values - remain := map[interface{}]interface{}{} - for key := range dataValKeysUnused { - remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() - } - - // Decode it as-if we were just decoding this map onto our map. - if err := d.decodeMap(name, remain, remainField.val); err != nil { - errors = appendErrors(errors, err) - } - - // Set the map to nil so we have none so that the next check will - // not error (ErrorUnused) - dataValKeysUnused = nil - } - if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { keys := make([]string, 0, len(dataValKeysUnused)) for rawKey := range dataValKeysUnused { diff --git a/vendor/golang.org/x/crypto/openpgp/packet/packet.go b/vendor/golang.org/x/crypto/openpgp/packet/packet.go index 9728d61d7aa..5af64c5421b 100644 --- a/vendor/golang.org/x/crypto/openpgp/packet/packet.go +++ b/vendor/golang.org/x/crypto/openpgp/packet/packet.go @@ -14,7 +14,6 @@ import ( "crypto/rsa" "io" "math/big" - "math/bits" "golang.org/x/crypto/cast5" "golang.org/x/crypto/openpgp/errors" @@ -101,65 +100,33 @@ func (r *partialLengthReader) Read(p []byte) (n int, err error) { type partialLengthWriter struct { w io.WriteCloser lengthByte [1]byte - sentFirst bool - buf []byte } -// RFC 4880 4.2.2.4: the first partial length MUST be at least 512 octets long. -const minFirstPartialWrite = 512 - func (w *partialLengthWriter) Write(p []byte) (n int, err error) { - off := 0 - if !w.sentFirst { - if len(w.buf) > 0 || len(p) < minFirstPartialWrite { - off = len(w.buf) - w.buf = append(w.buf, p...) - if len(w.buf) < minFirstPartialWrite { - return len(p), nil - } - p = w.buf - w.buf = nil - } - w.sentFirst = true - } - - power := uint8(30) for len(p) > 0 { - l := 1 << power - if len(p) < l { - power = uint8(bits.Len32(uint32(len(p)))) - 1 - l = 1 << power - } - w.lengthByte[0] = 224 + power - _, err = w.w.Write(w.lengthByte[:]) - if err == nil { - var m int - m, err = w.w.Write(p[:l]) - n += m - } - if err != nil { - if n < off { - return 0, err + for power := uint(14); power < 32; power-- { + l := 1 << power + if len(p) >= l { + w.lengthByte[0] = 224 + uint8(power) + _, err = w.w.Write(w.lengthByte[:]) + if err != nil { + return + } + var m int + m, err = w.w.Write(p[:l]) + n += m + if err != nil { + return + } + p = p[l:] + break } - return n - off, err } - p = p[l:] } - return n - off, nil + return } func (w *partialLengthWriter) Close() error { - if len(w.buf) > 0 { - // In this case we can't send a 512 byte packet. - // Just send what we have. - p := w.buf - w.sentFirst = true - w.buf = nil - if _, err := w.Write(p); err != nil { - return err - } - } - w.lengthByte[0] = 0 _, err := w.w.Write(w.lengthByte[:]) if err != nil { diff --git a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go index 5ede2c61b45..a3d068634c2 100644 --- a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go +++ b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go @@ -16,17 +16,6 @@ func (b *storageBuf) asBytes() *[maxRate]byte { return (*[maxRate]byte)(unsafe.Pointer(b)) } -//go:nocheckptr -// -// xorInUnaligned intentionally reads the input buffer as an unaligned slice of -// integers. The language spec is not clear on whether that is allowed. -// See: -// https://golang.org/issue/37644 -// https://golang.org/issue/37298 -// https://golang.org/issue/35381 - -// xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a -// XOR buf. func xorInUnaligned(d *state, buf []byte) { n := len(buf) bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))[: n/8 : n/8] diff --git a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go index d1b4fca3a94..dd7378c8a34 100644 --- a/vendor/golang.org/x/crypto/ssh/terminal/terminal.go +++ b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go @@ -7,7 +7,6 @@ package terminal import ( "bytes" "io" - "runtime" "strconv" "sync" "unicode/utf8" @@ -940,8 +939,6 @@ func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) { // readPasswordLine reads from reader until it finds \n or io.EOF. // The slice returned does not include the \n. // readPasswordLine also ignores any \r it finds. -// Windows uses \r as end of line. So, on Windows, readPasswordLine -// reads until it finds \r and ignores any \n it finds during processing. func readPasswordLine(reader io.Reader) ([]byte, error) { var buf [1]byte var ret []byte @@ -955,15 +952,9 @@ func readPasswordLine(reader io.Reader) ([]byte, error) { ret = ret[:len(ret)-1] } case '\n': - if runtime.GOOS != "windows" { - return ret, nil - } - // otherwise ignore \n + return ret, nil case '\r': - if runtime.GOOS == "windows" { - return ret, nil - } - // otherwise ignore \r + // remove \r from passwords on Windows default: ret = append(ret, buf[0]) } diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index 27cc893cc0e..bdaba1d46b1 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -19,6 +19,7 @@ package http2 // import "golang.org/x/net/http2" import ( "bufio" "crypto/tls" + "errors" "fmt" "io" "net/http" @@ -172,6 +173,11 @@ func (s SettingID) String() string { return fmt.Sprintf("UNKNOWN_SETTING_%d", uint16(s)) } +var ( + errInvalidHeaderFieldName = errors.New("http2: invalid header field name") + errInvalidHeaderFieldValue = errors.New("http2: invalid header field value") +) + // validWireHeaderFieldName reports whether v is a valid header field // name (key). See httpguts.ValidHeaderName for the base rules. // diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index bc9e41a1b77..de31d72b2c3 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -581,10 +581,13 @@ type stream struct { cancelCtx func() // owned by serverConn's serve loop: - bodyBytes int64 // body bytes seen so far - declBodyBytes int64 // or -1 if undeclared - flow flow // limits writing from Handler to client - inflow flow // what the client is allowed to POST/etc to us + bodyBytes int64 // body bytes seen so far + declBodyBytes int64 // or -1 if undeclared + flow flow // limits writing from Handler to client + inflow flow // what the client is allowed to POST/etc to us + parent *stream // or nil + numTrailerValues int64 + weight uint8 state streamState resetQueued bool // RST_STREAM queued for write; set by sc.resetStream gotTrailerHeader bool // HEADER frame for trailers was seen diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 81778bec612..d948e96eec2 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -2198,6 +2198,8 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error { return nil } +var errInvalidTrailers = errors.New("http2: invalid trailers") + func (rl *clientConnReadLoop) endStream(cs *clientStream) { // TODO: check that any declared content-length matches, like // server.go's (*stream).endStream method. @@ -2428,6 +2430,7 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) var ( errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit") errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit") + errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers") ) func (cc *ClientConn) logf(format string, args ...interface{}) { diff --git a/vendor/golang.org/x/net/ipv4/helper.go b/vendor/golang.org/x/net/ipv4/helper.go index e845a7376ea..b494a2cde46 100644 --- a/vendor/golang.org/x/net/ipv4/helper.go +++ b/vendor/golang.org/x/net/ipv4/helper.go @@ -13,13 +13,16 @@ import ( ) var ( - errInvalidConn = errors.New("invalid connection") - errMissingAddress = errors.New("missing address") - errNilHeader = errors.New("nil header") - errHeaderTooShort = errors.New("header too short") - errExtHeaderTooShort = errors.New("extension header too short") - errInvalidConnType = errors.New("invalid conn type") - errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH) + errInvalidConn = errors.New("invalid connection") + errMissingAddress = errors.New("missing address") + errMissingHeader = errors.New("missing header") + errNilHeader = errors.New("nil header") + errHeaderTooShort = errors.New("header too short") + errExtHeaderTooShort = errors.New("extension header too short") + errInvalidConnType = errors.New("invalid conn type") + errNoSuchInterface = errors.New("no such interface") + errNoSuchMulticastInterface = errors.New("no such multicast interface") + errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH) // See https://www.freebsd.org/doc/en/books/porters-handbook/versions.html. freebsdVersion uint32 diff --git a/vendor/golang.org/x/net/ipv4/sys_asmreq.go b/vendor/golang.org/x/net/ipv4/sys_asmreq.go index 76d670acaa9..c5eaafe96be 100644 --- a/vendor/golang.org/x/net/ipv4/sys_asmreq.go +++ b/vendor/golang.org/x/net/ipv4/sys_asmreq.go @@ -7,15 +7,12 @@ package ipv4 import ( - "errors" "net" "unsafe" "golang.org/x/net/internal/socket" ) -var errNoSuchInterface = errors.New("no such interface") - func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}} if err := setIPMreqInterface(&mreq, ifi); err != nil { diff --git a/vendor/golang.org/x/net/ipv6/helper.go b/vendor/golang.org/x/net/ipv6/helper.go index c2d508f9c30..f767b1f5ddd 100644 --- a/vendor/golang.org/x/net/ipv6/helper.go +++ b/vendor/golang.org/x/net/ipv6/helper.go @@ -15,6 +15,7 @@ var ( errMissingAddress = errors.New("missing address") errHeaderTooShort = errors.New("header too short") errInvalidConnType = errors.New("invalid conn type") + errNoSuchInterface = errors.New("no such interface") errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH) ) diff --git a/vendor/golang.org/x/net/publicsuffix/table.go b/vendor/golang.org/x/net/publicsuffix/table.go index 369e44656ad..8eb0495edd2 100644 --- a/vendor/golang.org/x/net/publicsuffix/table.go +++ b/vendor/golang.org/x/net/publicsuffix/table.go @@ -2,7 +2,7 @@ package publicsuffix -const version = "publicsuffix.org's public_suffix_list.dat, git revision 7922d7c20e246552be418e8f72e577899fd30d99 (2020-02-18T23:18:19Z)" +const version = "publicsuffix.org's public_suffix_list.dat, git revision 41cb01612341c7ce3bcdd0cc4e696ae9f6416600 (2019-11-08T08:48:39Z)" const ( nodesBitsChildren = 10 @@ -23,488 +23,487 @@ const ( ) // numTLD is the number of top level domains. -const numTLD = 1528 +const numTLD = 1538 // Text is the combined text of all labels. const text = "9guacuiababia-goracleaningroks-theatree12hpalermomahachijoinvill" + "eksvik12ix4432-balsfjordd-dnsiskinkyotobetsulikes-piedmonticello" + - "dingen4tatarantours3-ap-south-16-b-dataiji234lima-cityeatselinog" + - "radult3l3p0rtashkentatamotors3-ap-northeast-2038blackfridayuu2-l" + - "ocalhostoregontrailroadnparachutingleezebloombergbauernirasakind" + - "igenaklodzkochikushinonsenergyuzawabloxcms3-website-us-west-1blu" + - "edagestangemologicallimoliseminebmoattachments3-website-us-west-" + - "2bms5ybmweddinglitchattanooganordlandrangedalinkyard-cloudyclust" + - "erbnrwedeploybomloabathsbchernihivgubsakyotanabellunord-aurdalph" + - "a-myqnapcloudaccesscambridgestoneuesalangenishiazaindustriabondr" + - "ay-dnsupdaternopilawatchesalondonetskaruizawabonnishigohtawaramo" + - "toineppueblockbustermezparaglidingliwicebookinghostfoldnavybooml" + - "air-traffic-controlleyboschaefflerdalivornomutashinaindustrieste" + - "amfamberkeleybostikarumaifarmsteadrayddnsfreebox-osascoli-piceno" + - "rdre-landraydnsaltdalombardynaliaskimitsubatamibudejjuegoshikiho" + - "kumakogenebakkeshibechambagriculturennebugattiffanynysadoes-itve" + - "destrandrivefsnillfjordrobaknoluoktachikawakembuchikumagayagawak" + - "kanaibetsubamericanfamilydsclouderackmazerbaijan-mayen-rootaribe" + - "iraogashimadachicagoboatsaludrudupontariobranconakamuratajirivne" + - "bostonakijinsekikogentappsselfiparisor-fronishiharabotanicalgard" + - "enishiizunazukinfinitintuitjomeloyalistoragebotanicgardenishikat" + - "aketomisatomobellevuelosangelesjabbottjxfinitybotanybouncemerckm" + - "sdnipropetrovskjervoyageorgeorgiabounty-fullensakerrypropertiesa" + - "lvadordalibabalestrandabergamo-siemensncfdurbanamexnethnologybou" + - "tiquebechernivtsiciliabozen-sudtirolomzaporizhzhegurinuyamashina" + - "tsukigatakasakitaurayasudabozen-suedtirolondrinamsskoganeinvestm" + - "entsalzburglobalashovhachinohedmarkasaokamiminersamegawabplacedo" + - "gawarabikomaezakirunorddalorenskogloboavistanbulsan-sudtiroloten" + - "kawabrandywinevalleybrasiliabrindisibenikimobetsuitainaioiraseba" + - "stopologyeongnamegawafflecellclaimsamnangerbristoloseyouriparlia" + - "mentkmaxxjavald-aostarnberglogowegroweibolognagareyamakeupowiath" + - "letajimabaridagawakuyabukikonaikawachinaganoharamcoachampionship" + - "hoptobishimadridvagsoyerbritishcolumbialowiezaganishikatsuragit-" + - "reposampalacebroadcastleclerchernovtsymantechnologybroadwaybroke" + - "-itksatxn--0trq7p7nnishikawazukamisunagawabrokerbronnoysundurham" + - "burgloppenzaolbia-tempio-olbiatempioolbialystokkepnogatagajoboji" + - "nzais-a-candidatebrothermesaverdealstahaugesunderseaportsinfolld" + - "alottebrowsersafetymarketsamsclubartoweirbrumunddalottokonamegat" + - "akayamashikokuchuobrunelasticbeanstalkashibatakatoris-a-catererb" + - "russelsamsunglugmbhartipscbgminakamichiharabruxellesandnessjoeni" + - "shimerabryansklepparmatta-varjjatmparochernigovernmentoyosatoyok" + - "awabrynewjerseybuskerudinewmexicoalouvreitoyotaparsandoybuzentsu" + - "jiiebuzzwellbeingzonebwfarsundweberbzhitomirumalatvuopmicrolight" + - "ingmodellingmxn--11b4c3dynathomebuiltwithdarkashiharabzzcolumbus" + - "heycommunecommunity-prochowicecomoarekecomparemarkerryhotelsanta" + - "mariakecompute-1computerhistoryofscience-fictioncomsecuritytacti" + - "csantoandreamhostersanukis-a-cubicle-slavellinodearthachiojiyaho" + - "oguycondoshichinohealth-carereforminamidaitomanchesterconference" + - "constructionconsuladonnagatorodoyconsultanthropologyconsultingro" + - "ngausdalukowhalingrossetouchihayaakasakawaharacontactraniandriab" + - "arlettatraniandriacontagematsubaracontemporaryarteducationalchik" + - "ugodontexistmein-iservebeercontractorskenconventureshinodebalanc" + - "ertificationcookingchannelsdvrdnsfor-better-thanawassamukawatari" + - "ghtathomeftpartycooluroycooperativano-frankivskolegallocus-3cope" + - "nhagencyclopedichitosetogakushimotoganewyorkshirecifedexhibition" + - "ishinoomotegocorsicafederationcorvettemp-dnsaobernardocosenzakop" + - "anecosidnshome-webserverdalutskasuyameinforumzcostumedicinaharim" + - "alopolskanlandyndns-office-on-the-webhareidsbergentingroundhandl" + - "ingroznycouchpotatofriesaogoncarriercounciluxurycouponsaotomelda" + - "luzerncq-acranbrookuwanalyticsapporocrdyndns-picsardegnaroycredi" + - "tcardyndns-remotewdyndns-serverisigncreditunioncremonashgabadadd" + - "jaguarqcxn--12c1fe0bradescorporationrendercrewhoswhokksundyndns-" + - "webhopencraftranoycricketrzyncrimeast-kazakhstanangercrotonecrow" + - "nipasadenarashinocrsvpassagensardiniacruisesarlvivanovoldacrypto" + - "nomichigangwoncuisinellajollamericanexpressexyculturalcentertain" + - "mentransportecuneocupcakecuritibaghdadyndns-wikirkenesarpsborgrp" + - "assenger-associationcymrussiacyonabaruminamiechizencyouthruherec" + - "ipescaravantaarpatriaferrerotikagoshimalvikaszubyfetsundyndns1fg" + - "uidegreefhvalerfidoomdnstracefieldynnsarufutsunomiyawakasaikaita" + - "koelnfigueresinstaginguitarsauheradynservebbsasayamayfirstockhol" + - "mestrandyndns-workshopitsitexaskoyabearalvahkijobservableusercon" + - "tentransurlfilateliafilegear-audnedalnfilegear-deatnulminamiiser" + - "niafilegear-gbizfilegear-iefilegear-jpmorganfilegear-sgujohanama" + - "kinoharafilminamiizukamiokameokameyamatotakadafinalfinancefinear" + - "tsavannahgafinlandynufcfanfinnoyfirebaseapplinzis-a-doctorayfire" + - "nzefirestonefirmdalegoldpoint2thisamitsukefishingolffansaves-the" + - "-whalessandria-trani-barletta-andriatranibarlettaandriafitjarvod" + - "kafjordynv6fitnessettlementravelersinsurancefjalerflesbergulenfl" + - "ickragerogersavonarusawaflightsaxoflirfloginlinefloraflorenceflo" + - "ridattorelayfloripaderbornfloristanohatakaharulvikatowicefloroku" + - "nohealthcareerschoenbrunnflowerschokokekschokoladenfltrdynvpnplu" + - "s-4flynnhosting-clusterflynnhubarcelonagawalesundgcagliaricoharu" + - "ovataxihuanflfanfshostrowwlkpmgjerdrumemsettsupportcp4fndyroyrvi" + - "kingruefor-ourfor-somedizinhistorischescholarshipschoolschulefor" + - "-theaterforexrothachirogatakamoriokakudamatsueforgotdnschwarzgwa" + - "ngjuniperforli-cesena-forlicesenaforlikescandyn53forsaleikangerf" + - "orsandasuologoipaviancargodaddyn-o-saurlandeschweizfortalfortmis" + - "soulancasterfortworthadanorthwesternmutualfosnesciencecenterscie" + - "ncehistoryfotaruis-a-financialadvisor-aurdalfoxfordebianfozorafr" + - "edrikstadtvscientistordalfreeddnsgeekgalaxyfreedesktopocznore-og" + - "-uvdalfreemasonryfreesitextileirfjordfreetlscjohnsonfreiburgunma" + - "nxn--12co0c3b4evalleaostavangerfreightrentin-sud-tirolfreseniusc" + - "ountryestateofdelawareggio-calabriafribourguovdageaidnunusualper" + - "sonfriuli-v-giuliafriuli-ve-giuliafriuli-vegiuliafriuli-venezia-" + - "giuliafriuli-veneziagiuliafriuli-vgiuliafriuliv-giuliafriulive-g" + - "iuliafriulivegiuliafriulivenezia-giuliafriuliveneziagiuliafriuli" + - "vgiuliafrlfroganscotlandfrognfrolandfrom-akrehamnfrom-alfrom-arf" + - "rom-azimutheworkpccwiiheyakagefrom-capebretonamicrosoftbankatsus" + - "hikabeeldengeluidfrom-codyn-vpndnscrapper-sitefrom-ctrentin-sudt" + - "irolfrom-dchocolatelevisionishinoshimatsushigefrom-dedyn-berlinc" + - "olnfrom-flanderscrappingushikamifuranorth-kazakhstanfrom-gaulard" + - "alfrom-hichisochildrensgardenfrom-iafrom-idfrom-ilfrom-in-brbarc" + - "laycards3-sa-east-1from-kscrysechofunatoriginstitutemasekashiwaz" + - "akiyosatokamachintaifun-dnsdojolsterfrom-kyowariasahikawawildlif" + - "edorainfracloudfrontdoorfrom-lanciafrom-mamurogawafrom-mdfrom-me" + - "eresistancefrom-mifunefrom-mnfrom-modalenfrom-mserveirchonanbuls" + - "an-suedtirolowiczest-le-patronishiokoppegardyndns-at-homedepoten" + - "zamamidsundyndns-at-workisboringrimstadyndns-blogdnsangofrom-mtn" + - "from-nctulangevagrigentomologyeonggiehtavuoatnadexeterfrom-ndfro" + - "m-nefrom-nh-serveblogsiteleafamilycompanyminamimakis-a-geekatsuy" + - "amarugame-hostrowiechoseiroumuenchenishitosashimizunaminamibosog" + - "ndalpusercontentoyotsukaidofrom-njaworznoticiasnesoddenmarkhange" + - "lskjakdnepropetrovskiervaapsteiermarkaufenfrom-nminamiminowafrom" + - "-nvalled-aostavernfrom-nyfrom-ohkurafrom-oketogurafrom-orfrom-pa" + - "dovaksdalfrom-pratohmandalfrom-ris-a-greenfrom-schmidtre-gauldal" + - "from-sdfrom-tnfrom-txn--1ck2e1barclays3-us-east-2from-utazuerich" + - "ardlillehammerfeste-ipfizerfrom-val-daostavalleyfrom-vtrentin-su" + - "ed-tirolfrom-wafrom-wielunnerfrom-wvalledaostaobaomoriguchiharah" + - "kkeravjuedischesapeakebayernunzenfrom-wyfrosinonefrostalowa-wola" + - "wafroyahikobeardubaiduckdnserveminecraftrentin-suedtirolfstcgrou" + - "pgfoggiafujiiderafujikawaguchikonefujiminokamoenairguardiannakad" + - "omarineat-urlfujinomiyadavvenjargap-northeast-3fujiokayamangonoh" + - "ejis-a-guruslivinghistoryfujisatoshonairlinebraskauniversitychya" + - "ttorneyagawakayamagazinedre-eikerfujisawafujishiroishidakabirato" + - "ridefenseljordfujitsurugashimangyshlakasamatsudovre-eikerfujixer" + - "oxn--1ctwolominamatargivestbytemarkautokeinotteroyfujiyoshidavve" + - "siidatsunanjoburgwiddleitungsenfukayabeatservemp3fukuchiyamadaza" + - "ifudaigojomedio-campidano-mediocampidanomediofukudominichoshibuy" + - "achiyodatingripefukuis-a-hard-workerservep2pharmacienservepicser" + - "vequakefukumitsubishigakisarazurecontainerdpolicefukuokazakishiw" + - "adafukuroishikarikaturindalfukusakisofukushimaniwakuratefukuyama" + - "gatakahatakaishimogosenfunabashiriuchinadafunagatakamatsukawafun" + - "ahashikamiamakusatsumasendaisennangooglecodespotrentino-a-adigef" + - "undaciofuoiskujukuriyamannorfolkebibleirvikazoologyfuosskoczowil" + - "liamhillfurnitureggio-emilia-romagnakasatsunairportland-4-salern" + - "oboribetsuckservesarcasmatartanddesignfurubirafurudonostiaafuruk" + - "awairtelebitballooningxn--1lqs03nfusodegaurafussagamiharafutabay" + - "amaguchinomigawafutboldlygoingnowhere-for-morenakatombetsumitaka" + - "giizefuttsurugimperiafuturecmservicesevastopolefuturehostingfutu" + - "remailingfvgfylkesbiblackbaudcdn77-securebungoonord-odalwaysdata" + - "baseballangenkainanaejrietisalatinabenonicbcn-north-1fyresdalhan" + - "goutsystemscloudhannanmokuizumodenakayamapartmentsewinbarefootba" + - "llfinanzgoraustrheimatunduhrennesoyokozebinagisoccertmgretakaham" + - "alselvendrellaziobiramusementdllpages3-ap-southeast-2hannosegawa" + - "hanyuzenhapmirharstadharvestcelebrationhasamarburghasaminami-alp" + - "sharis-a-lawyerhashbanghasudahasura-appharmacysharphdfcbankddiel" + - "ddanuorrittogliattireshawaiijimaritimoduminamioguni5hasvikfhappo" + - "usrcfastly-terrariuminamifuranohatogayaitakanezawahatoyamazakita" + - "kamiizumisanofidelityhatsukaichikaiseis-a-liberalhattfjelldalhay" + - "ashimamotobungotakadancehazuminobusells-for-ustkannamilanotogawa" + - "helsinkitakatakaokalmykiahembygdsforbundhemneshellaspeziahemseda" + - "lhepforgeherokussldheroyhgtvallee-aosteroyhigashiagatsumagoiania" + - "higashichichibunkyonanaoshimageandsoundandvisionthewifiatmallorc" + - "adaqueshimojis-a-libertarianhigashihiroshimanehigashiizumozakita" + - "kyushuaiahigashikagawahigashikagurasoedahigashikawakitaaikitamih" + - "amadahigashikurumeetnedalhigashimatsushimarcheapigeelvinckhakass" + - "iahigashimatsuyamakitaakitadaitoigawahigashimurayamamotorcyclesh" + - "imokawahigashinarusells-itrentino-alto-adigehigashinehigashiomih" + - "achimanagementrentino-altoadigehigashiosakasayamanakakogawahigas" + - "hishirakawamatakarazukaluganskygearapphiladelphiaareadmyblogspot" + - "rentino-s-tirolhigashisumiyoshikawaminamiaikitamotosumy-gatewayh" + - "igashitsunoshiroomurahigashiurausukitanakagusukumodernhigashiyam" + - "atokoriyamanashifteditchyouriphilatelyhigashiyodogawahigashiyosh" + - "inogaris-a-linux-useranishiaritabashijonawatehiraizumisatohnosho" + - "ooshikamaishimodatehirakatashinagawahiranairtrafficplexus-1hirar" + - "ahiratsukagawahirayaizuwakamatsubushikusakadogawahistorichousesh" + - "imokitayamahitachiomiyagildeskaliszhitachiotagoppdalhitraeumtger" + - "adelmenhorstalbanshimonitayanagithubusercontentrentino-stirolhja" + - "rtdalhjelmelandholeckobierzyceholidayhomeiphilipsyno-dshimonosek" + - "ikawahomelinkitoolsztynsettlershimosuwalkis-a-llamarriottrentino" + - "-sud-tirolhomelinuxn--1lqs71dhomeofficehomesecuritymacaparecidah" + - "omesecuritypchoyodobashichikashukujitawaravennagasukehomesenseer" + - "inghomeunixn--1qqw23ahondahongotembaixadahonjyoitakasagotpantheo" + - "nsitehornindalhorsellsyourhomegoodshimotsukehorteneis-a-musician" + - "hospitalhoteleshimotsumahotmailhoyangerhoylandetroitskypehumanit" + - "ieshinichinanhurdalhurumajis-a-nascarfanhyllestadhyogoris-a-nurs" + - "embokukitchenhyugawarahyundaiwafuneis-very-sweetpepperis-with-th" + - "ebandoisleofmanaustdaljewelryjewishartgalleryjfkharkovalleedaost" + - "ejgorajlljmphotographysiojnjcphonefosshintomikasaharajoyentrenti" + - "noa-adigejoyokaichibalatinogiftshiojirishirifujiedajpnjprshioyan" + - "aizujurkoseis-a-personaltrainerkosherbrookegawakoshimizumakizuno" + - "kunimimatakatsukiyosemitekoshunantankhmelnitskiyamarumorimachida" + - "kosugekotohiradomainsurehabmerkotourakouhokutamakis-a-photograph" + - "erokuapphoenixn--2m4a15ekounosupplieshirakofuefukihaboromskogkou" + - "yamarylhurstjordalshalsenkouzushimasfjordenkozagawakozakis-a-pla" + - "yerkozowindmillkpnkppspdnshiranukamitsuekrasnikahokutokashikis-a" + - "-republicancerresearchaeologicaliforniakrasnodarkredstonekristia" + - "nsandcatshiraois-a-rockstarachowicekristiansundkrodsheradkroksta" + - "delvaldaostarostwodzislawindowskrakowinnershiraokamogawakryminam" + - "isanrikubetsurfastpanelblagrarchaeologyeongbuk0emmafann-arboretu" + - "mbriamallamaceiobbcg120001wwwebredirectmembers3-ap-northeast-133" + - "7kumatorinokumejimashikis-a-socialistdlibestadkumenantokigawakun" + - "isakis-a-soxfankunitachiarailwaykunitomigusukumamotoyamashikekun" + - "neppubtlshiratakahagitlaborkunstsammlungkunstunddesignkuokgroupi" + - "lotshishikuis-a-studentalkureisenkurgankurobelaudibleasingleshis" + - "ognekurogiminamiashigarakuroisoftwarendalenugkuromatsunais-a-tea" + - "cherkassyncloudkurotakikawasakis-a-techietis-a-painteractivegask" + - "vollkushirogawakustanais-a-therapistoiakusupplykutchanelkutnokuz" + - "umakis-an-accountantshinjournalismailillesandefjordkvafjordkvals" + - "undkvamlidlugolekadenagahamaroygardendoftheinternetlifyis-an-act" + - "orkvanangenkvinesdalkvinnheradkviteseidskogkvitsoykwpspectrumina" + - "mitanekzmissileluxembourgmisugitokorozawamitourismolanxesshisuif" + - "uettertdasnetzmitoyoakemiuramiyazurewebsiteshikagamiishibukawami" + - "yotamanomjondalenmlbfanmonstermontrealestatefarmequipmentrentino" + - "aadigemonza-brianzapposhitaramamonza-e-della-brianzaptokuyamatsu" + - "maebashikshacknetrentinoalto-adigemonzabrianzaramonzaebrianzamon" + - "zaedellabrianzamoonscalevangermordoviamoriyamatsumotofukemoriyos" + - "himinamiawajikis-an-engineeringmormonmouthaebaruericssongdalenvi" + - "knakatsugawamoroyamatsunomortgagemoscowioshizukuishimofusaitamat" + - "sukuris-an-entertainermoseushistorymosjoenmoskeneshizuokanagawam" + - "osshoppingmosvikhplaystationmoteginowaniihamatamakawajimansionsh" + - "oujis-bytomaritimekeepingmoviemovimientokyotangovtrentinoaltoadi" + - "gemozilla-iotrentinos-tirolmtranbymuenstermuginozawaonsenmuikami" + - "satokaizukamikitayamatsuris-certifieducatorahimeshimamateramobar" + - "amukodairamulhouseoullensvanguardmunakatanemuncienciamuosattemup" + - "imientakinouemurmansklabudhabikinokawabarthadselectrentino-aadig" + - "emurotorcraftrentinostirolmusashimurayamatsusakahoginankokubunji" + - "s-foundationmusashinoharamuseetrentinosud-tirolmuseumverenigingm" + - "usicarbonia-iglesias-carboniaiglesiascarboniamutsuzawamy-vigorge" + - "my-wanggouvichromedicaltanissettairamyactivedirectorymyasustor-e" + - "lvdalmycdn77-sslattuminamiuonumassa-carrara-massacarraramassabus" + - "inessebyklecznagasakinderoymydattolocalhistorymyddnskingmydissen" + - "trentinosudtirolmydobisshikis-gonemydroboehringerikemydshowamyef" + - "fectrentinosued-tirolmyfirewallonieruchomoscienceandindustrynmyf" + - "oruminamiyamashirokawanabelembetsukubankhmelnytskyivanylvenicemy" + - "fritzmyftpaccesshowtimelhusdecorativeartshriramsterdamnserverban" + - "iamyhome-servermyjinomykolaivaomymailermymediapchungnamdalseidfj" + - "ordyndns-ipartis-a-chefashionishiwakis-a-conservativegarsheis-a-" + - "cpadualstackhero-networkinggroupartsannanissandiegomyokohamamats" + - "udamypepinkmpspbargainstantcloudfunctionswedenvironmentalconserv" + - "ationionjukudoyamaintenancempresashibetsukuiiyamanouchikuhokuryu" + - "gasakitashiobarauthordalanddnslivelanddnss3-eu-west-1mypetsienar" + - "utolgamyphotoshibalena-devicesigdalmypictetrentinosuedtirolmypsx" + - "n--30rr7ymysecuritycamerakermyshopblocksilknx-serverrankoshigaya" + - "nagawamytis-a-bloggermytuleapioneermyvnchurcharternidyndns-mailu" + - "bindalublindesnesannohelplfinancialucaniamywirepaircraftingvollo" + - "mbardiamondsimple-urlpizzapkolobrzegersundplantsirdalplatformsha" + - "ngrilapyplazaplcube-serversaillesjcbnpparibaselburgplumbingoplur" + - "inacionalpodhalewismillerpodlasiellaktyubinskiptveterinaireadthe" + - "docscappgafannefrankfurtrentinsud-tirolpodzonepohlpoivronpokerpo" + - "krovskomaganepoliticarrdpolitiendapolkowicepoltavalle-aostathell" + - "ezajskomakiyosunndalpomorzeszowitdkomatsushimarylandponpesaro-ur" + - "bino-pesarourbinopesaromasvuotnaritakurashikis-into-animeguroros" + - "hinkamigotoyohashimototalponypordenonepornporsangerporsangugepor" + - "sgrunnanyokoshibahikariwanumatakkoebenhavnpoznanpraxis-a-bookkee" + - "perspectakashimarnardalprdpreservationpresidioprgmrprimelbournep" + - "rincipeprivatizehealthinsuranceproductionslupskomforbarreauction" + - "-webhostingjerstadotsuruokakamigaharautomotiveconomiasakuchinots" + - "uchiurakawalbrzycharitysfjordds3-eu-west-2profesionalprogressive" + - "nneslaskerrylogisticslzpromombetsurgeonshalloffameiwamasoyproper" + - "typrotectionprotonetrentinsudtirolprudentialpruszkowithgoogleapi" + - "sa-hockeynutsiracusakatamayufuelveruminanoprvcyberlevagangaviika" + - "nonjis-into-carshinshinotsurgeryprzeworskogptplusgardenpulawypup" + - "ippugliapvhagakhanamigawapvtrentinsued-tirolpwcircustomer-ocimdb" + - "ananarepublicaseihicampobassociatest-iservecounterstrikehimejibm" + - "deportevadsobetsumidatlanticasertaipeiheijiitatebayashiibajddarc" + - "hitecturealtorlandevelopmentattoobservereviewsaintlouis-a-bruins" + - "fanayorovnoceanographics3-fips-us-gov-west-1pzqhagebostadqldqpon" + - "iatowadaqslingqualifioappiszquickconnectrentinsuedtirolquicksyte" + - "stingquipelementsnoasaitoshimattelekommunikationqvcistrondheimmo" + - "bilienissayokkaichiropractichirurgiens-dentistes-en-francesuzaka" + - "nazawasuzukaneyamazoesuzukis-leetrentino-sudtirolsvalbardunloppa" + - "cificitichiryukyuragifuchungbukharaumalborkashiwarasveiosvelviko" + - "morotsukaminoyamaxunjargasvizzerasvn-reposomnarviikamishihoronob" + - "eauxartsandcraftsokndalswidnicartoonartdecologiaswidnikkokaminok" + - "awanishiaizubangeswiebodzin-butterswiftcoverswinoujscienceandhis" + - "toryswissmarterthanyousynology-diskstationsynology-dsooturystyka" + - "nmakiwientuscanytushuissier-justicetuvalle-daostaticsor-varanger" + - "tuxfamilytwmailvestfoldvestnesorfoldvestre-slidreplantationvestr" + - "e-totennishiawakuravestvagoyvevelstadvibo-valentiavibovalentiavi" + - "deovillasorocabalsan-sudtirollagdenesnaaseinet-freaksolarssonvin" + - "nicasacamdvrcampinagrandebuilderschlesischesorreisahayakawakamii" + - "chikawamisatottoris-into-cartoonshinshirovinnytsiavipsinaappitts" + - "burghofficialvirginiavirtual-userveftpiwatevirtualservervirtualu" + - "servegame-servervirtueeldomein-vigorlicevirtuelvisakegawaviterbo" + - "knowsitallvivolkenkundenvixn--32vp30haibarakitahatakanabeautysva" + - "rdoesntexisteingeekazunow-dnsevenassisicilyvlaanderenvladikavkaz" + - "imierz-dolnyvladimirvlogintoyonezawavminiserversicherungvologdan" + - "skongsbergvolvolkswagentsortlandvolyngdalvoorloperauniterois-los" + - "trolekamakurazakiwakunigamiharutwentevossevangenvotevotingvotoyo" + - "nowloclawekongsvingerwmflabsorumincomcastresindevicenzaporizhzhi" + - "awnextdirectrogstadworldworse-thandawowithyoutuberspacekitagatar" + - "getmyiphostrodawarawpdevcloudwritesthisblogsytewroclawiwatsukiyo" + - "notairestaurantroandinosaurepbodynamic-dnsopotrentoyonakagyokuto" + - "yakokonoewtcminnesotaketakazakis-an-actresshinjukumanowtvallee-d" + - "-aosteigenwtfastvps-serveronakanotoddenwuozuwzmiuwajimaxn--3oq18" + - "vl8pn36axn--3pxu8koninjambylxn--42c2d9axn--45br5cylxn--45brj9civ" + - "ilisationisshinguccircleverappsanokasukabedzin-berlindasdaburxn-" + - "-45q11civilizationiyodogawaxn--4gbriminingxn--4it168dxn--4it797k" + - "onskowolayangroupictureshirahamatonbetsurnadalxn--4pvxs4allxn--5" + - "4b7fta0ccivilwarmiastagets-itozsdeltajimidorissagaeroclubmedecin" + - "cinnationwidealerxn--55qw42gxn--55qx5dxn--5js045dxn--5rtp49clanb" + - "ibaidarmeniaxn--5rtq34konsulatrobeepilepsykkylvenetodayxn--5su34" + - "j936bgsgxn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlx" + - "n--7t0a264cldmailovecollegefantasyleaguernseyxn--80adxhksoundcas" + - "tronomy-routerxn--80ao21axn--80aqecdr1axn--80asehdbarrell-of-kno" + - "wledgeiseiyoichippubetsubetsugarugbyglandroverhalla-speziautosca" + - "nadaeguambulanceobninskaracoldwarszawaukraanghkeymachinewhampshi" + - "realtydalaskanittedallasalleangaviikaascolipicenodumemergencyach" + - "ts3-ca-central-1xn--80aswgxn--80augustownproviderxn--8ltr62konyv" + - "elolipopiemontexn--8pvr4uxn--8y0a063axn--90a3academiamicaaarbort" + - "eaches-yogasawaracingxn--90aeroportalabamagasakishimabaraogakibi" + - "chuoxn--90aishobarakawagoexn--90azhytomyravendbarsycenterprisesa" + - "kikuchikuseikarugamvikarasjokarasuyamarshallstatebankaratemrhclo" + - "udiscountyombolzano-altoadigeometre-experts-comptables3-us-west-" + - "1xn--9dbhblg6dietciprianiigataishinomakinkobayashikaoirmitakehar" + - "axn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byandexc" + - "loudxn--asky-iraxn--aurskog-hland-jnbarsyonlinewhollandiscourses" + - "3-us-west-2xn--avery-yuasakuhokkaidownloadxn--b-5gaxn--b4w605fer" + - "dxn--balsan-sdtirol-nsbsouthcarolinarvikommunexn--bck1b9a5dre4cl" + - "ickasumigaurawa-mazowszextraspace-to-rentalstomakomaibaraxn--bdd" + - "dj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--b" + - "hccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-fy" + - "aotsurreyxn--bjddar-ptarnobrzegyptianxn--blt-elabourxn--bmlo-gra" + - "ingerxn--bod-2natalxn--bozen-sdtirol-2obanazawaxn--brnny-wuacade" + - "my-firewall-gatewayxn--brnnysund-m8accident-investigation-aptibl" + - "eadpagest-mon-blogueurovision-k3southwestfalenxn--brum-voagatrom" + - "sakakinokiaxn--btsfjord-9zaxn--bulsan-sdtirol-nsbashkiriaveroyke" + - "ngerdalcesurancechirealmpmnavigationavoizumizakibigawaurskog-hol" + - "andingdyniaetnabudapest-a-la-masion-riopretobamaceratabuseating-" + - "organicasadelamonedapliernewspapereportateshinanomachimkentateya" + - "mabogadobeaemcloud66xn--c1avgxn--c2br7gxn--c3s14misakis-an-anarc" + - "historicalsocietyxn--cck2b3basicservercelliguriavocatanzarowebsp" + - "acebinordreisa-geekaragandaustevoll-o-g-i-natuurwetenschappenaum" + - "burggfarmerseine164-baltimore-og-romsdalipayboltatsunobihirosaki" + - "kamijimatsuuragrocerybnikeisenbahnaturhistorisches3-ap-southeast" + - "-1kappchizip6xn--cckwcxetdxn--cesena-forl-mcbremangerxn--cesenaf" + - "orl-i8axn--cg4bkis-not-certifiedugit-pagespeedmobilizeroticahces" + - "uoloanshintokushimaxn--ciqpnxn--clchc0ea0b2g2a9gcdxn--comunicaes" + - "-v6a2oxn--correios-e-telecomunicaes-ghc29axn--czr694basilicatani" + - "avoues3-eu-west-3utilitiesquare7xn--czrs0tromsojamisonxn--czru2d" + - "xn--czrw28basketballyngenhktjeldsundiscoveryomitanoceanographiqu" + - "eu-1xn--d1acj3batochiokinoshimaizuruhrxn--d1alfaromeoxn--d1atrus" + - "teexn--d5qv7z876clinichitachinakagawashtenawdev-myqnapcloudeitys" + - "nesandvikcoromantovalle-d-aostatic-accessanfranciscofreakunemuro" + - "rangehirnrtoyotomiyazakis-a-celticsfanishinomiyashironoxn--davve" + - "njrga-y4axn--djrs72d6uyxn--djty4kooris-a-patsfanxn--dnna-grajewo" + - "lterskluwerxn--drbak-wuaxn--dyry-iraxn--e1a4cliniquenoharaxn--ec" + - "kvdtc9dxn--efvn9sowaxn--efvy88hair-surveillancexn--ehqz56nxn--el" + - "qq16hakatanortonxn--estv75gxn--eveni-0qa01gaxn--f6qx53axn--fct42" + - "9kopervikhersonxn--fhbeiarnxn--finny-yuaxn--fiq228c5hspeedpartne" + - "rsolognexn--fiq64batsfjordishakotanhlfanhs3-website-ap-northeast" + - "-1xn--fiqs8spjelkavikomonowruzhgorodeoxn--fiqz9spreadbettingxn--" + - "fjord-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--forl-ce" + - "sena-fcbsspydebergxn--forlcesena-c8axn--fpcrj9c3dxn--frde-grandr" + - "apidsrlxn--frna-woaraisaijosoyrovigotsukisosakitagawaxn--frya-hr" + - "axn--fzc2c9e2clintonoshoesantabarbaraxn--fzys8d69uvgmailxn--g2xx" + - "48clothingdustdataitogitsuldalucernexn--gckr3f0fauskedsmokorseta" + - "gayaseralingenoamishirasatogokasells-for-lessasebofageologyxn--g" + - "ecrj9cn-northwest-1xn--ggaviika-8ya47hakodatexn--gildeskl-g0axn-" + - "-givuotna-8yasakaiminatoyookaniepcexn--gjvik-wuaxn--gk3at1exn--g" + - "ls-elacaixaxn--gmq050is-savedunetflixilxn--gmqw5axn--h-2failxn--" + - "h1aeghakonexn--h2breg3evenesrvaporcloudxn--h2brj9c8cngroks-thisa" + - "yamanobeokakegawaxn--h3cuzk1digitalxn--hbmer-xqaxn--hcesuolo-7ya" + - "35bauhausposts-and-telecommunications3-website-ap-southeast-1xn-" + - "-hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4accide" + - "nt-prevention-rancherkasydneyxn--hnefoss-q1axn--hobl-iraxn--holt" + - "len-hxaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hylandet-54axn" + - "--i1b6b1a6a2exn--imr513nxn--indery-fyasugivingxn--io0a7is-slickh" + - "arkivalleeaosteinkjerusalembroideryxn--j1aefbsbxn--12cfi8ixb8lxn" + - "--j1amhakubahccavuotnagaraholtalenglandxn--j6w193gxn--jlq480n2rg" + - "xn--jlq61u9w7beneventoeidsvollimanowarudaxaustinnaval-d-aosta-va" + - "lleyokosukanumazuryokoteastcoastaldefenceatonsbergjemnes3-eu-cen" + - "tral-1xn--jlster-byasuokanoyakumoldeloittenrikuzentakataiwanairf" + - "orcebetsuikidsmynasushiobaragusartstorfjordxn--jrpeland-54axn--j" + - "vr189misasaguris-an-artistgoryxn--k7yn95exn--karmy-yuaxn--kbrq7o" + - "xn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woaxn--klt787dxn--kltp7dxn" + - "--kltx9axn--klty5xn--3bst00mintelligencexn--koluokta-7ya57hakuis" + - "-a-hunterxn--kprw13dxn--kpry57dxn--kpu716fbx-osaskatchewanxn--kp" + - "ut3is-uberleetrentino-sued-tirolxn--krager-gyatomitamamuraxn--kr" + - "anghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfa" + - "stlylbanzaicloudcontrolledekagaminombresciaustraliajudaicable-mo" + - "democraciabruzzoologicalvinklein-addrammenuorochesterimo-i-ranaa" + - "mesjevuemielno-ipifonyc66xn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-" + - "fyatsukanraxn--kvnangen-k0axn--l-1fairwindstorjdevcloudnshinyosh" + - "itomiokamitondabayashiogamagoriziaxn--l1accentureklamborghinikol" + - "aeventstpetersburgxn--laheadju-7yatsushiroxn--langevg-jxaxn--lcv" + - "r32dxn--ldingen-q1axn--leagaviika-52bentleyonagoyaxn--lesund-hua" + - "xn--lgbbat1ad8jelenia-goraxn--lgrd-poacctrvareservehalflifestyle" + - "xn--lhppi-xqaxn--linds-pramericanartrycloudflarezzoxn--lns-qlaqu" + - "ilanstreamswatch-and-clockerxn--loabt-0qaxn--lrdal-sraxn--lrensk" + - "og-54axn--lt-liacnpyatigorskodjeffersonxn--lten-granexn--lury-ir" + - "axn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2ddestudioxn--mgb9" + - "awbfbxosassaris-a-democratrapaniizaxn--mgba3a3ejtrysiljanxn--mgb" + - "a3a4f16axn--mgba3a4franamizuholdingstudynamisches-dnsolundbeckom" + - "munalforbundxn--mgba7c0bbn0axn--mgbaakc7dvfedorapeoplegnicanonoi" + - "chinomiyakexn--mgbaam7a8hakusanagochijiwadell-ogliastraderxn--mg" + - "bab2bdxn--mgbah1a3hjkrdxn--mgbai9a5eva00beppublishproxyzgorzelec" + - "coffeedbackplaneapplicationcloudappspotagerxn--mgbai9azgqp6jeonn" + - "amerikawauexn--mgbayh7gpaleoxn--mgbbh1a71exn--mgbc0a9azcgxn--mgb" + - "ca7dzdoxn--mgberp4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4" + - "ecexposedxn--mgbpl2fhskydivingxn--mgbqly7c0a67fbcnsantacruzsanta" + - "fedjejuifmetlifeinsurancexn--mgbqly7cvafranziskanerimaringatlant" + - "akahashimamakiryuohdattowebcampinashikiminohostre-totendofintern" + - "et-dnsaliasiaxn--mgbt3dhdxn--mgbtf8flatangerxn--mgbtx2beskidyn-i" + - "p24xn--mgbx4cd0abbvieeexn--mix082fedoraprojectravelchannelxn--mi" + - "x891feiraquarelleaseeklogesaudaxn--mjndalen-64axn--mk0axin-dslgb" + - "tunesor-odalxn--mk1bu44cntrani-andria-barletta-trani-andriaxn--m" + - "kru45is-very-badajozxn--mlatvuopmi-s4axn--mli-tlarvikoryokamikaw" + - "anehonbetsurutaharaxn--mlselv-iuaxn--moreke-juaxn--mori-qsakurag" + - "awaxn--mosjen-eyawaraxn--mot-tlavagiskexn--mre-og-romsdal-qqbuse" + - "rveexchangexn--msy-ula0haldenxn--mtta-vrjjat-k7aflakstadaokagaki" + - "cks-assnasaarlandxn--muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngb" + - "e9e0axn--ngbrxn--3ds443gxn--nit225kosaigawaxn--nmesjevuemie-tcba" + - "lsan-suedtirolkuszczytnoipirangalsacexn--nnx388axn--nodessakurai" + - "s-very-evillagexn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--nts" + - "q17gxn--nttery-byaeservehttpixolinoxn--nvuotna-hwaxn--nyqy26axn-" + - "-o1acheltenham-radio-openairbusantiquest-a-la-maisondre-landroid" + - "xn--o3cw4halsaikitahiroshimaoris-a-knightpointtohobby-sitexn--o3" + - "cyx2axn--od0algxn--od0aq3bestbuyshouses3-website-ap-southeast-2x" + - "n--ogbpf8flekkefjordxn--oppegrd-ixaxn--ostery-fyawatahamaxn--osy" + - "ro-wuaxn--otu796dxn--p1acfermochizukirovogradoyxn--p1ais-very-go" + - "odyearxn--pbt977coguchikuzenxn--pgbs0dhlxn--porsgu-sta26ferrarax" + - "n--pssu33lxn--pssy2uxn--q9jyb4collectionxn--qcka1pmckinseyxn--qq" + - "qt11misconfusedxn--qxa6axn--qxamuneustargardxn--rady-iraxn--rdal" + - "-poaxn--rde-ulavangenxn--rdy-0nabaris-very-nicexn--rennesy-v1axn" + - "--rhkkervju-01aferraris-a-designerxn--rholt-mragowoodsidemoneyxn" + - "--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5nativeamericanan" + - "tiquestuff-4-salexn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rms" + - "kog-byaxn--rny31hammarfeastafricapetownnews-stagingxn--rovu88bet" + - "ainaboxfusejnyonagunicommbankaratsuginamikatagamilitaryoriikarel" + - "ianceu-2xn--rros-granvindafjordxn--rskog-uuaxn--rst-0naturalhist" + - "orymuseumcenterxn--rsta-francaiseharaxn--rvc1e0am3exn--ryken-vua" + - "xn--ryrvik-byaxn--s-1faithamurakamigoris-a-landscaperugiaxn--s9b" + - "rj9colognexus-2xn--sandnessjen-ogbhzcateringebuildingjesdalimite" + - "diskussionsbereichaseljeepsondriodejaneirockartuzyoshiokanzakiyo" + - "kawaraxn--sandy-yuaxn--sdtirol-n2axn--seral-lraxn--ses554gxn--sg" + - "ne-gratangenxn--skierv-utazastufftoread-booksnesolutionsokananii" + - "mihoboleslawiecitadeliveryggeexn--skjervy-v1axn--skjk-soaxn--skn" + - "it-yqaxn--sknland-fxaxn--slat-5naturalsciencesnaturellestuttgart" + - "revisohughesomaxn--slt-elabcieszynxn--smla-hraxn--smna-gratis-a-" + - "bulls-fanxn--snase-nraxn--sndre-land-0cbieigersundisrechtraining" + - "jovikariyaltakasugaincheonikonanporocpanamatsuzakindianapolis-a-" + - "anarchistoireggiocalabriaxn--snes-poaxn--snsa-roaxn--sr-aurdal-l" + - "8axn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbielawalmartjm" + - "axxxboxenapponazure-mobileu-3xn--srfold-byaxn--srreisa-q1axn--sr" + - "um-grazxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshalsen-sqbiellaa" + - "kesvuemielecceu-4xn--stre-toten-zcbieszczadygeyachimataikikugawa" + - "ltervistaprinternationalfirearms3-website-eu-west-1xn--t60b56axn" + - "--tckweatherchannelxn--tiq49xqyjetztrentino-suedtirolxn--tjme-hr" + - "axn--tn0agrinetbankosakaerodromegallupinbarrel-of-knowledgestack" + - "arasjohkamikoaniikappuboliviajessheimetacentrumeteorappalmaserat" + - "in-the-bandain-vpncasinordkappalmspringsakerevistaples3-us-gov-w" + - "est-1xn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol" + - "-rzbievat-band-campaniaxn--trentin-sdtirol-7vbifukagawashingtond" + - "clkarlsoyukindianmarketingladefinimakanegasakiraxn--trentino-sd-" + - "tirol-c3bigv-infoodnetworkangerxn--trentino-sdtirol-szbihorology" + - "ukuhashimoichinosekigaharaxn--trentinosd-tirol-rzbikedaejeonbukl" + - "ugsmileborkdalvdalaheadjudygarlandivtasvuodnakaiwamizawatchandcl" + - "ockarmoyurihonjournalistjohninohekinannestadivttasvuotnakamagaya" + - "habahcavuotnagaivuotnagaokakyotambabydgoszczecinemagentositelema" + - "rkarpaczeladzjampagefrontappanasonicatholicaxiashorokanaievje-og" + - "-hornnes3-website-sa-east-1xn--trentinosdtirol-7vbilbaokinawashi" + - "rosatochigiessensiositecnologiaxn--trentinsd-tirol-6vbillustrati" + - "onredumbrellahppiacenzachpomorskieninomiyakonojorpelandiyusuhara" + - "xn--trentinsdtirol-nsbioddaxn--trgstad-r1axn--trna-woaxn--troms-" + - "zuaxn--tysvr-vraxn--uc0atvarggatritonxn--uc0ay4axn--uist22handso" + - "nyoursidellogliastradingxn--uisz3gxn--unjrga-rtarumizusawaxn--un" + - "up4yxn--uuwu58axn--vads-jraxn--valle-aoste-ebbtunkomvuxn--2scrj9" + - "christmasakindlefrakkestadyndns-homednsanjotoyouraxn--valle-d-ao" + - "ste-ehbodollsusakis-into-gamessinazawaxn--valleaoste-e7axn--vall" + - "edaoste-ebbvacationsusonoxn--vard-jraxn--vegrshei-c0axn--vermgen" + - "sberater-ctbirdartcenterprisecloudcontrolapplebtimnetzlglassassi" + - "nationalheritagexn--vermgensberatung-pwbirkenesoddtangenovaranza" + - "nquanpachigasakievennodesabaerobatickets3-website-us-east-1xn--v" + - "estvgy-ixa6oxn--vg-yiabkhaziaxn--vgan-qoaxn--vgsy-qoa0jevnakersh" + - "uscultureggioemiliaromagnamsosnowiechristiansburgriwataraidyndns" + - "-freeboxosloftranakaniikawatanaguraxn--vgu402colonialwilliamsbur" + - "grondarxn--vhquvaroyxn--vler-qoaxn--vre-eiker-k8axn--vrggt-xqadx" + - "n--vry-yla5gxn--vuq861birthplacexn--w4r85el8fhu5dnraxn--w4rs40lx" + - "n--wcvs22dxn--wgbh1coloradoplateaudioxn--wgbl6axn--xhq521bjarkoy" + - "usuisservehumourxn--xkc2al3hye2axn--xkc2dl3a5ee0hangglidingxn--y" + - "9a3aquariumishimasudaxn--yer-znaturbruksgymnxn--yfro4i67oxn--yga" + - "rden-p1axn--ygbi2ammxn--3e0b707exn--ystre-slidre-ujbjerkreimbamb" + - "lebesbyeniwaizumiotsukumiyamazonawsmpplanetariumemorialillyolasi" + - "tebizenakanojoetsuwanouchikujogaszkolancashirecreationavuotnaple" + - "s3-external-1xn--zbx025dxn--zf0ao64axn--zf0avxn--3hcrj9civilavia" + - "tionissedaluccapitalonewportlligatoystre-slidrettozawaxn--zfr164" + - "bjugnieznord-frontierxnbayxz" + "dingenaturhistorisches3-ap-south-16-b-dataikikonaikawachinaganoh" + + "aramcoachampionshiphoptobishimadridvagsoyereportatarantours3-ap-" + + "northeast-2038bloombergbauerninomiyakonojorpelandiyusuharabloxcm" + + "s3-website-us-west-2bluedancebmoattachments5yusuisservehumourbms" + + "akyotanabellunord-aurdalvdalaskanittedallasalleangaviikaascolipi" + + "cenodumetlifeinsurancebmwedeployuu2-localhostoregontrailroadnpar" + + "isor-fronirasakindigenaklodzkochikushinonsenergyuzawabnrwegrowei" + + "bolognagasakimobetsuitainaioirasebastopologyeongnamegawakayamaga" + + "zineat-urlimitedrangedalimoliseoullensvanguardray-dnsupdaternopi" + + "lawatchesalangenishiazaindustriabomloabathsbcatholicaxiashorokan" + + "aiebondrayddnsfreebox-osascoli-picenordre-landraydnsalondonetska" + + "rlsoybonnishigobookinghostfoldnavyboomlahppiacenzachpomorskienis" + + "hiharaboschaefflerdalinkyard-cloudnsaltdalivornobostikarmoybosto" + + "nakijinsekikogentingloboavistanbulsan-sudtirolombardynaliaskimit" + + "subatamibugattiffanynysadoes-itvedestrandrivefsnillfjordrobaknol" + + "uoktachikawakembuchikumagayagawakkanaibetsubamericanfamilydsclou" + + "deitychyattorneyagawafflecellclaimsaludrudupontariodejaneirodoyb" + + "otanicalgardenishiizunazukindustriesteamfamberkeleybotanicgarden" + + "ishikatakazakinfinitintuitjxfinitybotanybouncemerckmsdnipropetro" + + "vskjervoyagebounty-fullensakerrypropertiesalvadordalibabalestran" + + "dabergamo-siemensncfdurbanamexnethnologyboutiquebecheltenham-rad" + + "io-openairbusantiquest-a-la-maisondre-landroidurhamburglogoweirb" + + "ozen-sudtirolomzaporizhzhegurinuyamashinatsukigatakasakitchenish" + + "ikatsuragit-reposalzburgloppenzaolbia-tempio-olbiatempioolbialys" + + "tokkepnogatagajobojinvestmentsamegawabozen-suedtirolondrinamssko" + + "ganeinzais-a-candidatebplacedogawarabikomaezakirunorddalorenskog" + + "lugmbhartipscbgminakamichiharabrandywinevalleybrasiliabrindisibe" + + "nikinderoybristoloseyouriparliamentkmaxxjavald-aostarostwodzisla" + + "wellbeingzonebritishcolumbialowiezaganquanpachigasakievennodesab" + + "aerobaticketsamnangerbroadcastleclerchernihivgubsampalacebroadwa" + + "ybroke-itksatxn--0trq7p7nnishikawazukamisunagawabrokerbronnoysun" + + "dweberbrothermesaverdealstahaugesunderseaportsinfolldalotenkawab" + + "rowsersafetymarketsamsclubartowfarmsteadynathomebuiltmparmattele" + + "fonicarbonia-iglesias-carboniaiglesiascarboniabrumunddalottebrun" + + "elasticbeanstalkarpaczeladzparochernigovernmentoyosatoyokawabrus" + + "selsamsungmodellingmxn--11b4c3dyndns-at-homedepotenzamamidsundyn" + + "dns-at-workisboringrimstadyndns-blogdnsandnessjoenishimerabruxel" + + "lesandoybryansklepparsandvikcoromantovalle-d-aostaticsanfrancisc" + + "ofreakunemurorangeiseiyoichippubetsubetsugarugbydgoszczecinemage" + + "ntositecnologiabrynewhollandyndns-freeboxosloftranakanojoetsuwan" + + "ouchikujogaszkolajollamericanexpressexybuskerudinewmexicoalottok" + + "onamegatakatsukis-a-catererbuzentsujiiebuzzwhalingripebwhoswhokk" + + "sundyndns-homednsangobzhitomirumalatvuopmicrolightingriwataraidy" + + "ndns-ipartis-a-celticsfanishinomiyashironobzzcolognexus-2colonia" + + "lwilliamsburgrongausdalukowiiheyakumoldeloittemp-dnsaogoncartier" + + "coloradoplateaudiocolumbusheycommunecommunitycomoarekecomparemar" + + "kerryhotelsaotomeloyalistoragecompute-1computerhistoryofscience-" + + "fictioncomsecuritytacticsapporocondoshichinohealth-carereformina" + + "miechizenconferenceconstructionconsuladonnakaiwamizawassamukawat" + + "aricoharuovatranoyconsultanthropologyconsultingrossetouchihayaak" + + "asakawaharacontactransportecontagematsubaracontemporaryarteducat" + + "ionalchikugodontexistmein-iservebeercontractorskenconventureshin" + + "odebalancertificationcookingchannelsdvrdnsfor-better-thanawatcha" + + "ndclockashiwaracooluroycooperativano-frankivskolegallocus-3copen" + + "hagencyclopedichiryukyuragifuchungbukharanzanishinoomotegocorsic" + + "afederationcorvettemasekashiwazakiyosatokamachintaifun-dnsdojols" + + "tercosenzakopanecosidnshome-webserverdalutskasukabedzin-berlinda" + + "sdaburcostumedicinakamagayahabaghdadyndns-workshopitsitevadsobet" + + "sumidatlantichitachinakagawashtenawdev-myqnapcloudcontrolledekag" + + "aminogiftsanjotoyotapartsannanishinoshimatsuuracouchpotatofriesa" + + "rdegnaroycounciluxurycouponsardiniacq-acranbrookuwanalyticsarluz" + + "erncrdyndns1creditcardynnsarpsborgroundhandlingroznycreditunionc" + + "remonashgabadaddjaguarqhachirogatakanezawacrewildlifedorainfracl" + + "ouderacricketrzyncrimeast-kazakhstanangercrotonecrownipasadenara" + + "shinocrsvpassagensarufutsunomiyawakasaikaitakoelncruisesasayamac" + + "ryptonomichigangwoncuisinellair-traffic-controlleyculturalcenter" + + "tainmentransurlvivanovoldacuneocupcakecuritibahcavuotnagaivuotna" + + "gaokakyotambabyeniwaizumiotsukumiyamazonawsagaeroclubmedecincinn" + + "ationwidealercxn--12c1fe0bradescorporationcymrussiacyonabarumina" + + "mifuranocyoutheworkpccwilliamhillferrerotikagoshimalvikasumigaur" + + "awa-mazowszextraspace-to-rentalstomakomaibarafetsundynuconnectra" + + "paniizafgruefhvalerfidoomdnstracefieldynv6figueresinstaginguideg" + + "reefilateliafilegear-audnedalnfilegear-deatnufcfanfilegear-gbizf" + + "ilegear-iefilegear-jpmorganfilegear-sguitarsavannahgafilminamiiz" + + "ukamiokameokameyamatotakadafinalfinancefineartsaves-the-whalessa" + + "ndria-trani-barletta-andriatranibarlettaandriafinlandynvpnplus-4" + + "finnoyfirebaseapplinzis-a-financialadvisor-aurdalfirenzefireston" + + "efirmdalegoldpoint2thisamitsukefishingolffansavonarusawafitjarvo" + + "dkafjordyroyrvikingrpassenger-associationfitnessettlementraveler" + + "sinsurancefjalerflesbergujohanamakinoharaflickragerogersaxofligh" + + "tschoenbrunnflirfloginlinefloraflorencefloridattorelayfloripader" + + "bornfloristanohatakaharulminamimakis-a-geekasuyanagawaflorokunoh" + + "ealthcareerschokokekschokoladenflowerscholarshipschoolschulefltr" + + "dflynnhosting-clusterflynnhubanzaicloudcontrolappleborkdalpha-my" + + "qnapcloud66fndfor-ourfor-somedizinhistorischeschwarzgwangjuniper" + + "for-theaterforexrothadanorthwesternmutualforgotdnschweizforli-ce" + + "sena-forlicesenaforlikescandyn53forsaleikangerforsandasuologoipa" + + "triafortalfortmissoulancashirecreationfortworthadselectrentin-su" + + "d-tirolforumzfosnesciencecentersciencehistoryfotaris-a-greenfoxf" + + "ordebianfozorafredrikstadtvscientistordalfreeddnsgeekgalaxyfreed" + + "esktopocznore-og-uvdalfreemasonryfreesitexaskoyabearalvahkihokum" + + "akogengerdalcesurancechirealmpmnfreetlscjohnsonfreiburgulenfreig" + + "htrentin-sudtirolfreseniuscountryestateofdelawareggio-calabriafr" + + "ibourgunmaoris-a-gurulvikaszubyfriuli-v-giuliafriuli-ve-giuliafr" + + "iuli-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgi" + + "uliafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giu" + + "liafriuliveneziagiuliafriulivgiuliafrlfroganscotlandfrognfroland" + + "from-akrehamnfrom-alfrom-arfrom-azimuthdfcbankatowicefrom-capebr" + + "etonamicrosoftbankatsushikabeeldengeluidfrom-codyn-vpndnscrapper" + + "-sitefrom-ctrentin-sued-tirolfrom-dchitosetogakushimotoganewspap" + + "erfrom-dedyn-berlincolnfrom-flanderscrappinguovdageaidnunusualpe" + + "rsonfrom-gaulardalfrom-hichisochildrensgardenfrom-iafrom-idfrom-" + + "ilfrom-in-brbarcelonagareyamaizuruhrhcloudiscoveryombolzano-alto" + + "adigeu-3from-kscrysechocolatelemarkaruizawafrom-kyowariasahikawa" + + "winbarclaycards3-fips-us-gov-west-1from-lancasterfrom-mamurogawa" + + "from-mdfrom-meeresistancefrom-mifunefrom-mnfrom-modalenfrom-mser" + + "veirchofunatoriginstitutelevisionishiokoppegardyndns-mailouvreit" + + "oyotomiyazakis-a-chefarsundyndns-office-on-the-webhareidsbergeni" + + "shitosashimizunaminamibosogndalowiczest-le-patronishiwakis-a-con" + + "servativegarsheis-a-cpadualstackhero-networkinggroupartyfrom-mtn" + + "from-nctulanciafrom-ndfrom-nefrom-nh-serveblogsiteleafamilycompa" + + "nyminamiminowafrom-njaworznoticiasnesoddenmarkhangelskjakdneprop" + + "etrovskiervaapsteiermarkatsuyamarylandfrom-nminamioguni5from-nva" + + "lled-aostamayufuettertdasnetzfrom-nyfrom-ohkurafrom-oketogurafro" + + "m-orfrom-padovaksdalfrom-pratohmangonohejis-a-hard-workerservemi" + + "necraftrentin-suedtirolfrom-ris-a-hunterfrom-schmidtre-gauldalfr" + + "om-sdfrom-tnfrom-txn--12co0c3b4evalleaostavernfrom-utazuerichard" + + "lillehammerfeste-ipaviancarrdfrom-val-daostavalleyfrom-vtrentino" + + "-a-adigefrom-wafrom-wielunnerfrom-wvalledaostaobaomoriguchiharag" + + "usartservemp3from-wyfrosinonefrostalowa-wolawafroyahooguyfstcgro" + + "upfizerfujiiderafujikawaguchikonefujiminokamoenairlinedre-eikerf" + + "ujinomiyadavvenjargap-northeast-3fujiokayamangyshlakasamatsudovr" + + "e-eikerfujisatoshonairportland-4-salernoboribetsuckservep2pgfogg" + + "iafujisawafujishiroishidakabiratoridefenseljordfujitsurugashiman" + + "iwakuratextileirfjordfujixeroxn--1ck2e1barclays3-sa-east-1fujiyo" + + "shidavvesiidatsunanjoburgushikamifuranorth-kazakhstanfukayabeats" + + "ervepicservequakefukuchiyamadazaifudaigojomedio-campidano-medioc" + + "ampidanomediofukudominichonanbulsan-suedtirolpusercontentoyotsuk" + + "aidofukuis-a-knightpointtohobby-sitefukumitsubishigakisarazureco" + + "ntainerdpolicefukuokazakishiwadafukuroishikarikaturindalfukusaki" + + "sofukushimannorfolkebibleirvikaufenfukuyamagatakahatakaishimogos" + + "enfunabashiriuchinadafunagatakamatsukawafunahashikamiamakusatsum" + + "asendaisennangooglecodespotaruis-a-landscaperfundaciofuoiskujuku" + + "riyamansionservesarcasmatartanddesignfuosskoczowindmillfurniture" + + "ggio-emilia-romagnakatombetsumitakagiizefurubirafurudonostiaafur" + + "ukawairtelebitballooningwiddleitungsenfusodegaurafussaikisosakit" + + "agawafutabayamaguchinomigawafutboldlygoingnowhere-for-morenakats" + + "ugawafuttsurugimperiafuturecmservicesevastopolefuturehostingxn--" + + "1ctwolominamatargivestbytemarkautokeinotteroyfuturemailingfvgfyl" + + "kesbiblackbaudcdn77-securebungoonord-odalwaysdatabaseballangenka" + + "inanaejrietisalatinabenonichoseiroumuenchenissandiegofyresdalhan" + + "gglidinghangoutsystemscloudyclusterhannanmokuizumodenakayamarbur" + + "ghannosegawahanyuzenhapmirharstadharvestcelebrationhasamarcheapi" + + "geelvinckazoologyhasaminami-alpsewindowsharis-a-libertarianhashb" + + "anghasudahasura-appharmaciensharpharmacyshawaiijimarnardalhasvik" + + "azunow-dnshellaspeziahatogayaizuwakamatsubushikusakadogawahatoya" + + "mazakitakamiizumisanofidelityhatsukaichikaiseis-a-linux-useranis" + + "hiaritabashijonawatehattfjelldalhayashimamotobungotakadapliernew" + + "jerseyhazuminobusells-for-unzenhelsinkitakatakaokalmykiahembygds" + + "forbundhemneshimojis-a-llamarriottrentino-aadigehemsedalhepforge" + + "herokussldheroyhgtvallee-aosteroyhigashiagatsumagoianiahigashich" + + "ichibunkyonanaoshimageandsoundandvisionhigashihiroshimanehigashi" + + "izumozakitakyushuaiahigashikagawahigashikagurasoedahigashikawaki" + + "taaikitamihamadahigashikurumeetnedalhigashimatsushimaritimodernh" + + "igashimatsuyamakitaakitadaitoigawahigashimurayamamotorcycleshimo" + + "kawahigashinarusells-itrentino-alto-adigehigashinehigashiomihach" + + "imanaustdalhigashiosakasayamanakakogawahigashishirakawamatakaraz" + + "ukaluganskypehigashisumiyoshikawaminamiaikitamotosumy-gatewayhig" + + "ashitsunoshiroomurahigashiurausukitanakagusukumoduminamisanrikub" + + "etsurfastly-terrariuminamiiserniahigashiyamatokoriyamanashiftedi" + + "tchyouriphdhigashiyodogawahigashiyoshinogaris-a-musicianhiraizum" + + "isatohnoshoooshikamaishimodatehirakatashinagawahiranairtrafficpl" + + "exus-1hirarahiratsukagawahirayakagehistorichouseshimokitayamahit" + + "achiomiyagildeskaliszhitachiotagoppdalhitraeumtgeradelmenhorstal" + + "banshimonitayanagithubusercontentrentino-altoadigehjartdalhjelme" + + "landholeckobierzyceholidayhomeiphiladelphiaareadmyblogspotrentin" + + "o-s-tirolhomelinkitoolsztynsettlershimonosekikawahomelinuxn--1lq" + + "s03nhomeofficehomesecuritymacaparecidahomesecuritypchoshibuyacht" + + "sannohelplfinancialubindalublindesnesanokarumaifashionissayokkai" + + "chiropractichernivtsiciliahomesensellsyourhomegoodshimosuwalkis-" + + "a-nascarfanhomeunixn--1lqs71dhondahongotembaixadahonjyoitakasago" + + "tpantheonsitehornindalhorsembokukitashiobarahorteneis-a-nursemin" + + "ehospitalhoteleshimotsukehotmailhoyangerhoylandetroitskddielddan" + + "uorrikuzentakatajimidorissagamiharahumanitieshimotsumahurdalhuru" + + "majis-a-painteractivegaskvollhyllestadhyogoris-a-patsfanhyugawar" + + "ahyundaiwafuneis-very-sweetpepperis-with-thebandoisleofmancheste" + + "rjewelryjewishartgalleryjfkhakassiajgorajlljmphoenixn--1qqw23ajn" + + "jcphilipsyno-dshintokushimajoyentrentino-sued-tiroljoyokaichibal" + + "atinoipirangamvikharkivalleeaosteinkjerusalembroideryjpnjprshiny" + + "oshitomiokamitondabayashiogamagoriziajurkoseis-a-playerkosherbro" + + "okegawakoshimizumakiyosunndalkoshunantankhersonkosugekotohiradom" + + "ainsurehabmerkotourakouhokutamakizunokunimimatakatoris-a-republi" + + "cancerresearchaeologicaliforniakounosupplieshirahamatonbetsurnad" + + "alkouyamashikekouzushimashikis-a-rockstarachowicekozagawakozakis" + + "-a-socialistdlibestadkozowinnershirakofuefukihaboromskogkpnkppsp" + + "dnshiranukamitsuekrasnikahokutokashikis-a-soxfankrasnodarkredsto" + + "nekristiansandcatshiraois-a-studentalkristiansundkrodsheradkroks" + + "tadelvaldaostathelleluxembourgkryminamitanekumatorinokumejimasoy" + + "kumenantokigawakunisakis-a-teacherkassyncloudkunitachiarailwayku" + + "nitomigusukumamotoyamashikokuchuokunneppubtlshiraokamogawakunsts" + + "ammlungkunstunddesignkuokgroupictetrentino-suedtirolkureisenkurg" + + "ankurobelaudibleasingleshiratakahagitlaborkurogiminamiashigaraku" + + "roisoftwarendalenugkuromatsunais-a-techietis-a-personaltrainerku" + + "rotakikawasakis-a-therapistoiakushirogawakustanais-an-accountant" + + "shinichinankusupplykutchanelkutnokuzumakis-an-actorkvafjordkvals" + + "undkvamlidlugolekadenagahamaroygardenebakkeshibechambagriculture" + + "nnebudejjuedischesapeakebayernutwentekvanangenkvinesdalkvinnhera" + + "dkviteseidskogkvitsoykwpspectruminamiuonumassa-carrara-massacarr" + + "aramassabusinessebyklecznagasukekzmisugitokorozawamitourismolang" + + "evagrigentomologyeonggiehtavuoatnadexetermitoyoakemiuramiyazurew" + + "ebsiteshikagamiishibukawamiyotamanomjondalenmlbfanmonstermontrea" + + "lestatefarmequipmentrentinoaadigemonza-brianzapposhishikuis-an-a" + + "rtistgorymonza-e-della-brianzaptokuyamatsumotofukemonzabrianzara" + + "monzaebrianzamonzaedellabrianzamoonscalewismillermoparachutingmo" + + "rdoviamoriyamatsunomoriyoshiminamiawajikis-an-engineeringmormonm" + + "outhagakhanamigawamoroyamatsusakahoginankokubunjis-an-entertaine" + + "rmortgagemoscowioshisognemoseushistorymosjoenmoskeneshisuifuelve" + + "ruminamiyamashirokawanabelembetsukubankhmelnitskiyamarylhurstjor" + + "dalshalsenmosshitaramamosvikhmelnytskyivanylvenicemoteginowaniih" + + "amatamakawajimanxn--2scrj9christiansburgroks-thisayamanobeokakud" + + "amatsuemoviemovimientokyotangovtrentinoalto-adigemovistargardmoz" + + "illa-iotrentinoaltoadigemtranbymuenstermuginozawaonsenmuikamisat" + + "okaizukamikitayamatsuris-bytomaritimekeepingmukodairamulhouserve" + + "game-servermunakatanemuncienciamuosattemupictureshizukuishimofus" + + "aitamatsukuris-certifieducatorahimeshimamateramobaramurmanskhpla" + + "ystationmurotorcraftrentinos-tirolmusashimurayamatsushigemusashi" + + "noharamuseetrentinostirolmuseumverenigingmusicargodaddyn-o-saurl" + + "andeshizuokanagawamutsuzawamy-vigorgemy-wanggouvichristmasakindl" + + "efrakkestadyndns-picsantacruzsantafedjejuifminamidaitomandalucan" + + "iamyactivedirectorymyasustor-elvdalmycdn77-sslattuminanomydattol" + + "ocalhistorymyddnskingmydissentrentinosud-tirolmydobisshikis-foun" + + "dationmydroboehringerikemydshoppingmyeffectrentinosudtirolmyfire" + + "wallonieruchomoscienceandindustrynmyfritzmyftpaccesshoujis-gonem" + + "yhome-servermyjinomykolaivaomymailermymediapchromedicaltanissett" + + "airavennagatorockartuzymyokohamamatsudamypepiemontemypetshowamyp" + + "hotoshibalena-deviceshowtimembershriramsterdamnserverbaniamypiag" + + "etmyiphostrodawaramypsxn--30rr7ymysecuritycamerakermyshopblocksi" + + "enarutolgamytis-a-bookkeeperugiamytuleapilotsigdalmyvnchryslermy" + + "wirepaircraftingvollombardiamondsilklabudhabikinokawabarthaebaru" + + "ericssonyoursidell-ogliastraderpiwatepixolinopizzapknx-serversai" + + "lleshiojirishirifujiedaplantationplantsimple-urlplatformshangril" + + "ansirdalplazaplcube-serversicherungplumbingoplurinacionalpodhale" + + "zajskolobrzegersundpodlasiellaktyubinskiptveterinaireadthedocsca" + + "ppgafannefrankfurtrentinosuedtirolpodzonepohlpoivronpokerpokrovs" + + "komaganepoliticarrierpolitiendapolkowicepoltavalle-aostatic-acce" + + "ssjcbnpparibaselburgpomorzeszowitdkomakiyosemiteponpesaro-urbino" + + "-pesarourbinopesaromasvuotnaritakurashikis-into-animeguroroshinj" + + "ukumanowtvallee-d-aosteigenponypordenonepornporsangerporsangugep" + + "orsgrunnanyokoshibahikariwanumatakinouepoznanpraxis-a-bruinsfanp" + + "rdpreservationpresidioprgmrprimelhusdecorativeartslupskomatsushi" + + "masfjordenprincipeprivatizehealthinsuranceprochowiceproductionsl" + + "zprofesionalprogressivenneslaskerrylogisticsnoasaitoshimayfirsto" + + "ckholmestrandpromombetsurgeonshalloffameldalpropertyprotectionpr" + + "otonetrentinsud-tirolprudentialpruszkowithgoogleapisa-hockeynuts" + + "iracusakatakkoebenhavnprvcyberlevagangaviikanonjis-into-carshink" + + "amigotoyohashimototalprzeworskogptplusgardenpulawypupimientaketo" + + "misatomobellevuelosangelesjabbottrentinosued-tirolpvhagebostadpv" + + "trentinsudtirolpwchungnamdalseidfjordyndns-remotewdyndns-serveri" + + "signissedaluccapitalonewportlligatoyourapzqldqponiatowadaqslingq" + + "ualifioappinkmpspbarefootballfinanzgoraustinnavuotnaples3-ca-cen" + + "tral-1quickconnectrentinsued-tirolquicksytestingquipelementsokan" + + "aniimihoboleslawiechurcharternidyndns-webhopencraftoystre-slidre" + + "ttozawaqvcircleverappsseljeepsongdalenviknaharimalopolskanlandyn" + + "dns-wikirkenesantamariakesusonosuzakanazawasuzukaneyamazoesuzuki" + + "s-leetrentino-stirolsvalbardunloppacificircustomersveiosvelvikom" + + "onowruzhgorodeosvizzerasvn-reposopotrentinsuedtirolswedenswidnic" + + "artoonartdecologiaswidnikkokaminokawanishiaizubangeswiebodzin-bu" + + "tterswiftcoverswinoujscienceandhistoryswissmarterthanyousynology" + + "-diskstationsynology-dsor-odaltuscanytushuissier-justicetuvalle-" + + "daostavangertuxfamilytwmailvestfoldvestnesorocabalsan-sudtirolla" + + "gdenesnaaseinet-freaksolognevestre-slidreplanetariuminiserverves" + + "tre-totennishiawakuravestvagoyvevelstadvibo-valentiavibovalentia" + + "videovillasorreisahayakawakamiichikawamisatottoris-into-cartoons" + + "hinshinotsurgeryvinnicasacamdvrcampinagrandebuilderschlesischeso" + + "rtlandvinnytsiavipsinaappioneervirginiavirtual-userveexchangevir" + + "tualservervirtualuserveftpippugliavirtueeldomein-vigorlicevirtue" + + "lvisakegawaviterboknowsitallvivolkenkundenvixn--32vp30haibarakit" + + "ahiroshimapartmentsevenassisicilyvlaanderenvladikavkazimierz-dol" + + "nyvladimirvlogintoyonezawavminnesotaketakayamasudavologdanskomvu" + + "xn--2m4a15evolvolkswagentsorumincomcastresindevicenzaporizhzhiav" + + "olyngdalvoorloperauniterois-lostrolekamakurazakiwakunigamiharusl" + + "ivinghistoryvossevangenvotevotingvotoyonowloclawekongsbergwmflab" + + "soundcastronomy-routerwnextdirectromsakakinokiaworldworse-thanda" + + "wowithyoutuberspacekitagatargets-itroandinosaurepbodynamic-dnsor" + + "-varangerwpdevcloudwritesthisblogsytewroclawiwatsukiyonotairesta" + + "urantrogstadwtcmintelligencewtfastvps-serveronakasatsunairguardi" + + "annakadomarinebraskauniversitydalaheadjudaicable-modemocraciawuo" + + "zuwzmiuwajimaxn--3oq18vl8pn36axn--3pxu8kongsvingerxn--42c2d9axn-" + + "-45br5cylxn--45brj9citadeliveryggeexn--45q11citichernovtsymantec" + + "hnologyxn--4gbriminingxn--4it168dxn--4it797koninjambylxn--4pvxs4" + + "allxn--54b7fta0ccivilaviationiyodogawaxn--55qw42gxn--55qx5dxn--5" + + "js045dxn--5rtp49civilisationxn--5rtq34konskowolayangrouphonefoss" + + "hioyanaizustkannamilanotogawaxn--5su34j936bgsgxn--5tzm5gxn--6btw" + + "5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264civilizationxn--" + + "80adxhksouthcarolinarvikommunalforbundxn--80ao21axn--80aqecdr1ax" + + "n--80asehdbarrel-of-knowledgemologicallillyomitanoddaustrheimatu" + + "nduhrennesoyokozebinordreisa-geekaracoldwarmiastagebizenakanotod" + + "denayorovnobninskaragandaukraanghkeymachineustarnbergjemnes3-ap-" + + "southeast-2xn--80aswgxn--80augustownproviderxn--8ltr62konsulatro" + + "beepilepsykkylvenetodayxn--8pvr4uxn--8y0a063axn--90a3academiamic" + + "aaarborteaches-yogasawaracingxn--90aeroportalabamagasakishimabar" + + "aogakibichuoxn--90aishobarakawagoexn--90azhytomyravendbarrell-of" + + "-knowledgeologyonagoyauthordalandeportenrightathomeftpalmaserati" + + "bmdevelopmentcp4lima-cityeatselinogradultateshinanomachimkentate" + + "yamabogadodgehirnrtatsunobihirosakikamijimatsuzaki234xn--9dbhblg" + + "6dietcimdbarsycenterprisesakikugawalmartjeldsundishakotanflfanfs" + + "hostrowwlkpmgladefinimakanegasakirautomotiveconomiasakuchinotsuc" + + "hiurakawalesundgcagliaribeiraokinawashirosatochigiessensiositele" + + "kommunikationionjukudoyamaintenancehimejiitatebayashiibajddarchi" + + "tecturealtorlandiscountyolasitempresashibetsukuiiyamanouchikuhok" + + "uryugasakitaurayasudaurskog-holandingjerdrumemsettsupportaxihuan" + + "aval-d-aosta-valleyokosukanumazuryokoteastcoastaldefenceatonsber" + + "gjerstadotsuruokakamigaharagrocerybnikeisenbahnatuurwetenschappe" + + "naumburggfarmerseine164-baltimore-og-romsdalipayboltattoobiraetn" + + "abudapest-a-la-masion-webhostingdyniabruzzoologicalvinklein-addr" + + "ammenuorochesterimo-i-ranaamesjevuemielno-ipifonyc66xn--9dbq2axn" + + "--9et52uxn--9krt00axn--andy-iraxn--aroport-byandexcloudxn--asky-" + + "iraxn--aurskog-hland-jnbarsyonlinewhampshirealtysnes3-us-east-2x" + + "n--avery-yuasakuhokkaidownloadxn--b-5gaxn--b4w605ferdxn--balsan-" + + "sdtirol-nsbsouthwestfalenxn--bck1b9a5dre4civilwarmanagementozsde" + + "ltaiwanairforcebetsuikidsmynasushiobarackmazerbaijan-mayendofthe" + + "internetlifyis-a-cubicle-slavellinodearthachiojiyaitakanabeautys" + + "vardoesntexisteingeekashibatakasugais-a-democratrani-andria-barl" + + "etta-trani-andriaxn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jx" + + "axn--bhcavuotna-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn-" + + "-bievt-0qa2xn--bjarky-fyaotsurreyxn--bjddar-ptarnobrzegyptianxn-" + + "-blt-elabourxn--bmlo-graingerxn--bod-2natalxn--bozen-sdtirol-2ob" + + "anazawaxn--brnny-wuacademy-firewall-gatewayxn--brnnysund-m8accid" + + "ent-investigation-aptibleadpagest-mon-blogueurovision-rancherkas" + + "ydneyxn--brum-voagatromsojamisonxn--btsfjord-9zaxn--bulsan-sdtir" + + "ol-nsbashkiriautoscanadaeguambulanceoceanographics3-eu-west-1xn-" + + "-c1avgxn--c2br7gxn--c3s14misasaguris-an-anarchistoricalsocietyxn" + + "--cck2b3basicservercelliguriaveroykenglandiscourses3-eu-west-2xn" + + "--cesena-forl-mcbremangerxn--cesenaforl-i8axn--cg4bkis-not-certi" + + "fiedugit-pagespeedmobilizeroticahcesuoloanshinshiroxn--ciqpnxn--" + + "clchc0ea0b2g2a9gcdxn--comunicaes-v6a2oxn--correios-e-telecomunic" + + "aes-ghc29axn--czr694basilicataniavocatanzarowebspacemreviewskrak" + + "oweddingjesdalazioceanographiqueu-1xn--czrs0trusteexn--czru2dxn-" + + "-czrw28basketballyngenvironmentalconservationrenderxn--d1acj3bat" + + "ochiokinoshimakeupowiat-band-campaniavoues3-eu-west-3utilitiesqu" + + "are7xn--d1alfaromeoxn--d1atrvareservehalflifestylexn--d5qv7z876c" + + "lanbibaidarmeniaxn--davvenjrga-y4axn--djrs72d6uyxn--djty4konyvel" + + "olipophotographysioxn--dnna-grajewolterskluwerxn--drbak-wuaxn--d" + + "yry-iraxn--e1a4cldmailovecollegefantasyleaguernseyxn--eckvdtc9dx" + + "n--efvn9sowaxn--efvy88hair-surveillancexn--ehqz56nxn--elqq16haka" + + "tanortonxn--estv75gxn--eveni-0qa01gaxn--f6qx53axn--fct429kooris-" + + "a-photographerokuapphilatelyxn--fhbeiarnxn--finny-yuaxn--fiq228c" + + "5hspeedpartnersolundbeckomforbargainstantcloudfrontdoorxn--fiq64" + + "batsfjordisrechtraininglassassinationalheritageu-4xn--fiqs8spjel" + + "kavikommunexn--fiqz9spreadbettingxn--fjord-lraxn--fjq720axn--fl-" + + "ziaxn--flor-jraxn--flw351exn--forl-cesena-fcbsspydebergxn--forlc" + + "esena-c8axn--fpcrj9c3dxn--frde-grandrapidsrlxn--frna-woaraisaijo" + + "soyrovigotsukitahatakamoriokakegawaxn--frya-hraxn--fzc2c9e2click" + + "ashiharaxn--fzys8d69uvgmailxn--g2xx48clinichirurgiens-dentistes-" + + "en-francexn--gckr3f0fauskedsmokorsetagayaseralingenoamishirasato" + + "gokasells-for-lessaskatchewanxn--gecrj9cliniquenoharaxn--ggaviik" + + "a-8ya47hakodatexn--gildeskl-g0axn--givuotna-8yasakaiminatoyookan" + + "iepcexn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050is-savedu" + + "netflixilxn--gmqw5axn--h-2failxn--h1aeghakonexn--h2breg3evenesrt" + + "rentoyonakagyokutoyakokonoexn--h2brj9c8clintonoshoesantoandreamh" + + "ostersanukis-a-designerxn--h3cuzk1digitalxn--hbmer-xqaxn--hcesuo" + + "lo-7ya35bauhausposts-and-telecommunicationswatch-and-clockerxn--" + + "hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4acciden" + + "t-prevention-riopretobamaceratabuseating-organicbcn-north-1xn--h" + + "nefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn--hxt814exn-" + + "-hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513nxn--indery" + + "-fyasugivingxn--io0a7is-slickfhappousrcfastlylbananarepublicasad" + + "elamonedatingjovikarasjohkamikoaniikappuboliviajessheimetacentru" + + "meteorappalmspringsakerevistaples3-external-1xn--j1aefbsbxn--12c" + + "fi8ixb8lxn--j1amhakubahccavuotnagarahkkeravjuegoshikikuchikuseik" + + "arugalsacexn--j6w193gxn--jlq61u9w7beneventoeidsvollimanowarudaxa" + + "ustevollavagiskebinagisoccertmgretakahamalselvendrellavangenavig" + + "ationavoizumizakibigawajudygarlanddnslivelanddnss3-ap-southeast-" + + "1kappchizip6xn--jlster-byasuokanoyaltakashimarshallstatebankoper" + + "vikharkovalleedaostexn--jrpeland-54axn--jvr189misawaxn--k7yn95ex" + + "n--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woax" + + "n--klt787dxn--kltp7dxn--kltx9axn--klty5xn--3bst00misakis-an-actr" + + "esshinjournalismailillesandefjordxn--koluokta-7ya57hakuis-a-lawy" + + "erxn--kprw13dxn--kpry57dxn--kpu716fbx-osassaris-a-doctorayxn--kp" + + "ut3is-uberleetrentino-sud-tirolxn--krager-gyatomitamamuraxn--kra" + + "nghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfas" + + "tpanelblagrarchaeologyeongbuk0emmafann-arboretumbriamallamaceiob" + + "bcg120001wwwebredirectmemorial-o-g-i-n4t3l3p0rtashkentatamotors3" + + "-ap-northeast-1337xn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyatsuk" + + "anraxn--kvnangen-k0axn--l-1fairwindsrvaporcloudxn--l1accenturekl" + + "amborghinikolaeventstorfjordxn--laheadju-7yatsushiroxn--langevg-" + + "jxaxn--lcvr32dxn--ldingen-q1axn--leagaviika-52bentleyonagunicomm" + + "bankarasjokarasuyamarugame-hostrowiecaseihicampobassociatest-ise" + + "rvecounterstrikeverbankaratevje-og-hornnes3-us-gov-west-1xn--les" + + "und-huaxn--lgbbat1ad8jelenia-goraxn--lgrd-poacctrycloudflarezzox" + + "n--lhppi-xqaxn--linds-pramericanartrysiljanxn--lns-qlanxesstorjd" + + "evcloudfunctionshintomikasaharaxn--loabt-0qaxn--lrdal-sraxn--lre" + + "nskog-54axn--lt-liaclothingdustdataitogitsuldalucernexn--lten-gr" + + "anexn--lury-iraxn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2dde" + + "stpetersburgxn--mgb9awbfbxosaudaxn--mgba3a3ejtunesorfoldxn--mgba" + + "3a4f16axn--mgba3a4franamizuholdingstreamuneuesolutionsokndalxn--" + + "mgba7c0bbn0axn--mgbaakc7dvfedorapeoplegnicanonoichinomiyakexn--m" + + "gbaam7a8hakusanagochijiwadellogliastradingxn--mgbab2bdxn--mgbah1" + + "a3hjkrdxn--mgbai9a5eva00beppublishproxyzgorzeleccoffeedbackplane" + + "applicationcloudaccesscambridgestonewyorkshirecifedexhibitionhkt" + + "jmaxxxboxenapponazure-mobilexn--mgbai9azgqp6jeonnamerikawauexn--" + + "mgbayh7gpaleoxn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgbe" + + "rp4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mg" + + "bpl2fhskydivingxn--mgbqly7c0a67fbcn-northwest-1xn--mgbqly7cvafra" + + "nziskanerimaringatlantakahashimamakiryuohdattowebcampinashikimin" + + "ohostre-totendofinternet-dnsaliasiaxn--mgbt3dhdxn--mgbtf8flatang" + + "erxn--mgbtx2beskidyn-ip24xn--mgbx4cd0abbvieeexn--mix082fedorapro" + + "jectravelchannelxn--mix891feiraquarelleaseeklogesauheradynserveb" + + "bsasebofageorgeorgiaxn--mjndalen-64axn--mk0axin-dslgbtunkomorots" + + "ukaminoyamaxunjargaxn--mk1bu44cngrondarxn--mkru45is-very-badajoz" + + "xn--mlatvuopmi-s4axn--mli-tlapyxn--mlselv-iuaxn--moreke-juaxn--m" + + "ori-qsakuragawaxn--mosjen-eyawaraxn--mot-tlaquilancomelbournexn-" + + "-mre-og-romsdal-qqbestbuyshouses3-us-west-1xn--msy-ula0haldenxn-" + + "-mtta-vrjjat-k7aflakstadaokagakicks-assnasaarlandxn--muost-0qaxn" + + "--mxtq1misconfusedxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--3ds443gxn-" + + "-nit225koryokamikawanehonbetsurutaharaxn--nmesjevuemie-tcbalsan-" + + "suedtirolkuszczytnombresciaxn--nnx388axn--nodessakurais-very-evi" + + "llagexn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nt" + + "tery-byaeservehttpiszxn--nvuotna-hwaxn--nyqy26axn--o1achattanoog" + + "anordlandxn--o3cw4halsaintlouis-a-anarchistoireggiocalabriaxn--o" + + "3cyx2axn--od0algxn--od0aq3betainaboxfusejnyoriikaratsuginamikata" + + "gamilitaryoshiokanzakiyokawaraxn--ogbpf8flekkefjordxn--oppegrd-i" + + "xaxn--ostery-fyawatahamaxn--osyro-wuaxn--otu796dxn--p1acfermochi" + + "zukirovogradoyxn--p1ais-very-goodyearxn--pbt977cnpyatigorskodjef" + + "fersonxn--pgbs0dhlxn--porsgu-sta26ferraraxn--pssu33lxn--pssy2uxn" + + "--q9jyb4cnsaobernardoxn--qcka1pmckinseyxn--qqqt11mishimatsumaeba" + + "shikshacknetrentinoa-adigexn--qxamusementdllpagestudioxn--rady-i" + + "raxn--rdal-poaxn--rde-ularvikosaigawaxn--rdy-0nabaris-very-nicex" + + "n--rennesy-v1axn--rhkkervju-01aferrarivnexn--rholt-mragowoodside" + + "moneyxn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5nativeame" + + "ricanantiquestudynamisches-dnsomaxn--risr-iraxn--rland-uuaxn--rl" + + "ingen-mxaxn--rmskog-byaxn--rny31hammarfeastafricapetownnews-stag" + + "ingxn--rovu88bhzcasertaipeiheijin-the-bandain-vpncasinordkappana" + + "matta-varjjatjomemergencyahikobeardubaiduckdns3-us-west-2xn--rro" + + "s-granvindafjordxn--rskog-uuaxn--rst-0naturalhistorymuseumcenter" + + "xn--rsta-francaiseharaxn--rvc1e0am3exn--ryken-vuaxn--ryrvik-byax" + + "n--s-1faithruherecipescaravantaarpittsburghofficialxn--s9brj9cnt" + + "raniandriabarlettatraniandriaxn--sandnessjen-ogbieigersundivtasv" + + "uodnakamuratajirittogliattires3-website-ap-northeast-1xn--sandy-" + + "yuaxn--sdtirol-n2axn--seral-lraxn--ses554gxn--sgne-gratangenxn--" + + "skierv-utazastuff-4-salexn--skjervy-v1axn--skjk-soaxn--sknit-yqa" + + "xn--sknland-fxaxn--slat-5naturalsciencesnaturellestufftoread-boo" + + "ksnesomnarviikamishihoronobeauxartsandcraftsolarssonxn--slt-elab" + + "cieszynxn--smla-hraxn--smna-gratis-a-bulls-fanxn--snase-nraxn--s" + + "ndre-land-0cbielawaltervistaprinternationalfirearms3-website-ap-" + + "southeast-1xn--snes-poaxn--snsa-roaxn--sr-aurdal-l8axn--sr-fron-" + + "q1axn--sr-odal-q1axn--sr-varanger-ggbielladbrokes3-website-ap-so" + + "utheast-2xn--srfold-byaxn--srreisa-q1axn--srum-grazxn--stfold-9x" + + "axn--stjrdal-s1axn--stjrdalshalsen-sqbieszczadygeyachiyodaejeonb" + + "uklugsmilebtimnetzjampagefrontappanasonicateringebuildingleezexn" + + "--stre-toten-zcbievathletajimabaridagawakuyabukijobserverrankosh" + + "igayachimataijincheonhlfanhs3-website-eu-west-1xn--t60b56axn--tc" + + "kweatherchannelxn--tiq49xqyjetztrentino-sudtirolxn--tjme-hraxn--" + + "tn0agrinetbankosakaerodromegallupinbarreauctionredumbrella-spezi" + + "australiaisondriobranconagawalbrzycharitysfjordds3-eu-central-1x" + + "n--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol-rzbif" + + "ukagawarszawashingtondclkareliancexn--trentin-sdtirol-7vbigv-inf" + + "oodnetworkangerxn--trentino-sd-tirol-c3bihorologyukindianapolis-" + + "a-bloggerxn--trentino-sdtirol-szbikedagestangeometre-experts-com" + + "ptables3-website-sa-east-1xn--trentinosd-tirol-rzbilbaogashimada" + + "chicagoboats3-website-us-east-1xn--trentinosdtirol-7vbillustrati" + + "onthewifiatmallorcadaques3-website-us-west-1xn--trentinsd-tirol-" + + "6vbiohtawaramotoineppueblockbustermezlglitchaselfiparaglidingliw" + + "icexn--trentinsdtirol-nsbirdartcenterprisecloudappspotagerxn--tr" + + "gstad-r1axn--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atvarggatr" + + "itonxn--uc0ay4axn--uist22hamurakamigoris-a-liberalxn--uisz3gxn--" + + "unjrga-rtarumizusawaxn--unup4yxn--uuwu58axn--vads-jraxn--valle-a" + + "oste-ebbturystykanmakiwienxn--valle-d-aoste-ehbodollstuttgartrev" + + "isohughesooxn--valleaoste-e7axn--valledaoste-ebbvacationsusakis-" + + "into-gamessinazawaxn--vard-jraxn--vegrshei-c0axn--vermgensberate" + + "r-ctbirkenesoddtangenovaraholtalenikonanporomutashinaindianmarke" + + "tinglobalashovhachinohedmarkariyameiwamarumorimachidaxn--vermgen" + + "sberatung-pwbirthplacexn--vestvgy-ixa6oxn--vg-yiabkhaziaxn--vgan" + + "-qoaxn--vgsy-qoa0jevnakershuscultureggioemiliaromagnamsosnowiech" + + "oyodobashichikashukujitawaraumalborkasaokamiminersantabarbaraxn-" + + "-vgu402coguchikuzenxn--vhquvaroyxn--vler-qoaxn--vre-eiker-k8axn-" + + "-vrggt-xqadxn--vry-yla5gxn--vuq861bjarkoyukuhashimoichinosekigah" + + "araxn--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1collection" + + "xn--wgbl6axn--xhq521bjerkreimbamblebesbyglandroverhallaakesvuemi" + + "elecceu-2xn--xkc2al3hye2axn--xkc2dl3a5ee0handsonxn--y9a3aquarium" + + "issilevangerxn--yer-znaturbruksgymnxn--yfro4i67oxn--ygarden-p1ax" + + "n--ygbi2ammxn--3e0b707exn--ystre-slidre-ujbjugnieznord-frontierx" + + "n--zbx025dxn--zf0ao64axn--zf0avxn--3hcrj9cistrondheimmobilieniss" + + "hingucciprianiigataishinomakinkobayashikaoirmitakeharaxn--zfr164" + + "blackfridayurihonjournalistjohninohekinannestadivttasvuotnakanii" + + "kawatanaguraxnbayxz" // nodes is the list of nodes. Each node is represented as a uint32, which // encodes the node's children, wildcard bit and node type (as an index into @@ -524,1805 +523,1816 @@ const text = "9guacuiababia-goracleaningroks-theatree12hpalermomahachijoinvill" // [15 bits] text index // [ 6 bits] text length var nodes = [...]uint32{ - 0x32ce03, - 0x243304, - 0x2d7946, - 0x215803, - 0x215806, - 0x38b3c6, - 0x3ae643, - 0x246d44, - 0x341047, - 0x2d7588, + 0x324003, + 0x3ac784, + 0x2e6d06, + 0x2f86c3, + 0x2f86c6, + 0x38e946, + 0x3b2f83, + 0x316b04, + 0x3280c7, + 0x2e6948, 0x1a000c2, - 0x1f3aec7, - 0x377a09, - 0x2c628a, - 0x2c628b, - 0x231b43, - 0x233805, - 0x2203042, - 0x212284, - 0x2d7ac3, - 0x203045, - 0x260c6c2, - 0x3290c3, - 0x2b22c44, - 0x33f285, - 0x2e0c182, - 0x26d6ce, - 0x24e5c3, - 0x3a36c6, - 0x3206082, - 0x2fd2c7, - 0x236086, - 0x3602982, - 0x27f103, - 0x27f104, - 0x397646, - 0x36bf08, - 0x288086, - 0x270104, + 0x1f3f4c7, + 0x378d49, + 0x2c3d8a, + 0x2c3d8b, + 0x234283, + 0x235a45, + 0x2203782, + 0x3c3f44, + 0x23be43, + 0x327905, + 0x260e2c2, + 0x3425c3, + 0x2a1f004, + 0x331f05, + 0x2e12502, + 0x270d0e, + 0x251a03, + 0x3a7ac6, + 0x3202e82, + 0x2cf107, + 0x238046, + 0x3602a42, + 0x223743, + 0x280904, + 0x2171c6, + 0x3381c8, + 0x289106, + 0x271dc4, 0x3a00ac2, - 0x34cb09, - 0x2171c7, - 0x344986, - 0x28dfc9, - 0x32fa48, - 0x34b444, - 0x3947c6, - 0x336a46, - 0x3e03582, - 0x3da686, - 0x24070f, - 0x2112ce, - 0x217bc4, - 0x20d005, - 0x32cd05, - 0x2e1b49, - 0x23b549, - 0x397e47, - 0x3cffc6, - 0x28e143, - 0x4212082, - 0x2232c3, - 0x28da0a, - 0x4613583, - 0x3cea45, - 0x299082, - 0x38c209, - 0x4e02282, - 0x213c04, - 0x21fb46, - 0x2fff45, - 0x36db84, - 0x5643344, - 0x225843, - 0x232b84, - 0x5a03342, - 0x31fd84, - 0x5f8a244, - 0x2fe64a, + 0x34c289, + 0x215c87, + 0x331a86, + 0x2fb689, + 0x36dc08, + 0x34a384, + 0x36a106, + 0x248746, + 0x3e03082, + 0x22a54f, + 0x211b0e, + 0x216684, + 0x213985, + 0x323f05, + 0x2e3949, + 0x23ec89, + 0x2179c7, + 0x21e906, + 0x238a03, + 0x42197c2, + 0x2197c3, + 0x30d24a, + 0x4631643, + 0x255b85, + 0x2fae02, + 0x38f789, + 0x4e03002, + 0x204dc4, + 0x203006, + 0x32cec5, + 0x36f104, + 0x5624404, + 0x21c183, + 0x234dc4, + 0x5a04182, + 0x23afc4, + 0x5f8d7c4, + 0x37bc4a, 0x6200882, - 0x21ef47, - 0x27afc8, - 0x7204c82, - 0x2f6e47, - 0x2c2b84, - 0x2c2b87, - 0x3d6805, - 0x362187, - 0x2e73c6, - 0x27d8c4, - 0x328e45, - 0x256407, - 0x8a05802, - 0x3da803, - 0x21e182, - 0x369a03, - 0x8e09bc2, - 0x281705, + 0x3ba4c7, + 0x212208, + 0x7204602, + 0x3bda07, + 0x22f344, + 0x2c1247, + 0x22f345, + 0x361307, + 0x326546, + 0x28c784, + 0x342345, + 0x2774c7, + 0x8a02cc2, + 0x245a03, + 0x20bd02, + 0x36af43, + 0x8e09fc2, + 0x282e45, 0x9200202, - 0x3c2844, - 0x277445, - 0x217b07, - 0x2fdfce, - 0x2b1044, - 0x261dc4, - 0x20e5c3, - 0x251789, - 0x265f0b, - 0x273788, - 0x28dd88, - 0x2e53c8, - 0x28c008, - 0x34b28a, - 0x362087, - 0x276586, - 0x9615842, - 0x2be403, - 0x3cab03, - 0x3cd244, - 0x2be443, - 0x28ca83, - 0x1736f42, + 0x2452c4, + 0x3a9905, + 0x2165c7, + 0x366b8e, + 0x2b1b04, + 0x263a84, + 0x20fc03, + 0x268309, + 0x26a0cb, + 0x27e9c8, + 0x2fb448, + 0x353748, + 0x28dc48, + 0x34a1ca, + 0x361207, + 0x2c6606, + 0x9682702, + 0x375fc3, + 0x3cb183, + 0x3ccb84, + 0x376003, + 0x363c03, + 0x173b542, 0x9a019c2, - 0x27e945, - 0x313dc6, - 0x2335c4, - 0x379907, - 0x263e46, - 0x2bfa04, - 0x399647, + 0x27fec5, + 0x339e46, + 0x235804, + 0x37ab87, + 0x23ae06, + 0x2ba3c4, + 0x394487, 0x2019c3, - 0x9ecb4c2, - 0xa227682, - 0xa627442, - 0x227446, + 0x9ecab82, + 0xa21c342, + 0xa61c102, + 0x21c106, 0xaa00282, - 0x285845, - 0x338483, - 0x3bfc44, - 0x2eddc4, - 0x2eddc5, - 0x3c7543, - 0xae48343, - 0xb338dc2, - 0x203c05, - 0x203c0b, - 0x20b24b, - 0x26bb44, - 0x204a09, - 0x205f44, - 0xb606802, - 0x207043, - 0x207183, - 0xba08082, - 0x2ed8ca, - 0xbe08342, - 0x212505, - 0x2de9ca, - 0x35cc04, - 0x208343, - 0x209ec4, - 0x20ba03, - 0x20ba04, - 0x20ba07, - 0x20c585, - 0x20d346, - 0x213006, - 0x213cc3, - 0x217f48, - 0x20db43, - 0xc209582, - 0x23d4c8, - 0x20958b, - 0x221cc8, - 0x222a86, - 0x224447, - 0x226fc8, - 0xd205b82, - 0xd6c1142, - 0x33f3c8, - 0x20f9c7, - 0x30f645, - 0x30f648, - 0xdadcf48, - 0x27ff43, - 0x22a104, - 0x38b442, - 0xde2a542, - 0xe243bc2, - 0xea2a8c2, - 0x22a8c3, - 0xee04042, - 0x30e303, - 0x237484, - 0x204043, - 0x206444, - 0x37454b, - 0x2094c3, - 0x2e94c6, - 0x27f404, - 0x2ba20e, - 0x381e45, - 0x3a37c8, - 0x3dd347, - 0x3dd34a, - 0x22f603, - 0x243107, - 0x2660c5, - 0x22f604, - 0x250206, - 0x250207, - 0x2fc304, - 0xf30f084, - 0x2fe304, - 0x2fe306, - 0x3db9c4, - 0x3ba486, - 0x226e03, - 0x3a8908, - 0x3c38c8, - 0x291d83, - 0x2ed883, - 0x346ac4, - 0x358183, - 0xfa09382, - 0xfe8b742, - 0x20b983, - 0x240d86, - 0x329383, - 0x35b7c4, - 0x102179c2, - 0x24a583, - 0x2179c3, - 0x214c82, + 0x284505, + 0x33ca83, + 0x3c2804, + 0x2e99c4, + 0x2e99c5, + 0x3c6083, + 0xae4af03, + 0xb33d3c2, + 0x28d145, + 0x3dc00b, + 0x3c65cb, + 0x226804, + 0x204389, + 0x205504, + 0xb605742, + 0x205f43, + 0x207583, + 0xba08d42, + 0x2ed10a, + 0xbe09002, + 0x3c41c5, + 0x2df2ca, + 0x390144, + 0x20b803, + 0x20c0c4, + 0x20d3c3, + 0x20d3c4, + 0x20d3c7, + 0x20e185, + 0x20ec06, + 0x20eec6, + 0x212fc3, + 0x216a08, + 0x20c483, + 0xc21c782, + 0x246648, + 0x38764b, + 0x21fe48, + 0x220c06, + 0x221187, + 0x224f08, + 0xd205142, + 0xd6bfa42, + 0x332048, + 0x210207, + 0x309b05, + 0x309b08, + 0xdac8208, + 0x2a9e43, + 0x22b9c4, + 0x38e9c2, + 0xde2bd82, + 0xe228b82, + 0xea2c542, + 0x22c543, + 0xee07982, + 0x305b43, + 0x238fc4, + 0x207983, + 0x31f8c4, + 0x332c0b, + 0x280c03, + 0x2e4a86, + 0x280c04, + 0x2b800e, + 0x384a45, + 0x3a7bc8, + 0x2fa347, + 0x2fa34a, + 0x223103, + 0x3ac587, + 0x26a285, + 0x231cc4, + 0x254146, + 0x254147, + 0x2f6e04, + 0x22ee47, + 0xf309544, + 0x37b904, + 0x37b906, + 0x2595c4, + 0x3a8c46, + 0x20bb03, + 0x3b9a08, + 0x20bb08, + 0x263a43, + 0x2ed0c3, + 0x3453c4, + 0x356ac3, + 0xfa47502, + 0xfe8d382, + 0x2056c3, + 0x243e86, + 0x342883, + 0x380c04, + 0x10216482, + 0x24ab83, + 0x216483, + 0x213e42, 0x10600d42, - 0x2c5c86, - 0x2344c7, - 0x2f8407, - 0x3a9405, - 0x207484, - 0x29bac5, - 0x267347, - 0x3cb009, - 0x2db306, - 0x2ea9c6, - 0x10a02c82, - 0x331448, - 0x31f486, - 0x34ebc5, - 0x3ac387, - 0x306104, - 0x306105, - 0x10e02c84, - 0x202c88, - 0x11203cc2, + 0x2c4586, + 0x236707, + 0x3be887, + 0x3c6a85, + 0x39ad84, + 0x290e85, + 0x239b07, + 0x2dbc49, + 0x2e1b06, + 0x2e5d88, + 0x2fd486, + 0x10a27f02, + 0x3db188, + 0x2fe246, + 0x227f05, + 0x3184c7, + 0x318b04, + 0x318b05, + 0x10f27544, + 0x327548, + 0x11214c42, 0x11600482, - 0x21d746, + 0x212746, 0x200488, - 0x335f85, - 0x34d406, - 0x351b08, - 0x35b088, - 0x11a07d45, - 0x11e25744, - 0x322d47, - 0x122059c2, - 0x1268cac2, - 0x13a0c302, - 0x21fc45, - 0x284a05, - 0x384006, - 0x326507, - 0x3a80c7, - 0x1422c0c3, - 0x318887, - 0x3a4548, - 0x1f22c289, - 0x26d887, - 0x22c9c7, - 0x22d408, - 0x22dc06, - 0x22f106, - 0x23000c, - 0x230d0a, - 0x231b87, - 0x2336cb, - 0x234307, - 0x23430e, - 0x1f635404, - 0x235604, - 0x237347, - 0x25bfc7, - 0x23ac06, - 0x23ac07, - 0x333e47, - 0x2e4003, - 0x1fa2ae02, - 0x23bec6, - 0x23beca, - 0x23c90b, - 0x23e487, - 0x23ef05, - 0x23f443, - 0x23f946, - 0x23f947, - 0x2ef083, - 0x1fe00102, - 0x24038a, - 0x20378f82, - 0x20661482, - 0x20a3d1c2, - 0x20e36182, - 0x242505, - 0x242cc4, - 0x21659dc2, - 0x31fe05, - 0x23cf03, - 0x2954c5, - 0x2028c4, - 0x20a204, - 0x280186, - 0x27e0c6, - 0x203e03, - 0x3bcfc4, - 0x2f8703, - 0x226081c2, - 0x2247c4, - 0x3232c6, - 0x2247c5, - 0x244086, - 0x3ac488, - 0x22b144, - 0x36b888, - 0x322805, - 0x37f488, - 0x2c24c6, - 0x3049c7, - 0x287804, - 0x23a87806, - 0x23ee85c3, - 0x39c943, - 0x2ec108, - 0x331344, - 0x24361707, - 0x24abe846, - 0x2dbb09, - 0x330048, - 0x34b8c8, - 0x355644, - 0x3c6d83, - 0x23cfc2, - 0x24e4cfc2, - 0x25201d42, - 0x204583, - 0x2560a782, - 0x2ef004, - 0x24ad06, - 0x21af83, - 0x2b6387, - 0x2f7443, - 0x334888, - 0x2101c5, - 0x259203, - 0x2773c5, - 0x277504, - 0x305e06, - 0x2127c6, - 0x217a46, - 0x2203c4, - 0x2346c3, - 0x25a05202, - 0x25e2ec05, + 0x358ec5, + 0x359946, + 0x35b9c8, + 0x3804c8, + 0x11a0e745, + 0x11e22584, + 0x245c47, + 0x12204f82, + 0x126291c2, + 0x13a03102, + 0x203105, + 0x2864c5, + 0x386c06, + 0x34f647, + 0x22db47, + 0x1422f743, + 0x30f807, + 0x37af08, + 0x1e22f909, + 0x270ec7, + 0x22fd87, + 0x2309c8, + 0x2311c6, + 0x2317c6, + 0x2324cc, + 0x23394a, + 0x2342c7, + 0x23590b, + 0x236547, + 0x23654e, + 0x1e6373c4, + 0x2375c4, + 0x238e87, + 0x25e687, + 0x23e546, + 0x23e547, + 0x344b07, + 0x26f503, + 0x1ea2ca82, + 0x23f306, + 0x23f30a, + 0x23fd0b, + 0x241187, + 0x241c05, + 0x242143, + 0x242c46, + 0x242c47, + 0x2eaf03, + 0x1ee00102, + 0x2434ca, + 0x1f37a202, + 0x1f647542, + 0x1fa46342, + 0x1fe38142, + 0x246a85, + 0x247204, + 0x20624502, + 0x23b045, + 0x23b843, + 0x205605, + 0x202984, + 0x20adc4, + 0x3671c6, + 0x27f2c6, + 0x2a75c3, + 0x3c0544, + 0x3beb83, + 0x21607682, + 0x221504, + 0x2461c6, + 0x221505, + 0x249f46, + 0x3185c8, + 0x225304, + 0x22e988, + 0x337f85, + 0x33aa08, + 0x2bc7c6, + 0x359d87, + 0x2877c4, + 0x22a877c6, + 0x22e3c8c3, + 0x3a03c3, + 0x2e6648, + 0x329044, + 0x23360887, + 0x23add286, + 0x2dd289, + 0x32d3c8, + 0x268a48, + 0x329bc4, + 0x204c03, + 0x2403c2, + 0x23e50002, + 0x24201d42, + 0x207ec3, + 0x2460ce02, + 0x2eae84, + 0x372c86, + 0x328205, + 0x21b703, + 0x2b6f47, + 0x3301c3, + 0x336588, + 0x210a05, + 0x25b603, + 0x3a9885, + 0x3a99c4, + 0x3006c6, + 0x212a46, + 0x216506, + 0x203884, + 0x236903, + 0x24a08682, + 0x24f39905, 0x200843, - 0x2660f4c2, - 0x22c243, - 0x373605, - 0x26a32c43, - 0x27232c49, - 0x27600942, - 0x27e04282, - 0x28b045, - 0x215e46, - 0x205606, - 0x2cf508, - 0x2cf50b, - 0x32ed0b, - 0x3a9605, - 0x2cbc09, + 0x25612602, + 0x22f8c3, + 0x23ce85, + 0x25a34e83, + 0x26234e89, + 0x26600942, + 0x26e07bc2, + 0x28cc85, + 0x214b46, + 0x208a86, + 0x2ceb88, + 0x2ceb8b, + 0x3293cb, + 0x2fe6c5, + 0x2cb2c9, 0x1600b42, - 0x2cfc08, - 0x204d04, - 0x28601bc2, - 0x34a603, - 0x28e5c186, - 0x33e208, - 0x29201a02, - 0x28c608, - 0x29609802, - 0x33c4ca, - 0x29a46e03, - 0x2a378046, - 0x3910c8, - 0x330906, - 0x387087, - 0x240907, - 0x3365ca, - 0x35cc84, - 0x35fe04, - 0x376889, - 0x2a7a7545, - 0x2114c6, - 0x20fbc3, - 0x24bd04, - 0x2aa0d644, - 0x344147, - 0x2aee3587, - 0x293104, - 0x236cc5, - 0x3840c8, - 0x3a03c7, - 0x243547, - 0x2b20c202, - 0x298d44, - 0x294348, - 0x2443c4, - 0x249204, - 0x249b85, - 0x249cc7, - 0x2b658549, - 0x24a804, - 0x24b0c9, - 0x24b308, - 0x24ba84, - 0x24ba87, - 0x2ba4cdc3, - 0x24d2c7, - 0x2be014c2, - 0x16b1b82, - 0x24df86, - 0x24e607, - 0x24e884, - 0x24f687, - 0x250647, - 0x2510c3, - 0x2b12c2, - 0x20bcc2, - 0x28de83, - 0x3be3c4, - 0x3be3cb, - 0x2c28de88, - 0x258bc4, - 0x254205, - 0x255c47, - 0x238a05, - 0x2d908a, - 0x258b03, - 0x2c603d42, - 0x20da44, - 0x25bd89, - 0x2601c3, - 0x260287, - 0x2683c9, - 0x3de348, - 0x23e2c3, - 0x27c387, - 0x27ce49, - 0x266883, - 0x284fc4, - 0x286209, - 0x289406, - 0x2c7d43, - 0x2076c2, - 0x235c83, - 0x2b1987, - 0x235c85, - 0x3b8806, - 0x26e144, - 0x3cc645, - 0x279803, - 0x213f06, - 0x210dc3, - 0x204c02, - 0x248304, - 0x2ca6bc02, - 0x2ce6bc03, - 0x2d2020c2, - 0x247603, - 0x213484, - 0x239bc7, - 0x216586, - 0x278042, - 0x2d65c582, - 0x3ac684, - 0x2da0bb82, - 0x2de063c2, - 0x2b36c4, - 0x2b36c5, - 0x27d545, - 0x366a06, - 0x2e204882, - 0x3bd645, - 0x3cedc5, - 0x204883, - 0x21a286, - 0x21b845, - 0x2273c2, - 0x35acc5, - 0x2273c4, - 0x22b083, - 0x22b2c3, - 0x2e61d302, - 0x256607, - 0x24b504, - 0x24b509, - 0x24bc04, - 0x284883, - 0x39bf88, - 0x2ea84884, - 0x284886, - 0x2a6b43, - 0x254c43, - 0x228b03, - 0x2eeedc82, - 0x302342, - 0x2f200642, - 0x339f48, - 0x301408, - 0x3aedc6, - 0x272945, - 0x2802c5, - 0x345387, - 0x2f677f05, - 0x220482, - 0x2fa97642, - 0x2fe00042, - 0x278cc8, - 0x31f3c5, - 0x2f3e44, - 0x243fc5, - 0x245547, - 0x27a1c4, - 0x240282, - 0x30205702, - 0x352784, - 0x222f47, - 0x28cf47, - 0x362144, - 0x3cc143, - 0x291cc4, - 0x291cc8, - 0x22f446, - 0x25008a, - 0x2eb544, - 0x296008, - 0x242ec4, - 0x224546, - 0x297604, - 0x21ff46, - 0x24b7c9, - 0x2a62c7, - 0x2087c3, - 0x306033c2, - 0x34b643, - 0x206a02, - 0x30a17d82, - 0x2fb0c6, - 0x380708, - 0x2a8787, - 0x26ad49, - 0x2ad689, - 0x2aa9c5, - 0x2abd49, - 0x2ac545, - 0x2ad385, - 0x2ae008, - 0x30e04104, - 0x31251207, - 0x22cd83, - 0x2ae207, - 0x22cd86, - 0x2ae607, - 0x2a5e45, - 0x22c603, - 0x31630ac2, - 0x208584, - 0x31a0adc2, - 0x31e04742, - 0x3ae186, - 0x27af45, - 0x2b0587, - 0x2fef43, - 0x28ca04, + 0x2e7008, + 0x204684, + 0x27601bc2, + 0x34bf03, + 0x27e5e846, + 0x25d348, + 0x28201a02, + 0x28e248, + 0x28669102, + 0x340aca, + 0x28ad0703, + 0x29379386, + 0x37c3c8, + 0x30ad48, + 0x3c2d46, + 0x38acc7, + 0x22a747, + 0x2482ca, + 0x3901c4, + 0x35e684, + 0x3786c9, + 0x297ac185, + 0x211d06, + 0x210403, + 0x24fa44, + 0x29a227c4, + 0x331247, + 0x29eaabc7, + 0x2a1144, + 0x387c05, + 0x386cc8, + 0x3a47c7, + 0x247847, + 0x2a2143c2, + 0x3c51c4, + 0x294548, + 0x2494c4, + 0x24bd44, + 0x24c6c5, + 0x24c807, + 0x2a64e689, + 0x24e184, + 0x24ee09, + 0x24f048, + 0x24f7c4, + 0x24f7c7, + 0x2aa4fe03, + 0x250a47, + 0x16014c2, + 0x16b2642, + 0x251a46, + 0x251ec7, + 0x252304, + 0x253107, + 0x2547c7, + 0x255043, + 0x2b1d82, + 0x20d682, + 0x2fb543, + 0x3c0fc4, + 0x3c0fcb, + 0x2aefb548, + 0x25afc4, + 0x2572c5, + 0x258807, + 0x25a1c5, + 0x2def0a, + 0x25af03, + 0x2b208142, + 0x20c384, + 0x25e449, + 0x2628c3, + 0x262987, + 0x353b89, + 0x3d9dc8, + 0x229b43, + 0x27dbc7, + 0x27e549, + 0x239cc3, + 0x286b44, + 0x287dc9, + 0x28a706, + 0x339283, + 0x202ec2, + 0x237c43, + 0x2b2447, + 0x237c45, + 0x3bd6c6, + 0x2d7004, + 0x3cd145, + 0x27b483, + 0x213206, + 0x211603, + 0x204582, + 0x24aec4, + 0x2b6268c2, + 0x2ba268c3, + 0x2be020c2, + 0x24a403, + 0x20f344, + 0x20f347, + 0x390246, + 0x27cec2, + 0x2c25ec42, + 0x3187c4, + 0x2c60d542, + 0x2ca19202, + 0x23d144, + 0x23d145, + 0x28c405, + 0x366186, + 0x2ce0f4c2, + 0x32a305, + 0x354585, + 0x223383, + 0x3cf0c6, + 0x20f4c5, + 0x21c082, + 0x359585, + 0x21c084, + 0x225243, + 0x225483, + 0x2d209102, + 0x2dac07, + 0x24f244, + 0x24f249, + 0x24f944, + 0x286343, + 0x39f748, + 0x2d686344, + 0x286346, + 0x2a57c3, + 0x257b03, + 0x224943, + 0x2dae9882, + 0x2faf82, + 0x2de00642, + 0x33e548, + 0x342a88, + 0x3b3706, + 0x25adc5, + 0x22bc45, + 0x3306c7, + 0x2e26fbc5, + 0x203942, + 0x2e698402, + 0x2ea00042, + 0x315e88, + 0x3db0c5, + 0x2efec4, + 0x249e85, + 0x24b947, + 0x25f444, + 0x2433c2, + 0x2ee08b82, + 0x350584, + 0x217c07, + 0x28f207, + 0x3612c4, + 0x3cbb43, + 0x263984, + 0x263988, + 0x231b06, + 0x253fca, + 0x2aa144, + 0x2967c8, + 0x28ab44, + 0x221286, + 0x2983c4, + 0x203406, + 0x24f509, + 0x23c347, + 0x21fa83, + 0x2f25ce02, + 0x387f43, + 0x205942, + 0x2f616842, + 0x2f5d86, + 0x3836c8, + 0x2a74c7, + 0x225a09, + 0x2aba89, + 0x2a9385, + 0x2ab689, + 0x2ac745, + 0x2ad585, + 0x2ae048, + 0x2fa07a44, + 0x2fe55187, + 0x230143, + 0x2ae247, + 0x230146, + 0x2ae647, + 0x2a4ac5, + 0x2b9ac3, + 0x30233702, + 0x20ba44, + 0x3062cc02, + 0x30a05dc2, + 0x3cc0c6, + 0x212185, + 0x2b1047, + 0x326fc3, + 0x363b84, 0x201e83, - 0x20f703, - 0x32203dc2, - 0x32a01cc2, - 0x38b4c4, - 0x3881c3, - 0x2fbf45, - 0x32e00f42, - 0x33602b82, - 0x2d5c86, - 0x2fdf04, - 0x303f04, - 0x303f0a, - 0x33e005c2, - 0x263f43, - 0x20cd0a, - 0x214388, - 0x34224e44, + 0x2c5e03, + 0x30e03842, + 0x31601cc2, + 0x38ea44, + 0x2dca43, + 0x2f6a45, + 0x31a00f42, + 0x32203702, + 0x2d8946, + 0x329184, + 0x3dacc4, + 0x3dacca, + 0x32a005c2, + 0x245e83, + 0x21368a, + 0x214348, + 0x32e21b84, 0x2005c3, - 0x34601803, - 0x266ac9, - 0x24d8c9, - 0x2b6486, - 0x34a14543, - 0x36f705, - 0x3b62cd, - 0x214546, - 0x219e4b, - 0x34e129c2, - 0x394608, - 0x38218042, - 0x38604dc2, - 0x2b3905, - 0x38a01742, - 0x2c67c7, - 0x214903, - 0x21ba08, - 0x38e02cc2, - 0x219384, - 0x20ff03, - 0x2f7ac5, - 0x23d006, - 0x21e244, - 0x2ed843, - 0x2b26c3, - 0x392163c2, - 0x3a9584, - 0x3b77c5, - 0x2b1587, - 0x279c43, - 0x2b2183, - 0x16b2242, - 0x2b2243, - 0x2b2643, - 0x39600e02, - 0x246b84, - 0x27e2c6, - 0x3cba43, - 0x2b2d43, - 0x39a48902, - 0x248908, - 0x2b3d84, - 0x20ed06, - 0x255087, - 0x270906, - 0x291e84, - 0x47e01b82, - 0x22cc4b, - 0x2f91ce, - 0x216c0f, - 0x292e43, - 0x48659902, - 0x163ea82, - 0x48a017c2, - 0x296583, - 0x20e883, - 0x2dd4c6, - 0x3cb286, - 0x2b0187, - 0x30b0c4, - 0x48e11902, - 0x492106c2, - 0x245005, - 0x2f1887, - 0x2b47c6, - 0x496526c2, - 0x2526c4, - 0x2b93c3, - 0x49a4e082, - 0x49f72383, - 0x2bac04, - 0x2c1d89, - 0x4a2c8c82, - 0x4a601882, + 0x33201803, + 0x26c409, + 0x207349, + 0x2b7046, + 0x33614503, + 0x315405, + 0x3b478d, + 0x214506, + 0x21a4cb, + 0x33a03302, + 0x2b4148, + 0x36a16b02, + 0x36e08242, + 0x2e8205, + 0x37201742, + 0x371347, + 0x2022c3, + 0x20f688, + 0x376051c2, + 0x32e244, + 0x210743, + 0x32aa45, + 0x240406, + 0x21da04, + 0x2ed083, + 0x2b3003, + 0x37a150c2, + 0x2fe644, + 0x3bc6c5, + 0x2b2047, + 0x27b8c3, + 0x2b2a03, + 0x16b2ac2, + 0x2b2ac3, + 0x2b2f83, + 0x37e00e02, + 0x3bac04, + 0x27f4c6, + 0x23d303, + 0x2b36c3, + 0x3824b4c2, + 0x24b4c8, + 0x2b4e04, + 0x369ac6, + 0x256e47, + 0x284746, + 0x2aed84, + 0x46601b82, + 0x23000b, + 0x2f378e, + 0x2156cf, + 0x366703, + 0x46e5bd02, + 0x1638902, + 0x472017c2, + 0x296d43, + 0x2092c3, + 0x21d086, + 0x2dbec6, + 0x218d87, + 0x3cb504, + 0x47614c82, + 0x47a10f02, + 0x242b05, + 0x2f1d87, + 0x2b5dc6, + 0x47e47482, + 0x32a244, + 0x2bae03, + 0x48251b42, + 0x48774343, + 0x2bbe44, + 0x2c0549, + 0x48ac7542, + 0x48e01882, 0x201885, - 0x4aac9182, - 0x4ae03c42, - 0x35f107, - 0x377c8b, - 0x2406c5, - 0x2570c9, - 0x268746, - 0x4b207844, - 0x328949, - 0x2c9cc7, - 0x32a547, - 0x22abc3, - 0x2b3546, - 0x3246c7, - 0x20a443, - 0x291246, - 0x4ba23342, - 0x4be1d702, - 0x34b783, - 0x38c3c5, - 0x221587, - 0x3cb386, - 0x235c05, - 0x24b484, - 0x2a4d05, - 0x38cf44, - 0x4c201b02, - 0x2c71c4, - 0x267f44, - 0x38830d, - 0x37adc9, - 0x22aec8, + 0x492c8802, + 0x49604b42, + 0x35d987, + 0x3b6a09, + 0x378fcb, + 0x22a505, + 0x26aa09, + 0x270246, + 0x393bc7, + 0x49a04b44, + 0x3d6a49, + 0x37ed07, + 0x206a07, + 0x22c843, + 0x2b3fc6, + 0x322ec7, + 0x20b003, + 0x371f06, + 0x4a219842, + 0x4a612702, + 0x329a83, + 0x38f945, + 0x21f787, + 0x2dbfc6, + 0x237bc5, + 0x24f1c4, + 0x2a3fc5, + 0x390c84, + 0x4aa01b02, + 0x3be187, + 0x2c51c4, + 0x207244, + 0x20724d, + 0x34ca49, + 0x22cb48, 0x201b04, - 0x3dad85, - 0x3a8e87, - 0x206504, - 0x263f07, - 0x2eb205, - 0x4c607b04, - 0x2a8b45, - 0x25ee84, - 0x27a306, - 0x35f885, - 0x4ca26902, - 0x21d6c3, - 0x28f783, - 0x348084, - 0x348085, - 0x37c586, - 0x235d45, - 0x3d3284, - 0x32c043, - 0x4ce0a6c6, - 0x225045, - 0x225c85, - 0x326404, - 0x2eb5c3, - 0x2eb5cc, - 0x4d204482, - 0x4d601442, - 0x4da03102, - 0x20e403, - 0x20e404, - 0x4de05f82, - 0x380d88, - 0x3b88c5, - 0x2c93c4, - 0x23aa86, - 0x4e217002, - 0x4e6115c2, - 0x4ea00c42, - 0x291a85, - 0x220286, - 0x20d584, - 0x397b86, - 0x21ed06, - 0x221983, - 0x4ee9e10a, - 0x279e05, - 0x28d9c3, - 0x2254c6, - 0x3bd449, - 0x2254c7, - 0x2a9c48, - 0x32f909, - 0x3b9e48, - 0x303706, - 0x20e583, - 0x4f21fc02, - 0x39dc88, - 0x4f644502, - 0x4fa06a42, - 0x238cc3, - 0x2e2a45, - 0x29b404, - 0x2f5d89, - 0x32acc4, - 0x3dabc8, - 0x50206a43, - 0x507749c4, - 0x215e88, - 0x388247, - 0x50a52742, - 0x22e302, - 0x32cc85, - 0x261b89, - 0x211543, - 0x27fcc4, - 0x36f6c4, - 0x20e903, - 0x2812ca, - 0x50f40d82, - 0x512083c2, - 0x2cb443, - 0x38f5c3, - 0x162c142, - 0x2bdc03, - 0x5161d902, - 0x51a00bc2, - 0x51f03f84, - 0x3b3506, - 0x269884, - 0x278b03, - 0x3bf203, - 0x52200bc3, - 0x23cc86, - 0x3a0e45, - 0x2cb5c7, - 0x2cf7c6, - 0x2d0648, - 0x2d0846, - 0x2035c4, - 0x29cd0b, - 0x2d3643, - 0x2d3645, - 0x21fdc2, - 0x35f402, - 0x52642582, - 0x52a05a02, - 0x215fc3, - 0x52e6bf42, - 0x26bf43, - 0x2d46c3, - 0x5360cac2, - 0x53ad9bc6, - 0x257906, - 0x53ed9d02, - 0x542071c2, - 0x5462b302, - 0x54a09082, - 0x54e18942, - 0x552050c2, - 0x208b03, - 0x26cb45, - 0x379b06, - 0x55617b84, - 0x3230ca, - 0x3a5d46, - 0x20bdc4, - 0x28dd43, - 0x56212b02, - 0x205642, - 0x22c203, - 0x5660a803, - 0x3b8307, - 0x35f787, - 0x58ae4447, - 0x39e847, - 0x229183, - 0x333b4a, - 0x340644, - 0x319084, - 0x31908a, - 0x3a8205, - 0x58e11482, - 0x24df43, - 0x59200602, - 0x24bbc3, - 0x34b603, - 0x59a00582, - 0x3a44c4, - 0x345584, - 0x3b0645, - 0x31e4c5, - 0x2e4a06, - 0x304146, - 0x59e39242, - 0x5a202f42, - 0x33d185, - 0x257612, - 0x353286, - 0x270e03, - 0x356606, - 0x31cd05, - 0x16045c2, - 0x626080c2, - 0x376203, - 0x2080c3, - 0x396203, - 0x62a18d42, - 0x23a183, - 0x63223242, - 0x220103, - 0x300808, - 0x239503, - 0x239506, - 0x3c4d87, - 0x321186, - 0x32118b, - 0x20bd07, - 0x2ebf04, - 0x63a00c02, - 0x3b8745, - 0x63e09783, - 0x21d283, - 0x2e60c5, - 0x333a43, - 0x64733a46, - 0x3c8fca, - 0x2a3fc3, - 0x235f44, + 0x31f985, + 0x20a247, + 0x20a5c4, + 0x266407, + 0x2aa705, + 0x4ae0e504, + 0x2b3145, + 0x261584, + 0x310fc6, + 0x35e105, + 0x4b224382, + 0x2126c3, + 0x3a2a83, + 0x346984, + 0x346985, + 0x361d86, + 0x237d05, + 0x229ac4, + 0x34dfc3, + 0x4b60cd46, + 0x223dc5, + 0x22ae85, + 0x34f544, + 0x2aa1c3, + 0x2aa1cc, + 0x4ba07dc2, + 0x4be01442, + 0x4c20e942, + 0x20e943, + 0x20e944, + 0x4c605542, + 0x353408, + 0x3bd785, + 0x2bd504, + 0x23e3c6, + 0x4ca065c2, + 0x4ce11e02, + 0x4d200c42, + 0x292905, + 0x203746, + 0x2aab04, + 0x217706, + 0x34b306, + 0x227803, + 0x4d737c4a, + 0x2747c5, + 0x30d203, + 0x222306, + 0x3ceec9, + 0x222307, + 0x297688, + 0x36dac9, + 0x326e08, + 0x222e46, + 0x20fbc3, + 0x4da030c2, + 0x3a17c8, + 0x4de49602, + 0x4e205982, + 0x225a83, + 0x2e1985, + 0x29b6c4, + 0x393d09, + 0x3a93c4, + 0x376588, + 0x4ea05983, + 0x4ef33084, + 0x214b88, + 0x207187, + 0x4f32a2c2, + 0x247702, + 0x323e85, + 0x264149, + 0x211d83, + 0x2814c4, + 0x3153c4, + 0x20a2c3, + 0x282a0a, + 0x4f727e02, + 0x4fa0b882, + 0x2cab03, + 0x3928c3, + 0x162f7c2, + 0x3757c3, + 0x4fe1f382, + 0x50200bc2, + 0x50746484, + 0x388586, + 0x26bc04, + 0x27aac3, + 0x3d4c43, + 0x50a00bc3, + 0x240086, + 0x3a5005, + 0x2cac87, + 0x2cdc45, + 0x2cee46, + 0x2d0048, + 0x2d0246, + 0x265cc4, + 0x29cc4b, + 0x2d41c3, + 0x2d41c5, + 0x2d4c48, + 0x203282, + 0x35dc82, + 0x50e46b02, + 0x51204fc2, + 0x214cc3, + 0x5166ff42, + 0x26ff43, + 0x2d5603, + 0x51e23c42, + 0x522da646, + 0x2578c6, + 0x526b4342, + 0x52a075c2, + 0x52e254c2, + 0x5323c9c2, + 0x53618382, + 0x53a02142, + 0x206183, + 0x2c9805, + 0x326406, + 0x53e09c04, + 0x245fca, + 0x3aa986, + 0x20d784, + 0x26a083, + 0x54a05682, + 0x208ac2, + 0x22f883, + 0x54e0ce83, + 0x3bd1c7, + 0x35e007, + 0x56e6f947, + 0x321a47, + 0x229483, + 0x22948a, + 0x265e44, + 0x3125c4, + 0x3125ca, + 0x22dc85, + 0x57211cc2, + 0x2522c3, + 0x57600602, + 0x22c483, + 0x387f03, + 0x57e00582, + 0x37ae84, + 0x3308c4, + 0x3ce845, + 0x319b45, + 0x28ea86, + 0x2aad46, + 0x5824dc02, + 0x58602f42, + 0x312a85, + 0x2575d2, + 0x351086, + 0x271283, + 0x301046, + 0x2ef145, + 0x1607f02, + 0x60a08d82, + 0x378043, + 0x208d83, + 0x282583, + 0x60e18782, + 0x23fc83, + 0x6160dbc2, + 0x2035c3, + 0x3bac48, + 0x26d843, + 0x26d846, + 0x32b747, + 0x31bb46, + 0x31bb4b, + 0x20d6c7, + 0x2e6444, + 0x61e00c02, + 0x3bd605, + 0x6220ce43, + 0x209b43, + 0x32c2c5, + 0x335703, + 0x62b35706, + 0x2e718a, + 0x2a3283, + 0x2170c4, 0x2003c6, - 0x34efc6, - 0x64a16603, - 0x340007, - 0x2669c7, - 0x29e985, - 0x26f486, - 0x2158c3, - 0x6761a4c3, - 0x67a00a82, - 0x67e8f804, - 0x3c36c9, - 0x2137c5, - 0x229bc4, - 0x354e88, - 0x2e47c5, - 0x682352c5, - 0x23f549, - 0x344a43, - 0x261404, - 0x686161c2, - 0x2161c3, - 0x68a74542, - 0x274546, - 0x1678002, - 0x68e08f82, - 0x291988, - 0x291c83, - 0x2a8a87, - 0x2b2745, - 0x2b22c5, - 0x2b22cb, - 0x2e8206, - 0x2b24c6, - 0x23bb44, - 0x2e8946, - 0x69321408, - 0x27f4c3, - 0x264503, - 0x264504, - 0x2e51c4, - 0x2ea707, - 0x2ec545, - 0x696ec682, - 0x69a08242, - 0x6a21ae45, - 0x2b8f44, - 0x2d244b, - 0x2edcc8, - 0x250f44, - 0x6a62ad42, - 0x6aa23c42, - 0x3ba403, - 0x2efb84, - 0x2efe45, - 0x2f0607, - 0x2f3984, - 0x362244, - 0x6ae16102, - 0x37b5c9, - 0x2f4c05, - 0x240985, - 0x2f5cc5, - 0x6b216103, - 0x2f67c4, - 0x2f67cb, - 0x2f8a84, - 0x2f8d4b, - 0x2f95c5, - 0x216d4a, - 0x2f9e88, - 0x2fa08a, - 0x2fa883, - 0x2fa88a, - 0x6ba13602, - 0x6be20082, - 0x6c2ba0c3, - 0x6c6fdb02, - 0x2fdb03, - 0x6caed182, - 0x6cf38c02, - 0x301f04, - 0x218086, - 0x3978c5, - 0x303c03, - 0x32d3c6, - 0x3973c5, - 0x3d2dc4, - 0x6d200902, - 0x29fc84, - 0x2cb88a, - 0x3001c7, - 0x32a006, - 0x242f47, - 0x23bf03, - 0x2bac48, - 0x3c608b, - 0x2b6585, - 0x2c26c5, - 0x2c26c6, - 0x229984, - 0x3a4f48, - 0x20f883, - 0x25b984, - 0x336947, - 0x2ebb46, - 0x340846, - 0x2ba04a, - 0x24b144, - 0x31b14a, - 0x6d7009c6, - 0x3009c7, - 0x254287, - 0x273f04, - 0x273f09, - 0x251e05, - 0x234f8b, - 0x2ed083, - 0x212983, - 0x6da1de03, - 0x331d84, - 0x6de00682, - 0x228906, - 0x6e2bb4c5, - 0x356845, - 0x24e1c6, - 0x2a1384, - 0x6e602442, - 0x23f484, - 0x6ea0a982, - 0x3287c5, - 0x34c884, - 0x6f61b443, - 0x6fa08102, - 0x208103, - 0x3062c6, - 0x6fe04e82, - 0x392248, - 0x225344, - 0x225346, - 0x38fe46, - 0x70255d04, - 0x20a645, - 0x225648, - 0x227187, - 0x34e087, - 0x34e08f, - 0x294246, - 0x23b743, - 0x23fac4, - 0x20dc83, - 0x224684, - 0x24e784, - 0x706085c2, - 0x28b443, - 0x335543, - 0x70a09482, - 0x209483, - 0x227603, - 0x20c60a, - 0x272bc7, - 0x25398c, - 0x70e53c46, - 0x253dc6, - 0x254d87, - 0x7122d847, - 0x25aac9, - 0x23d604, - 0x71660404, - 0x71a16002, - 0x71e02e42, - 0x2ba406, - 0x33fe04, - 0x28b8c6, - 0x22dcc8, - 0x38c484, - 0x2d7b46, - 0x2055c5, - 0x7228a748, - 0x23fa43, - 0x314705, - 0x28dc43, - 0x240a83, - 0x240a84, - 0x20da03, - 0x72648d42, - 0x72a03382, - 0x2ecf49, - 0x291b85, - 0x292544, - 0x296b45, - 0x209b04, - 0x2cd147, - 0x35a545, - 0x72e46484, - 0x2d2088, - 0x2d2f86, - 0x2dedc4, - 0x2e13c8, - 0x2e1a07, - 0x73201702, - 0x2e99c4, - 0x310d44, - 0x2c2d87, - 0x73605bc4, - 0x215782, - 0x73a01782, + 0x228306, + 0x62e3f7c3, + 0x363a47, + 0x26c307, + 0x29e485, + 0x281ec6, + 0x223e03, + 0x65bcf303, + 0x65e00a82, + 0x663406c4, + 0x3b9809, + 0x207f45, + 0x227484, + 0x3531c8, + 0x23d505, + 0x6666fcc5, + 0x242249, + 0x331b43, + 0x2474c4, + 0x66a04ac2, + 0x214ec3, + 0x66e7a042, + 0x27a046, + 0x167ce82, + 0x67203482, + 0x292808, + 0x2a2203, + 0x2b3087, + 0x31bdc5, + 0x2e2fc5, + 0x34e14b, + 0x2e2fc6, + 0x34e346, + 0x2e3f06, + 0x280104, + 0x2c0746, + 0x676d7a48, + 0x280cc3, + 0x266a03, + 0x266a04, + 0x2fb244, + 0x30a607, + 0x2e7b45, + 0x67ae7c82, + 0x67e07702, + 0x6861b5c5, + 0x2b5c44, + 0x2d8f4b, + 0x2e98c8, + 0x24de84, + 0x68a2c9c2, + 0x68e1a142, + 0x3a8bc3, + 0x2eba44, + 0x2ebd05, + 0x2ec547, + 0x2efa04, + 0x3613c4, + 0x69214e02, + 0x37e589, + 0x2f0b45, + 0x22a7c5, + 0x2f16c5, + 0x69614e03, + 0x2f2d04, + 0x2f2d0b, + 0x2f3044, + 0x2f330b, + 0x2f4345, + 0x21580a, + 0x2f4b08, + 0x2f4d0a, + 0x2f5543, + 0x2f554a, + 0x69e1c282, + 0x6a203542, + 0x6a628743, + 0x6aaf93c2, + 0x2f93c3, + 0x6af56bc2, + 0x6b33d202, + 0x2fab44, + 0x216b46, + 0x217445, + 0x2fe1c3, + 0x3245c6, + 0x216f45, + 0x22cec4, + 0x6b600902, + 0x2a7b04, + 0x2caf4a, + 0x32d147, + 0x335a86, + 0x3ac3c7, + 0x23f343, + 0x2bbe88, + 0x3bdbcb, + 0x2b7145, + 0x2c0d85, + 0x2c0d86, + 0x26cf04, + 0x3c0688, + 0x21be43, + 0x248644, + 0x248647, + 0x2e6086, + 0x203a86, + 0x2b7e4a, + 0x24ee84, + 0x314eca, + 0x6bb48d46, + 0x348d47, + 0x257347, + 0x276e44, + 0x276e49, + 0x233045, + 0x326a0b, + 0x2e8f43, + 0x212c03, + 0x6be1d5c3, + 0x2c9a04, + 0x6c200682, + 0x224746, + 0x6c6b9845, + 0x301285, + 0x251c86, + 0x2a0304, + 0x6ca03e42, + 0x242184, + 0x6ce129c2, + 0x228ac5, + 0x268804, + 0x6da1bbc3, + 0x6de08dc2, + 0x208dc3, + 0x238446, + 0x6e205fc2, + 0x395a48, + 0x222184, + 0x222186, + 0x393146, + 0x6e6588c4, + 0x20ccc5, + 0x222488, + 0x2250c7, + 0x227547, + 0x22754f, + 0x294446, + 0x231603, + 0x23ee84, + 0x20c5c3, + 0x2213c4, + 0x251dc4, + 0x6ea0ba82, + 0x28d083, + 0x337243, + 0x6ee02442, + 0x223943, + 0x21c2c3, + 0x20e20a, + 0x275b47, + 0x25494c, + 0x6f254c06, + 0x254d86, + 0x256b47, + 0x6f630e07, + 0x25d989, + 0x246784, + 0x262b04, + 0x6fa14d02, + 0x6fe05c82, + 0x2b8206, + 0x363844, + 0x28d506, + 0x231288, + 0x38fa04, + 0x259c46, + 0x208a45, + 0x7028b748, + 0x242d43, + 0x30d485, + 0x2917c3, + 0x22a8c3, + 0x22a8c4, + 0x20c343, + 0x7064b902, + 0x70a033c2, + 0x2e8e09, + 0x292705, + 0x292a04, + 0x293245, + 0x20b444, + 0x3a2007, + 0x35fbc5, + 0x70e3bb84, + 0x2df6c8, + 0x2e0cc6, + 0x2e2e04, + 0x2e3508, + 0x2e3807, + 0x71201702, + 0x2e6804, + 0x30a484, + 0x2c1447, + 0x71605184, + 0x226b42, + 0x71a01782, 0x201783, 0x201784, - 0x29f703, - 0x2aed05, - 0x73e2e942, - 0x302245, - 0x287582, - 0x30a205, - 0x3c0085, - 0x74210342, - 0x217944, - 0x74602602, - 0x28eb86, - 0x2bf706, - 0x261cc8, - 0x2c3748, - 0x3ae104, - 0x30ed05, - 0x3abbc9, - 0x2cfd44, - 0x3c8f84, - 0x2204c3, - 0x319c83, - 0x74b19c85, - 0x2411c5, - 0x284b04, - 0x356bcd, - 0x293042, - 0x359103, - 0x74e09442, - 0x75203a42, - 0x391d05, - 0x3babc7, - 0x21e484, - 0x32fb09, - 0x2cb9c9, - 0x277e43, - 0x277e48, - 0x245e09, - 0x214947, - 0x204185, - 0x37c106, - 0x37ec86, - 0x3808c5, - 0x37aec5, - 0x75601a82, - 0x287205, - 0x2b7748, - 0x2c5a46, - 0x75a52b07, - 0x2bd2c4, - 0x2fc647, - 0x305546, - 0x75e01082, - 0x37c286, - 0x30988a, - 0x30a105, - 0x762e8f82, - 0x76621902, - 0x3645c6, - 0x221908, - 0x76a8d107, - 0x76e43b02, - 0x288ec3, - 0x2ff806, - 0x226884, - 0x275b06, - 0x319f46, - 0x2034ca, - 0x2021c5, - 0x3006c6, - 0x2520c3, - 0x2520c4, - 0x207442, - 0x331403, - 0x7720e442, - 0x2f1803, - 0x7760cf84, - 0x221a44, - 0x77a21a4a, - 0x22ce03, - 0x266c87, - 0x30d106, - 0x2ff144, - 0x20bc82, - 0x2a6f02, - 0x77e007c2, - 0x22b9c3, - 0x254047, + 0x29f203, + 0x29f205, + 0x71e1df42, + 0x2fae85, + 0x287542, + 0x303a85, + 0x3b9145, + 0x72210b82, + 0x216404, + 0x726026c2, + 0x36b586, + 0x2ba0c6, + 0x264288, + 0x2c20c8, + 0x3cc044, + 0x3b2ac5, + 0x383b49, + 0x2fe744, + 0x2e7144, + 0x203983, + 0x248403, + 0x72a48405, + 0x234545, + 0x2865c4, + 0x35550d, + 0x354282, + 0x357a43, + 0x35ef43, + 0x72e05c42, + 0x73202302, + 0x395505, + 0x368687, + 0x21dc44, + 0x36dcc9, + 0x2cb089, + 0x279e83, + 0x279e88, + 0x2f3f49, + 0x2305c7, + 0x207ac5, + 0x383886, + 0x3a2c06, + 0x3a6305, + 0x34cb45, + 0x73601a82, + 0x27cbc5, + 0x2b8908, + 0x2c4346, + 0x73b2ec87, + 0x2a1084, + 0x309247, + 0x2ffe86, + 0x73e01082, + 0x361a86, + 0x30310a, + 0x303985, + 0x742e4542, + 0x7468f3c2, + 0x340fc6, + 0x318e08, + 0x74a8f3c7, + 0x74e28cc2, + 0x28a1c3, + 0x3a8546, + 0x224304, + 0x278b06, + 0x313646, + 0x376d4a, + 0x203bc5, + 0x331cc6, + 0x32ee03, + 0x32ee04, + 0x20b102, + 0x329103, + 0x7520e982, + 0x2ed803, + 0x213904, + 0x2c28c4, + 0x75718f4a, + 0x222f03, + 0x222f0a, + 0x239447, + 0x307186, + 0x23bd84, + 0x20d642, + 0x2a5b82, + 0x75a007c2, + 0x263943, + 0x257107, 0x2007c7, - 0x287dc4, - 0x3d0847, - 0x2f0706, - 0x20fb07, - 0x227544, - 0x292445, - 0x2187c5, - 0x78214682, - 0x3b2f46, - 0x215943, - 0x21e0c2, - 0x21e0c6, - 0x78621542, - 0x78a19f82, - 0x298e05, - 0x78e47c82, - 0x79201942, - 0x324c85, - 0x2d3985, - 0x2a9385, - 0x79a1d043, - 0x24adc5, - 0x2e82c7, - 0x2f3505, - 0x202385, - 0x32b944, - 0x229a46, - 0x3dd844, - 0x79e008c2, - 0x7ab82d05, - 0x3c9447, - 0x3afe08, - 0x24d686, - 0x38bb4d, - 0x24d689, - 0x24d692, - 0x34cf05, - 0x37aa03, - 0x7ae06902, - 0x319b44, - 0x2145c3, - 0x38d005, - 0x30b405, - 0x7b20ff42, - 0x259243, - 0x7b62b902, - 0x7beca302, - 0x7c200082, - 0x2e08c5, - 0x2088c3, - 0x7c60fa02, - 0x7ca14302, - 0x3a4486, - 0x27ac8a, - 0x208c83, - 0x256203, - 0x2f6ac3, - 0x7de05402, - 0x8c218d82, - 0x8ca05782, - 0x217042, - 0x3cd2c9, - 0x2c80c4, - 0x2d6648, - 0x8cefbb02, - 0x8d60ff82, - 0x2c4e85, - 0x233b08, - 0x23c708, - 0x315b0c, - 0x237843, - 0x8da08842, - 0x8de00f02, - 0x3b9686, - 0x30df85, - 0x2dae43, - 0x252f86, - 0x30e0c6, - 0x27a383, - 0x310c83, - 0x311346, - 0x312bc4, - 0x263546, - 0x3b610a, - 0x23fbc4, - 0x313284, - 0x314aca, - 0x8e212f42, - 0x24cf45, - 0x31634a, - 0x316285, - 0x317c04, - 0x317d06, - 0x317e84, - 0x216486, - 0x8e615482, - 0x215486, - 0x251a45, - 0x3b2dc7, - 0x3b5f86, - 0x254f84, - 0x2db0c7, - 0x20a4c5, - 0x20a4c7, - 0x3b7147, - 0x3b714e, - 0x389606, - 0x22a785, - 0x205b07, - 0x207203, - 0x207207, - 0x21e905, - 0x225944, - 0x22a582, - 0x23db47, - 0x30b144, - 0x241b04, - 0x285f4b, - 0x21c283, - 0x2bc607, - 0x21c284, - 0x2bc907, - 0x229683, - 0x350f8d, - 0x3a0c48, - 0x8ea46384, - 0x246385, - 0x3194c5, - 0x319903, - 0x8ee25242, - 0x31c243, - 0x31d283, - 0x3b30c4, - 0x27cf45, - 0x2159c7, - 0x252146, - 0x38cdc3, - 0x22b34b, - 0x27350b, - 0x2ac28b, - 0x3cad8b, - 0x2e8fca, - 0x36f44b, - 0x39334b, - 0x3d950c, - 0x3dcb4b, - 0x31ddd1, - 0x31e20a, - 0x31e70b, - 0x31e9cc, - 0x31eccb, - 0x31ff4a, - 0x3206ca, - 0x321ece, - 0x32344b, - 0x32370a, - 0x324dd1, - 0x32520a, - 0x32570b, - 0x325c4e, - 0x326b4c, - 0x32738b, - 0x32764e, - 0x3279cc, - 0x32b40a, - 0x32c64c, - 0x8f32c94a, - 0x32d548, - 0x32e109, - 0x33204a, - 0x3322ca, - 0x33254b, - 0x334cce, - 0x335b91, - 0x341509, - 0x34174a, - 0x34244b, - 0x34634d, - 0x3471ca, - 0x348716, - 0x349a8b, - 0x34a80a, - 0x34ad8a, - 0x34c10b, - 0x34c989, - 0x351909, - 0x351e8d, - 0x35250b, - 0x35340b, - 0x353dcb, - 0x3543c9, - 0x354a0e, - 0x35520a, - 0x35608a, - 0x35698a, - 0x35724b, - 0x357a8b, - 0x35890d, - 0x35a04d, - 0x35a950, - 0x35ae0b, - 0x35b90c, - 0x35cecb, - 0x35ec0b, - 0x3602ce, - 0x3609cb, - 0x3609cd, - 0x36550b, - 0x365f8f, - 0x36634b, - 0x366b8a, - 0x3678c9, - 0x367f89, - 0x8f7689cb, - 0x368c8e, - 0x36900e, - 0x36cecb, - 0x36e00f, - 0x37024b, - 0x37050b, - 0x3707cb, - 0x370e8a, - 0x377889, - 0x37a00f, - 0x37e9cc, - 0x37ee0c, - 0x37f8ce, - 0x37fe4f, - 0x38020e, - 0x381310, - 0x38170f, - 0x3822ce, - 0x382e8c, - 0x383191, - 0x3835d2, - 0x384ad1, - 0x3852ce, - 0x38570b, - 0x38570e, - 0x385a8f, - 0x385e4e, - 0x3861d3, - 0x386691, - 0x386acc, - 0x386dce, - 0x38724c, - 0x387793, - 0x388650, - 0x38a34c, - 0x38a64c, - 0x38ab0b, - 0x38b0ce, - 0x38b5cb, - 0x38be8b, - 0x38d30c, - 0x39278a, - 0x392b4c, - 0x392e4c, - 0x393149, - 0x39494b, - 0x394c08, - 0x3953c9, - 0x3953cf, + 0x288e44, + 0x21f187, + 0x2ec646, + 0x210347, + 0x21c204, + 0x3ae645, + 0x20fa45, + 0x75e14642, + 0x387fc6, + 0x214643, + 0x21d882, + 0x21d886, + 0x76207202, + 0x7661a602, + 0x3c5285, + 0x76a44d02, + 0x76e01942, + 0x323485, + 0x2d4505, + 0x2a8485, + 0x77609903, + 0x372d45, + 0x2e3087, + 0x2f7405, + 0x203d85, + 0x322804, + 0x23d386, + 0x2fdc84, + 0x77a008c2, + 0x786e7645, + 0x3858c7, + 0x3543c8, + 0x250e06, + 0x38f0cd, + 0x250e09, + 0x250e12, + 0x349b05, + 0x34c683, + 0x78a05842, + 0x313244, + 0x214583, + 0x382b45, + 0x304945, + 0x78e10782, + 0x25b643, + 0x7921ddc2, + 0x79a736c2, + 0x79e00082, + 0x2d1885, + 0x21fb83, + 0x248d88, + 0x7a210242, + 0x7a613602, + 0x37ae46, + 0x31650a, + 0x206303, + 0x258dc3, + 0x2f1cc3, + 0x7ba04cc2, + 0x89e187c2, + 0x8a608c02, + 0x2038c2, + 0x3ccc09, + 0x2c6984, + 0x20a988, + 0x8aaf6602, + 0x8b205d42, + 0x2b04c5, + 0x235d48, + 0x2f9f08, + 0x2e95cc, + 0x239383, + 0x8b61fb02, + 0x8ba00f02, + 0x367b06, + 0x308005, + 0x2db783, + 0x250346, + 0x308146, + 0x291103, + 0x30a3c3, + 0x30a7c6, + 0x30c044, + 0x26c6c6, + 0x3b45ca, + 0x2443c4, + 0x30c704, + 0x30d84a, + 0x8bee5d02, + 0x24ff85, + 0x30f38a, + 0x30f2c5, + 0x3115c4, + 0x3116c6, + 0x311844, + 0x215186, + 0x8c22c902, + 0x2f8346, + 0x32b1c5, + 0x329847, + 0x3b4446, + 0x256d44, + 0x2dba07, + 0x337b86, + 0x20b085, + 0x20b087, + 0x3bc047, + 0x3bc04e, + 0x38cb86, + 0x221045, + 0x2050c7, + 0x207603, + 0x349047, + 0x208f45, + 0x217ec4, + 0x222782, + 0x22bdc7, + 0x3cb584, + 0x2ff104, + 0x24758b, + 0x21c903, + 0x291847, + 0x21c904, + 0x2ba647, + 0x22ac83, + 0x34e84d, + 0x3a4e08, + 0x8c6261c4, + 0x23ba85, + 0x312bc5, + 0x313003, + 0x8ca22082, + 0x315303, + 0x315703, + 0x388144, + 0x27e645, + 0x2146c7, + 0x32ee86, + 0x390b03, + 0x22550b, + 0x27e74b, + 0x2b2ccb, + 0x2d340b, + 0x2e458a, + 0x3709cb, 0x396c8b, - 0x8fb9800a, - 0x399fcc, - 0x39b18b, - 0x39b449, - 0x39bbc8, - 0x39c18b, - 0x39c70b, - 0x39d28a, - 0x39d50b, - 0x39da0c, - 0x39e3c9, - 0x39e608, + 0x3d92cc, + 0x3da7cb, + 0x317351, + 0x31778a, + 0x317c8b, + 0x317f4c, + 0x31824b, + 0x3188ca, + 0x3191ca, + 0x31a0ce, + 0x31a98b, + 0x31ac4a, + 0x31c751, + 0x31cb8a, + 0x31d08b, + 0x31d5ce, + 0x31df0c, + 0x31e98b, + 0x31ec4e, + 0x31efcc, + 0x3222ca, + 0x32384c, + 0x8cf23b4a, + 0x324748, + 0x325309, + 0x333d0a, + 0x333f8a, + 0x33420b, + 0x3369ce, + 0x337651, + 0x342f49, + 0x34318a, + 0x343f8b, + 0x345aca, + 0x346f16, + 0x34828b, + 0x3498ca, + 0x349cca, + 0x34accb, + 0x34c109, + 0x34f1c9, + 0x34fc8d, + 0x35030b, + 0x35120b, + 0x351bcb, + 0x352709, + 0x352d4e, + 0x353dca, + 0x354c8a, + 0x3552ca, + 0x355b8b, + 0x3563cb, + 0x35724d, + 0x358bcd, + 0x359210, + 0x3596cb, + 0x35a24c, + 0x35b74b, + 0x35d48b, + 0x35eb4e, + 0x35f6cb, + 0x35f6cd, + 0x364c8b, + 0x36570f, + 0x365acb, + 0x36630a, + 0x368b49, + 0x369209, + 0x8d36a28b, + 0x36a54e, + 0x36e90b, + 0x36f58f, + 0x37208b, + 0x37234b, + 0x37260b, + 0x372e8a, + 0x378bc9, + 0x37d1cf, + 0x381d4c, + 0x38230c, + 0x38280e, + 0x382e0f, + 0x3831ce, + 0x383f10, + 0x38430f, + 0x384ece, + 0x385a8c, + 0x385d91, + 0x3861d2, + 0x388711, + 0x388f0e, + 0x38934b, + 0x38934e, + 0x3896cf, + 0x389a8e, + 0x389e13, + 0x38a2d1, + 0x38a70c, + 0x38aa0e, + 0x38ae8c, + 0x38b3d3, + 0x38bbd0, + 0x38d8cc, + 0x38dbcc, + 0x38e08b, + 0x38e64e, + 0x38eb4b, + 0x38f40b, + 0x3914cc, + 0x395f8a, + 0x39648c, + 0x39678c, + 0x396a89, + 0x3986cb, + 0x398988, + 0x399149, + 0x39914f, + 0x39a90b, + 0x8d79b24a, + 0x39d78c, + 0x39e94b, + 0x39ec09, + 0x39f388, + 0x39f94b, + 0x3a018b, + 0x3a0d0a, 0x3a0f8b, - 0x3a3ccb, - 0x3a694e, - 0x3a7e4b, - 0x3aabcb, - 0x3b6ccb, - 0x3b6f89, - 0x3b74cd, - 0x3c9e8a, - 0x3cdd57, - 0x3cf418, - 0x3d41c9, - 0x3d530b, - 0x3d5814, - 0x3d5d0b, - 0x3d628a, - 0x3d694a, - 0x3d6bcb, - 0x3d7410, - 0x3d7811, - 0x3d7eca, - 0x3d8b0d, - 0x3d920d, - 0x3ddd8b, - 0x3b3043, - 0x8ff83d43, - 0x32af06, - 0x22ef05, - 0x307347, - 0x332e46, - 0x1602d42, - 0x2ab3c9, - 0x32d1c4, - 0x2e4d08, - 0x21dd43, - 0x319a87, - 0x22de82, - 0x2b05c3, - 0x902057c2, - 0x2cc446, - 0x2cdb04, - 0x347d04, - 0x346243, - 0x90ac91c2, - 0x90e2a444, - 0x273e47, - 0x9122a1c2, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x111148, - 0x20ca43, + 0x3a154c, + 0x3a2688, + 0x3a514b, + 0x3a80cb, + 0x3ab58e, + 0x3acccb, + 0x3af7cb, + 0x3bbbcb, + 0x3bbe89, + 0x3bc3cd, + 0x3ca50a, + 0x3cdb97, + 0x3cfd58, + 0x3d34c9, + 0x3d460b, + 0x3d50d4, + 0x3d55cb, + 0x3d5b4a, + 0x3d600a, + 0x3d628b, + 0x3d7250, + 0x3d7651, + 0x3d7c0a, + 0x3d88cd, + 0x3d8fcd, + 0x3dbd8b, + 0x3880c3, + 0x8db86943, + 0x2a9ec6, + 0x279c45, + 0x3911c7, + 0x334b06, + 0x1603a02, + 0x3d2049, + 0x3243c4, + 0x2e2608, + 0x21d503, + 0x313187, + 0x231442, + 0x2b1083, + 0x8de08c42, + 0x2cbb06, + 0x2ccf04, + 0x346604, + 0x36d203, + 0x8e6c8842, + 0x8ea1e244, + 0x276d87, + 0x8ee2ba82, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x1acac8, + 0x204783, 0x2000c2, - 0x9fe08, - 0x20c302, - 0x228b03, - 0x211543, - 0x20a803, - 0xca43, - 0x216603, - 0x20c603, - 0x33b8d6, - 0x363e93, - 0x3d06c9, - 0x322c48, - 0x3b85c9, - 0x3164c6, - 0x3527d0, - 0x20c013, - 0x2ebc08, - 0x27a947, - 0x286b07, - 0x2a4a4a, - 0x3291c9, - 0x28f509, - 0x24224b, - 0x2e73c6, - 0x28830a, - 0x222a86, - 0x32cdc3, - 0x256545, - 0x3a8908, - 0x233fcd, - 0x21fd0c, - 0x2eaac7, - 0x3dcdcd, - 0x225744, - 0x22fd8a, - 0x23084a, - 0x230d0a, - 0x20c307, - 0x23a907, - 0x23da84, - 0x287806, - 0x251c04, - 0x2d58c8, - 0x32ad09, - 0x2cf506, - 0x2cf508, - 0x240dcd, - 0x2cbc09, - 0x3910c8, - 0x240907, - 0x23750a, - 0x24e606, - 0x25b7c7, - 0x2fb704, - 0x20b6c7, - 0x228b0a, - 0x239d4e, - 0x277f05, - 0x3d7c0b, - 0x22b709, - 0x24d8c9, - 0x2c6607, - 0x3c138a, - 0x2c2cc7, - 0x2f9309, - 0x27b408, - 0x2e640b, - 0x2e2a45, - 0x22ad8a, - 0x22b0c9, - 0x33e68a, - 0x20460b, - 0x20b5cb, - 0x241fd5, - 0x2c1f85, - 0x240985, - 0x2f67ca, - 0x3dbb0a, - 0x31b687, - 0x233c43, - 0x2ba388, - 0x2d80ca, - 0x225346, - 0x2592c9, - 0x28a748, - 0x2dedc4, - 0x387549, - 0x2c3748, - 0x2c2407, - 0x382d06, - 0x3c9447, - 0x2b4607, - 0x23ca85, - 0x2e450c, - 0x246385, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0xca43, - 0x216603, - 0x20c302, - 0x22c0c3, - 0x20a803, - 0x20ca43, - 0x216603, - 0x22c0c3, - 0x20a803, - 0xca43, - 0x239503, - 0x216603, - 0x1ca243, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0xca43, - 0x216603, - 0x9fe08, - 0x20c302, - 0x22c0c3, - 0x22c0c7, - 0x20a803, - 0x216603, - 0x20c302, + 0xa7c88, + 0x203102, + 0x224943, + 0x211d83, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0x202443, + 0x33fed6, + 0x362e53, + 0x21f009, + 0x245b48, + 0x3bd489, + 0x30f506, + 0x3505d0, + 0x243713, + 0x2e6148, + 0x27abc7, + 0x27c4c7, + 0x2a3d0a, + 0x3426c9, + 0x3a2809, + 0x25078b, + 0x326546, + 0x28938a, + 0x220c06, + 0x323fc3, + 0x2dab45, + 0x3b9a08, + 0x23620d, + 0x2031cc, + 0x2fd587, + 0x31a40d, + 0x222584, + 0x23224a, + 0x23348a, + 0x23394a, + 0x23cc87, + 0x23e247, + 0x240a84, + 0x2877c6, + 0x32b384, + 0x2d8588, + 0x3a9409, + 0x2ceb86, + 0x2ceb88, + 0x243ecd, + 0x2cb2c9, + 0x30ad48, + 0x22a747, + 0x23904a, + 0x251ec6, + 0x25dec7, + 0x2d0e84, + 0x28f047, + 0x22494a, + 0x23f84e, + 0x26fbc5, + 0x28ef4b, + 0x222b09, + 0x207349, + 0x371187, + 0x3dc44a, + 0x2c1387, + 0x2f38c9, + 0x209f08, + 0x32c60b, + 0x2e1985, + 0x22ca0a, + 0x225289, + 0x36beca, + 0x2cdccb, + 0x3c6c8b, + 0x250515, + 0x2e59c5, + 0x22a7c5, + 0x2f2d0a, + 0x25970a, + 0x313b87, + 0x22a803, + 0x2b8188, + 0x2d928a, + 0x222186, + 0x25b6c9, + 0x28b748, + 0x2e2e04, + 0x38b189, + 0x2c20c8, + 0x2bc707, + 0x2e7646, + 0x3858c7, + 0x2c2dc7, + 0x23fe85, + 0x26fa0c, + 0x23ba85, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0x203102, + 0x22f743, + 0x20ce83, + 0x204783, + 0x23f7c3, + 0x22f743, + 0x20ce83, + 0x4783, + 0x26d843, + 0x23f7c3, + 0x1ca8c3, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0xa7c88, + 0x203102, + 0x22f743, + 0x22f747, + 0x20ce83, + 0x23f7c3, + 0x203102, 0x201d02, - 0x2ebe82, - 0x202cc2, - 0x202f82, - 0x2e5382, - 0x91746, - 0x4e9c9, - 0x481b443, - 0x88147, - 0x5b03, - 0x119045, + 0x2e63c2, + 0x2051c2, + 0x2090c2, + 0x2e4e02, + 0x92246, + 0x52449, + 0x481bbc3, + 0x891c7, + 0x50c3, + 0x112585, 0xc1, - 0x522c0c3, - 0x232c43, - 0x212483, - 0x228b03, - 0x214543, - 0x211543, - 0x2d9fc6, - 0x20a803, - 0x216603, - 0x20f803, - 0x9fe08, - 0x3443c4, - 0x374787, - 0x346283, - 0x2b3904, - 0x218c83, - 0x286243, - 0x228b03, - 0x176c87, + 0x522f743, + 0x234e83, + 0x20d343, + 0x224943, + 0x214503, + 0x211d83, + 0x2daa46, + 0x20ce83, + 0x23f7c3, + 0x2021c3, + 0xa7c88, + 0x3314c4, + 0x332e47, + 0x36d243, + 0x2e8204, + 0x2186c3, + 0x287e03, + 0x224943, + 0xe747, 0x9c4, 0x11c3, - 0x2b05, + 0x1273c5, 0x2000c2, - 0x48343, - 0x660c302, - 0x688a549, - 0x8abcd, - 0x8af0d, - 0x2ebe82, - 0x24e44, - 0x2b49, + 0x4af03, + 0x6603102, + 0x688b549, + 0x8bbcd, + 0x8cb4d, + 0x2e63c2, + 0x21b84, + 0x127409, 0x2003c2, - 0x6e24d48, - 0xf61c4, - 0x9fe08, - 0x1417c42, + 0x6e21a88, + 0xf2484, + 0xa7c88, + 0x1416702, 0x14005c2, - 0x1417c42, - 0x1513486, - 0x22df03, - 0x26fb43, - 0x762c0c3, - 0x22fd84, - 0x7a32c43, - 0x8628b03, - 0x203dc2, - 0x224e44, - 0x20a803, - 0x2e59c3, + 0x1416702, + 0x150c906, + 0x2314c3, + 0x271803, + 0x762f743, + 0x232244, + 0x7a34e83, + 0x8624943, + 0x203842, + 0x221b84, + 0x20ce83, + 0x301e03, 0x201e02, - 0x216603, - 0x2185c2, - 0x301e43, - 0x204e82, - 0x203303, - 0x28a803, - 0x205842, - 0x9fe08, - 0x22df03, - 0x3c38c8, - 0x7ee59c3, + 0x23f7c3, + 0x218002, + 0x2faa83, + 0x205fc2, + 0x2a3903, + 0x28b803, + 0x202d02, + 0xa7c88, + 0x2314c3, + 0x20bb08, + 0x2802c2, + 0x7f01e03, 0x201e02, - 0x301e43, - 0x204e82, - 0x8203303, - 0x28a803, - 0x205842, - 0x253c47, - 0x232c49, - 0x301e43, - 0x204e82, - 0x203303, - 0x28a803, - 0x205842, - 0x22c0c3, - 0x248343, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x214543, - 0x211543, - 0x217b84, - 0x20a803, - 0x216603, - 0x20b142, - 0x216103, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x248343, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x20a803, - 0x216603, - 0x204185, - 0x20ff42, + 0x2faa83, + 0x205fc2, + 0x82a3903, + 0x28b803, + 0x202d02, + 0x254c07, + 0x234e89, + 0x2faa83, + 0x205fc2, + 0x2a3903, + 0x28b803, + 0x202d02, + 0x22f743, + 0x24af03, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x214503, + 0x211d83, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x20da42, + 0x214e03, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x24af03, + 0x203102, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x20ce83, + 0x23f7c3, + 0x207ac5, + 0x210782, 0x2000c2, - 0x9fe08, - 0x14470c8, - 0xf704a, - 0x228b03, - 0x203281, + 0xa7c88, + 0x14441c8, + 0x13258a, + 0x224943, + 0x2042c1, 0x2009c1, 0x200a01, 0x201301, 0x201281, - 0x207101, - 0x2027c1, - 0x2223c1, - 0x203bc1, + 0x205ac1, + 0x202881, + 0x220541, + 0x204341, 0x200001, 0x2000c1, 0x200201, - 0x12eb85, - 0x9fe08, + 0x129245, + 0xa7c88, 0x200101, 0x2015c1, 0x200501, @@ -2337,7112 +2347,7067 @@ var nodes = [...]uint32{ 0x200581, 0x2003c1, 0x200a81, - 0x209101, + 0x216b41, 0x200401, 0x200741, 0x2007c1, 0x200081, 0x200f01, - 0x205841, + 0x202d01, 0x201241, 0x2018c1, - 0x204981, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x20c302, - 0x22c0c3, - 0x232c43, + 0x2086c1, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x203102, + 0x22f743, + 0x234e83, 0x2003c2, - 0x216603, - 0x1ae03, - 0x176c87, - 0x11647, - 0x39346, - 0x3484a, - 0x89988, - 0x53388, - 0x53f47, - 0xbdc06, - 0xe1145, - 0x175305, - 0x125b03, - 0x13686, - 0x3e006, - 0x242244, - 0x2f6d07, - 0x9fe08, - 0x2db1c4, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0xc302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x32cb48, - 0x345344, - 0x232b84, - 0x26bb44, - 0x3b9587, - 0x2d6b87, - 0x22c0c3, - 0x23560b, - 0x37400a, - 0x2ff007, - 0x308a08, - 0x2f7b48, - 0x232c43, - 0x2e6687, - 0x212483, - 0x204f48, - 0x209c89, - 0x224e44, - 0x214543, - 0x238cc8, - 0x211543, - 0x2d378a, - 0x2d9fc6, - 0x3a5d47, - 0x20a803, - 0x373846, - 0x26f9c8, - 0x216603, - 0x2433c6, - 0x2edf0d, - 0x2f0348, - 0x2f8a8b, - 0x20b186, - 0x3baac7, - 0x212605, - 0x3c554a, - 0x222085, - 0x2410ca, - 0x20ff42, - 0x205b03, - 0x241b04, + 0x23f7c3, + 0x1b583, + 0xe747, + 0x11e87, + 0x25786, + 0x36a8a, + 0x8ac88, + 0x56548, + 0x57007, + 0x1757c6, + 0xe0a45, + 0x1339c5, + 0x11d483, + 0x1c6b46, + 0xfd986, + 0x250784, + 0x3bd8c7, + 0xa7c88, + 0x2dbb04, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x3102, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x323d48, + 0x330684, + 0x234dc4, + 0x226804, + 0x367a07, + 0x2d7607, + 0x22f743, + 0x2375cb, + 0x316cca, + 0x326807, + 0x302288, + 0x32aac8, + 0x234e83, + 0x32d787, + 0x20d343, + 0x2083c8, + 0x20b5c9, + 0x221b84, + 0x214503, + 0x23b2c8, + 0x211d83, + 0x2d430a, + 0x2daa46, + 0x3aa987, + 0x20ce83, + 0x398446, + 0x271688, + 0x23f7c3, + 0x258f86, + 0x2e9b0d, + 0x2ec208, + 0x2f304b, + 0x3c6506, + 0x368587, + 0x212885, + 0x22914a, + 0x220205, + 0x23444a, + 0x210782, + 0x2050c3, + 0x2ff104, 0x200006, - 0x3ae643, - 0x29fd03, - 0x258783, - 0x20f643, - 0x373c83, - 0x203582, - 0x3abe85, - 0x2aad89, - 0x23d103, - 0x225843, - 0x215203, + 0x3b2f83, + 0x2a7b83, + 0x24e8c3, + 0x2c5d43, + 0x2b5903, + 0x203082, + 0x2fcf85, + 0x2a9749, + 0x240503, + 0x21c183, + 0x224cc3, 0x200201, - 0x2cfb07, - 0x2e0605, - 0x3a8843, - 0x3c7543, - 0x26bb44, - 0x2fef83, - 0x21b908, - 0x367b03, - 0x30f30d, - 0x3896c8, - 0x3c3a86, - 0x2fdec3, - 0x360cc3, - 0x38d5c3, - 0xc62c0c3, - 0x232488, - 0x235604, - 0x23e483, + 0x2e6f07, + 0x2d15c5, + 0x3a8343, + 0x3c6083, + 0x226804, + 0x327003, + 0x20f588, + 0x368d83, + 0x3097cd, + 0x38cc48, + 0x20bcc6, + 0x329143, + 0x391783, + 0x3acf43, + 0xc62f743, + 0x2346c8, + 0x2375c4, + 0x241183, 0x200106, - 0x241648, - 0x27c083, - 0x3c5583, - 0x22c243, - 0x232c43, - 0x2234c3, - 0x2420c3, - 0x284ac3, - 0x3313c3, - 0x28c603, - 0x20d643, - 0x38c105, - 0x24e984, - 0x24f307, - 0x2b12c2, - 0x252d83, - 0x256cc6, - 0x258283, - 0x258e03, - 0x277e03, - 0x2be4c3, - 0x3440c3, - 0x297e47, - 0xca28b03, - 0x2530c3, - 0x3d9e83, - 0x204f43, - 0x214383, - 0x2157c3, - 0x3c3345, - 0x372f03, + 0x244988, + 0x27d8c3, + 0x229183, + 0x22f8c3, + 0x234e83, + 0x2199c3, + 0x250603, + 0x286583, + 0x3290c3, + 0x28e243, + 0x2227c3, + 0x38f685, + 0x252404, + 0x252d87, + 0x2b1d82, + 0x2562c3, + 0x259106, + 0x25ab43, + 0x25b203, + 0x279e43, + 0x376083, + 0x3311c3, + 0x298c07, + 0xca24943, + 0x249203, + 0x3d66c3, + 0x2083c3, + 0x214343, + 0x2f8683, + 0x3b9485, + 0x374ec3, 0x200e09, 0x201503, - 0x30b703, - 0xce35c03, - 0x2c9343, - 0x219a08, - 0x2aacc6, - 0x2be286, - 0x2b1306, - 0x388d07, - 0x228503, - 0x238cc3, - 0x211543, - 0x289a86, - 0x21fdc2, - 0x28f543, - 0x33a385, - 0x20a803, - 0x316d07, - 0x160ca43, - 0x26f9c3, - 0x204343, - 0x230743, - 0x21d283, - 0x216603, - 0x20dc46, - 0x3b9d86, - 0x37a8c3, - 0x2ef183, - 0x216103, - 0x2275c3, - 0x310d03, - 0x2fd203, - 0x302203, - 0x3973c5, - 0x236bc3, - 0x236bc6, - 0x211f08, - 0x212983, - 0x212989, - 0x33f908, - 0x216f88, - 0x221105, - 0x22ceca, - 0x22e04a, - 0x237acb, - 0x23a5c8, - 0x2ed803, - 0x38cf03, - 0x2f9503, - 0x30e208, - 0x3606c3, - 0x2520c4, - 0x207442, - 0x25c283, + 0x304c43, + 0xce37bc3, + 0x2bd483, + 0x21acc8, + 0x2a9686, + 0x375e46, + 0x29e046, + 0x38c287, + 0x222e43, + 0x225a83, + 0x211d83, + 0x28ad86, + 0x203282, + 0x2a2c03, + 0x33e985, + 0x20ce83, + 0x3104c7, + 0x1604783, + 0x271683, + 0x207c83, + 0x212ec3, + 0x209b43, + 0x23f7c3, + 0x20c586, + 0x326d46, + 0x37da83, + 0x2eb003, + 0x214e03, + 0x21c283, + 0x30a443, + 0x2f8c83, + 0x2fae43, + 0x216f45, + 0x259703, + 0x387b06, + 0x32b588, + 0x212c03, + 0x3be389, + 0x363348, + 0x215a48, + 0x21fc05, + 0x2ff34a, + 0x35fcca, + 0x3a128b, + 0x22ecc8, + 0x2ed043, + 0x390c43, + 0x2f2f83, + 0x305a48, + 0x3788c3, + 0x32ee04, + 0x20b102, + 0x25e943, 0x2007c3, - 0x228803, - 0x250d43, - 0x20f803, - 0x20ff42, - 0x229543, - 0x237843, - 0x313603, - 0x315504, - 0x241b04, - 0x3ced43, - 0x9fe08, + 0x222d03, + 0x254f83, + 0x2021c3, + 0x210782, + 0x22ab43, + 0x239383, + 0x30ca83, + 0x30e284, + 0x2ff104, + 0x3c6903, + 0xa7c88, 0x2000c2, 0x200ac2, - 0x203582, - 0x202542, + 0x203082, + 0x202602, 0x200202, 0x201ec2, - 0x25a902, + 0x255002, 0x201bc2, 0x200382, 0x200c42, - 0x252742, - 0x205a02, - 0x26bf42, + 0x32a2c2, + 0x204fc2, + 0x26ff42, 0x200a82, - 0x2e5382, - 0x2161c2, + 0x2e4e02, + 0x204ac2, 0x201c82, - 0x216102, - 0x228702, - 0x204d42, + 0x214e02, + 0x2b2002, + 0x2046c2, 0x200682, - 0x216c82, + 0x215742, + 0x203e42, 0x202442, - 0x209482, - 0x202e42, - 0x2411c2, + 0x205c82, + 0x234542, 0x201942, 0xc2, 0xac2, - 0x3582, - 0x2542, + 0x3082, + 0x2602, 0x202, 0x1ec2, - 0x5a902, + 0x55002, 0x1bc2, 0x382, 0xc42, - 0x52742, - 0x5a02, - 0x6bf42, + 0x12a2c2, + 0x4fc2, + 0x6ff42, 0xa82, - 0xe5382, - 0x161c2, + 0xe4e02, + 0x4ac2, 0x1c82, - 0x16102, - 0x28702, - 0x4d42, + 0x14e02, + 0xb2002, + 0x46c2, 0x682, - 0x16c82, + 0x15742, + 0x3e42, 0x2442, - 0x9482, - 0x2e42, - 0x411c2, + 0x5c82, + 0x34542, 0x1942, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x5b02, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0xc302, - 0x20c302, - 0x216603, - 0xe62c0c3, - 0x228b03, - 0x211543, - 0x6d9c3, - 0x22d7c2, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x57c2, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x50c2, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x3102, + 0x203102, + 0x23f7c3, + 0xe62f743, + 0x224943, + 0x211d83, + 0x71003, + 0x228002, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x8c42, 0x2001c2, - 0x154da85, - 0x12eb85, - 0x208602, - 0x9fe08, - 0xc302, - 0x234482, - 0x204b02, - 0x21bb02, - 0x211482, - 0x239242, - 0x175305, + 0x143c845, + 0x129245, + 0x20bac2, + 0xa7c88, + 0x3102, + 0x2366c2, + 0x204482, + 0x20f782, + 0x211cc2, + 0x24dc02, + 0x1339c5, 0x2016c2, 0x201e02, - 0x218d42, + 0x218782, 0x201dc2, - 0x2161c2, - 0x23d182, + 0x204ac2, + 0x3a1642, 0x201782, - 0x296542, - 0xf73f344, + 0x296d02, + 0xf731fc4, 0x142, - 0x176c87, - 0x1266cd, - 0xe11c9, - 0x11214b, - 0xe8188, - 0x643c9, - 0x10c246, - 0x228b03, - 0x9fe08, + 0xe747, + 0x14f80d, + 0xe0ac9, + 0xd700b, + 0xe2f48, + 0x668c9, + 0x105546, + 0x224943, + 0xa7c88, 0x9c4, 0x11c3, - 0x2b05, - 0x9fe08, - 0xddc47, - 0x54c46, - 0x2b49, - 0x7b0e, - 0x14a647, + 0x1273c5, + 0xa7c88, + 0xde387, + 0x57b06, + 0x127409, + 0xe50e, + 0x14bf47, 0x2000c2, - 0x242244, - 0x20c302, - 0x22c0c3, + 0x250784, + 0x203102, + 0x22f743, 0x201d02, - 0x232c43, - 0x14403, + 0x234e83, + 0x143c3, 0x200382, - 0x2db1c4, - 0x214543, - 0x244502, - 0x20a803, + 0x2dbb04, + 0x214503, + 0x249602, + 0x20ce83, 0x2003c2, - 0x216603, - 0x240986, - 0x332b0f, + 0x23f7c3, + 0x22a7c6, + 0x3347cf, 0x602, - 0x6be683, - 0x9fe08, - 0x20c302, - 0x212483, - 0x228b03, - 0x211543, - 0xca43, - 0x7b08, - 0x15c2c4b, - 0x15642ca, - 0xf5009, - 0x15c534a, - 0x150bb87, - 0xa4b0b, - 0x160745, - 0x116a49, - 0x12eb85, - 0x176c87, - 0xf3644, - 0x20c302, - 0x22c0c3, - 0x228b03, - 0x20a803, + 0x776243, + 0xa7c88, + 0x203102, + 0x20d343, + 0x224943, + 0x211d83, + 0x4783, + 0xe508, + 0x1428f0b, + 0x1540cca, + 0x152bd0a, + 0x1427bc7, + 0xa3dcb, + 0x178945, + 0x110209, + 0x129245, + 0xe747, + 0xef6c4, + 0x203102, + 0x22f743, + 0x224943, + 0x20ce83, 0x2000c2, 0x200c82, - 0x338dc2, - 0x12a2c0c3, - 0x23b182, - 0x232c43, + 0x33d3c2, + 0x12a2f743, + 0x23e8c2, + 0x234e83, 0x2014c2, - 0x26bc02, - 0x228b03, - 0x220482, - 0x288542, - 0x22a402, + 0x2268c2, + 0x224943, + 0x203942, + 0x28bec2, + 0x21e202, 0x200cc2, - 0x291482, + 0x291f82, 0x200802, 0x200d82, - 0x2033c2, - 0x21efc2, - 0x217d82, - 0xe550c, - 0x2b2182, - 0x2f10c2, - 0x215982, - 0x2450c2, - 0x211543, - 0x200bc2, - 0x20a803, - 0x228c42, - 0x25b002, - 0x216603, - 0x301b82, - 0x209482, - 0x216002, - 0x203382, - 0x210342, - 0x2e8f82, + 0x25ce02, + 0x27bc02, + 0x216842, + 0x15388c, + 0x2b2a02, + 0x2ea082, 0x214682, - 0x22b902, - 0x21e202, - 0x32370a, - 0x366b8a, - 0x39914a, - 0x3de682, - 0x20e6c2, - 0x3c3302, - 0x12fda689, - 0x1328caca, - 0x142d1c7, - 0x136049c2, - 0x14bd543, - 0x2482, - 0x8caca, - 0x15d14e, - 0x249f84, - 0xf04c5, - 0x13e2c0c3, - 0x3b903, - 0x232c43, - 0x24b304, - 0x228b03, - 0x224e44, - 0x214543, - 0x13bfc9, - 0x8f7c6, - 0x211543, - 0xe88c4, - 0x2143, - 0x20a803, - 0x12abc5, - 0x20ca43, - 0x216603, - 0x1429b04, - 0x236bc3, - 0x10cbc4, - 0x205b03, - 0x9fe08, - 0xbe5c6, - 0x14bdb84, - 0x146045, - 0x14a40a, - 0x12c5c2, - 0x1454114d, - 0x1a36c6, - 0x8f11, - 0x14bda689, - 0x1460c8, - 0x4aa08, - 0x1b584807, - 0x2282, - 0x1da807, - 0xe840e, - 0x12eb8b, - 0x13390b, - 0x1a3f4a, - 0x8824a, - 0x6bb47, - 0x9fe08, - 0x11a9c8, - 0x58c7, - 0x1b81684b, - 0x1ae07, - 0x9582, - 0x2b80d, - 0x13e387, - 0x14ebca, - 0x1ce74f, - 0x1732cf, - 0x8cac2, - 0xc302, - 0x84a08, - 0x1bcfdc4c, - 0xe1cca, - 0xdd74a, - 0x4f08a, - 0x1894c8, - 0xd948, - 0x59748, - 0xddc08, - 0xe7688, - 0x81c2, - 0x14db0f, - 0xa24cb, - 0x18a0c8, - 0x67607, + 0x242bc2, + 0x211d83, + 0x200bc2, + 0x20ce83, + 0x224a82, + 0x2d33c2, + 0x23f7c3, + 0x240582, + 0x202442, + 0x214d02, + 0x2033c2, + 0x210b82, + 0x2e4542, + 0x214642, + 0x21ddc2, + 0x21d9c2, + 0x31ac4a, + 0x36630a, + 0x39c18a, + 0x3dd442, + 0x20fd02, + 0x3b9442, + 0x12e45889, + 0x13363c4a, + 0x1430787, + 0x13605102, + 0x14ed383, + 0x2542, + 0x163c4a, + 0x18b84e, + 0x23d544, + 0x77605, + 0x13e2f743, + 0x3f0c3, + 0x234e83, + 0x24f044, + 0x224943, + 0x221b84, + 0x214503, + 0x1405c9, + 0x1a2ac6, + 0x211d83, + 0xe3e84, + 0x176943, + 0x20ce83, + 0x7085, + 0x204783, + 0x23f7c3, + 0x143d444, + 0x259703, + 0x1069c4, + 0x2050c3, + 0xa7c88, + 0x176186, + 0x1575744, + 0x16d005, + 0x14bd0a, + 0x1237c2, + 0x1a7ac6, + 0x55e11, + 0x14645889, + 0x16d088, + 0x4e388, + 0x1c7bc7, + 0x3002, + 0xe31ce, + 0x12924b, + 0x1355cb, + 0x19c68a, + 0x892ca, + 0x26807, + 0xa7c88, + 0x114748, + 0x4e87, + 0x1b01530b, + 0x1b587, + 0x1c782, + 0x5d4c7, + 0x27f0a, + 0x5588f, + 0x3cb4f, + 0x291c2, + 0x3102, + 0x864c8, + 0xe3aca, + 0xdde8a, + 0x52b0a, + 0x18ca48, + 0xc288, + 0x5bb48, + 0xde348, + 0x16c848, + 0x7682, + 0x3c8cf, + 0xa1f8b, + 0x18d648, + 0x39dc7, 0x168a, - 0x11404b, - 0x330c9, - 0x44447, - 0xd848, - 0x2e20c, - 0x16c307, - 0x5674a, - 0xe688, - 0x6aace, - 0x6b28e, - 0x6b98b, - 0x1d2e8b, - 0x1cb64b, - 0xe3089, - 0xead0b, - 0x3934d, - 0x3b98b, - 0x3c10d, - 0x3c48d, - 0x3de4a, - 0x4194b, - 0x461cb, - 0x44845, - 0x1c026590, - 0x19794f, - 0x13f50f, - 0x6a44d, - 0x13c190, - 0x9802, - 0x1c7d0408, - 0x114c8, - 0x93110, - 0x11d30e, - 0x1cb67ac5, - 0x4a80b, - 0x13b0d0, - 0x515c8, - 0xda4a, - 0x1d3049, - 0x60907, - 0x60c47, - 0x60e07, - 0x61787, - 0x62b87, - 0x63107, - 0x63b87, - 0x640c7, - 0x64d07, - 0x65087, + 0x13a0cb, + 0x35309, + 0x49547, + 0xc188, + 0x15fe8c, + 0x1385c7, + 0xdad4a, + 0xfcc8, + 0x2578e, + 0x25f4e, + 0x2664b, + 0x296cb, + 0x2c0cb, + 0x2cf89, + 0x6cb8b, + 0x6d68d, + 0xdc28b, + 0xf990d, + 0xf9c8d, + 0xfd7ca, + 0xfef4b, + 0x3b8cb, + 0x3f545, + 0x1b424010, + 0x174cf, + 0x13218f, + 0x6e90d, + 0x140790, + 0x69102, + 0x1ba1ed48, + 0x11d08, + 0xa1150, + 0x11578e, + 0x1bf68d45, + 0x4e18b, + 0x13f6d0, + 0x55548, + 0xc38a, + 0x29889, + 0x63007, + 0x63347, + 0x63507, + 0x63d47, + 0x65147, 0x65747, - 0x65907, - 0x65ac7, - 0x65c87, - 0x664c7, - 0x67907, - 0x688c7, - 0x68c87, - 0x692c7, - 0x69587, - 0x69747, - 0x69a47, - 0x6be07, - 0x6c007, - 0x6cd87, - 0x6cf47, - 0x6d107, - 0x6f6c7, - 0x70a87, - 0x70f07, - 0x71647, - 0x71907, - 0x71c87, - 0x71e47, - 0x72247, - 0x72687, - 0x72a87, - 0x73007, - 0x731c7, - 0x73387, - 0x73c47, - 0x746c7, - 0x74c07, - 0x75207, - 0x753c7, - 0x75747, - 0x76847, - 0x4c02, - 0x5984a, - 0x13488, - 0x11a007, - 0x8a005, - 0xa7791, - 0x4886, - 0xfadca, - 0x8488a, - 0x54c46, - 0xacd8b, + 0x66087, + 0x665c7, + 0x67107, + 0x67487, + 0x67b47, + 0x67d07, + 0x67ec7, + 0x68087, + 0x69207, + 0x69ac7, + 0x6ac47, + 0x6b007, + 0x6b647, + 0x6b907, + 0x6bac7, + 0x6bdc7, + 0x6fe07, + 0x70007, + 0x703c7, + 0x70587, + 0x70747, + 0x71387, + 0x72987, + 0x72e07, + 0x73907, + 0x73bc7, + 0x73f47, + 0x74107, + 0x74507, + 0x755c7, + 0x75a07, + 0x75f87, + 0x76147, + 0x76307, + 0x76b87, + 0x77747, + 0x77c87, + 0x78207, + 0x783c7, + 0x78747, + 0x79347, + 0x4582, + 0x5bc4a, + 0xe3fc7, + 0x888c5, + 0xa6411, + 0x1b9e06, + 0xf5a8a, + 0x8634a, + 0x57b06, + 0xacf8b, 0x642, - 0x2f451, - 0xb6fc9, - 0x97249, - 0x33c2, - 0x198c0a, - 0xaa289, - 0xaa9cf, - 0xaafce, - 0xac0c8, - 0x4742, - 0xbe0c9, - 0x1b0ece, - 0xea24c, - 0xf4d0f, - 0x1aeece, - 0x26ccc, - 0xe3389, - 0xe3911, - 0xe3ec8, - 0x2e612, - 0x17f34d, - 0x1a054d, - 0x4abcb, - 0x58415, - 0x6dc89, - 0x7280a, - 0x7a089, - 0x80510, - 0x16ff8b, - 0x1a798f, - 0x9110b, - 0x9494c, - 0x99310, - 0xa9a4a, - 0xadccd, - 0xaf68e, - 0xafdca, - 0xc4a8c, - 0xb42d4, - 0xb6c51, - 0xb8e0b, - 0xb9f0f, - 0xbb38d, - 0xbf5ce, - 0xc22cc, - 0xc3e0c, - 0xc478b, - 0xc558e, - 0xc6110, - 0xc7dcb, - 0x11c78d, - 0x141d4f, - 0x16d38c, - 0xcf38e, - 0xd1151, - 0xd564c, - 0xde6c7, - 0xf2b0d, - 0xfc10c, - 0x110450, - 0x1cc44d, - 0x105687, - 0x147410, - 0x166dc8, - 0x1710cb, - 0xb0d8f, - 0x1432c8, - 0xfafcd, - 0x10a190, - 0x176b89, - 0x1ceb2d46, - 0xb3cc3, - 0xb90c5, - 0x4e082, + 0x31b11, + 0x1522c9, + 0x98009, + 0x5ce02, + 0x8268a, + 0xa8c49, + 0xa938f, + 0xa998e, + 0xac2c8, + 0x5dc2, + 0x175c89, + 0x19b74e, + 0x1c1f4c, + 0xe534f, + 0x1b380e, + 0x2b3cc, + 0x6d309, + 0x6ee11, + 0x6f3c8, + 0x139312, + 0x13a8cd, + 0x16028d, + 0x172b4b, + 0x4e555, + 0x53889, + 0x5ac8a, + 0x5f309, + 0x74a50, + 0x7574b, + 0x8678f, + 0x171dcb, + 0x1c998c, + 0x91ad0, + 0x9748a, + 0xa2acd, + 0xabf4e, + 0xadcca, + 0xb00cc, + 0xc2a94, + 0x151f51, + 0xb5b0b, + 0xb7d0f, + 0xb970d, + 0xb9f8e, + 0xbc5cc, + 0xbe58c, + 0xc278b, + 0xc334e, + 0xc3c10, + 0xc4a0b, + 0x170d8d, + 0x14388f, + 0xcbe4c, + 0xcea0e, + 0xcfc11, + 0xd830c, + 0xe0e07, + 0xeea0d, + 0xf6c0c, + 0x108c10, + 0x1ccf4d, + 0xfffc7, + 0x145d10, + 0x166548, + 0x1730cb, + 0xb184f, + 0x120648, + 0xf5c8d, + 0x103a10, + 0x17ef89, + 0x1c2b36c6, + 0xb4d43, + 0xba545, + 0x51b42, 0x1b09, - 0x5590a, - 0x1d22eac6, - 0x1d73e584, - 0x56286, - 0x1dc4a, - 0x6f0cd, - 0x1d9b9b89, - 0x17c03, - 0x11594a, - 0xdb911, - 0xdbd49, - 0xdd6c7, - 0xde408, - 0xde887, - 0x11a0c8, - 0x908b, - 0x12e989, - 0xe9250, - 0xe970c, - 0xea548, - 0xea8c5, - 0x79148, - 0x10eaca, - 0xc7c07, - 0x523c7, + 0x584ca, + 0x1c7397c6, + 0x1ca5d6c4, + 0x58e46, + 0x1d40a, + 0x81b0d, + 0x1cd68009, + 0x166c3, + 0x106cca, + 0xdd091, + 0xdd4c9, + 0xdde07, + 0xdeb88, + 0xdf187, + 0xe4088, + 0x3c9cb, + 0x125b89, + 0xe4810, + 0xe4ccc, + 0xe5808, + 0xe5c85, + 0xa088, + 0x10630a, + 0x139147, + 0x129f47, 0x2f42, - 0x1de46bd5, - 0x13bdca, - 0x3d888, - 0x98b89, - 0x2efc5, - 0x116b8a, - 0x8d04f, - 0x12b98b, - 0x1c340c, - 0x147952, - 0x78005, - 0x1966c8, - 0x4b60a, - 0x1e2f5b85, - 0x183acc, - 0x138c03, - 0x190ec6, - 0x3d182, - 0x10238b, - 0x102dca, - 0x150314c, - 0x11848, - 0x3c2c8, - 0x1e63d906, - 0x12fec7, - 0xa982, - 0x4e82, - 0x4bdd0, - 0x66647, - 0x2dccf, - 0x13686, - 0x15c7ce, - 0x9588b, - 0x45948, - 0x33489, - 0xfe992, - 0x190f8d, - 0x111788, - 0x112009, - 0x17ab8d, - 0x1964c9, - 0x1d714b, - 0x69bc8, - 0x7ea48, - 0x80908, - 0x80d49, - 0x80f4a, - 0x8730c, - 0x4648a, - 0xec2ca, - 0x110d47, - 0x9f70a, - 0x13670d, - 0xe41d1, - 0x1eabf8c6, - 0x1ab70b, - 0x12cfcc, - 0x37908, - 0x61249, - 0x15b14d, - 0x1a38d0, - 0x17b8cd, - 0x14302, - 0x5cd8d, - 0x5402, - 0x18d82, - 0x110c8a, - 0x1d4ca, - 0xfacca, - 0x11998b, - 0x6b50c, - 0x11a4ca, - 0x11a74e, - 0x1b318d, - 0x1edde545, - 0x1dae88, - 0x57c2, - 0x14e85c3, - 0x14ebec0e, - 0x156037ce, - 0x15e0254a, - 0x16745d0e, - 0x16e8f9ce, - 0x1772b10c, - 0x142d1c7, - 0x142d1c9, - 0x14bd543, - 0x17f6ae8c, - 0x186e7b09, - 0x18ef8849, - 0x1974a209, - 0x2482, - 0xbeb51, - 0x3711, - 0x248d, - 0x145c51, - 0x8f911, - 0x12b04f, - 0x16adcf, - 0xe7a4c, - 0xf878c, - 0x14a14c, - 0x1dc00d, - 0x1015d5, - 0x661cc, - 0x7394c, - 0x1bad50, - 0x130d4c, - 0x133fcc, - 0x155a59, - 0x162919, - 0x199999, - 0x1b67d4, - 0x1c41d4, - 0x1d09d4, - 0x5a54, - 0x6b54, - 0x19e66289, - 0x1a5d0c89, - 0x1ae73a09, - 0x152e40c9, - 0x2482, - 0x15ae40c9, - 0x2482, - 0x5a4a, - 0x2482, - 0x162e40c9, - 0x2482, - 0x5a4a, - 0x2482, - 0x16ae40c9, - 0x2482, - 0x172e40c9, - 0x2482, - 0x17ae40c9, - 0x2482, - 0x5a4a, - 0x2482, - 0x182e40c9, - 0x2482, - 0x5a4a, - 0x2482, - 0x18ae40c9, - 0x2482, - 0x192e40c9, - 0x2482, - 0x5a4a, - 0x2482, - 0x19ae40c9, - 0x2482, - 0x5a4a, - 0x2482, - 0x1a2e40c9, - 0x2482, - 0x1aae40c9, - 0x2482, - 0x1b2e40c9, - 0x2482, - 0x5a4a, - 0x2482, - 0x1400401, - 0x8f05, - 0x1a3f44, - 0x1442303, - 0x15b08c3, - 0x14ef043, - 0xbec0e, - 0x37ce, - 0x7984e, - 0x254a, - 0x145d0e, - 0x8f9ce, - 0x12b10c, - 0x16ae8c, - 0xe7b09, - 0xf8849, - 0x14a209, - 0x66289, - 0x1d0c89, - 0x73a09, - 0x1017cd, - 0x5d09, - 0x6e09, - 0x14c004, - 0x1a5104, - 0x1b3644, - 0x1b5344, - 0xa4dc4, - 0x1a82c4, - 0x35e04, - 0x50fc4, - 0x13584, - 0x1587c03, - 0xbe9c7, - 0x33d8c, - 0x13583, - 0x9802, - 0x10bb86, - 0x1b3183, - 0x13583, - 0x9bb83, - 0x3f02, - 0x3f08, - 0xdff47, - 0x12ea07, - 0x81c2, + 0x1403ca, + 0x14aac8, + 0x1c5009, + 0x79d05, + 0x11034a, + 0x8f30f, + 0x12284b, + 0x1b954c, + 0x146252, + 0x7ce85, + 0xe7948, + 0x4f34a, + 0x1d2f1585, + 0x1866cc, + 0x13d203, + 0x1a1642, + 0xfafcb, + 0xfc88a, + 0x14fcc0c, + 0x138948, + 0xf9ac8, + 0x1d74ab46, + 0x688c7, + 0x129c2, + 0x5fc2, + 0x4cb90, + 0x69387, + 0x3128f, + 0x1c6b46, + 0x15b10e, + 0x9640b, + 0x18fe88, + 0x356c9, + 0x17bf92, + 0x10ac0d, + 0x10b488, + 0xd6ec9, + 0x14c80d, + 0x19a249, + 0x5c8b, + 0x6bf48, + 0x79148, + 0x7ccc8, + 0x7ffc9, + 0x801ca, + 0x872cc, + 0x3bb8a, + 0xe898a, + 0x10a487, + 0x4840d, + 0x6f6d1, + 0x1daba286, + 0x1b1c4b, + 0x1241cc, + 0x2eb08, + 0x47309, + 0x18058d, + 0x1a7cd0, + 0x17dbcd, + 0x13602, + 0x66dcd, + 0x4cc2, + 0x187c2, + 0x10a3ca, + 0x124ca, + 0xf598a, + 0x11308b, + 0x261cc, + 0x11424a, + 0x1144ce, + 0x18820d, + 0x1dddd305, + 0x12d5c8, + 0x8c42, + 0x14b7704e, + 0x15203f4e, + 0x15a0260a, + 0x1636ccce, + 0x16b21f4e, + 0x172fbe8c, + 0x1430787, + 0x1430789, + 0x14ed383, + 0x17bbeccc, + 0x18342d09, + 0x18b44d49, + 0x1934bb09, + 0x2542, + 0x176f91, + 0x3e91, + 0x254d, + 0x16cc11, + 0x121e91, + 0xfbdcf, + 0x1bec0f, + 0x142c4c, + 0x144c8c, + 0x14ba4c, + 0x16880d, + 0x6a395, + 0x7eb8c, + 0x135ccc, + 0x17ca50, + 0x1947cc, + 0x1a9b4c, + 0x1ae759, + 0x1b4c99, + 0x1b6c19, + 0x1bb6d4, + 0x1c3194, + 0x1c42d4, + 0x1c5614, + 0x5014, + 0x19a7ec49, + 0x1a1c4589, + 0x1ab35d89, + 0x14e6f5c9, + 0x2542, + 0x1566f5c9, + 0x2542, + 0x500a, + 0x2542, + 0x15e6f5c9, + 0x2542, + 0x500a, + 0x2542, + 0x1666f5c9, + 0x2542, + 0x16e6f5c9, + 0x2542, + 0x1766f5c9, + 0x2542, + 0x500a, + 0x2542, + 0x17e6f5c9, + 0x2542, + 0x500a, + 0x2542, + 0x1866f5c9, + 0x2542, + 0x18e6f5c9, + 0x2542, + 0x500a, + 0x2542, + 0x1966f5c9, + 0x2542, + 0x500a, + 0x2542, + 0x19e6f5c9, + 0x2542, + 0x1a66f5c9, + 0x2542, + 0x1ae6f5c9, + 0x2542, + 0x500a, + 0x2542, + 0x55e05, + 0x19c684, + 0x17704e, + 0x3f4e, + 0x7b4ce, + 0x260a, + 0x16ccce, + 0x121f4e, + 0xfbe8c, + 0x1beccc, + 0x142d09, + 0x144d49, + 0x14bb09, + 0x7ec49, + 0x1c4589, + 0x135d89, + 0x6a58d, + 0x194889, + 0x52c9, + 0x1497c4, + 0x1d7144, + 0x69104, + 0x154b84, + 0xa4084, + 0x2dd44, + 0x37dc4, + 0x4df04, + 0xfe484, + 0x15a1203, + 0xe3687, + 0x35fcc, + 0x31643, + 0x69102, + 0x188203, + 0x31643, + 0x90f43, + 0x7842, + 0x7848, + 0x125c07, + 0x7682, 0x2000c2, - 0x20c302, + 0x203102, 0x201d02, - 0x20c202, + 0x2143c2, 0x200382, 0x2003c2, - 0x204e82, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x214383, - 0x20a803, - 0x216603, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x20a803, - 0x216603, - 0x8503, - 0x228b03, - 0x24e44, + 0x205fc2, + 0x22f743, + 0x234e83, + 0x224943, + 0x214343, + 0x20ce83, + 0x23f7c3, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x20ce83, + 0x23f7c3, + 0xb9c3, + 0x224943, + 0x21b84, 0x2000c2, - 0x248343, - 0x2122c0c3, - 0x38c507, - 0x228b03, - 0x20e403, - 0x217b84, - 0x20a803, - 0x216603, - 0x21de8a, - 0x240985, - 0x216103, - 0x219f82, - 0x9fe08, - 0x9fe08, - 0xc302, - 0x135f02, - 0x21bb990b, - 0x21e2c344, - 0x13e4c5, - 0x7d45, - 0xfdc46, - 0x22207d45, - 0x50cc3, - 0x93003, + 0x24af03, + 0x2022f743, + 0x38fa87, + 0x224943, + 0x20e943, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x21d64a, + 0x22a7c5, + 0x214e03, + 0x21a602, + 0xa7c88, + 0xa7c88, + 0x3102, + 0x1379c2, + 0x20b67d8b, + 0x20e2f9c4, + 0x5d605, + 0xe745, + 0x100a86, + 0x2120e745, + 0x54f03, + 0x1668c3, 0x9c4, 0x11c3, - 0x2b05, - 0x12eb85, - 0x9fe08, - 0x1ae07, - 0x2c0c3, - 0x2c28d, - 0x22a380c7, + 0x1273c5, + 0x129245, + 0xa7c88, + 0x1b587, + 0x2f743, + 0x21a3a407, 0x15c6, - 0x22ce7945, - 0x1a9012, - 0x381c7, - 0xa0ca, - 0x9f88, - 0xe207, - 0x63d4a, - 0x18aec8, - 0x62607, - 0x18098f, - 0x43dc7, - 0x50dc6, - 0x13b0d0, - 0xc9fcf, - 0x20f09, - 0x56304, - 0x2303828e, - 0x11fb09, - 0x65dc6, - 0x109649, - 0x18ce06, - 0x1ba306, - 0x189e8c, - 0x11424a, - 0x33247, - 0x129b8a, - 0x143889, - 0xed38c, - 0x1ceb0a, - 0x7e54a, - 0x2b49, - 0x56286, - 0x3330a, - 0x11268a, - 0xa0d4a, - 0x127149, - 0xdad88, - 0xdb006, - 0xe208d, - 0xb9545, - 0x23754d4c, - 0x14a647, - 0x107849, - 0xa8c07, - 0x10a594, - 0x10aa8b, - 0x6744a, - 0xfe80a, - 0xa6d8d, - 0x1519b89, - 0x11154c, - 0x111e0b, - 0xe683, - 0xe683, - 0x39346, - 0xe683, - 0xfdc48, - 0x1581c3, - 0x33445, - 0x141d703, - 0x4e9c9, - 0x156d603, - 0x1439887, - 0x80787, - 0x245846c9, - 0xa6c6, - 0xbd389, - 0x48343, - 0x9fe08, - 0xc302, - 0x4b304, - 0x4243, - 0x4185, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x225843, - 0x22c0c3, - 0x232c43, - 0x212483, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x297403, - 0x205b03, - 0x225843, - 0x242244, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x21d0c3, - 0x261847c5, - 0x142bd43, - 0x22c0c3, - 0x232c43, - 0x214403, - 0x212483, - 0x228b03, - 0x224e44, + 0x21d6cb05, + 0x3a507, + 0xac8a, + 0xab48, + 0xcb47, + 0x6624a, + 0x18e448, + 0x64bc7, + 0x1a63cf, + 0x3f147, + 0x4dd06, + 0x13f6d0, + 0x7338f, + 0x19209, + 0x58ec4, + 0x2203a5ce, + 0x3ad49, + 0x681c6, + 0x102ec9, + 0x190b46, + 0x1a8ac6, + 0x18d40c, + 0x13a2ca, + 0x35487, + 0x12184a, + 0x176749, + 0xe938c, + 0x1b920a, + 0x8970a, + 0x127409, + 0x58e46, + 0x3554a, + 0x10bb0a, + 0x9fcca, + 0x112349, + 0xdb6c8, + 0xdb946, + 0xe0fcd, + 0xbaf85, + 0x2275308c, + 0x14bf47, + 0x1015c9, + 0xb3207, + 0x103e14, + 0x10430b, + 0x39c0a, + 0x17be0a, + 0xa5a0d, + 0x1513289, + 0x10a9cc, + 0x10b28b, + 0xfcc3, + 0xfcc3, + 0x25786, + 0xfcc3, + 0x100a88, + 0x156b03, + 0x35685, + 0x1412703, + 0x52449, + 0x14cc0c3, + 0x146dbc7, + 0x74cc7, + 0x235c7a89, + 0xcd46, + 0x174f49, + 0x4af03, + 0xa7c88, + 0x3102, + 0x4f044, + 0x7b83, + 0x7ac5, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x21c183, + 0x22f743, + 0x234e83, + 0x20d343, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x2981c3, + 0x2050c3, + 0x21c183, + 0x250784, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x209983, + 0x251c7b85, + 0x142da83, + 0x22f743, + 0x234e83, + 0x2143c3, + 0x20d343, + 0x224943, + 0x221b84, 0x201143, - 0x238cc3, - 0x211543, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x216103, - 0x26e20643, - 0x147849, - 0xc302, - 0x2ff843, - 0x27a2c0c3, - 0x232c43, - 0x244743, - 0x228b03, - 0x217203, - 0x238cc3, - 0x216603, - 0x2f5cc3, - 0x3a4e04, - 0x9fe08, - 0x2822c0c3, - 0x232c43, - 0x2ac183, - 0x228b03, - 0x211543, - 0x217b84, - 0x20a803, - 0x216603, - 0x22d843, - 0x9fe08, - 0x28a2c0c3, - 0x232c43, - 0x212483, - 0x20ca43, - 0x216603, - 0x9fe08, - 0x142d1c7, - 0x248343, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x217b84, - 0x20a803, - 0x216603, - 0x12eb85, - 0x176c87, - 0x10a7cb, - 0xdc144, - 0xb9545, - 0x14470c8, - 0x2a20d, - 0x29e352c5, - 0x46e44, - 0xc302, - 0x8303, - 0x176a85, - 0x2d7c2, + 0x225a83, + 0x211d83, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x214e03, + 0x25e1e383, + 0x146149, + 0x3102, + 0x3a8583, + 0x26a2f743, + 0x234e83, + 0x249843, + 0x224943, + 0x215cc3, + 0x225a83, + 0x23f7c3, + 0x2f16c3, + 0x39cb04, + 0xa7c88, + 0x2722f743, + 0x234e83, + 0x2ac383, + 0x224943, + 0x211d83, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x230e03, + 0xa7c88, + 0x27a2f743, + 0x234e83, + 0x20d343, + 0x204783, + 0x23f7c3, + 0xa7c88, + 0x1430787, + 0x24af03, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x129245, + 0xe747, + 0x10404b, + 0xdd8c4, + 0xbaf85, + 0x14441c8, + 0x1e00d, + 0x28e6fcc5, + 0x81b84, + 0x3102, + 0xd103, + 0x17ee85, + 0x28002, 0x1dc2, - 0x2e7585, - 0x9fe08, - 0x7e42, - 0xeec3, - 0x16368f, - 0xc302, - 0xfcac6, - 0x2000c2, - 0x248343, - 0x22c0c3, - 0x228b03, - 0x224e44, - 0x211543, - 0x217b84, - 0x20a803, - 0x216603, - 0x216103, - 0x2d7c2, - 0x32d6c8, - 0x242244, - 0x342bc6, - 0x34a006, - 0x9fe08, - 0x31f443, - 0x20f509, - 0x3046d5, - 0x1046df, - 0x22c0c3, - 0x11d07, - 0x330912, - 0x170a46, - 0x17f0c5, - 0xda4a, - 0x1d3049, - 0x3306cf, - 0x2db1c4, - 0x28ed85, - 0x30b4d0, - 0x322e47, - 0x20ca43, - 0x31b008, - 0xf6f86, - 0x280aca, - 0x224d04, - 0x2f55c3, - 0x219f82, - 0x2eec0b, - 0xca43, - 0x17d404, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0xca43, - 0x216603, - 0x2fd643, - 0x20c302, - 0x12aec3, - 0x12a8c4, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20e403, - 0x22b0c3, - 0x216603, - 0x48343, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x20a803, - 0xca43, - 0x216603, + 0x326705, + 0xa7c88, + 0xfcc2, + 0x2a83, + 0x16264f, + 0x3102, + 0xf7806, + 0x28002, + 0x3248c8, + 0x250784, + 0x348806, + 0x34b906, + 0xa7c88, + 0x31a3c3, + 0x2c5c09, + 0x359a95, + 0x159a9f, + 0x22f743, + 0x3c2d52, + 0x172886, + 0x1825c5, + 0xc38a, + 0x29889, + 0x3c2b0f, + 0x2dbb04, + 0x36b785, + 0x304a10, + 0x245d47, + 0x204783, + 0x314d88, + 0x1324c6, + 0x29248a, + 0x203b04, + 0x2f0fc3, + 0x21a602, + 0x2eaa8b, + 0x4783, + 0x19fbc4, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0x2f8f83, + 0x203102, + 0x1a95c3, + 0x6d84, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x20e943, + 0x225283, + 0x23f7c3, + 0x4af03, + 0x203102, + 0x22f743, + 0x234e83, + 0x20ce83, + 0x4783, + 0x23f7c3, 0x2000c2, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x7d45, - 0x242244, - 0x22c0c3, - 0x232c43, - 0x303f84, - 0x20a803, - 0x216603, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x133d89, - 0x22c0c3, - 0x232c43, - 0x212483, - 0x204f43, - 0x211543, - 0x20a803, - 0xca43, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x329144, - 0x224e44, - 0x20a803, - 0x216603, - 0x205b03, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x220383, - 0x63f43, - 0xe403, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x32370a, - 0x3484c9, - 0x35f2cb, - 0x35f9ca, - 0x366b8a, - 0x378e4b, - 0x38cbca, - 0x39278a, - 0x39914a, - 0x3993cb, - 0x3b8049, - 0x3c840a, - 0x3c894b, - 0x3d5fcb, - 0x3dc90a, - 0x22c0c3, - 0x232c43, - 0x212483, - 0x211543, - 0x20a803, - 0xca43, - 0x216603, - 0x920b, - 0x5a448, - 0x17acc4, - 0x91c6, - 0x3e109, - 0x9fe08, - 0x22c0c3, - 0xda44, - 0x260904, - 0x20aa02, - 0x217b84, - 0x203045, - 0x225843, - 0x242244, - 0x22c0c3, - 0x235604, - 0x232c43, - 0x24b304, - 0x2db1c4, - 0x224e44, - 0x238cc3, - 0x20a803, - 0x216603, - 0x25cf45, - 0x21d0c3, - 0x216103, - 0x24f1c3, - 0x246484, - 0x2be544, - 0x2bd645, - 0x9fe08, - 0x344b04, - 0x3ba486, - 0x202c84, - 0x20c302, - 0x347d47, - 0x243647, - 0x249204, - 0x238a05, - 0x3cc645, - 0x22cd85, - 0x224e44, - 0x388dc8, - 0x3db706, - 0x32bec8, - 0x27c8c5, - 0x2e2a45, - 0x340644, - 0x216603, - 0x2f61c4, - 0x377bc6, - 0x240a83, - 0x246484, - 0x2411c5, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0xe745, + 0x250784, + 0x22f743, + 0x234e83, + 0x346484, + 0x20ce83, + 0x23f7c3, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x144a49, + 0x22f743, + 0x234e83, + 0x20d343, + 0x2083c3, + 0x211d83, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x342644, + 0x221b84, + 0x20ce83, + 0x23f7c3, + 0x2050c3, + 0x203102, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x203843, + 0x45e83, + 0xe943, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x31ac4a, + 0x346cc9, + 0x35db4b, + 0x35e24a, + 0x36630a, + 0x37a0cb, + 0x39090a, + 0x395f8a, + 0x39c18a, + 0x39c40b, + 0x3bcf09, + 0x3c8bca, + 0x3c910b, + 0x3d588b, + 0x3da58a, + 0x22f743, + 0x234e83, + 0x20d343, + 0x211d83, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0x1872cb, + 0x5c848, + 0x14c944, + 0x3cb06, + 0xfda89, + 0xa7c88, + 0x22f743, + 0xc384, + 0x263004, + 0x213482, + 0x209c04, + 0x327905, + 0x21c183, + 0x250784, + 0x22f743, + 0x2375c4, + 0x234e83, + 0x24f044, + 0x2dbb04, + 0x221b84, + 0x225a83, + 0x20ce83, + 0x23f7c3, + 0x266f85, + 0x209983, + 0x214e03, + 0x252c43, + 0x23bb84, + 0x376104, + 0x375205, + 0xa7c88, + 0x331c04, + 0x3a8c46, + 0x327544, + 0x203102, + 0x346647, + 0x247947, + 0x24bd44, + 0x25a1c5, + 0x3cd145, + 0x230145, + 0x221b84, + 0x38c348, + 0x22a1c6, + 0x34de48, + 0x27bc45, + 0x2e1985, + 0x265e44, + 0x23f7c3, + 0x2f2484, + 0x378f06, + 0x22a8c3, + 0x23bb84, + 0x234545, 0x201a84, - 0x336544, - 0x219f82, - 0x322706, - 0x3ab5c6, - 0x30df85, + 0x248244, + 0x21a602, + 0x337e86, + 0x3b01c6, + 0x308005, 0x2000c2, - 0x248343, - 0x3260c302, - 0x3d0584, + 0x24af03, + 0x31203102, + 0x21eec4, 0x200382, - 0x211543, - 0x209082, - 0x20a803, + 0x211d83, + 0x23c9c2, + 0x20ce83, 0x2003c2, - 0x2f1d06, - 0x20c603, - 0x205b03, - 0x9fe08, - 0x9fe08, - 0x228b03, - 0x6d9c3, + 0x2edc06, + 0x202443, + 0x2050c3, + 0xa7c88, + 0xa7c88, + 0x224943, + 0x71003, 0x2000c2, - 0x3320c302, - 0x228b03, - 0x2623c3, + 0x31e03102, + 0x224943, + 0x264983, 0x201143, - 0x22c344, - 0x20a803, - 0x216603, - 0x9fe08, + 0x22f9c4, + 0x20ce83, + 0x23f7c3, + 0xa7c88, 0x2000c2, - 0x33a0c302, - 0x22c0c3, - 0x20a803, - 0xca43, - 0x216603, + 0x32603102, + 0x22f743, + 0x20ce83, + 0x4783, + 0x23f7c3, 0x682, - 0x206902, - 0x20ff42, - 0x20e403, - 0x2ed343, + 0x205842, + 0x210782, + 0x20e943, + 0x2e9343, 0x2000c2, - 0x12eb85, - 0x9fe08, - 0x176c87, - 0x20c302, - 0x232c43, - 0x24b304, + 0x129245, + 0xa7c88, + 0xe747, + 0x203102, + 0x234e83, + 0x24f044, 0x2020c3, - 0x228b03, - 0x204f43, - 0x211543, - 0x20a803, - 0x213dc3, - 0x216603, - 0x233c43, - 0x1b8a13, - 0x127c94, - 0x12eb85, - 0x176c87, - 0x10f246, - 0x11b7cb, - 0x39346, - 0x531c7, - 0x38a06, + 0x224943, + 0x2083c3, + 0x211d83, + 0x20ce83, + 0x2130c3, + 0x23f7c3, + 0x22a803, + 0x11f293, + 0x125d94, + 0x129245, + 0xe747, + 0x109706, + 0x113ccb, + 0x25786, + 0x56387, + 0x5a1c6, 0x649, - 0x160d4a, - 0x8984d, - 0x1263cc, - 0x11300a, - 0x45c88, - 0x175305, - 0xa108, - 0x13686, - 0x1be2c6, - 0x3e006, + 0xd39ca, + 0x8ab4d, + 0x14f50c, + 0x10c48a, + 0xf3dc8, + 0x1339c5, + 0xacc8, + 0x1c6b46, + 0x1c0ec6, + 0xfd986, 0x602, - 0x209802, - 0x3b04, - 0x9bb86, - 0x184410, - 0x8170e, - 0x2846, - 0x1841cc, - 0x3537314b, - 0x12eb85, - 0x1426cb, - 0x357be204, - 0x1a4107, - 0x25191, - 0x11f54a, - 0x22c0c3, - 0x63cc5, - 0x1bd708, - 0x12704, - 0x55b05, - 0x3588c906, - 0xa7786, - 0xc14c6, - 0x9174a, - 0x1a8883, - 0x35e0bfc4, - 0x4e9c9, - 0x12c047, - 0x1770a, - 0x14ce3c9, + 0x269102, + 0x4284, + 0x90f46, + 0x187010, + 0x82e4e, + 0x2906, + 0x186dcc, + 0x33e5570b, + 0x129245, + 0x14420b, + 0x343c0e04, + 0x19c847, + 0x21fd1, + 0xfe30a, + 0x22f743, + 0x661c5, + 0x12a3c8, + 0x12984, + 0x586c5, + 0x3448e546, + 0xa6406, + 0xc1886, + 0x9224a, + 0x1a8383, + 0x34a436c4, + 0x52449, + 0x14dfc7, + 0x161ca, + 0x14cd7c9, 0x605, - 0xeac83, - 0x3622eb47, - 0x12abc5, - 0x153c6c6, - 0x153f846, - 0xace4c, - 0xfa308, - 0x3643d183, - 0xeee4b, - 0x118a4b, - 0x36a4528c, - 0x14070c3, - 0xbb048, - 0xef0c5, - 0xa2349, - 0x119c88, - 0x141db86, - 0x88147, - 0x36f5b149, - 0x117787, - 0x16074a, - 0x111acd, - 0x8148, - 0x13583, - 0xbdb03, - 0xfdc48, - 0x13584, - 0x1224c5, - 0x148d103, - 0xe85c7, - 0x372e85c3, - 0x377afc46, - 0x37af67c4, - 0x37f02f87, - 0xfdc44, - 0xfdc44, - 0xfdc44, - 0xfdc44, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, + 0xfd743, + 0x34f39847, + 0x7085, + 0x1563286, + 0xad04c, + 0xf4f88, + 0xeaccb, + 0x10f9cb, + 0x35249bcc, + 0x1405a83, + 0xbc288, + 0xeaf45, + 0xa1e09, + 0x113388, + 0x141d346, + 0x891c7, + 0x35780589, + 0xc6787, + 0x17894a, + 0x10af4d, + 0x7608, + 0x31643, + 0x1756c3, + 0x100a88, + 0xfe484, + 0x120b85, + 0xe3387, + 0x35a3c8c3, + 0x35f54206, + 0x362f2d04, + 0x366fca47, + 0x100a84, + 0x100a84, + 0x100a84, + 0x100a84, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, 0x2000c2, - 0x20c302, - 0x228b03, - 0x203dc2, - 0x20a803, - 0x216603, - 0x20c603, - 0x37fe4f, - 0x38020e, - 0x9fe08, - 0x22c0c3, - 0x41487, - 0x232c43, - 0x228b03, - 0x214543, - 0x20a803, - 0x216603, - 0x2784, + 0x203102, + 0x224943, + 0x203842, + 0x20ce83, + 0x23f7c3, + 0x202443, + 0x382e0f, + 0x3831ce, + 0xa7c88, + 0x22f743, + 0x447c7, + 0x234e83, + 0x224943, + 0x214503, + 0x20ce83, + 0x23f7c3, + 0x2844, 0x1304, - 0x144444, - 0x21c0c3, - 0x374247, - 0x206082, - 0x26c3c9, + 0x131544, + 0x21c743, + 0x332907, + 0x202e82, + 0x2c9089, 0x200ac2, - 0x24c0cb, - 0x29d88a, - 0x29e589, + 0x24ce8b, + 0x29d7ca, + 0x268f09, 0x200542, - 0x212ac6, - 0x38d7d5, - 0x24c215, - 0x231e53, - 0x24c793, - 0x212082, - 0x21e405, - 0x369e0c, - 0x27494b, - 0x297885, - 0x202542, - 0x299082, - 0x37bf46, - 0x202282, - 0x37bb46, - 0x20dccd, - 0x32a94c, - 0x226604, + 0x3be4c6, + 0x33ad55, + 0x24cfd5, + 0x3ad113, + 0x24d553, + 0x2197c2, + 0x21dbc5, + 0x32f1cc, + 0x2779cb, + 0x298645, + 0x202602, + 0x2fae02, + 0x393ac6, + 0x203002, + 0x37de46, + 0x20c60d, + 0x206e0c, + 0x224084, 0x200882, - 0x20be02, - 0x22e9c8, + 0x206c82, + 0x3396c8, 0x200202, - 0x30e386, - 0x30e38f, - 0x393f90, - 0x21f204, - 0x38d995, - 0x231fd3, - 0x21cf83, - 0x349d0a, - 0x208b87, - 0x369349, - 0x2175c7, - 0x227682, + 0x305bc6, + 0x305bcf, + 0x397e50, + 0x3a3c04, + 0x33af15, + 0x3ad293, + 0x209843, + 0x34850a, + 0x206207, + 0x36a889, + 0x216087, + 0x21c342, 0x200282, - 0x3b4e46, - 0x203c02, - 0x9fe08, - 0x208082, - 0x208342, - 0x21e9c7, - 0x330307, - 0x330311, - 0x218585, - 0x21858e, - 0x21968f, - 0x209582, - 0x373907, - 0x21c708, - 0x205b82, - 0x2c1142, - 0x21bb46, - 0x21bb4f, - 0x269f10, - 0x22a8c2, - 0x204042, - 0x251c88, - 0x204043, - 0x25c6c8, - 0x2db50d, - 0x2094c3, - 0x3bc3c8, - 0x27f40f, - 0x27f7ce, - 0x2fe4ca, - 0x2da0d1, - 0x2da550, - 0x2dc90d, - 0x2dcc4c, - 0x2ff6c7, - 0x349e87, - 0x342c89, - 0x226702, + 0x3b6906, + 0x204382, + 0xa7c88, + 0x208d42, + 0x209002, + 0x209007, + 0x268d07, + 0x268d11, + 0x217fc5, + 0x217fce, + 0x21a94f, + 0x21c782, + 0x398507, + 0x21cd88, + 0x205142, + 0x2bfa42, + 0x20f7c6, + 0x20f7cf, + 0x281750, + 0x22c542, + 0x207982, + 0x32b408, + 0x207983, + 0x25ed88, + 0x2e1d0d, + 0x280c03, + 0x34b748, + 0x280c0f, + 0x280fce, + 0x37baca, + 0x223111, + 0x223590, + 0x2c7bcd, + 0x2c7f0c, + 0x3a8407, + 0x348687, + 0x3488c9, + 0x21c302, 0x201ec2, - 0x2553cc, - 0x2556cb, + 0x257f8c, + 0x25828b, 0x200d42, - 0x2c4946, - 0x202c82, + 0x2c2946, + 0x227f02, 0x200482, - 0x28cac2, - 0x20c302, - 0x22c784, - 0x237d87, - 0x22ae02, - 0x23cbc7, - 0x23ed47, - 0x22e002, - 0x22dac2, - 0x241345, - 0x259dc2, - 0x382a4e, - 0x3c91cd, - 0x232c43, - 0x28658e, - 0x3d234d, - 0x32fe43, + 0x2291c2, + 0x203102, + 0x22fb44, + 0x23a0c7, + 0x22ca82, + 0x23ffc7, + 0x241a47, + 0x227d02, + 0x231082, + 0x244685, + 0x224502, + 0x2e738e, + 0x38564d, + 0x234e83, + 0x28814e, + 0x3d1a0d, + 0x348cc3, 0x202102, - 0x284744, - 0x24a542, - 0x2253c2, - 0x39b645, - 0x39ce07, - 0x243f82, - 0x20c202, - 0x24af07, - 0x24ed48, - 0x2b12c2, - 0x278086, - 0x25524c, - 0x25558b, - 0x203d42, - 0x25d0cf, - 0x25d490, - 0x25d88f, - 0x25dc55, - 0x25e194, - 0x25e68e, - 0x25ea0e, - 0x25ed8f, - 0x25f14e, - 0x25f4d4, - 0x25f9d3, - 0x25fe8d, - 0x276a09, - 0x28b243, + 0x286204, + 0x24ab42, + 0x2072c2, + 0x39ee05, + 0x3a0887, + 0x2491c2, + 0x2143c2, + 0x24ec47, + 0x2527c8, + 0x2b1d82, + 0x27cf06, + 0x257e0c, + 0x25814b, + 0x208142, + 0x25f7cf, + 0x25fb90, + 0x25ff8f, + 0x260355, + 0x260894, + 0x260d8e, + 0x26110e, + 0x26148f, + 0x26184e, + 0x261bd4, + 0x2620d3, + 0x26258d, + 0x279509, + 0x28ce83, 0x2020c2, - 0x35c2c5, - 0x3cfd46, + 0x35ac05, + 0x3ce486, 0x200382, - 0x3776c7, - 0x228b03, + 0x2b5787, + 0x224943, 0x200642, - 0x231448, - 0x2da311, - 0x2da750, - 0x202b82, - 0x28a387, + 0x233b88, + 0x223351, + 0x223790, + 0x203702, + 0x28b387, 0x201742, - 0x247f07, - 0x24e082, - 0x328c49, - 0x37bf07, - 0x296c48, - 0x28c746, - 0x28f303, - 0x28f305, - 0x21d702, + 0x2a1687, + 0x251b42, + 0x3bde09, + 0x393a87, + 0x293348, + 0x28e386, + 0x2e9243, + 0x349345, + 0x212702, 0x2004c2, - 0x3b5245, - 0x383f45, + 0x3d7045, + 0x386b45, 0x201b02, - 0x22aec3, - 0x342a47, - 0x20c907, + 0x22cb43, + 0x344587, + 0x20ea47, 0x201f82, 0x201f84, - 0x20e503, - 0x2ebf89, - 0x20e508, - 0x203102, - 0x205f82, - 0x2eb887, - 0x3dd285, - 0x33fb88, - 0x34e347, - 0x21a7c3, - 0x29ba06, - 0x2dc78d, - 0x2dcb0c, - 0x2d5d46, - 0x204b02, - 0x21fc02, - 0x206a42, - 0x27f28f, - 0x27f68e, - 0x3cc6c7, - 0x206702, - 0x295d05, - 0x295d06, - 0x21d902, + 0x20fb43, + 0x2e64c9, + 0x20fb48, + 0x20e942, + 0x205542, + 0x2dcec7, + 0x2fa285, + 0x3635c8, + 0x227807, + 0x222303, + 0x290dc6, + 0x2c7a4d, + 0x2c7dcc, + 0x2d8a06, + 0x204482, + 0x2030c2, + 0x205982, + 0x280a8f, + 0x280e8e, + 0x3cd1c7, + 0x204802, + 0x31c445, + 0x31c446, + 0x21f382, 0x200bc2, - 0x28d746, - 0x2062c3, - 0x206586, - 0x2cc185, - 0x2cc18d, - 0x2cc7d5, - 0x2cd88c, - 0x2cdc0d, - 0x2cdf52, - 0x205a02, - 0x26bf42, - 0x2050c2, - 0x3dbec6, - 0x3b0d86, + 0x28fc06, + 0x20a643, + 0x20a646, + 0x2cb845, + 0x2cb84d, + 0x2cc255, + 0x2ccc8c, + 0x2cd00d, + 0x2cd352, + 0x204fc2, + 0x26ff42, + 0x202142, + 0x2fbc86, + 0x3c1e06, 0x202f42, - 0x3cfdc6, - 0x218d42, - 0x374a45, - 0x202f82, - 0x382b89, - 0x22330c, - 0x22364b, + 0x3ce506, + 0x218782, + 0x333105, + 0x2090c2, + 0x2e74c9, + 0x21980c, + 0x219b4b, 0x2003c2, - 0x24f708, + 0x253188, 0x201902, 0x200a82, - 0x271f86, - 0x2e4045, + 0x274246, + 0x26f545, 0x200a87, - 0x228445, - 0x2563c5, - 0x2091c2, - 0x20a1c2, - 0x2161c2, - 0x3a7c87, - 0x2f1dcd, - 0x2f214c, - 0x243047, - 0x278002, + 0x222d85, + 0x277485, + 0x23cb02, + 0x20ad82, + 0x204ac2, + 0x2e5647, + 0x2edccd, + 0x2ee04c, + 0x3ac4c7, + 0x27ce82, 0x201c82, - 0x3c63c8, + 0x20da88, 0x201c88, - 0x32c1c8, - 0x2faf84, - 0x2c5807, - 0x33e603, - 0x223c42, - 0x212842, - 0x2f3749, - 0x26aec7, - 0x216102, - 0x272385, - 0x220082, - 0x20b182, - 0x2fd083, - 0x2fd086, - 0x2fd202, - 0x301b02, + 0x2e2ac8, + 0x2f5c44, + 0x2c35c7, + 0x25d743, + 0x21a142, + 0x203b02, + 0x2ef7c9, + 0x225b87, + 0x214e02, + 0x274645, + 0x203542, + 0x228742, + 0x30b703, + 0x30b706, + 0x2f8c82, + 0x2faa02, 0x200402, - 0x36c686, - 0x2aba07, - 0x215f02, + 0x278f46, + 0x2e2087, + 0x214c02, 0x200902, - 0x25c50f, - 0x2863cd, - 0x3b12ce, - 0x3d21cc, - 0x204bc2, - 0x203d82, - 0x28c585, - 0x320886, + 0x25ebcf, + 0x287f8d, + 0x39bb4e, + 0x3d188c, + 0x204542, + 0x2023c2, + 0x28e1c5, + 0x319386, 0x200b82, - 0x204d42, + 0x2046c2, 0x200682, - 0x286744, - 0x2db384, - 0x359786, - 0x204e82, - 0x286e87, - 0x23bc03, - 0x23bc08, - 0x23f748, - 0x37f1c7, - 0x24e306, + 0x227784, + 0x2e1b84, + 0x3580c6, + 0x205fc2, + 0x27c847, + 0x23df83, + 0x23df88, + 0x23e6c8, + 0x3729c7, + 0x24fb06, 0x201702, - 0x2183c3, - 0x2183c7, - 0x314946, - 0x2e7e85, - 0x2fb308, - 0x202602, - 0x3a9687, - 0x2411c2, - 0x293042, - 0x209442, - 0x219809, - 0x201082, - 0xc41c8, - 0x2021c2, - 0x2432c3, - 0x202247, + 0x238f43, + 0x2ab4c7, + 0x30d6c6, + 0x2e4f85, + 0x2f5fc8, + 0x2026c2, + 0x3be287, + 0x234542, + 0x354282, 0x205c42, - 0x22348c, - 0x22378b, - 0x2d5dc6, - 0x2eabc5, - 0x247c82, + 0x21aac9, + 0x201082, + 0xbe948, + 0x202a02, + 0x24d983, + 0x203c47, + 0x205202, + 0x21998c, + 0x219c8b, + 0x2d8a86, + 0x2fd685, + 0x244d02, 0x201942, - 0x2bf146, - 0x236483, - 0x328ec7, - 0x235282, + 0x2bdbc6, + 0x229043, + 0x3423c7, + 0x282482, 0x2008c2, - 0x38d655, - 0x24c3d5, - 0x231d13, - 0x24c913, - 0x37f647, - 0x25b951, - 0x262d10, - 0x274d92, - 0x2779d1, - 0x284bc8, - 0x284bd0, - 0x2d7c8f, - 0x29d653, - 0x29e352, - 0x29ffd0, - 0x2a7b8f, - 0x2a9e12, - 0x305811, - 0x371353, - 0x3b78d2, - 0x2b2e8f, - 0x2cbe0e, - 0x2cd412, - 0x2d3c51, - 0x2d430f, - 0x2d830e, - 0x2d9791, - 0x2de010, - 0x2df0d2, - 0x2e8a91, - 0x2ef5d0, - 0x2fa4cf, - 0x2fd6d1, - 0x3029d0, - 0x31bb46, - 0x3adfc7, - 0x20ce47, + 0x33abd5, + 0x24d195, + 0x3acfd3, + 0x24d6d3, + 0x248f47, + 0x259d91, + 0x25e050, + 0x2652d2, + 0x275191, + 0x277e08, + 0x277e10, + 0x29784f, + 0x29d593, + 0x2a6812, + 0x2a7e50, + 0x30014f, + 0x373352, + 0x3bc7d1, + 0x2b3813, + 0x2c0892, + 0x3a22cf, + 0x2cb4ce, + 0x2d47d2, + 0x2d51d1, + 0x2d94cf, + 0x2da2ce, + 0x2de751, + 0x2dfa90, + 0x2f8812, + 0x2eb451, + 0x2f5150, + 0x2f900f, + 0x2fc451, + 0x3018d0, + 0x35efc6, + 0x3cbf07, + 0x2137c7, 0x201a42, - 0x2824c5, - 0x30b247, - 0x20ff42, - 0x207e02, - 0x229545, - 0x220883, - 0x2bdfc6, - 0x2f1f8d, - 0x2f22cc, - 0x217042, - 0x369c8b, - 0x27480a, - 0x21e2ca, - 0x2bc0c9, - 0x2f0c0b, - 0x34e48d, - 0x30b94c, - 0x25b3ca, - 0x27108c, - 0x2758cb, - 0x2976cc, - 0x31ce0e, - 0x36710b, - 0x2b1d4c, - 0x2e2703, - 0x37aa86, - 0x3bcb02, - 0x2fbb02, - 0x25a083, - 0x20ff82, - 0x233b03, - 0x324b86, - 0x25de07, - 0x2e0e06, - 0x2e1e88, - 0x3428c8, - 0x31d5c6, + 0x283c05, + 0x304787, + 0x210782, + 0x20e802, + 0x22ab45, + 0x21e5c3, + 0x375b86, + 0x2ede8d, + 0x2ee1cc, + 0x2038c2, + 0x32f04b, + 0x27788a, + 0x21da8a, + 0x2bd149, + 0x2ecb4b, + 0x22794d, + 0x304e8c, + 0x27680a, + 0x272f8c, + 0x2788cb, + 0x29848c, + 0x2ef24e, + 0x2b458b, + 0x36e20c, + 0x2e1643, + 0x34c706, + 0x3c0dc2, + 0x2f6602, + 0x206603, + 0x205d42, + 0x21ed83, + 0x323386, + 0x260507, + 0x2d2b06, + 0x2e3c88, + 0x344408, + 0x315a46, 0x200f02, - 0x30d94d, - 0x30dc8c, - 0x318c07, - 0x312e47, - 0x229942, - 0x216302, - 0x218342, - 0x279642, - 0x335056, - 0x33a4d5, - 0x33d6d6, - 0x346693, - 0x346d52, - 0x357d53, - 0x358492, - 0x3aa4cf, - 0x3bbb18, - 0x3bc5d7, - 0x3bdc19, - 0x3be7d8, - 0x3bf698, - 0x3c46d7, - 0x3c57d7, - 0x3c7016, - 0x3ca6d3, - 0x3cbc95, - 0x3cc992, - 0x3cce13, - 0x20c302, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x217b84, - 0x20a803, - 0x216603, - 0x20c603, + 0x3079cd, + 0x307d0c, + 0x30fb87, + 0x30c2c7, + 0x236942, + 0x215002, + 0x277dc2, + 0x27b2c2, + 0x336d56, + 0x33ead5, + 0x341c16, + 0x344f93, + 0x345652, + 0x356693, + 0x356dd2, + 0x3af0cf, + 0x3bf998, + 0x3c0897, + 0x3c13d9, + 0x3c2258, + 0x3c3698, + 0x3c47d7, + 0x3c5b17, + 0x3c70d6, + 0x3cad53, + 0x3cb695, + 0x3cc2d2, + 0x3cc753, + 0x203102, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x202443, 0x2000c2, - 0x203042, - 0x39e946c5, - 0x3a219305, - 0x3a675c06, - 0x9fe08, - 0x3aab3405, - 0x20c302, + 0x203782, + 0x386948c5, + 0x38a89f05, + 0x38e78c06, + 0xa7c88, + 0x392b3e85, + 0x203102, 0x201d02, - 0x3aefedc5, - 0x3b280405, - 0x3b681c47, - 0x3ba82949, - 0x3bf064c4, + 0x3972c885, + 0x39a82105, + 0x39e83387, + 0x3a284089, + 0x3a638644, 0x200382, 0x200642, - 0x3c25aec5, - 0x3c6998c9, - 0x3cb34708, - 0x3ceafc45, - 0x3d313987, - 0x3d622508, - 0x3db11985, - 0x3de9a406, - 0x3e243789, - 0x3e6d1dc8, - 0x3eac45c8, - 0x3ee99f0a, - 0x3f277244, - 0x3f605285, - 0x3fac0b08, - 0x3fe01885, - 0x213ec2, - 0x40242a83, - 0x406a64c6, - 0x40b4f408, - 0x40e1f986, - 0x412dd348, - 0x41779b06, - 0x41a3f204, - 0x41e05642, - 0x427315c7, - 0x42aacb84, - 0x42e79cc7, - 0x433c4d87, + 0x3aa5f145, + 0x3ae99b89, + 0x3b336408, + 0x3b6b0985, + 0x3bb0ce07, + 0x3be20688, + 0x3c2e7805, + 0x3c63c586, + 0x3ca47a89, + 0x3cedb288, + 0x3d2c3188, + 0x3d69a1ca, + 0x3dba9704, + 0x3de08705, + 0x3e2bf288, + 0x3e601885, + 0x2131c2, + 0x3ea32003, + 0x3eea5146, + 0x3f26d148, + 0x3f602e46, + 0x3fa09148, + 0x3ff26406, + 0x40241f04, + 0x40608ac2, + 0x40fdb307, + 0x412acd84, + 0x4167b947, + 0x41b2b747, 0x2003c2, - 0x4369e985, - 0x43a88bc4, - 0x43ed0e07, - 0x4423b747, - 0x44684586, - 0x44a81485, - 0x44e999c7, - 0x452d1c48, - 0x457c5107, - 0x45b48289, - 0x45ed3985, - 0x463102c7, - 0x46693d06, - 0x46e4b, - 0x46a7b288, - 0x2221cd, - 0x27d049, - 0x28858b, - 0x2aa48b, - 0x2b734b, - 0x31368b, - 0x320a8b, - 0x320d4b, - 0x321b89, - 0x32398b, - 0x323c4b, - 0x32430b, - 0x32548a, - 0x3259ca, - 0x325fcc, - 0x32bc4b, - 0x32c3ca, - 0x3419ca, - 0x34d0ce, - 0x35024e, - 0x3505ca, - 0x3521ca, - 0x352bcb, - 0x352e8b, - 0x353b0b, - 0x36d78b, - 0x36dd8a, - 0x36ea4b, - 0x36ed0a, - 0x36ef8a, - 0x36f20a, - 0x38decb, - 0x39360b, - 0x395ace, - 0x395e4b, - 0x39cfcb, - 0x39de8b, - 0x3a124a, - 0x3a14c9, - 0x3a170a, - 0x3a31ca, - 0x3bb50b, - 0x3c8c0b, - 0x3c960a, - 0x3ca10b, - 0x3d38cb, - 0x3dc34b, - 0x46e82f08, - 0x47288fc9, - 0x476a21c9, - 0x47ae4d08, - 0x359505, - 0x218e03, - 0x27e244, - 0x2abc05, - 0x306206, - 0x34d545, - 0x288844, - 0x3775c8, - 0x3197c5, - 0x295604, - 0x3c17c7, - 0x2a154a, - 0x381fca, - 0x3cc7c7, - 0x218d07, - 0x2de547, - 0x282bc7, - 0x35e6c5, - 0x3b0106, - 0x3b0347, - 0x3bdb04, - 0x2f1246, - 0x2f1146, - 0x3b06c5, - 0x355784, - 0x29af46, - 0x2a0607, - 0x26a746, - 0x31f207, - 0x27e303, - 0x39c446, - 0x251ec5, - 0x281d47, - 0x267aca, - 0x231544, - 0x220c88, - 0x310809, - 0x2cc587, - 0x38f346, - 0x28ee48, - 0x2200c9, - 0x369504, - 0x35c644, - 0x2d5085, - 0x225d48, - 0x2ca407, - 0x2f3249, - 0x228ec8, - 0x315686, - 0x229a46, - 0x29b888, - 0x371b06, - 0x219305, - 0x284646, - 0x27a648, - 0x27f186, - 0x25440b, - 0x292ec6, - 0x29d1cd, - 0x3c12c5, - 0x2aca46, - 0x210985, - 0x3b91c9, - 0x249507, - 0x3a4a48, - 0x314486, - 0x29c489, - 0x3b8486, - 0x267a45, - 0x215146, - 0x2c9006, - 0x2cee49, - 0x2b9b06, - 0x2a1247, - 0x2a4385, - 0x207683, - 0x223cc5, - 0x2affc7, - 0x36a486, - 0x3c11c9, - 0x275c06, - 0x279ec6, - 0x21a549, - 0x284049, - 0x2a4907, - 0x344e08, - 0x2a75c9, - 0x282148, - 0x3929c6, - 0x2dab45, - 0x278eca, - 0x279f46, - 0x21ce06, - 0x2d28c5, - 0x24ff08, - 0x2eb407, - 0x22f24a, - 0x24bb06, - 0x2f4745, - 0x302086, - 0x328687, - 0x38f207, - 0x21b145, - 0x267c05, - 0x269d86, - 0x26e4c6, - 0x27fdc6, - 0x226384, - 0x2835c9, - 0x28a146, - 0x2fd3ca, - 0x2278c8, - 0x30ffc8, - 0x381fca, - 0x223fc5, - 0x2a0545, - 0x3c1e08, - 0x2bcc08, - 0x266e07, - 0x226b86, - 0x338748, - 0x20e887, - 0x2815c8, - 0x2b8cc6, - 0x285308, - 0x298406, - 0x27ca47, - 0x3229c6, - 0x29af46, - 0x26ed4a, - 0x2d5ec6, - 0x2dab49, - 0x368506, - 0x21eb0a, - 0x23f209, - 0x2f2786, - 0x2baac4, - 0x35c38d, - 0x289247, - 0x2e6186, - 0x2c4485, - 0x3b8505, - 0x38fe46, - 0x2d0c49, - 0x2b7907, - 0x27bb46, - 0x2c9e46, - 0x2888c9, - 0x359a44, - 0x244f84, - 0x340e88, - 0x236846, - 0x2a3e08, - 0x2150c8, - 0x219447, - 0x3b5b89, - 0x27ffc7, - 0x2b32ca, - 0x2f420f, - 0x26f44a, - 0x28c385, - 0x27a885, - 0x214f05, - 0x21f147, - 0x267083, - 0x345008, - 0x20ef06, - 0x20f009, - 0x3cb186, - 0x2d0487, - 0x29c249, - 0x3a4948, - 0x2d2987, - 0x31da43, - 0x359585, - 0x3281c5, - 0x2261cb, + 0x41e9e485, + 0x42245a84, + 0x426d7fc7, + 0x42a31607, + 0x42e86046, + 0x43282bc5, + 0x43699c87, + 0x43adb108, + 0x43f2bac7, + 0x442b3489, + 0x446d4505, + 0x44b08a87, + 0x44e93f06, + 0x81b8b, + 0x45209d88, + 0x22034d, + 0x28bf09, + 0x2a8e4b, + 0x2ac48b, + 0x30f00b, + 0x30cb0b, + 0x31958b, + 0x31984b, + 0x319d89, + 0x31aecb, + 0x31b18b, + 0x31b70b, + 0x31ce0a, + 0x31d34a, + 0x31d94c, + 0x322b0b, + 0x3235ca, + 0x34340a, + 0x34cc8e, + 0x34d88e, + 0x34dc0a, + 0x34ffca, + 0x3509cb, + 0x350c8b, + 0x35190b, + 0x36ed0b, + 0x36f30a, + 0x36ffcb, + 0x37028a, + 0x37050a, + 0x37078a, + 0x3919cb, + 0x396f4b, + 0x39984e, + 0x399bcb, + 0x3a0a4b, + 0x3a19cb, + 0x3a540a, + 0x3a5689, + 0x3a58ca, + 0x3a75ca, + 0x3bf38b, + 0x3c93cb, + 0x3c9c8a, + 0x3ca78b, + 0x3d2f4b, + 0x3d9fcb, + 0x456849c8, + 0x45a8a2c9, + 0x45ea1c89, + 0x462e2608, + 0x357e45, + 0x209ec3, + 0x23d284, + 0x2c86c5, + 0x238386, + 0x23c305, + 0x289984, + 0x2b5688, + 0x312ec5, + 0x296184, + 0x3dc887, + 0x2a04ca, + 0x384bca, + 0x3cd2c7, + 0x218747, + 0x2decc7, + 0x27e007, + 0x35cf45, + 0x3cf6c6, + 0x33a747, + 0x32a7c4, + 0x2b6486, + 0x2ed886, + 0x3ce8c5, + 0x329d04, + 0x29b206, + 0x29f587, + 0x26c806, + 0x3daf07, + 0x27f503, + 0x3d3206, + 0x233105, + 0x283487, + 0x269c8a, + 0x233c84, + 0x218f88, + 0x346a89, + 0x2d2347, + 0x397806, + 0x36b848, + 0x203589, + 0x36aa44, + 0x35af84, + 0x2d5fc5, + 0x22af48, + 0x2c9ac7, + 0x2f7149, + 0x224d08, + 0x30e406, + 0x23d386, + 0x29bb48, + 0x373ac6, + 0x289f05, + 0x286106, + 0x27c1c8, + 0x280986, + 0x2405cb, + 0x366786, + 0x29d10d, + 0x3dc385, + 0x2acc46, + 0x202c45, + 0x367649, + 0x24c047, + 0x39cf08, + 0x292fc6, + 0x29c3c9, + 0x3bd346, + 0x269c05, + 0x2a2fc6, + 0x2bd946, + 0x2ce4c9, + 0x2bb546, + 0x2a01c7, + 0x2a3645, + 0x21a1c3, + 0x21a1c5, + 0x2ad647, + 0x32f846, + 0x3dc289, + 0x278c06, + 0x274886, + 0x3cf389, + 0x285b09, + 0x2a3bc7, + 0x3286c8, + 0x2a6249, + 0x283888, + 0x36eb86, + 0x2db485, + 0x31608a, + 0x274906, + 0x2096c6, + 0x2d2e45, + 0x253e48, + 0x2aa007, + 0x23190a, + 0x24f846, + 0x2f6245, + 0x2facc6, + 0x228987, + 0x3976c7, + 0x21b8c5, + 0x269dc5, + 0x2815c6, + 0x28e686, + 0x2a9cc6, + 0x2bf744, + 0x285089, + 0x28b146, + 0x2cf20a, + 0x21c588, + 0x308788, + 0x384bca, + 0x21b105, + 0x29f4c5, + 0x23b4c8, + 0x2bfc88, + 0x237187, + 0x2b7bc6, + 0x33cd48, + 0x20fec7, + 0x282d08, + 0x2b9e46, + 0x286e88, + 0x2991c6, + 0x27bdc7, + 0x2af486, + 0x29b206, + 0x26e40a, + 0x2d8b86, + 0x2db489, + 0x369786, + 0x2684ca, + 0x241f09, + 0x2ee686, + 0x2bbd04, + 0x35accd, + 0x28a547, + 0x32c386, + 0x2c3045, + 0x3bd3c5, + 0x393146, + 0x2d7e09, + 0x2ba7c7, + 0x27d386, + 0x2d0d06, + 0x289a09, + 0x289e44, + 0x242a84, + 0x327f08, + 0x265d46, + 0x2a30c8, + 0x2f7f88, + 0x32e307, + 0x3bb0c9, + 0x3b8c47, + 0x2b3d4a, + 0x2f028f, + 0x281e8a, + 0x28dfc5, + 0x27c405, + 0x2140c5, + 0x3ba6c7, + 0x228543, + 0x3288c8, + 0x25ce46, + 0x25cf49, + 0x2dbdc6, + 0x2ce307, + 0x29c189, + 0x39ce08, + 0x2d2f07, + 0x316fc3, + 0x357ec5, + 0x2284c5, + 0x2bf58b, 0x201944, - 0x308804, - 0x278686, - 0x31dc07, - 0x39abca, - 0x242b07, - 0x2ff907, - 0x280405, - 0x3bfc85, - 0x26de89, - 0x29af46, - 0x24298d, - 0x33fac5, - 0x2b6243, - 0x23ffc3, - 0x3d0605, - 0x35e345, - 0x28ee48, - 0x27c487, - 0x244d06, - 0x2a1e46, - 0x229e05, - 0x232f07, - 0x2e6d07, - 0x3db5c7, - 0x20530a, - 0x39c508, - 0x226384, - 0x27ef07, - 0x27ec47, - 0x353106, - 0x297a87, - 0x2e0388, - 0x360f08, - 0x249406, - 0x218f48, - 0x2b9b84, - 0x3b0346, - 0x238786, - 0x3aa006, - 0x345606, - 0x219cc4, - 0x282c86, - 0x2c3106, - 0x29b306, - 0x22f846, - 0x3c6986, - 0x2e01c6, - 0x244c08, - 0x2b4d08, - 0x2d6848, - 0x34d748, - 0x3c1d86, - 0x209a85, - 0x223c86, - 0x2afcc5, - 0x391e47, - 0x228f85, - 0x20ba83, - 0x20ca85, - 0x230fc4, - 0x3c6ac5, + 0x302084, + 0x27a646, + 0x317187, + 0x39e38a, + 0x232087, + 0x3a8647, + 0x282105, + 0x3c2845, + 0x2725c9, + 0x29b206, + 0x231f0d, + 0x363505, + 0x2b6e03, + 0x204943, + 0x21ef45, + 0x35cbc5, + 0x36b848, + 0x27dcc7, + 0x242806, + 0x2a1906, + 0x22b6c5, + 0x235147, + 0x32de07, + 0x22a087, + 0x20878a, + 0x3d32c8, + 0x2bf744, + 0x280707, + 0x280447, + 0x350f06, + 0x298847, + 0x2d1348, + 0x2d3b88, + 0x24bf46, + 0x218988, + 0x2bb5c4, + 0x33a746, + 0x253a86, + 0x39d606, + 0x330946, + 0x21af84, + 0x27e0c6, + 0x2c1a86, + 0x29b5c6, + 0x231f06, + 0x204806, + 0x2457c6, + 0x242708, + 0x2b6308, + 0x2d72c8, + 0x23c508, + 0x23b446, + 0x20b3c5, + 0x21a186, + 0x2b0a05, + 0x395647, + 0x224dc5, + 0x20d443, + 0x3ceac5, + 0x22e384, + 0x204945, 0x201903, - 0x393907, - 0x36d1c8, - 0x31f2c6, - 0x376e0d, - 0x27a846, - 0x29a8c5, - 0x219803, - 0x2c04c9, - 0x359bc6, - 0x296206, - 0x398b84, - 0x26f3c7, - 0x36c186, - 0x2b7bc5, - 0x242943, - 0x3d7004, - 0x27ee06, - 0x238884, - 0x2e9f88, - 0x3befc9, - 0x309209, - 0x2a3c0a, - 0x2a54cd, - 0x2318c7, - 0x3ba1c6, - 0x20a204, - 0x282949, - 0x287b88, - 0x288e46, - 0x234b46, - 0x297a87, - 0x2c1246, - 0x34fc46, - 0x2ffa86, - 0x3c4e0a, - 0x222508, - 0x2e3805, - 0x33e9c9, - 0x2cab8a, - 0x305288, - 0x29f1c8, - 0x296188, - 0x2e710c, - 0x350805, - 0x2a20c8, - 0x2b5006, - 0x317646, - 0x3d8287, - 0x242a05, - 0x2847c5, - 0x3090c9, - 0x20ac07, - 0x20efc5, - 0x237187, - 0x23ffc3, - 0x2cb045, - 0x21ac08, - 0x283347, - 0x29f089, - 0x2dedc5, - 0x3ae2c4, - 0x2a5188, - 0x331707, - 0x2d2b48, - 0x3d36c8, + 0x3a3787, + 0x3436c8, + 0x3dafc6, + 0x2b4ecd, + 0x27c3c6, + 0x29ab85, + 0x21aac3, + 0x2bec49, + 0x289fc6, + 0x2969c6, + 0x282604, + 0x281e07, + 0x338446, + 0x2baa85, + 0x23c043, + 0x205b44, + 0x280606, + 0x3cf7c4, + 0x253b88, + 0x3d4a09, + 0x302a89, + 0x2a2eca, + 0x29370d, + 0x234007, + 0x3a8986, + 0x20adc4, + 0x284089, + 0x288c08, + 0x28a146, + 0x236d86, + 0x298847, + 0x2c1606, + 0x22d906, + 0x32ca06, + 0x32b7ca, + 0x220688, + 0x26ed05, + 0x36c209, + 0x2ca24a, + 0x2ffbc8, + 0x29ecc8, + 0x296948, + 0x2ad80c, + 0x351e45, + 0x2a1b88, + 0x2b7946, + 0x310e06, + 0x3a1c47, + 0x231f85, + 0x286285, + 0x302949, + 0x20d207, + 0x25cf05, + 0x238cc7, + 0x204943, + 0x2ca705, + 0x21a748, + 0x284e07, + 0x29eb89, + 0x2e2e05, + 0x3a6744, + 0x2a4448, + 0x3db447, + 0x2d30c8, + 0x3dd108, 0x2adbc5, - 0x21f506, - 0x249886, - 0x2d5449, - 0x2b3f47, - 0x2b0386, - 0x3d00c7, - 0x205083, - 0x3064c4, - 0x2d8c85, - 0x233044, - 0x248d84, - 0x3890c7, - 0x2651c7, - 0x27bd04, - 0x29eed0, - 0x33ebc7, - 0x3bfc85, - 0x2f764c, - 0x32a2c4, - 0x2b2b48, - 0x27c949, - 0x385146, - 0x319dc8, - 0x270d84, - 0x278988, - 0x331dc6, - 0x26ebc8, - 0x2a0bc6, - 0x2d004b, - 0x32de45, - 0x2d8b08, - 0x213304, - 0x3bf40a, - 0x29f089, - 0x3228c6, - 0x225fc8, - 0x258305, - 0x2bfd44, - 0x2b2a46, - 0x3db488, - 0x282f08, - 0x338fc6, - 0x301104, - 0x278e46, - 0x280047, - 0x279bc7, - 0x297a8f, - 0x32eec7, - 0x2f2847, - 0x295bc5, - 0x376185, - 0x2a45c9, - 0x2d7886, - 0x389305, - 0x284347, - 0x2cd008, - 0x2f9c05, - 0x3229c6, - 0x227708, - 0x21f98a, - 0x3db188, - 0x28d4c7, - 0x2f4646, - 0x33e986, + 0x3baa86, + 0x24c3c6, + 0x2d6389, + 0x31c0c7, + 0x2b0e46, + 0x21ea07, + 0x202103, + 0x238644, + 0x2cf8c5, + 0x235284, + 0x2515c4, + 0x38c647, + 0x2675c7, + 0x27d544, + 0x29e9d0, + 0x36c407, + 0x3c2845, + 0x3303cc, + 0x206784, + 0x37f5c8, + 0x27bcc9, + 0x388d86, + 0x3134c8, + 0x23d044, + 0x27a948, + 0x3dbb06, + 0x26e288, + 0x29fb46, + 0x28ae8b, + 0x325045, + 0x2cf748, + 0x20f1c4, + 0x3d4e4a, + 0x29eb89, + 0x2af386, + 0x30e988, + 0x286685, + 0x2be1c4, + 0x37f4c6, + 0x229f48, + 0x2849c8, + 0x33d5c6, + 0x321104, + 0x316006, + 0x3b8cc7, + 0x27b847, + 0x29884f, + 0x329587, + 0x2ee747, + 0x31c305, + 0x377fc5, + 0x2a3889, + 0x2e6c46, + 0x38c885, + 0x285e07, + 0x3a1ec8, + 0x3cf845, + 0x2af486, + 0x21c3c8, + 0x202e4a, + 0x229c48, + 0x28f987, + 0x2f06c6, + 0x36c1c6, 0x2003c3, - 0x208a43, - 0x2cad49, - 0x2a7449, - 0x2b2946, - 0x2dedc5, - 0x2191c8, - 0x225fc8, - 0x371c88, - 0x2ffb0b, - 0x377047, - 0x31ae49, - 0x297d08, - 0x351c84, - 0x3a9c48, - 0x290cc9, - 0x2b0685, - 0x21f047, - 0x306545, - 0x282e08, - 0x29454b, - 0x299710, - 0x2ac685, - 0x21324c, - 0x244ec5, - 0x280483, - 0x31cc06, - 0x2c2644, - 0x288cc6, - 0x2a0607, - 0x212bc4, - 0x23ffc8, - 0x344ecd, - 0x31c485, - 0x231904, - 0x2a3484, - 0x2a3489, - 0x2af088, - 0x32e307, - 0x331e48, - 0x283688, - 0x27be45, - 0x2110c7, - 0x27bdc7, - 0x20f2c7, - 0x267c09, - 0x2e6809, - 0x3c3b86, - 0x2dce46, - 0x284406, - 0x323fc5, - 0x3af9c4, - 0x3bcb46, - 0x3bed86, - 0x27be88, - 0x32834b, - 0x2363c7, - 0x20a204, - 0x36c0c6, - 0x2e06c7, - 0x3da1c5, - 0x374cc5, - 0x227c84, - 0x2e6786, - 0x3bcbc8, - 0x282949, - 0x264806, - 0x287988, - 0x2b7c86, - 0x35d948, - 0x32170c, - 0x27bd06, - 0x29a58d, - 0x29aa0b, - 0x2a1305, - 0x2e6e47, - 0x2b9c06, - 0x38f0c8, - 0x3c3c09, - 0x307e48, - 0x3bfc85, - 0x3bd847, - 0x282248, - 0x3c0bc9, - 0x36be06, - 0x26470a, - 0x38ee48, - 0x307c8b, - 0x22278c, - 0x278a88, - 0x27e846, - 0x210ac8, - 0x21f607, - 0x21ca09, - 0x3983cd, - 0x29ae46, - 0x267048, - 0x2b4bc9, - 0x2c0f48, - 0x285408, - 0x2c3b4c, - 0x2c5107, - 0x2c5bc7, - 0x267a45, - 0x2c0d87, - 0x2ccec8, - 0x2b2ac6, - 0x2934cc, - 0x2f9688, - 0x2d1588, - 0x234d86, - 0x34ef07, - 0x3c3d84, - 0x34d748, - 0x28688c, - 0x289b8c, - 0x28c405, - 0x3b0747, - 0x301086, - 0x34ee86, - 0x3b9388, - 0x21c984, - 0x26a74b, - 0x286fcb, - 0x2f4646, - 0x344d47, - 0x28f405, - 0x271a45, - 0x26a886, - 0x2582c5, + 0x2060c3, + 0x2ca409, + 0x2a60c9, + 0x2b3386, + 0x2e2e05, + 0x218c08, + 0x30e988, + 0x373c48, + 0x32ca8b, + 0x2b5107, + 0x314bc9, + 0x298ac8, + 0x35bb44, + 0x39d248, + 0x291489, + 0x2b1145, + 0x3ba5c7, + 0x2386c5, + 0x2848c8, + 0x29474b, + 0x2999d0, + 0x2ac885, + 0x20f10c, + 0x2429c5, + 0x282183, + 0x2ef046, + 0x2c0d04, + 0x2af746, + 0x29f587, + 0x21c444, + 0x243108, + 0x32878d, + 0x30e845, + 0x234044, + 0x294e44, + 0x294e49, + 0x2c4008, + 0x325507, + 0x3dbb88, + 0x285148, + 0x27d685, + 0x211907, + 0x27d607, + 0x2c59c7, + 0x269dc9, + 0x32d909, + 0x20bdc6, + 0x2c8106, + 0x285ec6, + 0x34d0c5, + 0x3adbc4, + 0x3bff46, + 0x3c19c6, + 0x27d6c8, + 0x22864b, + 0x2658c7, + 0x20adc4, + 0x338386, + 0x2d1687, + 0x2453c5, + 0x333385, + 0x227044, + 0x32d886, + 0x3bffc8, + 0x284089, + 0x247086, + 0x288a08, + 0x2bab46, + 0x35c1c8, + 0x2b8c0c, + 0x27d546, + 0x29a84d, + 0x29accb, + 0x2a0285, + 0x32df47, + 0x2bb646, + 0x397588, + 0x20be49, + 0x3b2508, + 0x3c2845, + 0x32a507, + 0x283988, + 0x232b49, + 0x3380c6, + 0x27f74a, + 0x397308, + 0x3b234b, + 0x22090c, + 0x27aa48, + 0x27fdc6, + 0x211308, + 0x202ac7, + 0x2092c9, + 0x30cf4d, + 0x29b106, + 0x239808, + 0x2b61c9, + 0x2bf848, + 0x286f88, + 0x2c24cc, + 0x2c3787, + 0x2c44c7, + 0x269c05, + 0x2b91c7, + 0x3a1d88, + 0x37f546, + 0x246f0c, + 0x2f4408, + 0x2d0648, + 0x232e46, + 0x228247, + 0x20bfc4, + 0x23c508, + 0x315b4c, + 0x28844c, + 0x28e045, + 0x3ce947, + 0x321086, + 0x2281c6, + 0x367808, + 0x21d004, + 0x26c80b, + 0x27c98b, + 0x2f06c6, + 0x328607, + 0x331e05, + 0x273d05, + 0x26c946, + 0x286645, 0x201905, - 0x2cec87, - 0x20afc9, - 0x26e684, - 0x258e45, - 0x2fcfc5, - 0x2e9d08, - 0x28b9c5, - 0x2bd109, - 0x2b3947, - 0x2b394b, - 0x2f24c6, - 0x244949, - 0x3556c8, - 0x291005, - 0x20f3c8, - 0x2e6848, - 0x261fc7, - 0x331bc7, - 0x389149, - 0x26eb07, - 0x29cf89, - 0x2fc3cc, - 0x348188, - 0x2b9649, - 0x2bb207, - 0x283749, - 0x2ff287, - 0x222888, - 0x3b5d45, - 0x3b02c6, - 0x2c44c8, - 0x2d7148, - 0x2caa49, + 0x2ccac7, + 0x3c6349, + 0x28e844, + 0x25b245, + 0x30b645, + 0x3bae48, + 0x28d605, + 0x2a0ec9, + 0x2e8247, + 0x2e824b, + 0x2ee3c6, + 0x242449, + 0x329c48, + 0x2919c5, + 0x2c5ac8, + 0x32d948, + 0x264587, + 0x3db907, + 0x38c6c9, + 0x26e1c7, + 0x29cec9, + 0x308fcc, + 0x2b3388, + 0x2bb089, + 0x2bc447, + 0x285209, + 0x23bec7, + 0x220a08, + 0x202a05, + 0x33a6c6, + 0x2c3088, + 0x2f07c8, + 0x2ca109, 0x201947, - 0x272445, - 0x336b09, - 0x2d3206, - 0x293d04, - 0x31bf86, - 0x34f288, - 0x3cbac7, - 0x328548, - 0x219009, - 0x2f8107, - 0x2a1706, - 0x2e6f04, - 0x20cb09, - 0x210f48, - 0x234c47, - 0x36b6c6, - 0x328286, - 0x21cd84, - 0x2f5206, - 0x20f0c3, - 0x32d9c9, - 0x32de06, - 0x2accc5, - 0x2a1e46, - 0x2cf205, - 0x2826c8, - 0x20edc7, - 0x238ec6, - 0x2fee06, - 0x30ffc8, - 0x2a4747, - 0x29ae85, - 0x29ecc8, - 0x3a77c8, - 0x38ee48, - 0x244d85, - 0x3b0346, - 0x308fc9, - 0x2d52c4, - 0x2cf08b, - 0x34f94b, - 0x2e3709, - 0x23ffc3, - 0x256085, - 0x2e48c6, - 0x245b08, - 0x304204, - 0x31f2c6, - 0x205449, - 0x2c2f05, - 0x2cebc6, - 0x331706, - 0x2191c4, - 0x29f34a, - 0x2acc08, - 0x2d7146, - 0x3c2785, - 0x344bc7, - 0x35e587, - 0x21f504, - 0x34fb87, - 0x228f44, - 0x228f46, - 0x20eb03, - 0x267c05, - 0x2b1045, - 0x32f108, - 0x27f0c5, - 0x27ba49, - 0x2a62c7, - 0x34d58b, - 0x2a62cc, - 0x2a68ca, - 0x313987, - 0x20cc43, - 0x3897c8, - 0x244f45, - 0x2f9c85, - 0x359644, - 0x222786, - 0x27c946, - 0x2f5247, - 0x33608b, - 0x219cc4, - 0x3ac004, - 0x2c9a44, - 0x2ce986, - 0x212bc4, - 0x225e48, - 0x359445, - 0x21afc5, - 0x371bc7, - 0x2e6f49, - 0x35e345, - 0x38fe4a, - 0x2a4289, - 0x2ae38a, - 0x3c4f49, - 0x352404, - 0x2c9f05, - 0x2c1348, - 0x2d0ecb, - 0x2d5085, - 0x215246, - 0x209744, - 0x27bf86, - 0x2f7f89, - 0x2e07c7, - 0x275dc8, - 0x2a5846, - 0x27ffc7, - 0x282f08, - 0x3903c6, - 0x3bd204, - 0x380547, - 0x36fe85, - 0x382607, - 0x29a404, - 0x2b9b86, - 0x304f88, - 0x29abc8, - 0x2f1887, - 0x31d6c8, - 0x2984c5, - 0x240004, - 0x381ec8, - 0x295e04, - 0x214e85, - 0x305184, - 0x20e987, - 0x28a207, - 0x283888, - 0x2d2cc6, - 0x27f045, - 0x27b848, - 0x248e88, - 0x2a3b49, - 0x34fc46, - 0x22f2c8, - 0x3bf28a, - 0x3da248, - 0x311985, - 0x223e86, - 0x2a4148, - 0x3bd90a, - 0x20d487, - 0x287fc5, - 0x293f08, - 0x2ab804, - 0x24ff86, - 0x2c5f48, - 0x3c6986, - 0x3c9c88, - 0x254747, - 0x3c16c6, - 0x2baac4, - 0x266847, - 0x2b5684, - 0x2f7f47, - 0x36bacd, - 0x266e85, - 0x2d0a4b, - 0x289e06, - 0x24f808, - 0x23ff84, - 0x3c1f86, - 0x27ee06, - 0x210e07, - 0x29a24d, - 0x2fbf87, - 0x2b6188, - 0x285585, - 0x26e048, - 0x2ca386, - 0x298548, - 0x22e4c6, - 0x2f73c7, - 0x283c09, - 0x35a447, - 0x289108, - 0x273d85, - 0x229e88, - 0x34edc5, - 0x26b045, - 0x34c4c5, - 0x215183, - 0x2846c4, - 0x294105, - 0x243789, - 0x36b5c6, - 0x2e0488, - 0x331985, - 0x2b7f47, - 0x3171ca, - 0x2ceb09, - 0x2c8f0a, - 0x2d68c8, - 0x236fcc, - 0x2843cd, - 0x30ad03, - 0x3c9b88, - 0x3d6fc5, - 0x21f746, - 0x3a47c6, - 0x35c045, - 0x3d01c9, - 0x28e9c5, - 0x27b848, - 0x257506, + 0x274705, + 0x248809, + 0x2d66c6, + 0x293f04, + 0x35f406, + 0x26cfc8, + 0x2fa847, + 0x228848, + 0x218a49, + 0x32b087, + 0x2a0686, + 0x32e004, + 0x3ceb49, + 0x211788, + 0x232d07, + 0x22e7c6, + 0x228586, + 0x209644, + 0x36d946, + 0x2048c3, + 0x324bc9, + 0x325006, + 0x2acec5, + 0x2a1906, + 0x2ce885, + 0x283e08, + 0x369b87, + 0x2feac6, + 0x32c8c6, + 0x308788, + 0x2a3a07, + 0x29b145, + 0x29e7c8, + 0x3c97c8, + 0x397308, + 0x242885, + 0x33a746, + 0x302849, + 0x2d6204, + 0x2ce70b, + 0x22d60b, + 0x26ec09, + 0x204943, + 0x258c45, + 0x23d606, + 0x242dc8, + 0x2aae04, + 0x3dafc6, + 0x2088c9, + 0x2d0445, + 0x2cca06, + 0x3db446, + 0x214184, + 0x29ee4a, + 0x2ace08, + 0x2f07c6, + 0x245205, + 0x328487, + 0x35ce07, + 0x3baa84, + 0x22d847, + 0x224d84, + 0x224d86, + 0x210143, + 0x269dc5, + 0x2b1b05, + 0x369dc8, + 0x2808c5, + 0x27d289, + 0x23c347, + 0x23c34b, + 0x2a4f4c, + 0x2a554a, + 0x30ce07, + 0x202e03, + 0x38cd48, + 0x242a45, + 0x3cf8c5, + 0x357f84, + 0x220906, + 0x27bcc6, + 0x36d987, + 0x247d8b, + 0x21af84, + 0x2fd104, + 0x2b52c4, + 0x2ce186, + 0x21c444, + 0x22b048, + 0x357d85, + 0x21b745, + 0x373b87, + 0x32e049, + 0x35cbc5, + 0x39314a, + 0x2a3549, + 0x2afb0a, + 0x32b909, + 0x350204, + 0x2d0dc5, + 0x2c1708, + 0x2d808b, + 0x2d5fc5, + 0x2f8106, + 0x241b04, + 0x27d7c6, + 0x32af09, + 0x2d1787, + 0x278dc8, + 0x293a86, + 0x3b8c47, + 0x2849c8, + 0x3936c6, + 0x3c1c04, + 0x383507, + 0x371cc5, + 0x385207, + 0x23c584, + 0x2bb5c6, + 0x2ff8c8, + 0x29ae88, + 0x2f1d87, + 0x320dc8, + 0x299285, + 0x204784, + 0x384ac8, + 0x31c544, + 0x214045, + 0x2ffac4, + 0x20ffc7, + 0x28b207, + 0x285348, + 0x2d3246, + 0x280845, + 0x27d088, + 0x2516c8, + 0x2a2e09, + 0x22d906, + 0x231988, + 0x3d4cca, + 0x245448, + 0x2e7805, + 0x21a386, + 0x2a3408, + 0x32a5ca, + 0x2aaa07, + 0x289045, + 0x294108, + 0x3d2484, + 0x253ec6, + 0x2c4848, + 0x204806, + 0x3ca308, + 0x358587, + 0x3dc786, + 0x2bbd04, + 0x26c187, + 0x2b6784, + 0x32aec7, + 0x2af0cd, + 0x237205, + 0x2d7c0b, + 0x2886c6, + 0x253288, + 0x2430c4, + 0x23b646, + 0x280606, + 0x211647, + 0x29a50d, + 0x2f6a87, + 0x2b6d48, + 0x284245, + 0x37b488, + 0x2c9a46, + 0x299308, 0x360146, - 0x2a5049, - 0x3a6787, - 0x294806, - 0x317148, - 0x3a9f08, - 0x2e4f07, - 0x2c328e, - 0x2ca5c5, - 0x3c0ac5, - 0x3c6888, - 0x31a307, + 0x330147, + 0x2856c9, + 0x35fac7, + 0x28a408, + 0x276cc5, + 0x22b748, + 0x228105, + 0x225d05, + 0x34b085, + 0x24f543, + 0x286184, + 0x245505, + 0x247a89, + 0x36d746, + 0x2d1448, + 0x3db6c5, + 0x2b9087, + 0x31098a, + 0x2cc949, + 0x2bd84a, + 0x2d7348, + 0x238b0c, + 0x285e8d, + 0x3cc203, + 0x3ca208, + 0x205b05, + 0x202c06, + 0x39cc86, + 0x35a985, + 0x21eb09, + 0x36b3c5, + 0x27d088, + 0x2574c6, + 0x35e9c6, + 0x2a4309, + 0x3ab3c7, + 0x294a06, + 0x310908, + 0x39d508, + 0x2e2807, + 0x2c1c0e, + 0x2c9c85, + 0x232a45, + 0x204708, + 0x2e42c7, 0x200e42, - 0x2c36c4, - 0x288bca, - 0x234d08, - 0x2e6986, - 0x29c388, - 0x249886, - 0x36a0c8, - 0x2b0388, - 0x26b004, - 0x2b8705, - 0x602c84, - 0x602c84, - 0x602c84, - 0x204ec3, - 0x328106, - 0x27bd06, - 0x2a0fcc, - 0x202f03, - 0x2cab86, - 0x21a9c4, - 0x359b48, - 0x205285, - 0x288cc6, - 0x2c0c08, - 0x2d8046, - 0x238e46, - 0x212bc8, - 0x2d8d07, - 0x26e8c9, - 0x32044a, - 0x2052c4, - 0x228f85, - 0x2f3205, - 0x3598c6, - 0x231906, - 0x2a1b06, - 0x3cc306, - 0x26ea04, - 0x26ea0b, - 0x228d44, - 0x244ac5, - 0x2af585, - 0x219506, - 0x3c6e08, - 0x284287, - 0x32dd84, - 0x25a2c3, - 0x2ab305, - 0x31be47, - 0x28418b, - 0x32f007, - 0x2c0b08, - 0x2bf447, - 0x269406, - 0x27d308, - 0x292a0b, - 0x2abb46, - 0x213a89, - 0x292b85, - 0x31da43, - 0x2cebc6, - 0x254648, - 0x214303, - 0x27d903, - 0x27b386, - 0x249886, - 0x37880a, - 0x27e885, - 0x27ec4b, - 0x2a1d8b, - 0x244043, - 0x206743, - 0x2b3244, - 0x249647, - 0x2546c4, - 0x219344, - 0x2b4e84, - 0x3da548, - 0x3c26c8, - 0x2089c9, - 0x2d3a08, - 0x34c747, - 0x22f846, - 0x2e00cf, - 0x2ca706, - 0x2d6044, - 0x3c250a, - 0x31bd47, - 0x2b5786, - 0x293d49, - 0x208945, - 0x32f245, - 0x208a86, - 0x229fc3, - 0x2ab849, - 0x222686, - 0x218dc9, - 0x39abc6, - 0x267c05, - 0x28c805, - 0x206643, - 0x249788, - 0x32e4c7, - 0x20ef04, - 0x3599c8, - 0x3173c4, - 0x356506, - 0x31cc06, - 0x23b486, - 0x2d89c9, - 0x2f9c05, - 0x29af46, - 0x247d89, - 0x2c9646, - 0x2e01c6, - 0x39f786, - 0x212185, - 0x305186, - 0x2f73c4, - 0x3b5d45, - 0x2c44c4, - 0x2b6b06, - 0x33fa84, + 0x2c2044, + 0x2af64a, + 0x232dc8, + 0x32da86, + 0x29c2c8, + 0x24c3c6, + 0x32f488, + 0x2b0e48, + 0x225cc4, + 0x2b9445, + 0x727544, + 0x727544, + 0x727544, + 0x208343, + 0x228406, + 0x27d546, + 0x29ff4c, + 0x204743, + 0x23cf46, + 0x21c4c4, + 0x289f48, + 0x208705, + 0x2af746, + 0x2bf388, + 0x2d9206, + 0x2fea46, + 0x3ae0c8, + 0x2cf947, + 0x26df89, + 0x31a70a, + 0x208744, + 0x224dc5, + 0x23d345, + 0x358206, + 0x234046, + 0x2a0a86, + 0x3cce06, + 0x26e0c4, + 0x26e0cb, + 0x224b84, + 0x2425c5, + 0x2affc5, + 0x32e3c6, + 0x204c88, + 0x285d47, + 0x324f84, + 0x25c6c3, + 0x3d1f85, + 0x35f2c7, + 0x285c4b, + 0x369cc7, + 0x2bf288, + 0x2b9587, + 0x26b786, + 0x28c1c8, + 0x272b0b, + 0x2c8606, + 0x20df49, + 0x272c85, + 0x316fc3, + 0x2cca06, + 0x358488, + 0x213603, + 0x28c7c3, + 0x209e86, + 0x24c3c6, + 0x379a8a, + 0x27fe05, + 0x28044b, + 0x2a184b, + 0x246183, + 0x20a043, + 0x2b3cc4, + 0x24c187, + 0x27aa44, + 0x289f44, + 0x2b77c4, + 0x245748, + 0x245148, + 0x206049, + 0x2d4588, + 0x2686c7, + 0x231f06, + 0x2d108f, + 0x2c9dc6, + 0x2d6b04, + 0x244f8a, + 0x35f1c7, + 0x2b6886, + 0x293f49, + 0x205fc5, + 0x369f05, + 0x206106, + 0x22b883, + 0x3d24c9, + 0x220806, + 0x218809, + 0x39e386, + 0x269dc5, + 0x28e445, + 0x20a703, + 0x24c2c8, + 0x3256c7, + 0x25ce44, + 0x289dc8, + 0x310b84, + 0x300f46, + 0x2ef046, + 0x23ebc6, + 0x2cf609, + 0x3cf845, + 0x29b206, + 0x2a1509, + 0x2c8886, + 0x2457c6, + 0x3a3b86, + 0x203685, + 0x2ffac6, + 0x330144, + 0x202a05, + 0x2c3084, + 0x2b76c6, + 0x3634c4, 0x201a43, - 0x287c45, - 0x233c08, - 0x3d2cc7, - 0x304289, - 0x287ec8, - 0x29b651, - 0x33178a, - 0x2f4587, - 0x254886, - 0x21a9c4, - 0x2c45c8, - 0x2b5c48, - 0x29b80a, - 0x2bcecd, - 0x215146, - 0x212cc6, - 0x266906, - 0x21afc7, - 0x2b6245, - 0x251907, - 0x344ec5, - 0x2b3a84, - 0x206686, - 0x2269c7, - 0x2ab54d, - 0x2a4087, - 0x3774c8, - 0x27bb49, - 0x223d86, - 0x36bd85, - 0x23ae44, - 0x34f386, - 0x21f406, - 0x234e86, - 0x29cc08, - 0x223283, - 0x210e03, - 0x343085, - 0x35c6c6, - 0x2b0345, - 0x2a5a48, - 0x2a07ca, - 0x246b04, - 0x359b48, - 0x296188, - 0x219347, - 0x331a49, - 0x2c0808, - 0x2829c7, - 0x2b5106, - 0x3c698a, - 0x34f408, - 0x307009, - 0x2af148, - 0x227f89, - 0x361107, - 0x303505, - 0x2ffd06, - 0x2b2948, - 0x24f988, - 0x313c48, - 0x31c5c8, - 0x244ac5, + 0x288cc5, + 0x235e48, + 0x22cdc7, + 0x2aae89, + 0x288f48, + 0x29b911, + 0x3db4ca, + 0x2f0607, + 0x2d3ec6, + 0x21c4c4, + 0x2c3188, + 0x3cf988, + 0x29baca, + 0x2a0c8d, + 0x2a2fc6, + 0x3ae1c6, + 0x26c246, + 0x21b747, + 0x2b6e05, + 0x3be587, + 0x289e85, + 0x2e8384, + 0x2adec6, + 0x33a587, + 0x3d21cd, + 0x2a3347, + 0x2b5588, + 0x27d389, + 0x21a286, + 0x338045, + 0x230344, + 0x26d0c6, + 0x3ba986, + 0x232f46, + 0x29cb48, + 0x219783, + 0x209e43, + 0x320405, + 0x35b006, + 0x2b0e05, + 0x293c88, + 0x29f74a, + 0x3bab84, + 0x289f48, + 0x296948, + 0x32e207, + 0x3db789, + 0x2bef88, + 0x284107, + 0x2b7a46, + 0x20480a, + 0x26d148, + 0x390e89, + 0x2c40c8, + 0x226c49, + 0x2d3d87, + 0x2f3bc5, + 0x32cc86, + 0x37f3c8, + 0x253408, + 0x339cc8, + 0x214188, + 0x2425c5, 0x200d04, - 0x232588, - 0x23eb84, - 0x3c4d44, - 0x267c05, - 0x295647, - 0x2e6d09, - 0x210c07, - 0x21a5c5, - 0x278886, - 0x368186, - 0x213bc4, - 0x2a5386, - 0x27e044, - 0x292686, - 0x2e6ac6, - 0x214146, - 0x3bfc85, - 0x2a5907, - 0x20cc43, - 0x20a909, - 0x30fdc8, - 0x282844, - 0x28284d, - 0x29acc8, - 0x2f0148, - 0x306f86, - 0x283d09, - 0x2ceb09, - 0x2f7c85, - 0x2a08ca, - 0x26da4a, - 0x270c0c, - 0x270d86, - 0x2794c6, - 0x2caf86, - 0x39b709, - 0x21f986, - 0x222906, - 0x28ea86, - 0x34d748, - 0x31d6c6, - 0x2d4b8b, - 0x2957c5, - 0x21afc5, - 0x279cc5, - 0x340c06, - 0x215103, - 0x23b406, - 0x2a4007, - 0x2c4485, - 0x211e45, - 0x3b8505, - 0x33d006, - 0x2f7d44, - 0x334606, - 0x2a9789, - 0x340a8c, - 0x2b37c8, - 0x2a98c4, - 0x304e86, - 0x289f06, - 0x254648, - 0x225fc8, - 0x340989, - 0x344bc7, - 0x236589, - 0x271b06, - 0x2150c4, - 0x205fc4, - 0x281fc4, - 0x282f08, - 0x2e6b4a, - 0x35e2c6, - 0x36b487, - 0x382887, - 0x244a45, - 0x2f31c4, - 0x290c86, - 0x2b6286, - 0x20eec3, - 0x30fc07, - 0x3d35c8, - 0x2f7dca, - 0x345188, - 0x2dd348, - 0x33fac5, - 0x2a1405, - 0x2364c5, - 0x244e06, - 0x35cb06, - 0x2fe385, - 0x32dc09, - 0x2f2fcc, - 0x35b4c7, - 0x29b888, - 0x276705, - 0x602c84, - 0x229cc4, - 0x283484, - 0x218bc6, - 0x2a2d4e, - 0x32f2c7, - 0x21b1c5, - 0x2d524c, - 0x30af87, - 0x226947, - 0x22bb09, - 0x220d49, - 0x287fc5, - 0x30fdc8, - 0x308fc9, - 0x38ed05, - 0x2c43c8, - 0x2b9886, - 0x382146, - 0x23f204, - 0x28fe08, - 0x223f43, - 0x209284, - 0x2ab385, - 0x394e47, - 0x26bcc5, - 0x3bf149, - 0x2a5f8d, - 0x2c6506, - 0x3c37c4, - 0x226b08, - 0x20ae0a, - 0x21bf47, - 0x36ba05, - 0x2092c3, - 0x2a1f4e, - 0x24988c, - 0x305387, - 0x2a2f07, - 0x4230e9c7, - 0x14f0c6, - 0x46e44, - 0x210d83, - 0x21f9c5, - 0x283485, - 0x29c748, - 0x299d49, - 0x3db306, - 0x2546c4, - 0x2f44c6, - 0x266e0b, - 0x2dc50c, - 0x24b8c7, - 0x2d4e45, - 0x3a76c8, - 0x2e4cc5, - 0x3c2507, - 0x3315c7, - 0x22ee45, - 0x215103, - 0x20fd44, - 0x3cb985, - 0x26e585, - 0x26e586, - 0x2a8f48, - 0x2269c7, - 0x3a4ac6, - 0x21cc86, - 0x34c406, - 0x2671c9, - 0x2111c7, - 0x27e146, - 0x2dc686, - 0x277146, - 0x2acb45, - 0x205746, - 0x383a05, - 0x28ba48, - 0x29528b, - 0x2909c6, - 0x3828c4, - 0x2d5b09, - 0x2a62c4, - 0x2b9808, - 0x31c087, - 0x285304, - 0x2bff48, - 0x2c59c4, - 0x2acb84, - 0x398305, - 0x31c4c6, - 0x3da487, - 0x24e4c3, - 0x2a17c5, - 0x2fb684, - 0x3c0b06, - 0x2f7d08, - 0x3db085, - 0x294f49, - 0x313985, - 0x3736c8, - 0x21a887, - 0x32df08, - 0x2bfb87, - 0x2f2909, - 0x282b06, - 0x341c06, - 0x28ea84, - 0x3abf45, - 0x30d1cc, - 0x279cc7, - 0x27a747, - 0x231548, - 0x2c6506, - 0x2a3f44, - 0x34ab44, - 0x388fc9, - 0x2cb086, - 0x26df07, - 0x210a44, - 0x261606, - 0x3a4405, - 0x2d2807, - 0x2d4b06, - 0x2645c9, - 0x2cfa47, - 0x297a87, - 0x2a4ec6, - 0x261545, - 0x281448, - 0x222508, - 0x22fa46, - 0x3db0c5, - 0x2c7406, + 0x2347c8, + 0x241884, + 0x32b704, + 0x269dc5, + 0x2961c7, + 0x32de09, + 0x211447, + 0x2319c5, + 0x27a846, + 0x369406, + 0x202fc4, + 0x2a4646, + 0x27f244, + 0x292b46, + 0x32dbc6, + 0x213446, + 0x3c2845, + 0x293b47, + 0x202e03, + 0x269889, + 0x308588, + 0x283f84, + 0x283f8d, + 0x29af88, + 0x2ec008, + 0x390e06, + 0x2857c9, + 0x2cc949, + 0x32ac05, + 0x29f84a, + 0x25364a, + 0x27108c, + 0x271206, + 0x27b146, + 0x2ca646, + 0x39eec9, + 0x202e46, + 0x220a86, + 0x36b486, + 0x23c508, + 0x229c46, + 0x2d5acb, + 0x296345, + 0x21b745, + 0x27b945, + 0x327c86, + 0x2047c3, + 0x23eb46, + 0x2a32c7, + 0x2c3045, + 0x25ab85, + 0x3bd3c5, + 0x312906, + 0x32acc4, + 0x336306, + 0x2abc89, + 0x327b0c, + 0x2e80c8, + 0x229ec4, + 0x2ff7c6, + 0x2887c6, + 0x358488, + 0x30e988, + 0x327a09, + 0x328487, + 0x265a89, + 0x273dc6, + 0x22c644, + 0x205584, + 0x283704, + 0x2849c8, + 0x32dc4a, + 0x35cb46, + 0x36d607, + 0x385487, + 0x242545, + 0x2f70c4, + 0x291446, + 0x2b6e46, + 0x202a83, + 0x3083c7, + 0x3dd008, + 0x32ad4a, + 0x23d9c8, + 0x209148, + 0x363505, + 0x2a0385, + 0x2659c5, + 0x242906, + 0x390046, + 0x37b985, + 0x324e09, + 0x2f6ecc, + 0x380907, + 0x29bb48, + 0x296685, + 0x727544, + 0x2270c4, + 0x284f44, + 0x218606, + 0x2a268e, + 0x369f87, + 0x21b945, + 0x2d618c, + 0x3cb3c7, + 0x33a507, + 0x358fc9, + 0x219049, + 0x289045, + 0x308588, + 0x302849, + 0x3971c5, + 0x2c2f88, + 0x2bb2c6, + 0x384d46, + 0x241f04, + 0x290108, + 0x21a443, + 0x387344, + 0x3d2005, + 0x398bc7, + 0x22c405, + 0x3d4b89, + 0x2a4c0d, + 0x371086, + 0x3b9904, + 0x2b7b48, + 0x3c618a, + 0x221e07, + 0x326945, + 0x280883, + 0x2a1a0e, + 0x24c3cc, + 0x2ffcc7, + 0x2a2847, + 0x40b06207, + 0x1282c6, + 0x81b84, + 0x202e83, + 0x202e85, + 0x284f45, + 0x29c688, + 0x29a009, + 0x229dc6, + 0x27aa44, + 0x2f0546, + 0x2395cb, + 0x2c77cc, + 0x24f607, + 0x2d5d85, + 0x3c96c8, + 0x2e25c5, + 0x244f87, + 0x3db307, + 0x339b45, + 0x2047c3, + 0x210584, + 0x23d245, + 0x28e745, + 0x28e746, + 0x2a8a48, + 0x33a587, + 0x39cf86, + 0x209546, + 0x34afc6, + 0x239989, + 0x211a07, + 0x27f346, + 0x2c7946, + 0x3a9606, + 0x2acd45, + 0x208bc6, + 0x386605, + 0x28d688, + 0x295b4b, + 0x290cc6, + 0x3854c4, + 0x2d87c9, + 0x23c344, + 0x2bb248, + 0x35f507, + 0x286e84, + 0x2be3c8, + 0x2c42c4, + 0x2acd84, + 0x289d05, + 0x30e886, + 0x245687, + 0x2172c3, + 0x2a0745, + 0x273304, + 0x232a86, + 0x32ac88, + 0x320cc5, + 0x295809, + 0x248a05, + 0x23cf48, + 0x3d28c7, + 0x325108, + 0x2be007, + 0x2ee809, + 0x27df46, + 0x370c46, + 0x2a6384, + 0x2fd045, + 0x30724c, + 0x27b947, + 0x27c2c7, + 0x233c88, + 0x371086, + 0x2a3204, + 0x3415c4, + 0x38c549, + 0x2ca746, + 0x272647, + 0x211284, + 0x2a4746, + 0x37adc5, + 0x2d2d87, + 0x2d5a46, + 0x27f609, + 0x2e6e47, + 0x298847, + 0x2a4186, + 0x22e705, + 0x282b88, + 0x220688, + 0x2dccc6, + 0x320d05, + 0x2c5406, 0x2017c3, - 0x29c5c9, - 0x2a188e, - 0x2bf2c8, - 0x3174c8, - 0x22f84b, - 0x295186, - 0x379b04, - 0x238e44, - 0x2a198a, - 0x213147, - 0x27e205, - 0x213a89, - 0x2c31c5, - 0x3c4d87, - 0x230504, - 0x299187, - 0x214fc8, - 0x2cc646, - 0x2b9d09, - 0x2c090a, - 0x2130c6, - 0x29a806, - 0x2af505, - 0x396405, - 0x34bac7, - 0x242788, - 0x3a4348, - 0x26b006, - 0x28c885, - 0x23168e, - 0x226384, - 0x22f9c5, - 0x278209, - 0x2d7688, - 0x28d406, - 0x29e7cc, - 0x2a03d0, - 0x2a298f, - 0x2a44c8, - 0x313987, - 0x3bfc85, - 0x294105, - 0x3da309, - 0x294109, - 0x278f46, - 0x2d5107, - 0x3abe45, - 0x306a89, - 0x353186, - 0x21f7cd, - 0x281e89, - 0x219344, - 0x2bf048, - 0x232649, - 0x35e486, - 0x3899c5, - 0x341c06, - 0x275c89, - 0x27b108, - 0x209a85, - 0x28fe04, - 0x29e98b, - 0x35e345, - 0x245b86, - 0x284706, - 0x252a06, - 0x2a388b, - 0x295049, - 0x21cbc5, - 0x391d47, - 0x331706, - 0x212dc6, - 0x283208, - 0x2b5209, - 0x37728c, - 0x31bc48, - 0x317f06, - 0x338fc3, - 0x22d046, - 0x2a36c5, - 0x27fb48, - 0x28c286, - 0x2d2a48, - 0x242b85, - 0x292745, - 0x21a9c8, - 0x3a9dc7, - 0x3a4707, - 0x2f5247, - 0x319dc8, - 0x313ac8, - 0x2b5b46, - 0x2b6947, - 0x306387, - 0x2a358a, - 0x206383, - 0x340c06, - 0x231605, - 0x288bc4, - 0x27bb49, - 0x2f2884, - 0x202244, - 0x2a0c44, - 0x2a2f0b, - 0x32e407, - 0x2318c5, - 0x2981c8, - 0x278886, - 0x278888, - 0x27e7c6, - 0x28fd45, - 0x290005, - 0x2915c6, - 0x2937c8, - 0x293c88, - 0x27bd06, - 0x29800f, - 0x29c090, - 0x3c12c5, - 0x20cc43, - 0x22aa85, - 0x31ad88, - 0x294009, - 0x38ee48, - 0x2d4f08, - 0x31f888, - 0x32e4c7, - 0x278549, - 0x2d2c48, + 0x29c509, + 0x2a080e, + 0x2bdd48, + 0x310c88, + 0x2dcacb, + 0x295a46, + 0x326404, 0x285a84, - 0x2a0ac8, - 0x2e9dc9, - 0x2b7607, - 0x2b0104, - 0x210cc8, - 0x2a56ca, - 0x2fb906, - 0x215146, - 0x34fb09, - 0x2a0607, - 0x2d0308, - 0x230588, - 0x21d348, - 0x37f785, - 0x207685, - 0x21afc5, - 0x283445, - 0x2b4a07, - 0x244bc5, - 0x2c4485, - 0x3cfec6, - 0x38ed87, - 0x2d0e07, - 0x2a59c6, - 0x2d6e05, - 0x245b86, - 0x20ee45, - 0x2bca88, - 0x3abdc4, - 0x2c96c6, - 0x324c84, - 0x2bfd48, - 0x2c97ca, - 0x27c48c, - 0x336285, - 0x21b086, - 0x377446, - 0x28e886, - 0x317f84, - 0x3a4d85, - 0x27dd87, - 0x2a0689, - 0x2cef47, - 0x602c84, - 0x602c84, - 0x32e285, - 0x217684, - 0x29dd4a, - 0x278706, - 0x308dc4, - 0x3b06c5, - 0x2b41c5, - 0x2b6184, - 0x284347, - 0x336c87, - 0x2ce988, - 0x2c7508, - 0x209a89, - 0x295e08, - 0x29df0b, - 0x26f484, - 0x2921c5, - 0x389385, - 0x2f51c9, - 0x2b5209, - 0x2d5a08, - 0x228d48, - 0x219504, - 0x289f45, - 0x218e03, - 0x359885, - 0x29afc6, - 0x299b8c, - 0x210946, - 0x3898c6, - 0x28d685, - 0x33d088, - 0x3d83c6, - 0x254a06, - 0x215146, - 0x26368c, - 0x389444, - 0x34c54a, - 0x28d5c8, - 0x2999c7, - 0x2fb586, - 0x3db3c7, - 0x2f40c5, - 0x36b6c6, - 0x366906, - 0x376047, - 0x2c0604, - 0x20ea85, - 0x278204, - 0x2b3b07, - 0x278448, - 0x27934a, - 0x2820c7, - 0x2ac747, - 0x313907, - 0x2e4e09, - 0x299b8a, - 0x229a03, - 0x3d2c85, - 0x214183, - 0x2b4ec9, - 0x361248, - 0x295bc7, - 0x38ef49, - 0x222606, - 0x3b5e08, - 0x393885, - 0x248f8a, - 0x3b0a49, - 0x2492c9, - 0x3d8287, - 0x2b5d49, - 0x214048, - 0x36a2c6, - 0x21b248, - 0x212187, - 0x26eb07, - 0x2a4287, - 0x2d1c48, - 0x3cd4c6, - 0x2a5485, - 0x27dd87, - 0x29a308, - 0x34c384, - 0x2fd284, - 0x294707, - 0x2b0707, - 0x308e4a, - 0x36a246, - 0x32f70a, - 0x2c3607, - 0x226147, - 0x20eb44, - 0x29d044, - 0x2d2706, - 0x36c404, - 0x36c40c, - 0x308d05, - 0x214e09, - 0x2b3644, - 0x2b6245, - 0x20ad88, - 0x293d45, - 0x38fe46, - 0x294244, - 0x2ad88a, + 0x2a090a, + 0x20f007, + 0x27f405, + 0x20df49, + 0x2c1b45, + 0x32b747, + 0x2329c4, + 0x297307, + 0x2f7e88, + 0x2d2406, + 0x2bb749, + 0x2bf08a, + 0x20ef86, + 0x29aac6, + 0x2aff45, + 0x39a185, + 0x31fa87, + 0x246d08, + 0x37ad08, + 0x225cc6, + 0x28e4c5, + 0x233dce, + 0x2bf744, + 0x29c605, + 0x27a1c9, + 0x2e6a48, + 0x28f8c6, + 0x29e2cc, + 0x29f350, + 0x2a22cf, + 0x2a3788, + 0x30ce07, + 0x3c2845, + 0x245505, + 0x245509, + 0x294309, + 0x316106, + 0x2d6047, + 0x2fcf45, + 0x237189, + 0x350f86, + 0x202c8d, + 0x2835c9, + 0x289f44, + 0x2bdac8, + 0x234889, + 0x35cd06, + 0x38cf45, + 0x370c46, + 0x278c89, + 0x212348, + 0x20b3c5, + 0x290104, + 0x29e48b, + 0x35cbc5, + 0x242e46, + 0x2861c6, + 0x32eb86, + 0x29524b, + 0x295909, + 0x209485, + 0x395547, + 0x3db446, + 0x3ae2c6, + 0x284cc8, + 0x22b1c9, + 0x2b534c, + 0x35f0c8, + 0x3118c6, + 0x33d5c3, + 0x2ff4c6, + 0x295085, + 0x281348, + 0x28dec6, + 0x2d2fc8, + 0x232105, + 0x29bc85, + 0x3d2a08, + 0x39d3c7, + 0x39cbc7, + 0x36d987, + 0x3134c8, + 0x358308, + 0x2d1bc6, + 0x2b7507, + 0x238507, + 0x294f4a, + 0x2292c3, + 0x327c86, + 0x22a005, + 0x245a84, + 0x27d389, + 0x2ee784, + 0x203c44, + 0x29fbc4, + 0x2a284b, + 0x325607, + 0x234005, + 0x298f88, + 0x27a846, + 0x27a848, + 0x27fd46, + 0x290045, + 0x290305, + 0x2920c6, + 0x293548, + 0x293e88, + 0x27d546, + 0x298dcf, + 0x29bfd0, + 0x3dc385, + 0x202e03, + 0x22c705, + 0x314b08, + 0x294209, + 0x397308, + 0x2d5e48, + 0x23aac8, + 0x3256c7, + 0x27a509, + 0x2d31c8, + 0x291204, + 0x29fa48, + 0x3baf09, + 0x2b87c7, + 0x2ad784, + 0x211508, + 0x29390a, + 0x2ddc86, + 0x2a2fc6, + 0x22d7c9, + 0x29f587, + 0x2cf488, + 0x2e21c8, + 0x209c08, + 0x249085, + 0x39af85, + 0x21b745, + 0x284f05, + 0x2b6007, + 0x2047c5, + 0x2c3045, + 0x2389c6, + 0x397247, + 0x2d7fc7, + 0x293c06, + 0x2d7885, + 0x242e46, + 0x2b9605, + 0x2bfb08, + 0x2fcec4, + 0x2c8906, + 0x323484, + 0x2be1c8, + 0x2c8a0a, + 0x27dccc, + 0x247f85, + 0x21b806, + 0x2b5506, + 0x3202c6, + 0x311944, + 0x39ca85, + 0x27ef87, + 0x29f609, + 0x2ce5c7, + 0x727544, + 0x727544, + 0x325485, + 0x216144, + 0x29dc8a, + 0x27a6c6, + 0x302644, + 0x3ce8c5, + 0x2b5a05, + 0x2b6d44, + 0x285e07, + 0x248987, + 0x2ce188, + 0x2c5508, + 0x20b3c9, + 0x31c548, + 0x29de4b, + 0x245644, + 0x3ae3c5, + 0x38c905, + 0x36d909, + 0x22b1c9, + 0x2d86c8, + 0x224b88, + 0x2dd504, + 0x288805, + 0x209ec3, + 0x3581c5, + 0x29b286, + 0x299e4c, + 0x211186, + 0x38ce46, + 0x28fb45, + 0x312988, + 0x30eb06, + 0x2d4046, + 0x2a2fc6, + 0x23d74c, + 0x38c9c4, + 0x34b10a, + 0x28fa88, + 0x299c87, + 0x273206, + 0x229e87, + 0x2f0145, + 0x22e7c6, + 0x366086, + 0x377e87, + 0x22ce84, + 0x2100c5, + 0x27a1c4, + 0x2e8407, + 0x27a408, + 0x27afca, + 0x283807, + 0x2ac947, + 0x30cd87, + 0x2e2709, + 0x299e4a, + 0x22c603, + 0x22cd85, + 0x213483, + 0x2b7809, + 0x3586c8, + 0x31c307, + 0x397409, + 0x220786, + 0x3296c8, + 0x3a3705, + 0x2517ca, + 0x328a49, + 0x24be09, + 0x3a1c47, + 0x3cfa89, + 0x213348, + 0x32f686, + 0x21b9c8, + 0x3c3e47, + 0x26e1c7, + 0x2a3547, + 0x2db108, + 0x2ff646, + 0x2936c5, + 0x27ef87, + 0x29a5c8, + 0x34af44, + 0x2cf0c4, + 0x294907, + 0x2b11c7, + 0x3026ca, + 0x32f606, + 0x37b28a, + 0x2c1f87, + 0x2bf507, + 0x210184, + 0x29cf84, + 0x2d2c86, + 0x3386c4, + 0x3386cc, + 0x302585, + 0x213fc9, + 0x23d0c4, + 0x2b6e05, + 0x3c6108, + 0x293f45, + 0x393146, + 0x294444, + 0x2ae3ca, + 0x31bfc6, + 0x24080a, + 0x32bac7, + 0x228985, + 0x22b885, + 0x24258a, + 0x339c05, + 0x2454c6, + 0x241884, 0x2b3e46, - 0x293a0a, - 0x3c5107, - 0x2d0145, - 0x229fc5, - 0x244a8a, - 0x293945, - 0x2a3c06, - 0x23eb84, - 0x2b33c6, - 0x34bb85, - 0x28c346, - 0x2f188c, - 0x26390a, - 0x26db44, - 0x22f846, - 0x2a0607, - 0x2d4a84, - 0x34d748, - 0x2e7f46, - 0x382709, - 0x2c20c9, - 0x348289, - 0x2cf246, - 0x212286, - 0x21b387, - 0x32db48, - 0x212089, - 0x32e407, - 0x298346, - 0x280047, - 0x2667c5, - 0x226384, - 0x21af47, - 0x306545, - 0x288b05, + 0x31fb45, + 0x28df86, + 0x2f1d8c, + 0x2d9bca, + 0x253744, + 0x231f06, + 0x29f587, + 0x2d59c4, + 0x23c508, + 0x2e5046, + 0x385309, + 0x2cbc49, + 0x2b3489, + 0x2ce8c6, + 0x3c3f46, + 0x21bb07, + 0x324d48, + 0x3c3d49, + 0x325607, + 0x299106, + 0x3b8cc7, + 0x26c105, + 0x2bf744, + 0x21b6c7, + 0x2386c5, + 0x289c45, 0x200cc7, - 0x22ed08, - 0x3a7646, - 0x29b14d, - 0x29c94f, - 0x2a1d8d, - 0x205484, - 0x233d06, - 0x2d9448, - 0x28ea45, - 0x2a3748, - 0x261e8a, - 0x219344, - 0x2b53c6, - 0x2d60c7, - 0x219cc7, - 0x2d8dc9, - 0x21b205, - 0x2b6184, - 0x2b864a, - 0x2c03c9, - 0x2b5e47, - 0x2f2dc6, - 0x35e486, - 0x289e86, - 0x380606, - 0x2d868f, - 0x2d9309, - 0x31d6c6, - 0x388c06, - 0x32d209, - 0x2b6a47, - 0x214703, - 0x243846, - 0x208a43, - 0x35bf08, - 0x27fe87, - 0x2a46c9, - 0x31ca88, - 0x3a4848, - 0x2ff3c6, - 0x210889, - 0x35b405, - 0x22cf84, - 0x3035c7, - 0x39b785, - 0x205484, - 0x231988, - 0x20f104, - 0x2b6787, - 0x36d146, - 0x269e45, - 0x2af148, - 0x35e34b, - 0x3102c7, - 0x244d06, - 0x2ca784, - 0x379a86, - 0x267c05, - 0x306545, - 0x2811c9, - 0x283f49, - 0x26eb44, - 0x26eb85, - 0x22f885, - 0x248e06, - 0x30fec8, - 0x2c29c6, - 0x3d340b, - 0x384fca, - 0x2bfc85, - 0x290086, - 0x246805, - 0x2db7c5, - 0x296307, - 0x340e88, - 0x236584, - 0x261a86, - 0x293d06, - 0x214207, - 0x31da04, - 0x27ee06, - 0x21f245, - 0x21f249, - 0x212484, - 0x2f3349, - 0x27bd06, - 0x2c51c8, - 0x22f885, - 0x382985, - 0x28c346, - 0x377189, - 0x220d49, - 0x389946, - 0x2d7788, - 0x2a60c8, - 0x2467c4, - 0x2b8ac4, - 0x2b8ac8, - 0x2e6288, - 0x236689, - 0x29af46, - 0x215146, - 0x33860d, - 0x31f2c6, - 0x3215c9, - 0x202945, - 0x208a86, - 0x27b288, - 0x334545, - 0x3063c4, - 0x267c05, - 0x283a88, - 0x29db09, - 0x2782c4, - 0x2b9b86, - 0x3071ca, - 0x305288, - 0x308fc9, - 0x268a0a, - 0x38eec6, - 0x29cb08, - 0x3c22c5, - 0x28d848, - 0x2f4145, - 0x2224c9, - 0x33a989, - 0x20fe02, - 0x292b85, - 0x271786, - 0x27bc47, - 0x322b85, - 0x2fb486, - 0x312c48, - 0x2c6506, - 0x2c1209, - 0x27a846, - 0x283088, - 0x389d05, - 0x3ddc06, - 0x2f74c8, - 0x282f08, - 0x361008, - 0x315708, - 0x205744, - 0x21f543, - 0x2c1444, - 0x2822c6, - 0x266804, - 0x317407, - 0x254909, - 0x2c9a45, - 0x230586, - 0x243846, - 0x2a8d8b, - 0x2b56c6, - 0x33fd06, - 0x2ccd48, - 0x229a46, - 0x2bd1c3, - 0x203e83, - 0x226384, - 0x22f1c5, - 0x2b7ac7, - 0x278448, - 0x27844f, - 0x27dc8b, - 0x30fcc8, - 0x2b9c06, - 0x30ffce, - 0x244ec3, - 0x2b7a44, - 0x2b5645, - 0x2b6006, - 0x290d8b, - 0x295706, - 0x227789, - 0x269e45, - 0x24e408, - 0x204d88, - 0x220c0c, - 0x2a2f46, - 0x3598c6, - 0x2dedc5, - 0x288ec8, - 0x27c485, - 0x351c88, - 0x29eb4a, - 0x2a21c9, - 0x602c84, + 0x339a08, + 0x3c9646, + 0x29b40d, + 0x29c88f, + 0x2a184d, + 0x208904, + 0x235f46, + 0x2d9f88, + 0x36b445, + 0x295108, + 0x26444a, + 0x289f44, + 0x2ed986, + 0x2d6b87, + 0x21af87, + 0x2cfa09, + 0x21b985, + 0x2b6d44, + 0x2b938a, + 0x2beb49, + 0x3cfb87, + 0x2eecc6, + 0x35cd06, + 0x288746, + 0x3835c6, + 0x2d988f, + 0x2d9e49, + 0x229c46, + 0x38c186, + 0x324409, + 0x2b7607, + 0x222b43, + 0x23d8c6, + 0x2060c3, + 0x35a848, + 0x2a9d87, + 0x2a3989, + 0x2eeec8, + 0x39cd08, + 0x23c006, + 0x2110c9, + 0x380845, + 0x273204, + 0x2f3c87, + 0x39ef45, + 0x208904, + 0x2340c8, + 0x20f2c4, + 0x2b7347, + 0x343646, + 0x281685, + 0x2c40c8, + 0x35cbcb, + 0x308a87, + 0x242806, + 0x2c9e44, + 0x326386, + 0x269dc5, + 0x2386c5, + 0x282909, + 0x285a09, + 0x26e204, + 0x26e245, + 0x231f45, + 0x251646, + 0x308688, + 0x2c1086, + 0x3dce4b, + 0x388c0a, + 0x2be105, + 0x290386, + 0x25cb45, + 0x2e1fc5, + 0x296ac7, + 0x327f08, + 0x265a84, + 0x264046, + 0x293f06, + 0x213507, + 0x316f84, + 0x280606, + 0x3ba7c5, + 0x3ba7c9, + 0x20d344, + 0x2f7249, + 0x27d546, + 0x2c3848, + 0x231f45, + 0x385585, + 0x28df86, + 0x2b5249, + 0x219049, + 0x38cec6, + 0x2e6b48, + 0x2a4d48, + 0x25cb04, + 0x2b9c44, + 0x2b9c48, + 0x32c488, + 0x265b89, + 0x29b206, + 0x2a2fc6, + 0x33cc0d, + 0x3dafc6, + 0x2b8ac9, + 0x3bb285, + 0x206106, + 0x209d88, + 0x336245, + 0x238544, + 0x269dc5, + 0x285548, + 0x29da49, + 0x27a284, + 0x2bb5c6, + 0x39104a, + 0x2ffbc8, + 0x302849, + 0x26ad8a, + 0x397386, + 0x29ca48, + 0x244d45, + 0x28fd08, + 0x2f01c5, + 0x220649, + 0x33ef89, + 0x210642, + 0x272c85, + 0x273a46, + 0x27d487, + 0x245a85, + 0x2f6146, + 0x30c0c8, + 0x371086, + 0x2c15c9, + 0x27c3c6, + 0x284b48, + 0x38d285, + 0x2fe046, + 0x330248, + 0x2849c8, + 0x2d3c88, + 0x30e488, + 0x208bc4, + 0x23b083, + 0x2c1804, + 0x283a06, + 0x26c144, + 0x310bc7, + 0x2d3f49, + 0x2c8c85, + 0x2e21c6, + 0x23d8c6, + 0x2a888b, + 0x2b67c6, + 0x363746, + 0x2cc7c8, + 0x23d386, + 0x228783, + 0x2077c3, + 0x2bf744, + 0x231885, + 0x2ba987, + 0x27a408, + 0x27a40f, + 0x27ee8b, + 0x308488, + 0x2bb646, + 0x30878e, + 0x232ac3, + 0x2ba904, + 0x2b6745, + 0x2b6bc6, + 0x29154b, + 0x296286, + 0x21c449, + 0x281685, + 0x24fc08, + 0x208208, + 0x218f0c, + 0x2a2886, + 0x358206, + 0x2e2e05, + 0x28a1c8, + 0x27dcc5, + 0x35bb48, + 0x29e64a, + 0x2a1c89, + 0x727544, 0x2000c2, - 0x4820c302, + 0x46a03102, 0x200382, - 0x224e44, - 0x206a42, - 0x303f84, - 0x205642, - 0xca43, + 0x221b84, + 0x205982, + 0x346484, + 0x208ac2, + 0x4783, 0x2003c2, - 0x209482, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x248343, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x20a803, - 0x216603, - 0x234c83, - 0x242244, - 0x22c0c3, - 0x235604, - 0x232c43, - 0x2db1c4, - 0x228b03, - 0x322e47, - 0x211543, - 0x20ca43, - 0x31b008, - 0x216603, - 0x280acb, - 0x2f55c3, - 0x240986, - 0x219f82, - 0x2eec0b, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x216603, - 0x221003, - 0x204383, + 0x202442, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x24af03, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x20ce83, + 0x23f7c3, + 0x232d43, + 0x250784, + 0x22f743, + 0x2375c4, + 0x234e83, + 0x2dbb04, + 0x224943, + 0x245d47, + 0x211d83, + 0x204783, + 0x314d88, + 0x23f7c3, + 0x29248b, + 0x2f0fc3, + 0x22a7c6, + 0x21a602, + 0x2eaa8b, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x23f7c3, + 0x203a83, + 0x207cc3, 0x2000c2, - 0x9fe08, - 0x397705, - 0x3065c8, - 0x2e2bc8, - 0x20c302, - 0x329085, - 0x3bfd47, + 0xa7c88, + 0x217285, + 0x238748, + 0x2f9448, + 0x203102, + 0x342585, + 0x3b8e07, 0x201bc2, - 0x2401c7, + 0x243307, 0x200382, - 0x254f47, - 0x2bd949, - 0x26c708, - 0x21d1c9, - 0x208582, - 0x3b04c7, - 0x3880c4, - 0x3bfe07, - 0x384ec7, - 0x259902, - 0x211543, - 0x205a02, - 0x205642, + 0x256d07, + 0x375509, + 0x2c93c8, + 0x209a89, + 0x20ba42, + 0x3bb387, + 0x2dc944, + 0x3b8ec7, + 0x388b07, + 0x25bd02, + 0x211d83, + 0x204fc2, + 0x208ac2, 0x2003c2, - 0x2161c2, + 0x204ac2, 0x200902, - 0x209482, - 0x2d6405, - 0x21bb85, - 0xc302, - 0x32c43, - 0x22c0c3, - 0x232c43, - 0x210b03, - 0x228b03, - 0x204f43, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x8083, + 0x202442, + 0x20a745, + 0x20f805, + 0x3102, + 0x34e83, + 0x22f743, + 0x234e83, + 0x211343, + 0x224943, + 0x2083c3, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x8d43, 0x101, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x214543, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x216e03, - 0x4b50bb86, - 0xe85c3, - 0xca9c5, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x82c2, - 0x9fe08, - 0x12cdc3, - 0xca43, - 0x6d9c3, - 0x42744, - 0x142a744, - 0xe50c5, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x214503, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x2158c3, + 0x49c27bc6, + 0x3c8c3, + 0xca085, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x203102, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x39c2, + 0xa7c88, + 0x123fc3, + 0x4783, + 0x71003, + 0x46cc4, + 0x1421004, + 0xe29c5, 0x2000c2, - 0x392104, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x241f43, - 0x22cd85, - 0x214543, - 0x20e403, - 0x20a803, - 0x24bbc3, - 0x216603, - 0x20c603, - 0x2422c3, - 0x205b03, + 0x395904, + 0x22f743, + 0x234e83, + 0x224943, + 0x250483, + 0x230145, + 0x214503, + 0x20e943, + 0x20ce83, + 0x22c483, + 0x23f7c3, + 0x202443, + 0x250803, + 0x2050c3, 0x5c2, - 0x2d7c2, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, + 0x28002, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, 0x2000c2, - 0x248343, - 0x20c302, - 0x232c43, - 0x228b03, - 0x224e44, - 0x20a803, - 0x216603, - 0x209482, - 0x9fe08, - 0x228b03, - 0x6d9c3, - 0x9fe08, - 0x6d9c3, - 0x26fb43, - 0x22c0c3, - 0x22fd84, - 0x232c43, - 0x228b03, - 0x203dc2, - 0x211543, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x203dc2, - 0x238cc3, - 0x20a803, - 0x216603, - 0x2ed343, - 0x20c603, + 0x24af03, + 0x203102, + 0x234e83, + 0x224943, + 0x221b84, + 0x20ce83, + 0x23f7c3, + 0x202442, + 0xa7c88, + 0x224943, + 0x71003, + 0xa7c88, + 0x71003, + 0x271803, + 0x22f743, + 0x232244, + 0x234e83, + 0x224943, + 0x203842, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x203842, + 0x225a83, + 0x20ce83, + 0x23f7c3, + 0x2e9343, + 0x202443, 0x2000c2, - 0x20c302, - 0x228b03, - 0x20a803, - 0x216603, - 0x240985, - 0x127206, - 0x242244, - 0x219f82, - 0x9fe08, + 0x203102, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x22a7c5, + 0x112406, + 0x250784, + 0x21a602, + 0xa7c88, 0x2000c2, - 0x12eb85, - 0x1c508, - 0x175583, - 0x20c302, - 0x4fd40486, - 0xd944, - 0x10a7cb, - 0x34786, - 0x11647, - 0x1b8dc9, - 0x232c43, - 0x47508, - 0x4750b, - 0x4798b, - 0x480cb, - 0x4840b, - 0x486cb, - 0x48b0b, - 0x7386, - 0x228b03, - 0x20005, - 0x2a44, - 0x20e943, - 0x115547, - 0xded04, - 0x6c144, - 0x20a803, - 0x189a46, - 0x194584, - 0x6d9c3, - 0x216603, - 0x2f61c4, - 0x12ea07, - 0x126e09, - 0x10a588, - 0x52c84, - 0x3e006, - 0x8148, - 0x130245, - 0x3fc9, - 0x2f783, - 0x12eb85, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20ca43, - 0x216603, - 0x2f55c3, - 0x219f82, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x214383, - 0x217b84, - 0x20a803, - 0xca43, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x2db1c4, - 0x228b03, - 0x20a803, - 0x216603, - 0x240986, - 0x232c43, - 0x228b03, - 0x3a183, - 0x6d9c3, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x12eb85, - 0x11647, - 0x7883, - 0x2f783, - 0x9fe08, - 0x228b03, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x5c743, - 0x20a803, - 0x216603, - 0x5322c0c3, - 0x232c43, - 0x20a803, - 0x216603, - 0x9fe08, + 0x129245, + 0x1cb88, + 0x133c43, + 0x203102, + 0x4e495d86, + 0xc284, + 0x10404b, + 0x369c6, + 0x11e87, + 0x234e83, + 0x4a308, + 0x4a30b, + 0x4a78b, + 0x4ac8b, + 0x4afcb, + 0x4b28b, + 0x4b6cb, + 0x1c6986, + 0x224943, + 0x34c5, + 0x128c44, + 0x20ff83, + 0x10e2c7, + 0xdf604, + 0x70144, + 0x20ce83, + 0x18cfc6, + 0xb40c4, + 0x71003, + 0x23f7c3, + 0x2f2484, + 0x125c07, + 0x112009, + 0x103e08, + 0x127304, + 0xfd986, + 0x7608, + 0x68c45, + 0x7909, + 0x31e43, + 0x129245, + 0x203102, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x204783, + 0x23f7c3, + 0x2f0fc3, + 0x21a602, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x214343, + 0x209c04, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x2dbb04, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x22a7c6, + 0x234e83, + 0x224943, + 0x3fc83, + 0x71003, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x129245, + 0x11e87, + 0x4b83, + 0x31e43, + 0xa7c88, + 0x224943, + 0x22f743, + 0x234e83, + 0x224943, + 0x5ee03, + 0x20ce83, + 0x23f7c3, + 0x51a2f743, + 0x234e83, + 0x20ce83, + 0x23f7c3, + 0xa7c88, 0x2000c2, - 0x20c302, - 0x22c0c3, - 0x228b03, - 0x20a803, + 0x203102, + 0x22f743, + 0x224943, + 0x20ce83, 0x2003c2, - 0x216603, - 0x33aec7, - 0x20f64b, - 0x20c003, - 0x278c08, - 0x32d8c7, - 0x32a1c6, - 0x20d0c5, - 0x3291c9, - 0x2112c8, - 0x37b649, - 0x3a1d90, - 0x37b64b, - 0x2e1b49, - 0x207883, - 0x2ef2c9, - 0x230a06, - 0x230a0c, - 0x3977c8, - 0x3d80c8, - 0x2bde09, - 0x2ba48e, - 0x2bd70b, - 0x2fff4c, - 0x225843, - 0x28768c, - 0x3ce3c9, - 0x308907, - 0x232b8c, - 0x2b18ca, - 0x249f84, - 0x30810d, - 0x287548, - 0x3cee4d, - 0x314846, - 0x24224b, - 0x326f89, - 0x388e87, - 0x369a86, - 0x373a89, - 0x2f790a, - 0x3dcf08, - 0x2f4c84, - 0x38e347, - 0x2417c7, - 0x345784, - 0x217304, - 0x344509, - 0x251789, - 0x28c008, - 0x2eda85, - 0x2084c5, - 0x204c46, - 0x307fc9, - 0x26210d, - 0x215348, - 0x204b47, - 0x20d148, - 0x263e46, - 0x237b84, - 0x285845, - 0x3c4c46, - 0x3c5d44, - 0x3ce2c7, - 0x3d558a, - 0x20ab44, - 0x213006, - 0x213cc9, - 0x213ccf, - 0x214b0d, - 0x215b86, - 0x21c110, - 0x21c506, - 0x21dac7, - 0x220607, - 0x22060f, + 0x23f7c3, + 0x33f4c7, + 0x2c5d4b, + 0x2171c3, + 0x315dc8, + 0x324ac7, + 0x206686, + 0x213a45, + 0x3426c9, + 0x211b08, + 0x37e609, + 0x3a5f50, + 0x37e60b, + 0x2e3949, + 0x204b83, + 0x2eb149, + 0x233646, + 0x23364c, + 0x217348, + 0x3d7e08, + 0x3759c9, + 0x2b828e, + 0x3752cb, + 0x32cecc, + 0x21c183, + 0x28764c, + 0x3c7709, + 0x302187, + 0x234dcc, + 0x2b238a, + 0x23d544, + 0x3b27cd, + 0x287508, + 0x35460d, + 0x30d5c6, + 0x25078b, + 0x312189, + 0x38c407, + 0x2fb986, + 0x3be009, + 0x32a88a, + 0x31a548, + 0x2f0bc4, + 0x391e47, + 0x23b747, + 0x330ac4, + 0x215dc4, + 0x331609, + 0x268309, + 0x28dc48, + 0x2ed2c5, + 0x20b985, + 0x2045c6, + 0x3b2689, + 0x2646cd, + 0x2f8208, + 0x2044c7, + 0x213ac8, + 0x23ae06, + 0x3a1344, + 0x284505, + 0x3c3c46, + 0x3c4d44, + 0x3c7607, + 0x3d030a, + 0x20d144, + 0x20eec6, + 0x212fc9, + 0x212fcf, + 0x213ccd, + 0x214886, + 0x21c790, + 0x21cb86, + 0x21d287, + 0x21e347, + 0x21e34f, + 0x21f549, + 0x223f06, + 0x224f07, + 0x224f08, + 0x226e89, + 0x3b9c48, + 0x3ac987, + 0x217283, + 0x22f5c6, + 0x3c5448, + 0x2b854a, + 0x387589, + 0x211c43, + 0x342486, + 0x263e8a, + 0x2ec387, + 0x301fca, + 0x366ece, + 0x21f686, + 0x30f8c7, + 0x22d3c6, + 0x243e86, + 0x39ad8b, + 0x216c8a, + 0x2c638d, + 0x3c4007, + 0x267788, + 0x267789, + 0x26778f, + 0x2ab00c, + 0x269509, + 0x2d368e, + 0x245e4a, + 0x228e06, + 0x3009c6, + 0x31b40c, + 0x31dc0c, + 0x337a48, + 0x35f9c7, + 0x237085, + 0x22adc4, + 0x32fa8e, + 0x264b44, + 0x320907, + 0x3d5d8a, + 0x22de54, + 0x22f00f, + 0x21e508, + 0x22f488, + 0x36174d, + 0x36174e, + 0x22f909, + 0x2309c8, + 0x2309cf, + 0x234acc, + 0x234acf, + 0x235c87, + 0x237eca, + 0x2467cb, + 0x2392c8, + 0x23b187, + 0x25e68d, + 0x32d486, + 0x3b2986, + 0x23e9c9, + 0x259788, + 0x243c88, + 0x243c8e, + 0x2c5e47, + 0x2f6645, + 0x246a85, + 0x20a544, + 0x206946, + 0x28db48, + 0x332f43, + 0x2f190e, + 0x25ea48, + 0x2a5ccb, + 0x2719c7, + 0x225b05, + 0x2877c6, + 0x2aeb87, + 0x3139c8, + 0x268a49, + 0x3cbc05, + 0x288d08, + 0x217b46, + 0x3a79ca, + 0x32f989, + 0x234e89, + 0x234e8b, + 0x33dd48, + 0x330989, + 0x2ed386, + 0x36baca, + 0x2b4aca, + 0x2380cc, + 0x3448c7, + 0x2c91ca, + 0x34a50b, + 0x34a519, + 0x323088, + 0x22a845, + 0x25e846, + 0x2167c9, + 0x2c98c6, + 0x387cca, + 0x211d06, + 0x2227c4, + 0x2cb1cd, + 0x331247, + 0x2227c9, + 0x249845, + 0x249a88, + 0x24a0c9, + 0x24bd44, + 0x24c9c7, + 0x24c9c8, + 0x24db87, + 0x266708, + 0x2529c7, + 0x338285, + 0x25928c, + 0x259989, + 0x2def0a, + 0x3ab249, + 0x2eb249, + 0x38bf4c, + 0x25c58b, + 0x25dbc8, + 0x25ef88, + 0x262984, + 0x286b48, + 0x287dc9, + 0x2b2447, + 0x213206, + 0x29fd87, + 0x291009, + 0x31f6cb, + 0x326207, + 0x390347, + 0x32bc07, + 0x354584, + 0x354585, + 0x2db805, + 0x3577cb, + 0x3b7bc4, + 0x34fa88, + 0x2f478a, + 0x217c07, + 0x3d7a47, + 0x290852, + 0x292a46, + 0x231b06, + 0x31fe4e, + 0x293286, + 0x2967c8, + 0x296e0f, + 0x3549c8, + 0x39b9c8, + 0x343b4a, + 0x343b51, + 0x2a48ce, + 0x20228a, + 0x20228c, + 0x230bc7, + 0x230bd0, + 0x3c1a48, + 0x2a4ac5, + 0x2af8ca, + 0x3c4d8c, + 0x29944d, + 0x3c1cc6, + 0x3c1cc7, + 0x3c1ccc, + 0x3ced4c, + 0x31540c, + 0x2b028b, + 0x38f704, + 0x22d944, + 0x2b1c49, + 0x341647, + 0x39ff49, + 0x2b4909, + 0x2b2047, + 0x2b2206, + 0x2b2209, + 0x2b2603, + 0x37118a, + 0x316987, + 0x36c5cb, + 0x2c620a, + 0x2dc9c4, + 0x37c586, + 0x283a89, + 0x338544, + 0x2f630a, + 0x242b05, + 0x2bfe85, + 0x2bfe8d, + 0x2c01ce, + 0x2c1945, + 0x33e186, + 0x22a3c7, + 0x25950a, + 0x2dafc6, + 0x2e8fc4, + 0x3b2b47, + 0x2cd98b, + 0x266407, + 0x24e444, + 0x310fc6, + 0x310fcd, + 0x2ddfcc, + 0x20cd46, + 0x2f840a, + 0x26ce06, + 0x230448, + 0x380b87, + 0x2bd50a, + 0x23ef46, + 0x203743, + 0x203746, + 0x3c52c8, + 0x2b1dca, + 0x287107, + 0x287108, + 0x2d3344, + 0x28fe87, + 0x2d6748, + 0x29bcc8, + 0x272788, + 0x2d1cca, + 0x2e1985, + 0x2e1c07, + 0x2566d3, + 0x26b306, + 0x376588, 0x221349, - 0x226486, - 0x226fc7, - 0x226fc8, - 0x227ac9, - 0x3a8b48, - 0x311007, - 0x20b383, - 0x22bf46, - 0x298fc8, - 0x2ba74a, - 0x2094c9, - 0x211403, - 0x328f86, - 0x2618ca, - 0x23a747, - 0x30874a, - 0x34018e, - 0x221486, - 0x318947, - 0x34f706, - 0x240d86, - 0x20748b, - 0x39710a, - 0x27630d, - 0x212347, - 0x265388, - 0x265389, - 0x26538f, - 0x30440c, - 0x263289, - 0x3d28ce, - 0x322f4a, - 0x3c2b46, - 0x2fdb86, - 0x31ef4c, - 0x32018c, - 0x322208, - 0x35a347, - 0x37c545, - 0x2297c4, - 0x36a6ce, - 0x262584, - 0x329687, - 0x39d78a, - 0x3d3b54, - 0x3d64cf, - 0x2207c8, - 0x22be08, - 0x3625cd, - 0x3625ce, - 0x22c289, - 0x22d408, - 0x22d40f, - 0x23288c, - 0x23288f, - 0x233a47, - 0x235f0a, - 0x23d64b, - 0x237788, - 0x238b87, - 0x25bfcd, - 0x330106, - 0x3082c6, - 0x23b289, - 0x3dbb88, - 0x240b88, - 0x240b8e, - 0x20f747, - 0x2fbb45, - 0x242505, - 0x207a84, - 0x32a486, - 0x28bf08, - 0x374883, - 0x2e16ce, - 0x25c388, - 0x2a704b, - 0x26fd07, - 0x26ae45, - 0x287806, - 0x2aeb47, - 0x31b4c8, - 0x34b8c9, - 0x3cc205, - 0x287c88, - 0x222e86, - 0x3a35ca, - 0x36a5c9, - 0x232c49, - 0x232c4b, - 0x339748, - 0x345649, - 0x2edb46, - 0x28f0ca, - 0x36764a, - 0x23610c, - 0x368807, - 0x26c50a, - 0x2e5b0b, - 0x2e5b19, - 0x324888, - 0x240a05, - 0x25c186, - 0x217d09, - 0x26cc06, - 0x236d8a, - 0x2114c6, - 0x20d644, - 0x2cbb0d, - 0x344147, - 0x20d649, - 0x244745, - 0x245148, - 0x2472c9, - 0x249204, - 0x249e87, - 0x249e88, - 0x24a2c7, - 0x264208, - 0x24ef47, - 0x36bfc5, - 0x256e4c, - 0x257309, - 0x2d908a, - 0x3a6609, - 0x2ef3c9, - 0x3889cc, - 0x25a18b, - 0x25ad08, - 0x25c8c8, - 0x260284, - 0x284fc8, - 0x286209, - 0x2b1987, - 0x213f06, - 0x2a0e07, - 0x29bc49, - 0x20624b, - 0x35cd07, - 0x216687, - 0x3c5247, - 0x3cedc4, - 0x3cedc5, - 0x2daec5, - 0x358e8b, - 0x3b40c4, - 0x326948, - 0x2f9a0a, - 0x222f47, - 0x3c8e87, - 0x290552, - 0x292586, - 0x22f446, - 0x28e40e, - 0x296b86, - 0x296008, - 0x29664f, - 0x3cf208, - 0x3b1148, - 0x34200a, - 0x342011, - 0x2a5c4e, - 0x2536ca, - 0x2536cc, - 0x22d607, - 0x22d610, - 0x3bee08, - 0x2a5e45, - 0x2aee4a, - 0x3c5d8c, - 0x29868d, - 0x3b0c46, - 0x3b0c47, - 0x3b0c4c, - 0x3bd2cc, - 0x36f70c, - 0x2c4c4b, - 0x38c184, - 0x2e5bc4, - 0x2b1189, - 0x34abc7, - 0x37d789, - 0x367489, - 0x2b1587, - 0x2b1746, - 0x2b1749, - 0x2b1b43, - 0x2c660a, - 0x373cc7, - 0x3c05cb, - 0x27618a, - 0x388144, - 0x32fd06, - 0x282349, - 0x36c284, - 0x2f480a, - 0x245005, - 0x2c16c5, - 0x2c16cd, - 0x2c1a0e, - 0x2c1585, - 0x339b86, - 0x240587, - 0x3db90a, - 0x2569c6, - 0x37c044, - 0x30ed87, - 0x2ee38b, - 0x263f07, - 0x24aac4, - 0x27a306, - 0x27a30d, - 0x2dd88c, - 0x20a6c6, - 0x21554a, - 0x229886, - 0x2147c8, - 0x35b747, - 0x2c93ca, - 0x23b006, - 0x212243, - 0x220286, - 0x298e48, - 0x22fb0a, - 0x2d2dc7, - 0x2d2dc8, - 0x25af84, - 0x290ac7, - 0x2d3288, - 0x292788, - 0x2f1b08, - 0x2b808a, - 0x2e2a45, - 0x2db407, - 0x253513, - 0x268f86, - 0x3dabc8, - 0x224609, - 0x240088, - 0x2ff44b, - 0x3a4bc8, - 0x2b92c4, - 0x21aac6, - 0x320906, - 0x31c309, - 0x2c9207, - 0x256f48, - 0x2a1c06, + 0x2431c8, + 0x23c08b, + 0x39d088, + 0x287cc4, + 0x3d2b06, + 0x319406, + 0x30e6c9, + 0x3d7fc7, + 0x259388, + 0x29be46, 0x200bc4, - 0x3a0e45, - 0x2cf888, + 0x3a5005, + 0x2cef08, 0x201d8a, - 0x2cb788, - 0x2d0846, - 0x29cd0a, - 0x26e708, - 0x2d4888, - 0x2d6288, - 0x2d6ac6, - 0x2d9646, - 0x3a60cc, - 0x2d9bd0, - 0x2ade05, - 0x3b6408, - 0x3b6410, - 0x3cf010, - 0x3a1c0e, - 0x3a5d4e, - 0x3a5d54, - 0x3ad7cf, - 0x3adb86, - 0x345851, - 0x343a93, - 0x343f08, - 0x369c05, - 0x27aa88, - 0x2097c5, - 0x329d8c, - 0x229189, - 0x229609, - 0x3dd547, - 0x340649, - 0x236947, - 0x35e746, - 0x285647, - 0x203885, - 0x2080c3, - 0x23a183, - 0x20fc44, - 0x30128d, - 0x34bc8f, + 0x2cae48, + 0x2d0246, + 0x29cc4a, + 0x28e8c8, + 0x2d57c8, + 0x2d6d48, + 0x2d7546, + 0x2da186, + 0x3aad0c, + 0x2da650, + 0x2a2c05, + 0x3547c8, + 0x3b48d0, + 0x3547d0, + 0x3a5dce, + 0x3aa98e, + 0x3aa994, + 0x3b164f, + 0x3b1a06, + 0x202151, + 0x330b93, + 0x331008, + 0x32efc5, + 0x316308, + 0x383a45, + 0x33580c, + 0x295f49, + 0x22ac09, + 0x2fa547, + 0x265e49, + 0x387887, + 0x35cfc6, + 0x284307, + 0x204005, + 0x208d83, + 0x23fc83, + 0x210484, + 0x34290d, + 0x34944f, 0x200c05, - 0x333a46, - 0x212887, - 0x397547, - 0x204206, - 0x20420b, - 0x2a6a85, - 0x258b46, - 0x305f87, - 0x24f449, - 0x2211c6, - 0x3855c5, - 0x3ba74b, - 0x3b0946, - 0x2137c5, - 0x23f088, - 0x291988, - 0x29f94c, - 0x29f950, - 0x2a2749, - 0x2b71c7, - 0x2b22cb, - 0x2c1f86, - 0x310eca, - 0x3da94b, - 0x30cc4a, - 0x2eca86, - 0x2ed205, - 0x32d7c6, - 0x286bc8, - 0x3dd60a, - 0x36225c, - 0x2f568c, - 0x2f5988, - 0x240985, - 0x38b9c7, - 0x2ba0c6, - 0x3b9505, - 0x218086, - 0x2043c8, - 0x2c0647, - 0x2ba388, - 0x26904a, - 0x3a978c, - 0x374b09, - 0x3a9a07, - 0x286744, - 0x2425c6, - 0x300b4a, - 0x367585, - 0x216f8c, - 0x21a0c8, - 0x2e4ac8, - 0x34ea0c, - 0x35a64c, - 0x387c89, - 0x387ec7, - 0x370b8c, - 0x222104, - 0x24a04a, - 0x30f80c, - 0x25038b, - 0x250a0b, - 0x253c46, - 0x256b07, - 0x22d847, - 0x22d84f, - 0x309cd1, - 0x2dfa92, - 0x257bcd, - 0x257bce, - 0x257f0e, - 0x3ad988, - 0x3ad992, - 0x260408, - 0x224c47, - 0x24d44a, - 0x2a95c8, - 0x296b45, - 0x2b484a, - 0x21c887, - 0x2e99c4, + 0x335706, + 0x212b07, + 0x2170c7, + 0x207b46, + 0x207b4b, + 0x2a5705, + 0x25af46, + 0x300847, + 0x252ec9, + 0x21fcc6, + 0x389205, + 0x36820b, + 0x3a8f06, + 0x207f45, + 0x241d88, + 0x292808, + 0x2a77cc, + 0x2a77d0, + 0x3524c9, + 0x2b2b47, + 0x34e14b, + 0x2e59c6, + 0x3ac84a, + 0x306a4b, + 0x2e85ca, + 0x2e8846, + 0x2e9205, + 0x3249c6, + 0x27c588, + 0x2fa60a, + 0x3613dc, + 0x2f108c, + 0x2f1388, + 0x22a7c5, + 0x38ef47, + 0x2b7ec6, + 0x367985, + 0x216b46, + 0x207d08, + 0x2bedc7, + 0x2b8188, + 0x26b3ca, + 0x212c0c, + 0x3331c9, + 0x2e2347, + 0x227784, + 0x246b46, + 0x39b54a, + 0x2b4a05, + 0x215a4c, + 0x219408, + 0x28eb48, + 0x227d4c, + 0x3d2c4c, + 0x2dc509, + 0x2dc747, + 0x35b44c, + 0x220284, + 0x24baca, + 0x309ccc, + 0x25204b, + 0x25450b, + 0x254c06, + 0x257c47, + 0x230e07, + 0x230e0f, + 0x303551, + 0x2e03d2, + 0x25a48d, + 0x25a48e, + 0x25a7ce, + 0x3b1808, + 0x3b1812, + 0x262b08, + 0x221987, + 0x250bca, + 0x2a86c8, + 0x293245, + 0x2b5e4a, + 0x21cf07, + 0x2e6804, 0x201783, - 0x235b45, - 0x342287, - 0x355047, - 0x29888e, - 0x3355cd, - 0x33c809, - 0x319c85, - 0x358243, - 0x34a646, - 0x259145, - 0x2a7288, - 0x21e489, - 0x25c1c5, - 0x25c1cf, - 0x2d2547, - 0x20cf45, - 0x2706ca, - 0x3c1586, - 0x245e09, - 0x37818c, - 0x3addc9, - 0x3d7046, - 0x2f980c, - 0x3390c6, - 0x307648, - 0x2e5a06, - 0x3645c6, - 0x2b5844, - 0x31c283, - 0x221a4a, - 0x3037d1, - 0x26344a, - 0x246685, - 0x25a5c7, - 0x254047, - 0x2d3384, - 0x2d338b, - 0x21d048, - 0x2bf146, - 0x2315c5, - 0x32b944, - 0x2410c9, + 0x237b05, + 0x343dc7, + 0x306547, + 0x29964e, + 0x31e1cd, + 0x3372c9, + 0x248405, + 0x356b83, + 0x34bf46, + 0x25b545, + 0x2a5f08, + 0x321b09, + 0x25e885, + 0x25e88f, + 0x2d9047, + 0x2138c5, + 0x27238a, + 0x3dc646, + 0x2f3f49, + 0x38200c, + 0x3cbd09, + 0x205b86, + 0x2f458c, + 0x33d6c6, + 0x3013c8, + 0x301cc6, + 0x340fc6, + 0x2b6944, + 0x315343, + 0x318f4a, + 0x32bf11, + 0x26c5ca, + 0x25c9c5, + 0x27e1c7, + 0x257107, + 0x2d6844, + 0x2d684b, + 0x209908, + 0x2bdbc6, + 0x233d05, + 0x322804, + 0x234449, 0x2008c4, - 0x20c3c7, - 0x34cf05, - 0x34cf07, - 0x28e645, - 0x247d03, - 0x224b08, - 0x27ac8a, - 0x24e4c3, - 0x39774a, - 0x36c746, - 0x25bf4f, - 0x3d2009, - 0x2e1650, - 0x2fcbc8, - 0x2d1689, - 0x29a087, - 0x27a28f, - 0x38f304, - 0x2db244, - 0x21c386, - 0x243206, - 0x2ed5ca, - 0x252f86, - 0x395207, - 0x311348, - 0x311547, - 0x312a07, - 0x314aca, - 0x31330b, - 0x251a45, - 0x2df6c8, - 0x20ae83, - 0x3bcd4c, - 0x37c2cf, - 0x3c0d8d, - 0x257747, - 0x33c949, - 0x2312c7, - 0x267e48, - 0x3d3d4c, - 0x2b91c8, - 0x246388, - 0x33104e, - 0x348c94, - 0x3491a4, - 0x35ff0a, - 0x37bccb, - 0x236a04, - 0x236a09, - 0x2b5448, - 0x242d05, - 0x37438a, - 0x285b07, - 0x322c44, - 0x248343, - 0x22c0c3, - 0x235604, - 0x232c43, - 0x228b03, - 0x224e44, - 0x214543, - 0x211543, - 0x2d9bc6, - 0x217b84, - 0x20a803, - 0x216603, - 0x216103, + 0x243ac7, + 0x349b05, + 0x349b07, + 0x320085, + 0x2535c3, + 0x221848, + 0x31650a, + 0x2172c3, + 0x2172ca, + 0x279006, + 0x25e60f, + 0x3d16c9, + 0x2f1890, + 0x2f7908, + 0x2d0749, + 0x29a347, + 0x310f4f, + 0x3977c4, + 0x2dbb84, + 0x21ca06, + 0x3ac686, + 0x2e7e8a, + 0x250346, + 0x398f87, + 0x30a7c8, + 0x30a9c7, + 0x30be87, + 0x30d84a, + 0x30c78b, + 0x32b1c5, + 0x2e0008, + 0x21b803, + 0x3c02cc, + 0x361acf, + 0x236e8d, + 0x257707, + 0x337409, + 0x22bac7, + 0x240b48, + 0x22e04c, + 0x287bc8, + 0x23ba88, + 0x328d4e, + 0x347494, + 0x3479a4, + 0x35e78a, + 0x37eacb, + 0x387944, + 0x387949, + 0x2eda08, + 0x247245, + 0x332a4a, + 0x291287, + 0x21f004, + 0x24af03, + 0x22f743, + 0x2375c4, + 0x234e83, + 0x224943, + 0x221b84, + 0x214503, + 0x211d83, + 0x2da646, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x214e03, 0x2000c2, - 0x248343, - 0x20c302, - 0x22c0c3, - 0x235604, - 0x232c43, - 0x228b03, - 0x214543, - 0x2d9bc6, - 0x20a803, - 0x216603, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x212483, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x217b84, - 0x20a803, - 0x216603, + 0x24af03, + 0x203102, + 0x22f743, + 0x2375c4, + 0x234e83, + 0x224943, + 0x214503, + 0x2da646, + 0x20ce83, + 0x23f7c3, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x20d343, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x209c04, + 0x20ce83, + 0x23f7c3, 0x2000c2, - 0x258783, - 0x20c302, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x204042, - 0x209382, - 0x20c302, - 0x22c0c3, - 0x207902, + 0x24e8c3, + 0x203102, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x207982, + 0x247502, + 0x203102, + 0x22f743, + 0x2037c2, 0x2005c2, - 0x224e44, - 0x303f84, - 0x22b302, - 0x217b84, + 0x221b84, + 0x346484, + 0x2254c2, + 0x209c04, 0x2003c2, - 0x216603, - 0x216103, - 0x253c46, - 0x20ff42, - 0x205402, - 0x225242, - 0x55a08683, - 0x55e2d603, - 0x54b86, - 0x54b86, - 0x242244, - 0x20ca43, - 0x14114d, - 0x8bd8a, - 0x1bc1cc, - 0x1b338c, - 0xca7cd, - 0x12eb85, - 0x8b50c, - 0x6bb47, - 0xbec6, - 0x15d08, - 0x1ae07, - 0x21ec8, - 0x19974a, - 0x10f087, - 0x56a8b745, - 0xdc1c9, - 0x56c344cb, - 0x920b, - 0x1846c8, - 0x14dd89, - 0x6828a, - 0xe56ce, - 0x7d4d, - 0x2c28d, - 0x143fe8b, - 0xdd74a, - 0xd944, - 0x58c86, - 0x1bd708, - 0x18a0c8, - 0x67607, - 0xa0c5, - 0xfdc7, - 0x330c9, - 0x16c307, - 0xe688, - 0x2b5c9, - 0x4a444, - 0x4d185, - 0x13fe4e, - 0x189d4d, - 0x114c8, - 0x57293106, - 0x57d72f88, - 0x74388, - 0x13b0d0, - 0x510cc, - 0x60fc7, - 0x62447, - 0x68607, - 0x71487, - 0x4c02, - 0x122587, - 0x1972cc, - 0xfe445, - 0x35147, - 0xa8946, - 0xaa289, - 0xac0c8, - 0x4742, + 0x23f7c3, + 0x214e03, + 0x254c06, + 0x210782, + 0x204cc2, + 0x222082, + 0x5421f943, + 0x54602283, + 0x57a46, + 0x57a46, + 0x250784, + 0x204783, + 0x8d9ca, + 0x14b54c, + 0x18840c, + 0xc9e8d, + 0x129245, + 0x8d14c, + 0x26807, + 0xd886, + 0x14a08, + 0x1b587, + 0x20048, + 0x19458a, + 0x109547, + 0x5528d385, + 0xdd949, + 0x3670b, + 0x1872cb, + 0x1c7a88, + 0x11f09, + 0x153a4a, + 0x17f08e, + 0x8f58d, + 0x1442fcb, + 0xdde8a, + 0xc284, + 0x5b086, + 0x12a3c8, + 0x18d648, + 0x39dc7, + 0xac85, + 0x10607, + 0x35309, + 0x1385c7, + 0xfcc8, + 0x229c9, + 0x48cc4, + 0x49945, + 0x16388e, + 0x18d2cd, + 0x11d08, + 0x556a1146, + 0x561669c8, + 0x772c8, + 0x13f6d0, + 0x5504c, + 0x636c7, + 0x64a07, + 0x6a8c7, + 0x73747, + 0x4582, + 0x113707, + 0x16e4c, + 0x17ba45, + 0x126bc7, + 0xa7686, + 0xa8c49, + 0xac2c8, + 0x5dc2, 0x5c2, - 0x18ce06, - 0x1ba00b, - 0x1ba306, - 0xbe384, - 0x1753c7, - 0xe3389, - 0x6dc89, - 0x1432c8, - 0x48902, - 0x191f89, - 0xbac8, - 0xe9a8a, - 0x38909, - 0x52946, - 0xce3c9, - 0xdd6c7, - 0xdde09, - 0xdef08, - 0xe0f87, - 0xe29c9, - 0xe8ec5, - 0xe9250, - 0x155886, - 0x175305, - 0x114587, - 0x3950d, - 0x3ef85, - 0xef1c6, - 0xef9c7, - 0xf61d8, - 0x11848, - 0xbe7ca, - 0xa982, - 0x507ca, - 0x6284d, - 0x2e42, - 0x13686, - 0x9d488, - 0xabe4a, - 0x45948, + 0x190b46, + 0x1a87cb, + 0x1a8ac6, + 0x175f44, + 0x133a87, 0x6d309, - 0x111788, - 0x7768e, - 0x6d548, - 0x14a647, - 0x58293044, - 0x14e70d, - 0x102f05, - 0x3148, - 0x42dc8, - 0x10c246, - 0x14302, - 0x92c04, - 0x62706, - 0x3e006, - 0x58532e4b, - 0x57c2, + 0x53889, + 0x120648, + 0x4b4c2, + 0x195789, + 0xd488, + 0xe7cca, + 0x12eac6, + 0xcd7c9, + 0xdde07, + 0xde549, + 0xdf8c8, + 0xe0887, + 0xe1909, + 0xe4485, + 0xe4810, + 0x1bb506, + 0x1339c5, + 0x930c7, + 0x6d84d, + 0x41c85, + 0xeb046, + 0xeb887, + 0xf2498, + 0x138948, + 0x17638a, + 0x129c2, + 0x542ca, + 0x64e0d, + 0x5c82, + 0x1c6b46, + 0x9d3c8, + 0x18fe88, + 0x70949, + 0x10b488, + 0x74e4e, + 0x70b88, + 0x14bf47, + 0x56766904, + 0xecd4d, + 0xfc9c5, + 0x1769c8, + 0x1ac248, + 0x105546, + 0x13602, + 0x72d04, + 0x64cc6, + 0xfd986, + 0x56934b0b, + 0x8c42, 0x401, - 0x81, - 0x5a947, - 0x8d9c3, - 0x576f67c4, - 0x57a973c3, + 0x5d807, + 0x10d203, + 0x55af2d04, + 0x55e98183, 0xc1, - 0x1a286, + 0x1cf0c6, 0xc1, 0x201, - 0x1a286, - 0x8d9c3, - 0x422c3, - 0x46e44, - 0x14947, - 0x5b07, - 0x153e145, - 0x4cec4, - 0x61107, - 0xc302, - 0x249f84, - 0x22c0c3, - 0x24b304, - 0x224e44, - 0x20a803, - 0x2244c5, - 0x216e03, - 0x236bc3, - 0x204185, - 0x205b03, - 0xdd43, - 0x5962c0c3, - 0x232c43, - 0x4b304, + 0x1cf0c6, + 0x10d203, + 0x50803, + 0x81b84, + 0x305c7, + 0x50c7, + 0x145d285, + 0x4ff04, + 0x63807, + 0x3102, + 0x23d544, + 0x22f743, + 0x24f044, + 0x221b84, + 0x20ce83, + 0x221205, + 0x2158c3, + 0x259703, + 0x207ac5, + 0x2050c3, + 0x6e83, + 0x57a2f743, + 0x234e83, + 0x4f044, 0x20c3, - 0x228b03, + 0x224943, 0x200181, - 0xe403, - 0x211543, - 0x303f84, - 0x217b84, - 0x20a803, - 0x4bbc3, - 0x216603, - 0x20c603, - 0x9fe08, + 0xe943, + 0x211d83, + 0x346484, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x202443, + 0xa7c88, 0x2000c2, - 0x248343, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x212483, + 0x24af03, + 0x203102, + 0x22f743, + 0x234e83, + 0x20d343, 0x2005c2, - 0x224e44, - 0x214543, - 0x211543, - 0x20a803, - 0x20ca43, - 0x216603, - 0x205b03, - 0x17c204, - 0x9fe08, - 0x103c87, - 0xc302, - 0x1a0dc5, - 0x5120f, - 0xd23c6, - 0x14470c8, - 0x11240e, - 0x5a631802, - 0x32ce48, - 0x28c4c6, - 0x24d046, - 0x30e787, - 0x5aa00c82, - 0x5afd1e88, - 0x21068a, - 0x260a48, + 0x221b84, + 0x214503, + 0x211d83, + 0x20ce83, + 0x204783, + 0x23f7c3, + 0x2050c3, + 0xa7c88, + 0x1daa47, + 0x3102, + 0x1a4f85, + 0x5518f, + 0xd8ec6, + 0x14441c8, + 0x10b88e, + 0x58a06dc2, + 0x324048, + 0x28e106, + 0x250086, + 0x305fc7, + 0x58e00c82, + 0x593d1548, + 0x210eca, + 0x263148, 0x200ac2, - 0x3c0409, - 0x251a87, - 0x213e86, - 0x224849, - 0x2db544, - 0x3c0306, - 0x2c7144, - 0x203584, - 0x2560c9, - 0x30f546, - 0x229cc5, - 0x264f45, - 0x22cac7, - 0x2c3887, - 0x2f53c4, - 0x35c0c6, - 0x2f9145, - 0x20e805, - 0x246745, - 0x2c4f47, - 0x26fb45, - 0x247749, - 0x329945, - 0x31b604, - 0x256907, - 0x33ed4e, - 0x343689, - 0x28e2c9, - 0x33de06, - 0x23ce88, - 0x3c208b, - 0x36828c, - 0x324046, - 0x2ffe07, - 0x2b34c5, - 0x21730a, - 0x28c109, + 0x3167c9, + 0x32b207, + 0x213186, + 0x221589, + 0x2e1d44, + 0x206586, + 0x2c5144, + 0x295a04, + 0x258c89, + 0x309a06, + 0x2270c5, + 0x267345, + 0x22fe87, + 0x2c2207, + 0x292c84, + 0x35aa06, + 0x2f3705, + 0x20fe45, + 0x25ca85, + 0x2b0587, + 0x271805, + 0x24a549, + 0x321605, + 0x313b04, + 0x2daf07, + 0x32e50e, + 0x36afc9, + 0x31fd09, + 0x344706, + 0x240288, + 0x244b0b, + 0x36950c, + 0x34d146, + 0x32cd87, + 0x2b3f45, + 0x215dca, + 0x28dd49, 0x2013c9, - 0x3d9f06, - 0x305d45, - 0x242885, - 0x355449, - 0x2468cb, - 0x2772c6, - 0x354546, - 0x204b44, - 0x239b06, - 0x2fbbc8, - 0x3bc0c6, - 0x2eb006, - 0x3cf9c8, - 0x3d6e47, - 0x3d9cc9, - 0x3de005, - 0x9fe08, - 0x3cc184, - 0x312f84, - 0x208345, - 0x346b09, - 0x222c07, - 0x222c0b, - 0x225a4a, - 0x2290c5, - 0x5b20b382, - 0x20ebc7, - 0x5b6293c8, - 0x328887, - 0x2dd185, - 0x347e8a, - 0xc302, - 0x2795cb, - 0x27deca, - 0x247bc6, - 0x2081c3, - 0x291f0d, - 0x3c084c, - 0x3c1acd, - 0x2304c5, - 0x27cb85, - 0x3748c7, - 0x207909, - 0x210586, - 0x252e05, - 0x2ec888, - 0x239a03, - 0x2e2ec8, - 0x239a08, - 0x2c8907, - 0x369588, - 0x3afa49, - 0x2fb787, - 0x20f1c7, - 0x33dfc8, - 0x29b484, - 0x29b487, - 0x314748, - 0x360586, - 0x3c3e4f, - 0x22a5c7, - 0x35bbc6, - 0x388005, - 0x2253c3, - 0x243c47, - 0x3874c3, - 0x24a686, - 0x24cdc6, - 0x24db06, - 0x294d45, - 0x264203, - 0x391c08, - 0x38a8c9, - 0x39a24b, - 0x24dc88, - 0x24ec05, - 0x24fe45, - 0x5bab12c2, - 0x285709, - 0x224ec7, - 0x258bc5, - 0x255fc7, - 0x257a86, - 0x3804c5, - 0x258f8b, - 0x25ad04, - 0x260605, - 0x260747, - 0x276c46, - 0x277085, - 0x2851c7, - 0x285cc7, - 0x2d0d84, - 0x28b30a, - 0x28cd48, - 0x3c2349, - 0x394785, - 0x32f406, - 0x2fbd8a, - 0x264e46, - 0x231047, - 0x26c88d, - 0x2a65c9, - 0x390885, - 0x36ac47, - 0x252788, - 0x2f7288, - 0x3a8d07, - 0x3affc6, - 0x2230c7, - 0x24b503, - 0x30f4c4, - 0x37dc05, - 0x3a5447, - 0x3ab0c9, - 0x26b7c8, - 0x230f45, - 0x2530c4, - 0x24de45, - 0x25ca8d, + 0x3d6746, + 0x300605, + 0x246e05, + 0x354009, + 0x25cc0b, + 0x3a9786, + 0x352886, + 0x2044c4, + 0x26de46, + 0x2f66c8, + 0x3ba3c6, + 0x2aa506, + 0x3ce108, + 0x3d4887, + 0x3d6509, + 0x3d9a85, + 0xa7c88, + 0x3cbb84, + 0x30c404, + 0x20b805, + 0x345409, + 0x220d87, + 0x220d8b, + 0x223b8a, + 0x2293c5, + 0x5960f7c2, + 0x2c60c7, + 0x59a2a9c8, + 0x3d6987, + 0x2c8445, + 0x34678a, + 0x3102, + 0x27b24b, + 0x27f0ca, + 0x24a9c6, + 0x207683, + 0x2aee0d, + 0x3ade4c, + 0x3dcb8d, + 0x232985, + 0x27bf05, + 0x332f87, + 0x20a3c9, + 0x210dc6, + 0x2501c5, + 0x2ea2c8, + 0x26dd43, + 0x2f9748, + 0x26dd48, + 0x2c71c7, + 0x36aac8, + 0x3adc49, + 0x2d0f07, + 0x2c58c7, + 0x25d108, + 0x29b744, + 0x29b747, + 0x30d4c8, + 0x35ee06, + 0x37c6cf, + 0x26d507, + 0x35a506, + 0x2dc885, + 0x222203, + 0x248b47, + 0x38b103, + 0x24e006, + 0x24fe06, + 0x251286, + 0x295605, + 0x266703, + 0x395408, + 0x38de49, + 0x39da0b, + 0x251408, + 0x252685, + 0x253d85, + 0x59eb1d82, + 0x2843c9, + 0x221c07, + 0x25afc5, + 0x258b87, + 0x25a346, + 0x383485, + 0x25b38b, + 0x25dbc4, + 0x262d05, + 0x262e47, + 0x279746, + 0x279b85, + 0x286d47, + 0x287947, + 0x2d7f44, + 0x28cf4a, + 0x28ed48, + 0x244dc9, + 0x36a0c5, + 0x2b42c6, + 0x2f688a, + 0x267246, + 0x22e407, + 0x2c954d, + 0x2a5249, + 0x36b2c5, + 0x321d07, + 0x32e908, + 0x330008, + 0x3491c7, + 0x367306, + 0x2195c7, + 0x24f243, + 0x309984, + 0x380f85, + 0x3aa087, + 0x3afcc9, + 0x226488, + 0x22e305, + 0x249204, + 0x25dd85, + 0x266acd, 0x200cc2, - 0x2b6606, - 0x2d7a86, - 0x301bca, - 0x3915c6, - 0x398245, - 0x2c7605, - 0x2c7607, - 0x3a340c, - 0x27420a, - 0x290206, - 0x21fb05, - 0x239946, - 0x290387, - 0x292d06, - 0x294c4c, - 0x224989, - 0x5be1a707, - 0x296a05, - 0x296a06, - 0x296e48, - 0x245785, - 0x2a6d05, - 0x2a7f48, - 0x2a814a, - 0x5c21efc2, - 0x5c606a02, - 0x3ac085, - 0x266803, - 0x23dc88, - 0x245f43, - 0x2a83c4, - 0x245f4b, - 0x368688, - 0x2b2788, - 0x5cae7489, - 0x2ad149, + 0x2b71c6, + 0x259b86, + 0x2f8d0a, + 0x394dc6, + 0x39b485, + 0x2c5605, + 0x2c5607, + 0x3a780c, + 0x27714a, + 0x290506, + 0x202fc5, + 0x26dc86, + 0x290687, + 0x292e86, + 0x29550c, + 0x2216c9, + 0x5a3cf547, + 0x2971c5, + 0x2971c6, + 0x297c08, + 0x2bcd85, + 0x2a5985, + 0x2a6c88, + 0x2a6e8a, + 0x5a67bc02, + 0x5aa05942, + 0x2fd185, + 0x26c143, + 0x22bf08, + 0x20bbc3, + 0x2a7104, + 0x2f408b, + 0x3ce688, + 0x31be08, + 0x5af26609, + 0x2ad349, 0x2adb06, - 0x2ae7c8, - 0x2ae9c9, - 0x2af346, - 0x2af4c5, - 0x244246, - 0x2afa09, - 0x2bf9c7, - 0x3ddac6, - 0x2dd507, - 0x2e77c7, - 0x208804, - 0x5ce11b49, - 0x3b9748, - 0x3d1d88, - 0x267747, - 0x2cb246, - 0x3c6b89, - 0x24d007, - 0x3b8fca, - 0x32f548, - 0x3bd087, - 0x3c1086, - 0x27d88a, - 0x241b88, - 0x2d7505, - 0x228345, - 0x3359c7, - 0x316049, - 0x31828b, - 0x354048, - 0x3299c9, - 0x24e087, - 0x2bae4c, - 0x2bb8cc, - 0x2bbbca, - 0x2bbe4c, - 0x2c6cc8, - 0x2c6ec8, - 0x2c70c4, - 0x2c8089, - 0x2c82c9, - 0x2c850a, - 0x2c8789, - 0x2c8ac7, - 0x3b4f4c, - 0x3c62c6, - 0x26c248, - 0x264f06, - 0x38ebc6, - 0x390787, - 0x39f348, - 0x32a68b, - 0x3da007, - 0x255d89, - 0x25a709, - 0x285907, - 0x2c7384, + 0x2ae808, + 0x2aea09, + 0x2afd86, + 0x2aff05, + 0x249346, + 0x2b0749, + 0x2ba387, + 0x2fdf06, + 0x21d0c7, + 0x36c987, + 0x21fac4, + 0x5b338c49, + 0x367bc8, + 0x3d1448, + 0x239f07, + 0x2ca906, + 0x204a09, + 0x250047, + 0x36744a, + 0x37b0c8, + 0x20cf87, + 0x20ed46, + 0x28c74a, + 0x2ff188, + 0x2e68c5, + 0x227385, + 0x355107, + 0x311c49, + 0x3179cb, + 0x36dec8, + 0x321689, + 0x251b47, + 0x2bc08c, + 0x2bc94c, + 0x2bcc4a, + 0x2bcecc, + 0x2c4cc8, + 0x2c4ec8, + 0x2c50c4, + 0x2c6949, + 0x2c6b89, + 0x2c6dca, + 0x2c7049, + 0x2c7387, + 0x3d6d4c, + 0x20d986, + 0x2c8f08, + 0x267306, + 0x3a35c6, + 0x36b1c7, + 0x36bd08, + 0x206b4b, + 0x3d6847, + 0x258949, + 0x27e309, + 0x2845c7, + 0x2c5384, 0x200fc7, - 0x2cfec6, - 0x20c7c6, - 0x215705, - 0x2ce588, - 0x340544, - 0x340546, - 0x2740cb, - 0x2c6909, - 0x31fc86, - 0x2eb209, - 0x208406, - 0x201f88, - 0x20e503, - 0x305ec5, - 0x21b649, - 0x21bec5, - 0x380d84, - 0x2755c6, - 0x2354c5, - 0x207f06, - 0x316887, - 0x34b4c6, - 0x22ab4b, - 0x28efc7, - 0x243946, - 0x272506, - 0x22cb86, - 0x2f5389, - 0x2b884a, - 0x2f9d45, - 0x22850d, - 0x2a8246, + 0x2fe8c6, + 0x20e3c6, + 0x2f85c5, + 0x3d8108, + 0x295e44, + 0x295e46, + 0x27700b, + 0x371489, 0x23aec6, - 0x2e1546, - 0x214745, - 0x2e9547, - 0x26b107, - 0x272c8e, - 0x211543, - 0x2cb209, - 0x374d89, - 0x22c807, - 0x269887, - 0x292905, - 0x36b7c5, - 0x5d34464f, - 0x2d18c7, - 0x2d1a88, - 0x2d1fc4, - 0x2d2286, - 0x5d642582, - 0x2d6d46, - 0x2d9bc6, - 0x374f4e, - 0x2e2d0a, - 0x3d2606, - 0x219b8a, - 0x3c18c9, - 0x23bd85, - 0x307b08, - 0x335886, - 0x2b1388, - 0x3dbd48, - 0x27b58b, - 0x30e885, - 0x26fbc8, - 0x3cfb0c, - 0x2dd047, - 0x24d386, - 0x3dd0c8, - 0x32a348, - 0x5da39242, - 0x208ccb, - 0x3de209, - 0x28bbc9, - 0x21b4c7, - 0x3ba588, - 0x5de07748, - 0x20df8b, - 0x343149, - 0x259e4d, - 0x31d7c8, - 0x27da88, - 0x5e201e02, - 0x3c75c4, - 0x5e62d7c2, - 0x3aba86, - 0x5ea06302, - 0x2f258a, - 0x2a6b86, - 0x26a908, - 0x3be5c8, - 0x3c0206, - 0x300306, - 0x2fc946, - 0x2a7205, - 0x237dc4, - 0x5efd3204, - 0x359686, - 0x2978c7, - 0x5f20bc07, - 0x389b0b, - 0x328a89, - 0x27cbca, - 0x220504, - 0x2c7748, - 0x3dd88d, - 0x2f3a89, - 0x2f3cc8, - 0x2f3f49, - 0x2f61c4, - 0x23d504, - 0x39ba85, - 0x275f4b, - 0x368606, - 0x3594c5, - 0x3cb449, - 0x35c188, - 0x2a4984, - 0x217489, - 0x306845, - 0x2c38c8, - 0x20f887, - 0x28e6c8, - 0x282546, - 0x3a8a07, - 0x2deac9, - 0x3ba8c9, - 0x213845, - 0x322ac5, - 0x5f61df02, - 0x31b3c4, - 0x230705, - 0x30e686, - 0x33cf45, - 0x2b7d87, - 0x2f2ec5, - 0x276c84, - 0x33dec6, - 0x252e87, - 0x251f86, - 0x3ac605, - 0x2098c8, - 0x28c6c5, - 0x20e387, - 0x21d889, - 0x2c6a4a, - 0x227cc7, - 0x227ccc, - 0x229c86, - 0x241d49, - 0x38c685, - 0x2456c8, - 0x202e43, - 0x2edb05, - 0x3a94c5, - 0x27c1c7, - 0x5fa01482, - 0x2ee787, - 0x2e8746, - 0x37fcc6, - 0x2ecbc6, - 0x32a286, - 0x239188, - 0x27abc5, - 0x35bc87, - 0x35bc8d, + 0x2aa709, + 0x20b8c6, + 0x201f88, + 0x20fb43, + 0x300785, + 0x21bdc9, + 0x221d85, + 0x353404, + 0x2785c6, + 0x237485, + 0x2553c6, + 0x310047, + 0x34a406, + 0x22c7cb, + 0x36b9c7, + 0x247c46, + 0x2dcd86, + 0x22ff46, + 0x292c49, + 0x2f200a, + 0x2bdec5, + 0x3a900d, + 0x2a6f86, + 0x2f4986, + 0x2f1786, + 0x2303c5, + 0x2e4b07, + 0x225dc7, + 0x275c0e, + 0x211d83, + 0x2ca8c9, + 0x333449, + 0x22fbc7, + 0x26bc07, + 0x2a0b85, + 0x22e8c5, + 0x5b73174f, + 0x2d0987, + 0x2d0b48, + 0x2d2284, + 0x2d2586, + 0x5ba46b02, + 0x2d77c6, + 0x2da646, + 0x33360e, + 0x2f958a, + 0x3d1cc6, + 0x21ae4a, + 0x3dc989, + 0x23e105, + 0x3b21c8, + 0x31e486, + 0x29e0c8, + 0x2fbb08, + 0x27ad0b, + 0x3060c5, + 0x271888, + 0x3ce24c, + 0x2c8307, + 0x250b06, + 0x2fa0c8, + 0x206808, + 0x5be4dc02, + 0x20634b, + 0x3d9c89, + 0x28d809, + 0x21bc47, + 0x3a8d48, + 0x5c39b048, + 0x20c8cb, + 0x3204c9, + 0x25c24d, + 0x320ec8, + 0x28c948, + 0x5c601e02, + 0x31fc44, + 0x5ca28002, + 0x3b1fc6, + 0x5ce06ec2, + 0x2ee48a, + 0x2a5806, + 0x26c9c8, + 0x3c11c8, + 0x255d06, + 0x32d286, + 0x2f7686, + 0x2a5e85, + 0x23a104, + 0x5d229a44, + 0x357fc6, + 0x298687, + 0x5d60d5c7, + 0x38d08b, + 0x3d6b89, + 0x27bf4a, + 0x2039c4, + 0x2c5748, + 0x2fdccd, + 0x2efb09, + 0x2efd48, + 0x2effc9, + 0x2f2484, + 0x246684, + 0x39f245, + 0x36988b, + 0x3ce606, + 0x357e05, + 0x2dc089, + 0x35aac8, + 0x229bc4, + 0x215f49, + 0x3d2685, + 0x2c2248, + 0x2c5f87, + 0x320108, + 0x283c86, + 0x3b9b07, + 0x2df3c9, + 0x368389, + 0x207fc5, + 0x2af585, + 0x5da0a202, + 0x3138c4, + 0x212e85, + 0x305ec6, + 0x312845, + 0x2bac47, + 0x2eedc5, + 0x21dd04, + 0x3447c6, + 0x250247, + 0x2331c6, + 0x318745, + 0x20b208, + 0x28e305, + 0x20e8c7, + 0x21f309, + 0x3715ca, + 0x226987, + 0x22698c, + 0x227086, + 0x23f649, + 0x3826c5, + 0x38fc08, + 0x225003, + 0x2ed345, + 0x2fe585, + 0x27da07, + 0x5de01482, + 0x2ea607, + 0x2e5b06, + 0x37e946, + 0x2e9086, + 0x206746, + 0x2fed88, + 0x316445, + 0x35a5c7, + 0x35a5cd, 0x201783, - 0x3c6785, - 0x270487, - 0x2eeac8, - 0x270045, - 0x216348, - 0x37d686, - 0x2dc387, - 0x2c9c05, - 0x30e906, - 0x392185, - 0x21034a, - 0x303406, - 0x26ef47, - 0x2c2fc5, - 0x308407, - 0x30ed04, - 0x380d06, - 0x307a45, - 0x397c4b, - 0x2cfd49, - 0x25888a, - 0x2138c8, - 0x38d108, - 0x30bd0c, - 0x30c747, - 0x30fac8, - 0x316608, - 0x3186c5, - 0x3562ca, - 0x358249, - 0x5fe03a42, - 0x206146, - 0x25c1c4, - 0x2f0e09, - 0x25b589, - 0x2712c7, - 0x31d0c7, - 0x367309, - 0x2b8288, - 0x2b828f, - 0x223ac6, - 0x2dbe8b, - 0x259485, - 0x259487, - 0x36c889, - 0x210086, - 0x217407, - 0x2dfe05, - 0x2303c4, - 0x35b606, - 0x222dc4, - 0x2f1347, - 0x321988, - 0x60305c48, - 0x306cc5, - 0x306e07, - 0x324a09, - 0x208a84, - 0x23eb48, - 0x607c2e88, - 0x2d3384, - 0x2ebdc8, - 0x369b44, - 0x34b6c9, - 0x214685, - 0x60a19f82, - 0x223b05, - 0x2e8045, - 0x36aa88, - 0x233887, - 0x60e008c2, - 0x3d3345, - 0x2d4706, - 0x23e306, - 0x31b388, - 0x3192c8, - 0x33cf06, - 0x34aa46, - 0x303d49, - 0x37fc06, - 0x20ff4b, - 0x32a105, - 0x2a9506, - 0x2f8548, - 0x34df46, - 0x313ec6, - 0x216a4a, - 0x2d64ca, - 0x24fb45, - 0x307487, - 0x2fb286, - 0x61217042, - 0x2705c7, - 0x2ff1c5, - 0x2fbd04, - 0x2fbd05, - 0x220406, - 0x272087, - 0x21c385, - 0x25b644, - 0x2e0cc8, - 0x313f85, - 0x3c8647, - 0x3d43c5, - 0x210285, - 0x2c4e84, - 0x2e3cc9, - 0x2f8f88, - 0x238546, - 0x2e9c46, - 0x27d5c6, - 0x6170c3c8, - 0x30c5c7, - 0x30c90d, - 0x30cecc, - 0x30d4c9, - 0x30d709, - 0x61b75ac2, - 0x3d1b43, + 0x20de45, + 0x272147, + 0x2ea948, + 0x271d05, + 0x215048, + 0x39fe46, + 0x2ddb07, + 0x2c8e45, + 0x306146, + 0x395985, + 0x210b8a, + 0x2f3ac6, + 0x26e607, + 0x2d0505, + 0x383d47, + 0x3b2ac4, + 0x353386, + 0x3b2105, + 0x2177cb, + 0x2fe749, + 0x24e9ca, + 0x208048, + 0x304588, + 0x313f4c, + 0x382c47, + 0x308288, + 0x309f88, + 0x30f645, + 0x354eca, + 0x356b89, + 0x5e202302, + 0x3c2a06, + 0x227bc4, + 0x2bd2c9, + 0x3050c9, + 0x2769c7, + 0x2ef507, + 0x2b4789, + 0x2d1ec8, + 0x2d1ecf, + 0x219fc6, + 0x2dd60b, + 0x25b885, + 0x25b887, + 0x3794c9, + 0x2108c6, + 0x215ec7, + 0x2e0745, + 0x232884, + 0x380a46, + 0x220f44, + 0x2b6587, + 0x2b8e88, + 0x5e700508, + 0x300c85, + 0x300dc7, + 0x323209, + 0x206104, + 0x241848, + 0x5ea696c8, + 0x2d6844, + 0x2e6308, + 0x2fba44, + 0x3299c9, + 0x3a9305, + 0x5ee1a602, + 0x21a005, + 0x2e5145, + 0x32fe48, + 0x235ac7, + 0x5f2008c2, + 0x229b85, + 0x2d5646, + 0x233306, + 0x313888, + 0x315108, + 0x312806, + 0x3414c6, + 0x3dab09, + 0x37e886, + 0x21078b, + 0x316705, + 0x2a8606, + 0x3be9c8, + 0x335b86, + 0x339f46, + 0x21550a, + 0x20a80a, + 0x25f505, + 0x391307, + 0x2f5f46, + 0x5f6038c2, + 0x272287, + 0x23be05, + 0x2f6804, + 0x2f6805, + 0x2038c6, + 0x274347, + 0x21ca05, + 0x20a984, + 0x2d29c8, + 0x33a005, + 0x3c8e07, + 0x3d36c5, + 0x210ac5, + 0x26f1c4, + 0x26f1c9, + 0x2f3548, + 0x23a886, + 0x3bad86, + 0x28c486, + 0x5fb056c8, + 0x3058c7, + 0x30670d, + 0x306f4c, + 0x307549, + 0x307789, + 0x5ff77902, + 0x3d1203, 0x2010c3, - 0x2cff85, - 0x3a554a, - 0x33cdc6, - 0x23fd45, - 0x317944, - 0x31794b, - 0x33280c, - 0x33310c, - 0x333415, - 0x3342cd, - 0x336e4f, - 0x337212, - 0x33768f, - 0x337a52, - 0x337ed3, - 0x33838d, - 0x33894d, - 0x338cce, - 0x33924e, - 0x33994c, - 0x339d0c, - 0x33a14b, - 0x33abce, - 0x33b4d2, - 0x33cb8c, - 0x33d2d0, - 0x34fdd2, - 0x350c0c, - 0x3512cd, - 0x35160c, - 0x3536d1, - 0x3546cd, - 0x356f0d, - 0x35750a, - 0x35778c, - 0x358c4c, - 0x3591cc, - 0x359d4c, - 0x35d4d3, - 0x35db50, - 0x35df50, - 0x35e8cd, - 0x35eecc, - 0x35fc49, - 0x3618cd, - 0x361c13, - 0x363251, - 0x363a53, - 0x36474f, - 0x364b0c, - 0x364e0f, - 0x3651cd, - 0x3657cf, - 0x365b90, - 0x36660e, - 0x36b18e, - 0x36cad0, - 0x36da4d, - 0x36e3ce, - 0x36e74c, - 0x36fa13, - 0x37180e, - 0x371e90, - 0x372291, - 0x3726cf, - 0x372a93, - 0x37564d, - 0x37598f, - 0x375d4e, - 0x3762d0, - 0x3766c9, - 0x378490, - 0x378a8f, - 0x37910f, - 0x3794d2, - 0x379c8e, - 0x37a68d, - 0x37b00d, - 0x37b34d, - 0x37c70d, - 0x37ca4d, - 0x37cd90, - 0x37d18b, - 0x37d9cc, - 0x37dd4c, - 0x37e34c, - 0x37e64e, - 0x38c7d0, - 0x38e512, - 0x38e98b, - 0x38f4ce, - 0x38f84e, - 0x3900ce, - 0x39054b, - 0x61f909d6, - 0x3912cd, - 0x391754, - 0x39244d, - 0x393ad5, - 0x39578d, - 0x39610f, - 0x3968cf, - 0x39a50f, - 0x39a8ce, - 0x39ae4d, - 0x39ca11, - 0x39eb0c, - 0x39ee0c, - 0x39f10b, - 0x39f54c, - 0x39fbcf, - 0x39ff92, - 0x3a088d, - 0x3a198c, - 0x3a244c, - 0x3a274d, - 0x3a2a8f, - 0x3a2e4e, - 0x3a520c, - 0x3a57cd, - 0x3a5b0b, - 0x3a63cc, - 0x3a6ccd, - 0x3a700e, - 0x3a7389, - 0x3a83d3, - 0x3aa18d, - 0x3aa88d, - 0x3aae8c, - 0x3ab30e, - 0x3ac78f, - 0x3acb4c, - 0x3ace4d, - 0x3ad18f, - 0x3ad54c, - 0x3ae3cc, - 0x3ae88c, - 0x3aeb8c, - 0x3af24d, - 0x3af592, - 0x3b164c, - 0x3b194c, - 0x3b1c51, - 0x3b208f, - 0x3b244f, - 0x3b2813, - 0x3b374e, - 0x3b3acf, - 0x3b3e8c, - 0x623b41ce, - 0x3b454f, - 0x3b4916, - 0x3b5452, - 0x3b7d4c, - 0x3bb14f, - 0x3bb7cd, - 0x3c76cf, - 0x3c7a8c, - 0x3c7d8d, - 0x3c80cd, - 0x3c988e, - 0x3ca3cc, - 0x3cd64c, - 0x3cd950, - 0x3d0ed1, - 0x3d130b, - 0x3d174c, - 0x3d1a4e, - 0x3d4811, - 0x3d4c4e, - 0x3d4fcd, - 0x3d854b, - 0x3d8e4f, - 0x3d9814, - 0x220482, - 0x220482, - 0x227dc3, - 0x220482, - 0x227dc3, - 0x220482, - 0x204142, - 0x244285, - 0x3d450c, - 0x220482, - 0x220482, - 0x204142, - 0x220482, - 0x2974c5, - 0x2c6a45, - 0x220482, - 0x220482, - 0x208342, - 0x2974c5, - 0x334a89, - 0x362f4c, - 0x220482, - 0x220482, - 0x220482, - 0x220482, - 0x244285, - 0x220482, - 0x220482, - 0x220482, - 0x220482, - 0x208342, - 0x334a89, - 0x220482, - 0x220482, - 0x220482, - 0x2c6a45, - 0x220482, - 0x2c6a45, - 0x362f4c, - 0x3d450c, - 0x248343, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x20a803, - 0x216603, - 0x62f0f647, - 0x1ce4cf, - 0x144208, - 0x6704, - 0xca43, - 0xcd248, - 0x5bc4, + 0x2fe985, + 0x3aa18a, + 0x341386, + 0x244545, + 0x311304, + 0x31130b, + 0x3344cc, + 0x334dcc, + 0x3350d5, + 0x335fcd, + 0x33b44f, + 0x33b812, + 0x33bc8f, + 0x33c052, + 0x33c4d3, + 0x33c98d, + 0x33cf4d, + 0x33d2ce, + 0x33d84e, + 0x33df4c, + 0x33e30c, + 0x33e74b, + 0x33f1ce, + 0x33fad2, + 0x34114c, + 0x341810, + 0x34d412, + 0x34e4cc, + 0x34eb8d, + 0x34eecc, + 0x3514d1, + 0x352a0d, + 0x35584d, + 0x355e4a, + 0x3560cc, + 0x35758c, + 0x357b0c, + 0x3588cc, + 0x35bd53, + 0x35c3d0, + 0x35c7d0, + 0x35d14d, + 0x35d74c, + 0x35e4c9, + 0x360a4d, + 0x360d93, + 0x362211, + 0x362a13, + 0x363ecf, + 0x36428c, + 0x36458f, + 0x36494d, + 0x364f4f, + 0x365310, + 0x365d8e, + 0x36d30e, + 0x36e510, + 0x36efcd, + 0x36f94e, + 0x36fccc, + 0x371853, + 0x3737ce, + 0x373e50, + 0x374251, + 0x37468f, + 0x374a53, + 0x37748d, + 0x3777cf, + 0x377b8e, + 0x378110, + 0x378509, + 0x379710, + 0x379d0f, + 0x37a38f, + 0x37a752, + 0x37ce4e, + 0x37d84d, + 0x37dfcd, + 0x37e30d, + 0x37f7cd, + 0x37fb0d, + 0x37fe50, + 0x38024b, + 0x380d4c, + 0x3810cc, + 0x3816cc, + 0x3819ce, + 0x390510, + 0x392012, + 0x39248b, + 0x3927ce, + 0x392b4e, + 0x3933ce, + 0x39384b, + 0x60393f56, + 0x394acd, + 0x394f54, + 0x395c4d, + 0x397995, + 0x39950d, + 0x399e8f, + 0x39a54f, + 0x39dccf, + 0x39e08e, + 0x39e60d, + 0x3a0491, + 0x3a2d8c, + 0x3a308c, + 0x3a338b, + 0x3a394c, + 0x3a3fcf, + 0x3a4392, + 0x3a4a4d, + 0x3a5b4c, + 0x3a684c, + 0x3a6b4d, + 0x3a6e8f, + 0x3a724e, + 0x3a9e4c, + 0x3aa40d, + 0x3aa74b, + 0x3ab00c, + 0x3ab90d, + 0x3abc4e, + 0x3abfc9, + 0x3ad753, + 0x3aed8d, + 0x3af48d, + 0x3afa8c, + 0x3aff0e, + 0x3b060f, + 0x3b09cc, + 0x3b0ccd, + 0x3b100f, + 0x3b13cc, + 0x3b2d0c, + 0x3b31cc, + 0x3b34cc, + 0x3b3b8d, + 0x3b3ed2, + 0x3b52cc, + 0x3b55cc, + 0x3b58d1, + 0x3b5d0f, + 0x3b60cf, + 0x3b6493, + 0x3b724e, + 0x3b75cf, + 0x3b798c, + 0x607b7cce, + 0x3b804f, + 0x3b8416, + 0x3b9f92, + 0x3bcc0c, + 0x3befcf, + 0x3bf64d, + 0x3c7e8f, + 0x3c824c, + 0x3c854d, + 0x3c888d, + 0x3c9f0e, + 0x3caa4c, + 0x3cd48c, + 0x3cd790, + 0x3d0591, + 0x3d09cb, + 0x3d0e0c, + 0x3d110e, + 0x3d3b11, + 0x3d3f4e, + 0x3d42cd, + 0x3d830b, + 0x3d8c0f, + 0x3d95d4, + 0x203942, + 0x203942, + 0x226a83, + 0x203942, + 0x226a83, + 0x203942, + 0x207a82, + 0x249385, + 0x3d380c, + 0x203942, + 0x203942, + 0x207a82, + 0x203942, + 0x298285, + 0x3715c5, + 0x203942, + 0x203942, + 0x209002, + 0x298285, + 0x336789, + 0x361f0c, + 0x203942, + 0x203942, + 0x203942, + 0x203942, + 0x249385, + 0x203942, + 0x203942, + 0x203942, + 0x203942, + 0x209002, + 0x336789, + 0x203942, + 0x203942, + 0x203942, + 0x3715c5, + 0x203942, + 0x3715c5, + 0x361f0c, + 0x3d380c, + 0x24af03, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x20ce83, + 0x23f7c3, + 0x61309b07, + 0x1c780f, + 0x131308, + 0x74f84, + 0x4783, + 0x1a2108, + 0x5184, 0x2000c2, - 0x6360c302, - 0x23e483, - 0x259844, + 0x61a03102, + 0x241183, + 0x2539c4, 0x2020c3, - 0x2d3b84, - 0x22f446, - 0x20b8c3, - 0x30b0c4, - 0x398685, - 0x211543, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x21de8a, - 0x253c46, - 0x38fbcc, - 0x9fe08, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x238cc3, - 0x2d9bc6, - 0x20a803, - 0x216603, - 0x216103, - 0x2f783, - 0xa9148, - 0x641c6005, - 0x453c7, - 0x12eb85, - 0x9349, - 0xc6c2, - 0x1b5fca, - 0x64f9e785, - 0x12eb85, - 0x6bb47, - 0x6d448, - 0x680e, - 0x894d2, - 0x173e0b, - 0x10f186, - 0x6528b745, - 0x6568b74c, - 0x8ec47, - 0x176c87, - 0x12650a, - 0x3a210, - 0xe7945, - 0x10a7cb, - 0x18a0c8, - 0x67607, - 0x11404b, - 0x330c9, - 0x44447, - 0x16c307, - 0x77507, - 0x346c6, - 0xe688, - 0x65c39346, - 0x45887, - 0x147786, - 0x189d4d, - 0xc78d0, - 0x66009802, - 0x114c8, - 0x67fd0, - 0x181a8c, - 0x6678b84d, - 0x59648, - 0x59acb, - 0x68e47, - 0x6e149, - 0x54c46, - 0x97048, - 0x33c2, - 0x198c0a, - 0x1cb807, - 0x35147, - 0xaa289, - 0xac0c8, - 0x20005, - 0x18ce06, - 0x1ba306, - 0x100d4e, - 0x240ce, - 0x14f5cf, - 0xe3389, - 0x6dc89, - 0x19878b, - 0xa318f, - 0x15090c, - 0xc010b, - 0xd8fc8, - 0x116e87, - 0x15f548, - 0x18e14b, - 0x194fcc, - 0x19bd8c, - 0x19f8cc, - 0xb08cd, - 0x1432c8, - 0xf10c2, - 0x191f89, - 0x45c88, - 0x19e10b, - 0xcb446, - 0xd408b, - 0x13b00b, - 0xdf54a, - 0xe1145, - 0xe9250, - 0xeba46, - 0x52286, - 0x175305, - 0x114587, - 0xd6fc8, - 0xef9c7, - 0xefc87, - 0x184907, - 0xc10c6, - 0x1ab8ca, - 0x9fc8a, - 0x13686, - 0xad44d, - 0x45948, - 0x111788, - 0x112009, - 0xb9545, - 0x1a214c, - 0xb0acb, - 0x1cab84, - 0x10c009, - 0x10c246, - 0x4a506, - 0x1bff46, - 0x5402, - 0x3e006, - 0xbe70b, - 0x118547, - 0x57c2, - 0xccc85, - 0x63444, + 0x2d4704, + 0x231b06, + 0x3c6f83, + 0x3cb504, + 0x25f205, + 0x211d83, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0x21d64a, + 0x254c06, + 0x392ecc, + 0xa7c88, + 0x203102, + 0x22f743, + 0x234e83, + 0x224943, + 0x225a83, + 0x2da646, + 0x20ce83, + 0x23f7c3, + 0x214e03, + 0x31e43, + 0xa8248, + 0x625bdb45, + 0x49d07, + 0x129245, + 0x187409, + 0xe2c2, + 0x1b448a, + 0x63383985, + 0x129245, + 0x26807, + 0x70a88, + 0x574e, + 0x8a7d2, + 0x116acb, + 0x109646, + 0x6368d385, + 0x63a8d38c, + 0x16b647, + 0xe747, + 0x14f64a, + 0x3dbd0, + 0x16cb05, + 0x10404b, + 0x18d648, + 0x39dc7, + 0x13a0cb, + 0x35309, + 0x49547, + 0x1385c7, + 0x1a99c7, + 0x36906, + 0xfcc8, + 0x64025786, + 0x18fdc7, + 0x146086, + 0x18d2cd, + 0x138e10, + 0x64469102, + 0x11d08, + 0x40cd0, + 0x18468c, + 0x64b8edcd, + 0x5ba48, + 0x5becb, + 0x6b1c7, + 0x17b589, + 0x57b06, + 0x97e08, + 0x5ce02, + 0x8268a, + 0x2c287, + 0x126bc7, + 0xa8c49, + 0xac2c8, + 0x34c5, + 0x190b46, + 0x1a8ac6, + 0xf0c4e, + 0x1b20e, + 0x2d28f, + 0x6d309, + 0x53889, + 0x8220b, + 0x94b4f, + 0xb0b0c, + 0xbb94b, + 0xdee48, + 0x110647, + 0x15ddc8, + 0x191c4b, + 0x198d4c, + 0x19f54c, + 0x1a3ccc, + 0xb138d, + 0x120648, + 0xea082, + 0x195789, + 0xf3dc8, + 0x1961cb, + 0xcab06, + 0xd4f4b, + 0x13f60b, + 0xdfe8a, + 0xe0a45, + 0xe4810, + 0xe5f86, + 0x129e06, + 0x1339c5, + 0x930c7, + 0xf7d08, + 0xeb887, + 0xebb47, + 0x1c7cc7, + 0xbf9c6, + 0x1b1e0a, + 0xa7b0a, + 0x1c6b46, + 0xab84d, + 0x18fe88, + 0x10b488, + 0xd6ec9, + 0xbaf85, + 0x1b030c, + 0xb158b, + 0x190d44, + 0x105309, + 0x105546, + 0x4ab06, + 0x1b9006, + 0x4cc2, + 0xfd986, + 0x1762cb, + 0x111e87, + 0x8c42, + 0xcc705, + 0x22f04, 0x101, - 0x50343, - 0x65a669c6, - 0x973c3, + 0x54283, + 0x63e6c306, + 0x98183, 0x382, - 0x2b704, + 0x22b04, 0xac2, - 0x42244, + 0x50784, 0x882, - 0x4c82, + 0x4602, 0x19c2, - 0x27682, - 0x4042, - 0x8b742, + 0x1c342, + 0x7982, + 0x8d382, 0xd42, - 0x8cac2, - 0x36182, - 0x59dc2, - 0x81c2, - 0x4cfc2, - 0x32c43, + 0x291c2, + 0x38142, + 0x24502, + 0x7682, + 0x50002, + 0x34e83, 0x942, 0x1bc2, - 0xc202, - 0x3d42, + 0x143c2, + 0x8142, 0x642, - 0x30ac2, - 0x4742, + 0x33702, + 0x5dc2, 0x1cc2, 0xf42, 0x5c2, - 0x14543, + 0x14503, 0x1742, - 0x2cc2, - 0x48902, - 0x4e082, - 0x3102, - 0x5f82, - 0x17002, - 0x1fc02, - 0x6a42, - 0x140d82, - 0x6bf42, - 0x9082, - 0xa803, + 0x51c2, + 0x4b4c2, + 0x51b42, + 0xe942, + 0x5542, + 0x65c2, + 0x30c2, + 0x5982, + 0x127e02, + 0x6ff42, + 0x3c9c2, + 0xce83, 0x602, - 0x39242, + 0x4dc02, 0x2f42, - 0x23242, - 0x137c5, - 0x8242, - 0x20082, - 0x3b1c3, + 0xdbc2, + 0x7f45, + 0x7702, + 0x3542, + 0x3e903, 0x682, - 0xa982, - 0x2e42, + 0x129c2, + 0x5c82, 0x1702, 0x1782, 0x8c2, - 0x14302, - 0x5402, - 0x7d45, - 0x66a04142, - 0x66f6d603, - 0x13583, - 0x67204142, - 0x13583, - 0x819c7, - 0x209e83, + 0x13602, + 0x4cc2, + 0xe745, + 0x64e07a82, + 0x652cc0c3, + 0x31643, + 0x65607a82, + 0x31643, + 0x83107, + 0x20b7c3, 0x2000c2, - 0x22c0c3, - 0x232c43, - 0x212483, + 0x22f743, + 0x234e83, + 0x20d343, 0x2005c3, - 0x238cc3, - 0x20a803, - 0x20ca43, - 0x216603, - 0x297403, - 0xfba85, - 0x8303, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x212483, - 0x211543, - 0x20a803, - 0x20ca43, - 0x6d9c3, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, + 0x225a83, + 0x20ce83, + 0x204783, + 0x23f7c3, + 0x2981c3, + 0xf6585, + 0xd103, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x20d343, + 0x211d83, + 0x20ce83, + 0x204783, + 0x71003, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, 0x200181, - 0x211543, - 0x20a803, - 0x24bbc3, - 0x216603, - 0xbef44, - 0x248343, - 0x22c0c3, - 0x232c43, - 0x20d083, - 0x212483, - 0x35c6c3, - 0x2042c3, - 0x2a6b43, - 0x20edc3, - 0x228b03, - 0x224e44, - 0x20a803, - 0x216603, - 0x205b03, - 0x345344, - 0x25cc83, - 0x25843, - 0x2287c3, - 0x32b808, - 0x27d8c4, + 0x211d83, + 0x20ce83, + 0x22c483, + 0x23f7c3, + 0x177384, + 0x24af03, + 0x22f743, + 0x234e83, + 0x211d03, + 0x20d343, + 0x35b003, + 0x207c03, + 0x2a57c3, + 0x228c43, + 0x224943, + 0x221b84, + 0x20ce83, + 0x23f7c3, + 0x2050c3, + 0x330684, + 0x22cf03, + 0x1c183, + 0x3c5243, + 0x3226c8, + 0x28c784, 0x20020a, - 0x31fa06, - 0x124804, - 0x38ad87, - 0x22090a, - 0x223989, - 0x3b2c87, - 0x3b588a, - 0x248343, - 0x3ac10b, - 0x3c28c9, - 0x2d3185, - 0x3ae6c7, - 0xc302, - 0x22c0c3, - 0x3c3187, - 0x26a3c5, - 0x2c7249, - 0x232c43, - 0x2bd546, - 0x2c5d83, - 0xcfe03, - 0x115f06, - 0x13f146, - 0xb847, - 0x21e686, - 0x2276c5, - 0x3de0c7, - 0x312847, - 0x69e28b03, - 0x350e47, - 0x3c0043, - 0x20a405, - 0x224e44, - 0x26f848, - 0x37a38c, - 0x2b2045, - 0x2a6746, - 0x3c3047, - 0x3a9ac7, - 0x243a87, - 0x24fc48, - 0x314f4f, - 0x223bc5, - 0x23e587, - 0x205147, - 0x2a850a, - 0x2ec6c9, - 0x31e445, - 0x320fca, - 0xbc7c6, - 0xb9a07, - 0x2c5e05, - 0x2ed104, - 0x3c0146, - 0xdd246, - 0x381d07, - 0x2f0fc7, - 0x369748, - 0x2188c5, - 0x26a2c6, - 0x25788, - 0x2eaf85, - 0xeb146, - 0x2311c5, - 0x28b084, - 0x306907, - 0x238fca, - 0x336408, - 0x36a346, - 0x38cc3, - 0x2e2a45, - 0x322406, - 0x3b5186, - 0x375206, - 0x211543, - 0x3a0b07, - 0x2050c5, - 0x20a803, - 0x2df80d, - 0x20ca43, - 0x369848, - 0x20fcc4, - 0x276f45, - 0x2a8406, - 0x394306, - 0x2a9407, - 0x259d07, - 0x28aa85, - 0x216603, - 0x31a207, - 0x316f89, - 0x26e2c9, - 0x2524ca, - 0x2091c2, - 0x20a3c4, - 0x302604, - 0x2ee247, - 0x2ee648, - 0x2f0889, - 0x3c6649, - 0x2f1507, - 0x101f49, - 0x21ee46, - 0xf4a86, - 0x2f61c4, - 0x22c50a, - 0x2fab08, - 0x2fc809, - 0x2fcdc6, - 0x2b6305, - 0x3362c8, - 0x2cb88a, - 0x24f1c3, - 0x3454c6, - 0x2f1607, - 0x31f785, - 0x3a4245, - 0x240a83, - 0x246484, - 0x228305, - 0x285dc7, - 0x2f90c5, - 0x2f6a46, - 0x11ba45, - 0x359a43, - 0x3d26c9, - 0x276d0c, - 0x2bb5cc, - 0x39e908, - 0x2a98c7, - 0x3085c8, - 0x108c07, - 0x30944a, - 0x309b0b, - 0x3c2a08, - 0x394408, - 0x3db806, - 0x27d485, - 0x33954a, - 0x36d645, - 0x219f82, - 0x2c9ac7, - 0x24d686, - 0x377b45, - 0x30adc9, - 0x27ae85, - 0x295b05, - 0x2f8249, - 0x322346, - 0x329788, - 0x267dc3, - 0x21e7c6, - 0x275506, - 0x318085, - 0x318089, - 0x2bc409, - 0x27d207, - 0x11abc4, - 0x31abc7, - 0x3c6549, - 0x220b05, - 0x37ec8, - 0x342dc5, - 0x28e1c5, - 0x383dc9, - 0x202542, - 0x3d2c04, + 0x23ac46, + 0x123004, + 0x38e307, + 0x21e64a, + 0x219e89, + 0x3b4307, + 0x3b894a, + 0x24af03, + 0x2fd20b, + 0x228b89, + 0x2d6645, + 0x3b3007, + 0x3102, + 0x22f743, + 0x224507, + 0x26e885, + 0x2c5249, + 0x234e83, + 0x375106, + 0x2c4683, + 0xe5b83, + 0x10ed86, + 0x1327c6, + 0x1c6f07, + 0x217d86, + 0x21c385, + 0x3d9b47, + 0x30bcc7, + 0x68224943, + 0x34e707, + 0x3b9103, + 0x20afc5, + 0x221b84, + 0x271508, + 0x37d54c, + 0x2b28c5, + 0x2a53c6, + 0x2243c7, + 0x2e2407, + 0x25f607, + 0x263b48, + 0x30dccf, + 0x21a0c5, + 0x241287, + 0x2085c7, + 0x2a724a, + 0x2ea109, + 0x319ac5, + 0x31b98a, + 0x148f06, + 0xbb447, + 0x2c4705, + 0x3926c4, + 0x255c46, + 0xc8506, + 0x384907, + 0x2e9f87, + 0x36ac88, + 0x218305, + 0x26e786, + 0x225c8, + 0x2aa485, + 0xaa646, + 0x22e585, + 0x26cd44, + 0x3d2747, + 0x2febca, + 0x248108, + 0x32f706, + 0x25a83, + 0x2e1985, + 0x320ac6, + 0x3d6f86, + 0x3338c6, + 0x211d83, + 0x3a4cc7, + 0x208545, + 0x20ce83, + 0x2e014d, + 0x204783, + 0x36ad88, + 0x210504, + 0x279a45, + 0x2a7146, + 0x3981c6, + 0x2a8507, + 0x25c107, + 0x28ba85, + 0x23f7c3, + 0x2e41c7, + 0x310749, + 0x37b709, + 0x32a04a, + 0x23cb02, + 0x20af84, + 0x39a444, + 0x2e9e47, + 0x2ea4c8, + 0x2ec7c9, + 0x20dd09, + 0x2ed507, + 0xfab89, + 0x34b446, + 0xf09c6, + 0x2f2484, + 0x2f2a8a, + 0x2f57c8, + 0x2f7549, + 0x2f7b06, + 0x2b6ec5, + 0x247fc8, + 0x2caf4a, + 0x252c43, + 0x330806, + 0x2ed607, + 0x2aa905, + 0x39c985, + 0x22a8c3, + 0x23bb84, + 0x227345, + 0x287a47, + 0x2f3685, + 0x2f1c46, + 0x1017c5, + 0x289e43, + 0x3d1d89, + 0x27980c, + 0x2b994c, + 0x2d4d48, + 0x2abdc7, + 0x301e48, + 0x102487, + 0x302cca, + 0x30338b, + 0x228cc8, + 0x3982c8, + 0x22a2c6, + 0x28c345, + 0x33db4a, + 0x2cc105, + 0x21a602, + 0x2c8d07, + 0x250e06, + 0x378e85, + 0x3cb209, + 0x2120c5, + 0x31c245, + 0x3be6c9, + 0x320a06, + 0x3c0148, + 0x269f83, + 0x208e06, + 0x278506, + 0x311a45, + 0x311a49, + 0x21de09, + 0x28c0c7, + 0x114944, + 0x314947, + 0x20dc09, + 0x21e845, + 0x3a208, + 0x348a05, + 0x2fb885, + 0x3869c9, + 0x202602, + 0x22cd04, 0x201e82, 0x201742, - 0x2e5285, - 0x324588, - 0x2b9485, - 0x2c8c83, - 0x2c8c85, - 0x2d6f43, - 0x2071c2, - 0x331d04, - 0x26e683, + 0x2fb305, + 0x322d88, + 0x2baec5, + 0x2c7543, + 0x2c7545, + 0x2d79c3, + 0x2075c2, + 0x3dba44, + 0x28e843, 0x200a82, - 0x3b8944, - 0x311943, - 0x212842, - 0x2b9503, - 0x213604, - 0x2fcf43, - 0x254ec4, - 0x204e82, - 0x216003, - 0x219c83, - 0x202602, - 0x293042, - 0x2bc249, - 0x20fa02, - 0x28a304, - 0x20d542, - 0x336144, - 0x21ee04, - 0x252b44, - 0x205402, - 0x23b4c2, - 0x387e43, - 0x298cc3, - 0x2614c4, - 0x28dcc4, - 0x2d0984, - 0x2f1784, - 0x31ad43, - 0x300b03, - 0x2bc744, - 0x31d9c4, - 0x31db06, - 0x20b582, - 0xc302, - 0x3ef83, - 0x20c302, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, + 0x3bd804, + 0x2e77c3, + 0x203b02, + 0x2baf43, + 0x2fe504, + 0x2f7c83, + 0x256c84, + 0x205fc2, + 0x214d03, + 0x21af43, + 0x2026c2, + 0x354282, + 0x21dc49, + 0x210242, + 0x28b304, + 0x205e02, + 0x247e44, + 0x34b404, + 0x32ecc4, + 0x204cc2, + 0x229f02, + 0x2dc6c3, + 0x303143, + 0x22e684, + 0x26a004, + 0x2d0384, + 0x2ed784, + 0x314ac3, + 0x245a43, + 0x348e84, + 0x316f44, + 0x317086, + 0x224682, + 0x3102, + 0x41c83, + 0x203102, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, 0x2000c2, - 0x248343, - 0x22c0c3, - 0x232c43, - 0x205e03, - 0x228b03, - 0x224e44, - 0x2bc504, - 0x217b84, - 0x20a803, - 0x216603, - 0x216103, - 0x2f8a84, - 0x32ce03, - 0x2aad03, - 0x37a944, - 0x342bc6, - 0x20e5c3, - 0x12eb85, - 0x176c87, - 0x2e4003, - 0x6b644548, - 0x2420c3, - 0x2b4103, - 0x20a443, - 0x238cc3, - 0x3afd05, - 0x1ae683, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x208243, - 0x22dcc3, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x214543, - 0x20a803, - 0x27f984, - 0x6d9c3, - 0x216603, - 0x2ba0c4, - 0x12eb85, - 0x2c2ac5, - 0x176c87, - 0x20c302, + 0x24af03, + 0x22f743, + 0x234e83, + 0x2053c3, + 0x224943, + 0x221b84, + 0x21df04, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x214e03, + 0x2f3044, + 0x324003, + 0x2a96c3, + 0x37db04, + 0x348806, + 0x20fc03, + 0x129245, + 0xe747, + 0x26f503, + 0x69a49648, + 0x250603, + 0x2b5943, + 0x20b003, + 0x225a83, + 0x3542c5, + 0x1b2fc3, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x207703, + 0x231283, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x214503, + 0x20ce83, + 0x281184, + 0x71003, + 0x23f7c3, + 0x2b7ec4, + 0x129245, + 0x2c1185, + 0xe747, + 0x203102, 0x201d02, 0x200382, - 0x205642, - 0xca43, + 0x208ac2, + 0x4783, 0x2003c2, 0x1244, - 0x22c0c3, - 0x235604, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x217b84, - 0x20a803, - 0xca43, - 0x216603, - 0x20c603, - 0x242244, - 0x9fe08, - 0x22c0c3, - 0x20ca43, - 0x8303, - 0x123ec4, - 0x249f84, - 0x9fe08, - 0x22c0c3, - 0x24b304, - 0x224e44, - 0x20ca43, + 0x22f743, + 0x2375c4, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x209c04, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0x202443, + 0x250784, + 0xa7c88, + 0x22f743, + 0x204783, + 0xd103, + 0x14cfc4, + 0x23d544, + 0xa7c88, + 0x22f743, + 0x24f044, + 0x221b84, + 0x204783, 0x201e02, - 0x6d9c3, - 0x216603, - 0x236bc3, - 0x46484, - 0x204185, - 0x219f82, - 0x2be683, - 0x2b49, - 0xddb86, - 0x142ec8, + 0x71003, + 0x23f7c3, + 0x259703, + 0x3bb84, + 0x207ac5, + 0x21a602, + 0x376243, + 0x127409, + 0xde2c6, + 0x148b08, 0x2000c2, - 0x9fe08, - 0x20c302, - 0x232c43, - 0x228b03, + 0xa7c88, + 0x203102, + 0x234e83, + 0x224943, 0x2005c2, - 0xca43, - 0x216603, - 0x5942, + 0x4783, + 0x23f7c3, + 0x4f02, 0x82, - 0xc2, - 0x1b5a47, - 0x13dc09, - 0x7be83, - 0x9fe08, - 0x27643, - 0x6ef26287, - 0x2c0c3, - 0x6048, - 0x32c43, - 0x28b03, - 0x3a086, - 0x14543, - 0x96448, - 0xc53c8, - 0x79046, - 0x11543, - 0xce788, - 0xb7e03, - 0x6f0e23c6, - 0xea185, - 0x32e47, - 0xa803, - 0x21803, - 0x16603, - 0xb142, - 0x17d48a, - 0x4e03, - 0xe5343, - 0xfe804, - 0x114d4b, - 0x115308, - 0x91482, - 0x1451207, - 0x153efc7, - 0x14c8d48, - 0x151d403, - 0x10044b, - 0x8582, - 0x12ea07, - 0x10cbc4, 0x2000c2, - 0x20c302, - 0x235604, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x238cc3, - 0x20a803, - 0x216603, - 0x2ba0c3, - 0x20c603, - 0x2f783, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, + 0x1b8b07, + 0x142149, + 0x7d6c3, + 0xa7c88, + 0x1c303, + 0x6d34f3c7, + 0x2f743, + 0x1c2908, + 0x234e83, + 0x224943, + 0x3fb86, + 0x214503, + 0x96c08, + 0xc3a48, + 0x116206, + 0x211d83, + 0xcdf88, + 0xbacc3, + 0x6d4e1306, + 0xe5285, + 0x35087, + 0xce83, + 0x444c3, + 0x3f7c3, + 0xda42, + 0x19fc4a, + 0x8283, + 0xfb3c3, + 0x2fca44, + 0x10dacb, + 0x10e088, + 0x91f82, + 0x1455187, + 0x152e787, + 0x14c7608, + 0x1515883, + 0x12708b, + 0xba42, + 0x125c07, + 0x1069c4, + 0x2000c2, + 0x203102, + 0x2375c4, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x225a83, + 0x20ce83, + 0x23f7c3, + 0x228743, + 0x202443, + 0x31e43, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, 0x602, - 0x8303, - 0x28b03, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x238cc3, - 0x20a803, - 0x216603, - 0x20ff42, + 0xd103, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x225a83, + 0x20ce83, + 0x23f7c3, + 0x210782, 0x2000c1, 0x2000c2, 0x200201, - 0x336f42, - 0x9fe08, - 0x21c105, + 0x33b542, + 0xa7c88, + 0x21c785, 0x200101, - 0x2c0c3, - 0x2fd84, + 0x2f743, + 0x32244, 0x2015c1, 0x200501, 0x2014c1, - 0x244202, - 0x3874c4, - 0x244203, + 0x249302, + 0x38b104, + 0x249303, 0x200041, 0x200801, 0x200181, 0x200701, - 0x2f6b87, - 0x380f4f, - 0x3cac46, + 0x3535c7, + 0x31e5cf, + 0x30eec6, 0x2004c1, - 0x323f06, + 0x34d006, 0x200bc1, 0x200581, - 0x3d878e, + 0x3d854e, 0x2003c1, - 0x216603, + 0x23f7c3, 0x200a81, - 0x2e3285, - 0x20b142, - 0x240985, + 0x22d185, + 0x20da42, + 0x22a7c5, 0x200401, 0x200741, 0x2007c1, - 0x219f82, + 0x21a602, 0x200081, - 0x205841, + 0x202d01, 0x201241, 0x2018c1, - 0x204981, - 0x4e9c9, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x216e03, - 0x22c0c3, - 0x228b03, - 0x913c8, - 0x211543, - 0x20a803, - 0x70e03, - 0x216603, - 0x14ecd48, - 0x8148, - 0x12eb85, - 0x9fe08, - 0xca43, - 0x12eb85, - 0x1da144, - 0x116c8, - 0x42744, - 0xc9345, - 0x4e9c9, - 0x14ecd4a, - 0x9fe08, - 0x6d9c3, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x225843, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x2db1c4, - 0x216603, - 0x25cf45, - 0x27ac84, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x206a42, - 0x20a803, - 0x216603, - 0xc603, - 0xa924a, - 0x119b84, - 0x121d46, - 0x248343, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x20a803, - 0x216603, - 0x20c302, - 0x22c0c3, - 0x230309, - 0x232c43, - 0x2ac809, - 0x228b03, - 0x211543, - 0x20a803, - 0x189a44, - 0xca43, - 0x216603, - 0x2f5fc8, - 0x23ad87, - 0x204185, - 0x1d1548, - 0x1b5a47, - 0xee8ca, - 0x6fe0b, - 0x124147, - 0x3cd48, - 0x1198a, - 0x1a348, - 0x13dc09, - 0x281c7, - 0x106707, - 0x140cc8, - 0x6048, - 0x3e84f, - 0x17c45, - 0x16687, - 0x3a086, - 0x3fc07, - 0x11e586, - 0x96448, - 0x9f546, - 0x129587, - 0x143489, - 0x1a4ec7, - 0x9be49, - 0xba9c9, - 0xc2846, - 0xc53c8, - 0xc3a05, - 0x7c70a, - 0xce788, - 0xb7e03, - 0xd7348, - 0x32e47, - 0x13e8c5, - 0x64910, - 0x21803, - 0x6d9c3, - 0x129407, - 0x231c5, - 0xeff88, - 0x65305, - 0xe5343, - 0x3308, - 0xb446, - 0x92289, - 0xaebc7, - 0x2e0b, - 0x6c1c4, - 0x10b8c4, - 0x114d4b, - 0x115308, - 0x115e07, - 0x12eb85, - 0x22c0c3, - 0x232c43, - 0x212483, - 0x216603, - 0x23bf03, - 0x228b03, - 0x6d9c3, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x1988cb, + 0x2086c1, + 0x52449, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x2158c3, + 0x22f743, + 0x224943, + 0x91ec8, + 0x211d83, + 0x20ce83, + 0x71283, + 0x23f7c3, + 0x14e8c08, + 0x7608, + 0x129245, + 0xa7c88, + 0x4783, + 0x129245, + 0x45344, + 0x40f88, + 0x46cc4, + 0xbd485, + 0x52449, + 0x14e8c0a, + 0xa7c88, + 0x71003, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x21c183, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x2dbb04, + 0x23f7c3, + 0x266f85, + 0x316504, + 0x22f743, + 0x234e83, + 0x224943, + 0x205982, + 0x20ce83, + 0x23f7c3, + 0x2443, + 0xa834a, + 0x113284, + 0x119f46, + 0x24af03, + 0x22f743, + 0x234e83, + 0x224943, + 0x20ce83, + 0x23f7c3, + 0x203102, + 0x22f743, + 0x2327c9, + 0x234e83, + 0x2aca09, + 0x224943, + 0x211d83, + 0x20ce83, + 0x18cfc4, + 0x4783, + 0x23f7c3, + 0x2f2288, + 0x230287, + 0x207ac5, + 0x1d0c08, + 0x1b8b07, + 0xea74a, + 0x71acb, + 0x14d247, + 0x40148, + 0x138a8a, + 0x1cf188, + 0x142149, + 0x27207, + 0x38887, + 0x127d48, + 0x1c2908, + 0x4154f, + 0x16705, + 0x190347, + 0x3fb86, + 0x44407, + 0x119c06, + 0x96c08, + 0x9f046, + 0x120807, + 0x121409, + 0x1c0607, + 0xb2689, + 0xbbc09, + 0xc0f06, + 0xc3a48, + 0xc2385, + 0x7ba8a, + 0xcdf88, + 0xbacc3, + 0xd8d08, + 0x35087, + 0x16c105, + 0x7f950, + 0x444c3, + 0x71003, + 0x121287, + 0x196c5, + 0xebe48, + 0x67705, + 0xfb3c3, + 0x176b88, + 0x1c67c6, + 0x1ae489, + 0xaec07, + 0x1276cb, + 0x701c4, + 0x104e04, + 0x10dacb, + 0x10e088, + 0x10ec87, + 0x129245, + 0x22f743, + 0x234e83, + 0x20d343, + 0x23f7c3, + 0x23f343, + 0x224943, + 0x71003, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x8234b, 0x2000c2, - 0x20c302, - 0x216603, - 0x9fe08, - 0x133d89, - 0xc302, + 0x203102, + 0x23f7c3, + 0xa7c88, + 0x3102, 0x2000c2, - 0x20c302, + 0x203102, 0x200382, 0x2005c2, - 0x206702, - 0x20a803, - 0x133a46, + 0x204802, + 0x20ce83, + 0x135706, 0x2003c2, - 0x46484, + 0x3bb84, 0x2000c2, - 0x248343, - 0x20c302, - 0x22c0c3, - 0x232c43, + 0x24af03, + 0x203102, + 0x22f743, + 0x234e83, 0x200382, - 0x228b03, - 0x214543, - 0x211543, - 0x217b84, - 0x20a803, - 0x213dc3, - 0xca43, - 0x216603, - 0x2fe804, - 0x205b03, - 0x228b03, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x20ca43, - 0x216603, - 0x3b8207, - 0x22c0c3, - 0x27c087, - 0x35f6c6, - 0x216b03, - 0x214403, - 0x228b03, - 0x204f43, - 0x224e44, - 0x300bc4, - 0x3187c6, - 0x218f83, - 0x20a803, - 0x216603, - 0x25cf45, - 0x34f1c4, - 0x326a03, - 0x276683, - 0x2c9ac7, - 0x20f805, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x211543, - 0x20a803, - 0x216603, - 0x14803, - 0x7970270c, - 0x50e87, - 0xbe846, - 0x114587, - 0x8f6c5, - 0x20be02, - 0x245a83, - 0x208b83, - 0x248343, - 0x7a22c0c3, - 0x207902, - 0x232c43, + 0x224943, + 0x214503, + 0x211d83, + 0x209c04, + 0x20ce83, + 0x2130c3, + 0x4783, + 0x23f7c3, + 0x2fca44, + 0x2050c3, + 0x224943, + 0x203102, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x204783, + 0x23f7c3, + 0x3bd0c7, + 0x22f743, + 0x27d8c7, + 0x35df46, + 0x20a8c3, + 0x2143c3, + 0x224943, + 0x2083c3, + 0x221b84, + 0x39b5c4, + 0x30f746, + 0x202143, + 0x20ce83, + 0x23f7c3, + 0x266f85, + 0x3283c4, + 0x34fb43, + 0x2c6703, + 0x2c8d07, + 0x2c5f05, + 0x22f743, + 0x234e83, + 0x224943, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x772fc18c, + 0x4ddc7, + 0xdd286, + 0x930c7, + 0x1a29c5, + 0x206c82, + 0x38ffc3, + 0x206203, + 0x24af03, + 0x77e2f743, + 0x2037c2, + 0x234e83, 0x2020c3, - 0x228b03, - 0x224e44, + 0x224943, + 0x221b84, 0x201143, - 0x223bc3, - 0x211543, - 0x217b84, - 0x7a612b02, - 0x20a803, - 0x216603, - 0x21d0c3, - 0x22ce03, - 0x20a883, - 0x20ff42, - 0x205b03, - 0x9fe08, - 0x228b03, - 0x8303, - 0x322c44, - 0x248343, - 0x20c302, - 0x22c0c3, - 0x235604, - 0x232c43, - 0x228b03, - 0x224e44, - 0x214543, - 0x246b84, - 0x303f84, - 0x2d9bc6, - 0x217b84, - 0x20a803, - 0x216603, - 0x216103, - 0x24d686, - 0x3494b, - 0x39346, - 0x396ca, - 0x11960a, - 0x9fe08, - 0x225744, - 0x7ba2c0c3, - 0x3db044, - 0x232c43, - 0x26e144, - 0x228b03, - 0x220383, - 0x211543, - 0x20a803, - 0x6d9c3, - 0x216603, - 0x47203, - 0x34b00b, - 0x3c840a, - 0x3dc60c, - 0xe27c8, + 0x21a0c3, + 0x211d83, + 0x209c04, + 0x78205682, + 0x20ce83, + 0x23f7c3, + 0x209983, + 0x222f03, + 0x20cf03, + 0x210782, + 0x2050c3, + 0xa7c88, + 0x224943, + 0xd103, + 0x21f004, + 0x24af03, + 0x203102, + 0x22f743, + 0x2375c4, + 0x234e83, + 0x224943, + 0x221b84, + 0x214503, + 0x3bac04, + 0x346484, + 0x2da646, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x214e03, + 0x250e06, + 0x36b8b, + 0x25786, + 0x6da0a, + 0x112d0a, + 0xa7c88, + 0x222584, + 0x7962f743, + 0x320c84, + 0x234e83, + 0x2d7004, + 0x224943, + 0x203843, + 0x211d83, + 0x20ce83, + 0x71003, + 0x23f7c3, + 0xa1c3, + 0x349f4b, + 0x3c8bca, + 0x3da28c, + 0xe1708, 0x2000c2, - 0x20c302, + 0x203102, 0x200382, - 0x22cd85, - 0x224e44, - 0x206a42, - 0x211543, - 0x303f84, - 0x205642, + 0x230145, + 0x221b84, + 0x205982, + 0x211d83, + 0x346484, + 0x208ac2, 0x2003c2, - 0x209482, - 0x20ff42, - 0x48343, - 0x9382, - 0x2c4009, - 0x364448, - 0x228989, - 0x208649, - 0x2181ca, - 0x22170a, - 0x203cc2, - 0x28cac2, - 0xc302, - 0x22c0c3, - 0x22ae02, - 0x23e746, - 0x378f82, + 0x202442, + 0x210782, + 0x4af03, + 0x47502, + 0x2be789, + 0x340e48, + 0x2247c9, + 0x21f909, + 0x2ab2ca, + 0x318c0a, + 0x214c42, + 0x2291c2, + 0x3102, + 0x22f743, + 0x22ca82, + 0x241446, + 0x37a202, 0x201682, - 0x27018e, - 0x21604e, - 0x27fc47, - 0x20a787, - 0x24b5c2, - 0x232c43, - 0x228b03, - 0x20d602, + 0x271e4e, + 0x214d4e, + 0x281447, + 0x20ce07, + 0x24f302, + 0x234e83, + 0x224943, + 0x207282, 0x2005c2, - 0x14383, - 0x23580f, - 0x23ea82, - 0x366f87, - 0x2b1bc7, - 0x354207, - 0x2b590c, - 0x2e09cc, - 0x3d0384, - 0x39b8ca, - 0x211902, - 0x24e082, - 0x2bce04, + 0x14343, + 0x2377cf, + 0x238902, + 0x2b4407, + 0x36e087, + 0x2b6a07, + 0x2d198c, + 0x2d26cc, + 0x21ecc4, + 0x39f08a, + 0x214c82, + 0x251b42, + 0x2bd784, 0x200702, - 0x2c4fc2, - 0x2e0c04, - 0x213ec2, - 0x203102, - 0xe403, - 0x29f5c7, - 0x238685, - 0x217002, - 0x23fb84, - 0x340d82, - 0x2e2548, - 0x20a803, - 0x377ec8, + 0x2b0602, + 0x2d2904, + 0x2131c2, + 0x20e942, + 0xe943, + 0x29f0c7, + 0x23a9c5, + 0x2065c2, + 0x244384, + 0x327e02, + 0x2e1488, + 0x20ce83, + 0x379208, 0x201fc2, - 0x3d0545, - 0x394d46, - 0x216603, - 0x208242, - 0x2f0ac7, - 0xb142, - 0x212ec5, - 0x301185, - 0x216442, - 0x2085c2, - 0x21cf0a, - 0x28a90a, - 0x287582, - 0x2a0cc4, - 0x205c42, - 0x20a288, - 0x205782, - 0x356708, - 0xf01, - 0x30ef47, - 0x310a49, - 0x212f42, - 0x316805, - 0x3b0205, - 0x21898b, - 0x318d4c, - 0x22a908, - 0x32e848, - 0x20b582, - 0x2a94c2, + 0x21ee85, + 0x398ac6, + 0x23f7c3, + 0x207702, + 0x2eca07, + 0xda42, + 0x3a4905, + 0x321185, + 0x205d02, + 0x20ba82, + 0x2097ca, + 0x28b90a, + 0x287542, + 0x29fc44, + 0x205202, + 0x20ae48, + 0x208c02, + 0x301148, + 0x309407, + 0x30a189, + 0x2e5d02, + 0x30ffc5, + 0x36d845, + 0x2183cb, + 0x30fccc, + 0x22c588, + 0x325a48, + 0x224682, + 0x2a85c2, 0x2000c2, - 0x9fe08, - 0x20c302, - 0x22c0c3, + 0xa7c88, + 0x203102, + 0x22f743, 0x200382, - 0x205642, - 0xca43, + 0x208ac2, + 0x4783, 0x2003c2, - 0x216603, - 0x209482, + 0x23f7c3, + 0x202442, 0x2000c2, - 0x12eb85, - 0x7ce0c302, - 0x7d628b03, - 0x20e403, - 0x206a42, - 0x20a803, - 0x3559c3, - 0x7da16603, - 0x2ed343, - 0x281ac6, - 0x160c603, - 0x12eb85, - 0x13390b, - 0x9fe08, - 0x7d27d6c8, - 0x7e407, - 0x6d247, - 0x175305, - 0x2a20d, - 0x39e82, - 0x115902, - 0xaa74a, - 0x8a747, - 0x27304, - 0x27343, - 0x1bffc4, - 0x7e204ec2, - 0x7e600ac2, - 0x7ea02282, - 0x7ee03342, - 0x7f209bc2, - 0x7f604042, - 0x176c87, - 0x7fa0c302, - 0x7fe2dac2, - 0x80221442, - 0x806081c2, - 0x216043, - 0x12704, - 0x236cc3, - 0x80a0c782, - 0x59648, - 0x80e076c2, - 0x4bc07, - 0x81200042, - 0x81600d82, - 0x81a00182, - 0x81e03dc2, - 0x82200f42, - 0x826005c2, - 0xd30c5, - 0x215183, - 0x36c284, - 0x82a00702, - 0x82e01882, - 0x83203c42, - 0x86ccb, - 0x83600c42, - 0x83e44502, - 0x84206a42, - 0x84606702, - 0x84a1d902, - 0x84e00bc2, - 0x85205a02, - 0x8566bf42, - 0x85a12b02, - 0x85e04f82, - 0x86205642, - 0x86636002, - 0x86a6f802, - 0x86e28c42, - 0x194584, - 0x217903, - 0x87200ec2, - 0x8760fc42, - 0x87a0ad82, - 0x87e006c2, - 0x882003c2, - 0x88600a82, - 0x198a47, - 0x88a16102, - 0x88e03d82, - 0x89209482, - 0x89616002, - 0x1a214c, - 0x89a47c82, - 0x89e22182, - 0x8a202682, - 0x8a617042, - 0x8aa00f02, - 0x8ae18342, - 0x8b205842, - 0x8b60b902, - 0x8ba75882, - 0x8be369c2, - 0x209382, + 0x129245, + 0x7aa03102, + 0x7b224943, + 0x20e943, + 0x205982, + 0x20ce83, + 0x3bb643, + 0x7b63f7c3, + 0x2e9343, + 0x283206, + 0x1602443, + 0x129245, + 0x1355cb, + 0xa7c88, + 0x7ae8c588, + 0x895c7, + 0x70887, + 0x1339c5, + 0x1e00d, + 0x3f982, + 0x10e682, + 0xa910a, + 0x8b747, + 0x1bfc4, + 0x1c003, + 0x1b9084, + 0x7be048c2, + 0x7c200ac2, + 0x7c603002, + 0x7ca04182, + 0x7ce09fc2, + 0x7d207982, + 0xe747, + 0x7d603102, + 0x7da31082, + 0x7de1f642, + 0x7e207682, + 0x214d43, + 0x12984, + 0x239043, + 0x7e60e382, + 0x5ba48, + 0x7ea02ec2, + 0x4f947, + 0x7ee00042, + 0x7f200d82, + 0x7f600182, + 0x7fa03842, + 0x7fe00f42, + 0x802005c2, + 0xd6585, + 0x24f543, + 0x338544, + 0x80600702, + 0x80a01882, + 0x80e04b42, + 0x7c68b, + 0x81200c42, + 0x81a49602, + 0x81e05982, + 0x82204802, + 0x8261f382, + 0x82a00bc2, + 0x82e04fc2, + 0x8326ff42, + 0x83605682, + 0x83a04bc2, + 0x83e08ac2, + 0x84216e02, + 0x8463d2c2, + 0x84a24a82, + 0xb40c4, + 0x2163c3, + 0x84e00ec2, + 0x85210482, + 0x85602f82, + 0x85a006c2, + 0x85e003c2, + 0x86200a82, + 0x824c7, + 0x86614e02, + 0x86a023c2, + 0x86e02442, + 0x87214d02, + 0x1b030c, + 0x87644d02, + 0x87a20302, + 0x87e02742, + 0x882038c2, + 0x88600f02, + 0x88a77dc2, + 0x88e02d02, + 0x8921c902, + 0x89678882, + 0x89a79482, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x17203, - 0x209382, + 0x15cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, - 0x83a01143, - 0x217203, - 0x3afd84, - 0x228886, - 0x2fd643, - 0x209382, + 0x215cc3, + 0x247502, + 0x81601143, + 0x215cc3, + 0x354344, + 0x2246c6, + 0x2f8f83, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x2bdd09, - 0x209382, - 0x39c403, - 0x2bacc3, - 0x36aa05, + 0x215cc3, + 0x3758c9, + 0x247502, + 0x3d31c3, + 0x2bbf03, + 0x32fdc5, 0x2020c3, 0x201143, - 0x217203, - 0x28f543, - 0x221a43, - 0x34d8c9, - 0x209382, + 0x215cc3, + 0x2a2c03, + 0x229143, + 0x23c689, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, + 0x215cc3, + 0x247502, 0x201143, - 0x217203, - 0x209382, - 0x209382, + 0x215cc3, + 0x247502, + 0x247502, 0x201143, - 0x217203, - 0x8c62c0c3, - 0x232c43, - 0x208883, - 0x211543, - 0x20a803, - 0xca43, - 0x216603, - 0x9fe08, - 0x20c302, - 0x22c0c3, - 0x20a803, - 0x216603, - 0xbdb82, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x8d0ebe82, - 0x211543, - 0x20a803, - 0xca43, - 0x216603, + 0x215cc3, + 0x8a22f743, + 0x234e83, + 0x21fb43, + 0x211d83, + 0x20ce83, + 0x4783, + 0x23f7c3, + 0xa7c88, + 0x203102, + 0x22f743, + 0x20ce83, + 0x23f7c3, + 0x22f743, + 0x234e83, + 0x224943, + 0x8ace63c2, + 0x211d83, + 0x20ce83, + 0x4783, + 0x23f7c3, 0x15c1, - 0x249f84, - 0x20c302, - 0x22c0c3, + 0x23d544, + 0x203102, + 0x22f743, 0x200983, - 0x232c43, - 0x24b304, - 0x212483, - 0x228b03, - 0x224e44, - 0x214543, - 0x211543, - 0x20a803, - 0x216603, - 0x236bc3, - 0x204185, - 0x221a43, - 0x205b03, - 0xca43, - 0x20c302, - 0x22c0c3, + 0x234e83, + 0x24f044, + 0x20d343, + 0x224943, + 0x221b84, + 0x214503, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x259703, + 0x207ac5, + 0x229143, + 0x2050c3, + 0x4783, + 0x203102, + 0x22f743, 0x201143, - 0x20a803, - 0x216603, + 0x20ce83, + 0x23f7c3, 0x2000c2, - 0x248343, - 0x9fe08, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x22f446, - 0x224e44, - 0x214543, - 0x217b84, - 0x20a803, - 0x216603, - 0x216103, - 0x22c0c3, - 0x232c43, - 0x20a803, - 0x216603, - 0x2d7c2, + 0x24af03, + 0xa7c88, + 0x22f743, + 0x234e83, + 0x224943, + 0x231b06, + 0x221b84, + 0x214503, + 0x209c04, + 0x20ce83, + 0x23f7c3, + 0x214e03, + 0x22f743, + 0x234e83, + 0x20ce83, + 0x23f7c3, + 0x28002, 0x1942, - 0x1458787, - 0x141347, - 0x22c0c3, - 0x39346, - 0x232c43, - 0x228b03, - 0xe7d46, - 0x20a803, - 0x216603, - 0x32b688, - 0x32e689, - 0x341509, - 0x34cd48, - 0x396f48, - 0x396f49, - 0x32370a, - 0x35f9ca, - 0x39278a, - 0x39914a, - 0x3c840a, - 0x3d5fcb, - 0x23d20d, - 0x367bcf, - 0x25b050, - 0x36144d, - 0x37e04c, - 0x398e8b, - 0x6d448, - 0xebcc8, - 0x92e85, - 0x1488147, - 0xccc85, + 0x144e8c7, + 0x56107, + 0x22f743, + 0x25786, + 0x234e83, + 0x224943, + 0xe2cc6, + 0x20ce83, + 0x23f7c3, + 0x322548, + 0x325889, + 0x342f49, + 0x34c4c8, + 0x39abc8, + 0x39abc9, + 0x31ac4a, + 0x35e24a, + 0x395f8a, + 0x39c18a, + 0x3c8bca, + 0x3d588b, + 0x24638d, + 0x368e4f, + 0x276490, + 0x3605cd, + 0x3813cc, + 0x39becb, + 0x70a88, + 0xe6208, + 0x166745, + 0x14891c7, + 0xcc705, 0x2000c2, - 0x20f645, - 0x20e3c3, - 0x9060c302, - 0x232c43, - 0x228b03, - 0x3d4007, - 0x20a443, - 0x211543, - 0x20a803, - 0x24bbc3, - 0x213dc3, - 0x209a83, - 0x20ca43, - 0x216603, - 0x253c46, - 0x219f82, - 0x205b03, - 0x9fe08, + 0x2c5d45, + 0x20e903, + 0x8e203102, + 0x234e83, + 0x224943, + 0x391807, + 0x20b003, + 0x211d83, + 0x20ce83, + 0x22c483, + 0x2130c3, + 0x20b3c3, + 0x204783, + 0x23f7c3, + 0x254c06, + 0x21a602, + 0x2050c3, + 0xa7c88, 0x2000c2, - 0x248343, - 0x20c302, - 0x22c0c3, - 0x232c43, - 0x228b03, - 0x224e44, - 0x211543, - 0x20a803, - 0x216603, - 0x20c603, - 0x141347, - 0x8582, - 0x2b44, - 0x15c87c6, + 0x24af03, + 0x203102, + 0x22f743, + 0x234e83, + 0x224943, + 0x221b84, + 0x211d83, + 0x20ce83, + 0x23f7c3, + 0x202443, + 0x56107, + 0xba42, + 0x127404, + 0x15c8f86, 0x2000c2, - 0x20c302, - 0x228b03, - 0x211543, - 0x216603, + 0x203102, + 0x224943, + 0x211d83, + 0x23f7c3, } // children is the list of nodes' children, the parent's wildcard bit and the @@ -9462,585 +9427,576 @@ var children = [...]uint32{ 0x40000000, 0x50000000, 0x60000000, - 0x17f85f8, - 0x17fc5fe, - 0x18005ff, - 0x1824600, - 0x1980609, - 0x1998660, - 0x19ac666, - 0x19c466b, - 0x19e4671, - 0x19fc679, - 0x1a1467f, - 0x1a2c685, - 0x1a3068b, - 0x1a5868c, - 0x1a5c696, - 0x1a74697, - 0x1a7869d, - 0x1a7c69e, - 0x1ab869f, - 0x1abc6ae, - 0x61ac46af, - 0x21acc6b1, - 0x1b146b3, - 0x1b186c5, - 0x1b3c6c6, + 0x1820602, + 0x1824608, + 0x1828609, + 0x184c60a, + 0x19a8613, + 0x19c066a, + 0x19d4670, + 0x19ec675, + 0x1a0c67b, + 0x1a24683, + 0x1a3c689, + 0x1a5468f, + 0x1a58695, + 0x1a80696, + 0x1a846a0, + 0x1a9c6a1, + 0x1aa06a7, + 0x1aa46a8, + 0x1ae06a9, + 0x1ae46b8, + 0x61aec6b9, + 0x21af46bb, + 0x1b3c6bd, 0x1b406cf, - 0x1b446d0, - 0x1b586d1, - 0x1b5c6d6, - 0x1b8c6d7, - 0x1ba86e3, - 0x1bd06ea, - 0x1be06f4, - 0x1be46f8, - 0x1c7c6f9, - 0x1c9071f, - 0x1ca4724, - 0x1cdc729, - 0x1cec737, - 0x1d0073b, - 0x1d18740, - 0x1dbc746, - 0x1fc076f, - 0x1fc47f0, - 0x20307f1, - 0x209c80c, - 0x20b4827, - 0x20c882d, - 0x20cc832, - 0x20d4833, - 0x20e8835, - 0x20ec83a, - 0x210883b, - 0x2158842, - 0x215c856, - 0x22160857, - 0x217c858, - 0x218085f, - 0x2184860, - 0x21a8861, - 0x21e886a, - 0x21ec87a, - 0x621f087b, - 0x220887c, - 0x222c882, - 0x223888b, - 0x224888e, - 0x22fc892, - 0x23008bf, - 0x223108c0, - 0x223148c4, - 0x2231c8c5, - 0x23748c7, - 0x23788dd, - 0x288c8de, - 0x2890a23, - 0x22938a24, - 0x2293ca4e, + 0x1b686d0, + 0x1b6c6da, + 0x1b706db, + 0x1b846dc, + 0x1b886e1, + 0x1bb86e2, + 0x1bd46ee, + 0x1bfc6f5, + 0x1c0c6ff, + 0x1c10703, + 0x1ca8704, + 0x1cbc72a, + 0x1cd072f, + 0x1d08734, + 0x1d18742, + 0x1d2c746, + 0x1d4474b, + 0x1de8751, + 0x1fec77a, + 0x1ff07fb, + 0x205c7fc, + 0x20c8817, + 0x20e0832, + 0x20f4838, + 0x20f883d, + 0x210083e, + 0x2114840, + 0x2118845, + 0x2134846, + 0x218484d, + 0x2188861, + 0x2218c862, + 0x21a8863, + 0x21ac86a, + 0x21b086b, + 0x21d486c, + 0x2214875, + 0x2218885, + 0x6221c886, + 0x2234887, + 0x225488d, + 0x2260895, + 0x2270898, + 0x232489c, + 0x23288c9, + 0x223388ca, + 0x2233c8ce, + 0x223448cf, + 0x239c8d1, + 0x23a08e7, + 0x28948e8, + 0x2293ca25, 0x22940a4f, - 0x2294ca50, - 0x22950a53, - 0x2295ca54, - 0x22960a57, + 0x22944a50, + 0x22950a51, + 0x22954a54, + 0x22960a55, 0x22964a58, 0x22968a59, 0x2296ca5a, 0x22970a5b, - 0x2297ca5c, - 0x22980a5f, - 0x2298ca60, - 0x22990a63, + 0x22974a5c, + 0x22980a5d, + 0x22984a60, + 0x22990a61, 0x22994a64, 0x22998a65, - 0x229a4a66, - 0x229a8a69, - 0x229b4a6a, - 0x229b8a6d, + 0x2299ca66, + 0x229a8a67, + 0x229aca6a, + 0x229b8a6b, 0x229bca6e, 0x229c0a6f, - 0x29c4a70, - 0x229c8a71, - 0x229d4a72, - 0x229d8a75, - 0x29dca76, + 0x229c4a70, + 0x29c8a71, + 0x229cca72, + 0x229d8a73, + 0x229dca76, 0x29e4a77, - 0x629f0a79, - 0x2a34a7c, - 0x22a54a8d, - 0x22a58a95, + 0x2a28a79, + 0x22a48a8a, + 0x22a4ca92, + 0x22a50a93, + 0x22a58a94, 0x22a5ca96, - 0x22a64a97, + 0x2a60a97, + 0x22a64a98, 0x22a68a99, - 0x2a6ca9a, - 0x22a70a9b, - 0x22a74a9c, - 0x22a78a9d, - 0x22a7ca9e, - 0x2a84a9f, - 0x2a8caa1, - 0x2a90aa3, - 0x2aacaa4, - 0x2ac4aab, - 0x2ac8ab1, - 0x2ad8ab2, - 0x2ae4ab6, - 0x2b18ab9, - 0x2b1cac6, - 0x2b34ac7, - 0x22b3cacd, - 0x22b40acf, - 0x22b48ad0, - 0x2c40ad2, - 0x22c44b10, - 0x2c4cb11, - 0x2c50b13, - 0x22c54b14, + 0x22a6ca9a, + 0x2a74a9b, + 0x2a78a9d, + 0x2a7ca9e, + 0x2a98a9f, + 0x2ab0aa6, + 0x2ab4aac, + 0x2ac4aad, + 0x2ad0ab1, + 0x2b04ab4, + 0x2b08ac1, + 0x2b20ac2, + 0x22b28ac8, + 0x22b2caca, + 0x22b34acb, + 0x2c24acd, + 0x22c28b09, + 0x2c30b0a, + 0x2c34b0c, + 0x22c38b0d, + 0x2c3cb0e, + 0x2c54b0f, 0x2c58b15, - 0x2c70b16, - 0x2c74b1c, - 0x2c78b1d, - 0x2c7cb1e, - 0x2c94b1f, - 0x2ca8b25, - 0x2cd0b2a, - 0x2cf0b34, - 0x2cf4b3c, - 0x62cf8b3d, - 0x2d2cb3e, - 0x2d30b4b, - 0x22d34b4c, - 0x2d38b4d, - 0x2d60b4e, - 0x2d64b58, - 0x2d88b59, + 0x2c5cb16, + 0x2c60b17, + 0x2c78b18, + 0x2c8cb1e, + 0x2cb4b23, + 0x2cd4b2d, + 0x2cd8b35, + 0x62cdcb36, + 0x2d10b37, + 0x2d14b44, + 0x22d18b45, + 0x2d1cb46, + 0x2d44b47, + 0x2d48b51, + 0x2d6cb52, + 0x2d70b5b, + 0x2d84b5c, + 0x2d88b61, 0x2d8cb62, - 0x2da0b63, - 0x2da4b68, - 0x2da8b69, - 0x2dc8b6a, - 0x2de4b72, - 0x2de8b79, - 0x22decb7a, - 0x2df0b7b, - 0x2df4b7c, - 0x2df8b7d, - 0x2e00b7e, - 0x2e14b80, - 0x2e18b85, - 0x2e1cb86, - 0x2e44b87, - 0x2e48b91, - 0x2ebcb92, - 0x2ec0baf, - 0x2ec4bb0, - 0x2ee4bb1, - 0x2ef8bb9, - 0x2f0cbbe, - 0x2f24bc3, - 0x2f40bc9, - 0x2f58bd0, - 0x2f5cbd6, - 0x2f74bd7, - 0x2f90bdd, - 0x2f94be4, - 0x2fb4be5, - 0x2fd4bed, - 0x2ff0bf5, - 0x3054bfc, - 0x3070c15, - 0x3080c1c, - 0x3084c20, - 0x309cc21, - 0x30e0c27, - 0x3160c38, - 0x3190c58, - 0x3194c64, - 0x31a0c65, - 0x31c0c68, - 0x31c4c70, - 0x31e8c71, - 0x31f0c7a, - 0x322cc7c, - 0x327cc8b, - 0x3280c9f, - 0x3284ca0, - 0x3354ca1, - 0x23358cd5, - 0x2335ccd6, - 0x3360cd7, - 0x23364cd8, - 0x23368cd9, - 0x336ccda, - 0x23370cdb, - 0x23380cdc, - 0x23384ce0, - 0x23388ce1, - 0x2338cce2, - 0x23390ce3, - 0x33a8ce4, - 0x33cccea, - 0x33eccf3, - 0x3a58cfb, - 0x3a64e96, - 0x3a84e99, - 0x3c44ea1, - 0x3d14f11, - 0x3d84f45, - 0x3ddcf61, - 0x3ec4f77, - 0x3f1cfb1, - 0x3f58fc7, - 0x4054fd6, - 0x4121015, - 0x41b9048, - 0x424906e, - 0x42ad092, - 0x44e50ab, - 0x459d139, - 0x4669167, - 0x46b519a, - 0x473d1ad, - 0x47791cf, - 0x47c91de, - 0x48411f2, - 0x64845210, - 0x64849211, - 0x6484d212, - 0x48c9213, - 0x4925232, - 0x49a1249, - 0x4a19268, - 0x4a99286, - 0x4b052a6, - 0x4c312c1, - 0x4c8930c, - 0x64c8d322, - 0x4d25323, - 0x4d2d349, - 0x24d3134b, - 0x4db934c, - 0x4e0536e, - 0x4e6d381, - 0x4f1539b, - 0x4fdd3c5, - 0x50453f7, - 0x5159411, - 0x6515d456, - 0x65161457, - 0x51bd458, - 0x521946f, - 0x52a9486, - 0x53254aa, - 0x53694c9, - 0x544d4da, - 0x5481513, - 0x54e1520, - 0x5555538, - 0x55dd555, - 0x561d577, - 0x568d587, - 0x656915a3, - 0x56b95a4, - 0x56bd5ae, - 0x56d55af, - 0x56f15b5, - 0x57355bc, - 0x57455cd, - 0x575d5d1, - 0x57d55d7, - 0x57dd5f5, - 0x57f95f7, - 0x580d5fe, - 0x5829603, - 0x585560a, - 0x5859615, - 0x5861616, - 0x5875618, - 0x589561d, - 0x58a5625, - 0x58b1629, - 0x58ed62c, - 0x58f563b, - 0x590963d, - 0x592d642, - 0x593964b, - 0x594164e, - 0x5965650, - 0x5989659, - 0x59a1662, - 0x59a5668, - 0x59ad669, - 0x59b166b, - 0x5a5166c, - 0x5a55694, - 0x5a59695, - 0x5a5d696, - 0x5a81697, - 0x5aa56a0, - 0x5ac16a9, - 0x5ad56b0, - 0x5ae96b5, - 0x5af16ba, - 0x5af96bc, - 0x5b016be, - 0x5b196c0, - 0x5b296c6, - 0x5b2d6ca, - 0x5b496cb, - 0x63d16d2, - 0x64098f4, - 0x6435902, - 0x645190d, - 0x6471914, - 0x649191c, - 0x64d5924, - 0x64dd935, - 0x264e1937, - 0x264e5938, - 0x64ed939, - 0x66c593b, - 0x266c99b1, - 0x66cd9b2, - 0x266dd9b3, - 0x266e59b7, - 0x266f19b9, - 0x66f59bc, - 0x266fd9bd, - 0x67059bf, - 0x67159c1, - 0x673d9c5, - 0x67799cf, - 0x677d9de, - 0x67b59df, - 0x67d99ed, - 0x73319f6, + 0x2dacb63, + 0x2dc8b6b, + 0x2dccb72, + 0x22dd0b73, + 0x2dd4b74, + 0x2dd8b75, + 0x2ddcb76, + 0x2de4b77, + 0x2df8b79, + 0x2dfcb7e, + 0x2e00b7f, + 0x2e04b80, + 0x2e74b81, + 0x2e78b9d, + 0x2e7cb9e, + 0x2e9cb9f, + 0x2eb0ba7, + 0x2ec4bac, + 0x2edcbb1, + 0x2ef8bb7, + 0x2f10bbe, + 0x2f14bc4, + 0x2f2cbc5, + 0x2f48bcb, + 0x2f4cbd2, + 0x2f6cbd3, + 0x2f8cbdb, + 0x2fa8be3, + 0x300cbea, + 0x3028c03, + 0x3038c0a, + 0x303cc0e, + 0x3054c0f, + 0x3098c15, + 0x3118c26, + 0x3148c46, + 0x314cc52, + 0x3158c53, + 0x3178c56, + 0x317cc5e, + 0x31a0c5f, + 0x31a8c68, + 0x31e4c6a, + 0x3234c79, + 0x3238c8d, + 0x323cc8e, + 0x3304c8f, + 0x23308cc1, + 0x2330ccc2, + 0x3310cc3, + 0x23314cc4, + 0x23318cc5, + 0x2331ccc6, + 0x2332ccc7, + 0x23330ccb, + 0x23334ccc, + 0x23338ccd, + 0x2333ccce, + 0x3354ccf, + 0x3378cd5, + 0x3398cde, + 0x3a04ce6, + 0x3a10e81, + 0x3a30e84, + 0x3bf0e8c, + 0x3cc0efc, + 0x3d30f30, + 0x3d88f4c, + 0x3e70f62, + 0x3ec8f9c, + 0x3f04fb2, + 0x4000fc1, + 0x40cd000, + 0x4165033, + 0x41f5059, + 0x425907d, + 0x4491096, + 0x4549124, + 0x4615152, + 0x4661185, + 0x46e9198, + 0x47251ba, + 0x47751c9, + 0x47ed1dd, + 0x647f11fb, + 0x647f51fc, + 0x647f91fd, + 0x48751fe, + 0x48d121d, + 0x494d234, + 0x49c5253, + 0x4a45271, + 0x4ab1291, + 0x4bdd2ac, + 0x4c352f7, + 0x64c3930d, + 0x4cd130e, + 0x4cd9334, + 0x24cdd336, + 0x4d65337, + 0x4db1359, + 0x4e1936c, + 0x4ec1386, + 0x4f893b0, + 0x4ff13e2, + 0x51053fc, + 0x65109441, + 0x6510d442, + 0x5169443, + 0x51c545a, + 0x5255471, + 0x52d1495, + 0x53154b4, + 0x53f94c5, + 0x542d4fe, + 0x548d50b, + 0x5501523, + 0x5589540, + 0x55c9562, + 0x5639572, + 0x6563d58e, + 0x566558f, + 0x5669599, + 0x568159a, + 0x569d5a0, + 0x56e15a7, + 0x56f15b8, + 0x57095bc, + 0x57815c2, + 0x57895e0, + 0x57a55e2, + 0x57b95e9, + 0x57d55ee, + 0x58015f5, + 0x5805600, + 0x580d601, + 0x5821603, + 0x5841608, + 0x5851610, + 0x585d614, + 0x5899617, + 0x58a1626, + 0x58b5628, + 0x58d962d, + 0x58e5636, + 0x58ed639, + 0x591163b, + 0x5935644, + 0x594d64d, + 0x5951653, + 0x5959654, + 0x595d656, + 0x59f9657, + 0x59fd67e, + 0x5a0167f, + 0x5a05680, + 0x5a29681, + 0x5a4d68a, + 0x5a69693, + 0x5a7d69a, + 0x5a9169f, + 0x5a996a4, + 0x5aa16a6, + 0x5aa96a8, + 0x5ac16aa, + 0x5ad16b0, + 0x5ad56b4, + 0x5af16b5, + 0x63796bc, + 0x63b18de, + 0x63dd8ec, + 0x63f98f7, + 0x64198fe, + 0x6439906, + 0x647d90e, + 0x648591f, + 0x26489921, + 0x2648d922, + 0x6495923, + 0x665d925, + 0x26661997, + 0x26671998, + 0x2667999c, + 0x2668599e, + 0x66899a1, + 0x266919a2, + 0x66999a4, + 0x66a99a6, + 0x66d19aa, + 0x67099b4, + 0x670d9c2, + 0x67459c3, + 0x67659d1, + 0x72bd9d9, + 0x72c1caf, + 0x72c5cb0, + 0x272c9cb1, + 0x72cdcb2, + 0x272d1cb3, + 0x72d5cb4, + 0x272e1cb5, + 0x72e5cb8, + 0x72e9cb9, + 0x272edcba, + 0x72f1cbb, + 0x272f9cbc, + 0x72fdcbe, + 0x7301cbf, + 0x27311cc0, + 0x7315cc4, + 0x7319cc5, + 0x731dcc6, + 0x7321cc7, + 0x27325cc8, + 0x7329cc9, + 0x732dcca, + 0x7331ccb, 0x7335ccc, - 0x7339ccd, - 0x2733dcce, + 0x2733dccd, 0x7341ccf, - 0x27345cd0, + 0x7345cd0, 0x7349cd1, - 0x27355cd2, - 0x7359cd5, - 0x735dcd6, - 0x27361cd7, - 0x7365cd8, - 0x2736dcd9, - 0x7371cdb, - 0x7375cdc, - 0x27385cdd, - 0x7389ce1, - 0x738dce2, - 0x7391ce3, - 0x7395ce4, - 0x27399ce5, - 0x739dce6, - 0x73a1ce7, - 0x73a5ce8, - 0x73a9ce9, - 0x273b1cea, - 0x73b5cec, - 0x73b9ced, - 0x73bdcee, - 0x273c1cef, - 0x73c5cf0, - 0x273cdcf1, - 0x273d1cf3, - 0x73edcf4, - 0x7405cfb, - 0x27409d01, - 0x744dd02, - 0x7451d13, - 0x7475d14, - 0x7481d1d, - 0x7485d20, - 0x7489d21, - 0x7645d22, - 0x27649d91, - 0x27651d92, - 0x27655d94, - 0x27659d95, - 0x7661d96, - 0x773dd98, - 0x27749dcf, - 0x2774ddd2, - 0x27751dd3, - 0x27755dd4, - 0x7759dd5, - 0x7785dd6, - 0x7789de1, - 0x778dde2, - 0x77b1de3, - 0x77bddec, - 0x77dddef, - 0x77e1df7, - 0x7819df8, - 0x7ac9e06, - 0x7b85eb2, - 0x7b89ee1, - 0x7b8dee2, - 0x7ba1ee3, - 0x7bd5ee8, - 0x7c0def5, - 0x27c11f03, - 0x7c2df04, - 0x7c55f0b, - 0x7c59f15, - 0x7c7df16, - 0x7c99f1f, - 0x7cc1f26, - 0x7cd1f30, - 0x7cd5f34, - 0x7cd9f35, - 0x7d11f36, - 0x7d1df44, - 0x7d45f47, - 0x7dc5f51, - 0x27dc9f71, - 0x7dd9f72, - 0x7de9f76, - 0x7e05f7a, - 0x7e25f81, - 0x7e29f89, - 0x7e3df8a, - 0x7e51f8f, - 0x7e55f94, - 0x7e59f95, - 0x7e5df96, - 0x7e7df97, - 0x7f25f9f, - 0x7f29fc9, - 0x7f45fca, - 0x7f69fd1, - 0x7f6dfda, - 0x7f75fdb, - 0x7f91fdd, - 0x7f99fe4, - 0x7fadfe6, - 0x7fcdfeb, - 0x7fe9ff3, - 0x7ff5ffa, - 0x800dffd, - 0x8046003, - 0x811a011, - 0x811e046, - 0x8132047, - 0x813a04c, - 0x815204e, - 0x8156054, - 0x8162055, - 0x8166058, - 0x816a059, - 0x816e05a, - 0x819205b, - 0x81d2064, - 0x81d6074, - 0x81f6075, - 0x824607d, - 0x826a091, - 0x2826e09a, - 0x827609b, - 0x82ce09d, - 0x82d20b3, - 0x82d60b4, - 0x82da0b5, - 0x831e0b6, - 0x832e0c7, - 0x836e0cb, - 0x83720db, - 0x83a20dc, - 0x84ee0e8, - 0x851613b, - 0x8546145, - 0x8566151, - 0x2856e159, - 0x857615b, - 0x858215d, - 0x8696160, + 0x2734dcd2, + 0x7351cd3, + 0x27359cd4, + 0x2735dcd6, + 0x7379cd7, + 0x7391cde, + 0x27395ce4, + 0x73d9ce5, + 0x73ddcf6, + 0x7401cf7, + 0x740dd00, + 0x7411d03, + 0x7415d04, + 0x75d1d05, + 0x275d5d74, + 0x275ddd75, + 0x275e1d77, + 0x275e5d78, + 0x75edd79, + 0x76c9d7b, + 0x276d5db2, + 0x276d9db5, + 0x276dddb6, + 0x276e1db7, + 0x76e5db8, + 0x7711db9, + 0x7715dc4, + 0x7719dc5, + 0x773ddc6, + 0x7749dcf, + 0x7769dd2, + 0x776ddda, + 0x77a5ddb, + 0x7a55de9, + 0x7b11e95, + 0x7b15ec4, + 0x7b19ec5, + 0x7b2dec6, + 0x7b61ecb, + 0x7b99ed8, + 0x27b9dee6, + 0x7bb9ee7, + 0x7be1eee, + 0x7be5ef8, + 0x7c09ef9, + 0x7c25f02, + 0x7c4df09, + 0x7c5df13, + 0x7c61f17, + 0x7c65f18, + 0x7c9df19, + 0x7ca9f27, + 0x7cd1f2a, + 0x7d51f34, + 0x27d55f54, + 0x7d65f55, + 0x7d75f59, + 0x7d91f5d, + 0x7db1f64, + 0x7db5f6c, + 0x7dc9f6d, + 0x7dddf72, + 0x7de1f77, + 0x7de5f78, + 0x7e05f79, + 0x7eadf81, + 0x7eb1fab, + 0x7ecdfac, + 0x7ef1fb3, + 0x7ef5fbc, + 0x7efdfbd, + 0x7f19fbf, + 0x7f21fc6, + 0x7f35fc8, + 0x7f55fcd, + 0x7f71fd5, + 0x7f7dfdc, + 0x7f95fdf, + 0x7fcdfe5, + 0x80a1ff3, + 0x80a6028, + 0x80ba029, + 0x80c202e, + 0x80da030, + 0x80de036, + 0x80ea037, + 0x80ee03a, + 0x80f203b, + 0x811603c, + 0x8156045, + 0x815a055, + 0x817a056, + 0x81ca05e, + 0x81ea072, + 0x281ee07a, + 0x81f607b, + 0x824e07d, + 0x8252093, + 0x8256094, + 0x825a095, + 0x829e096, + 0x82ae0a7, + 0x82ee0ab, + 0x82f20bb, + 0x83220bc, + 0x846a0c8, + 0x849211a, + 0x84c2124, + 0x84e2130, + 0x284ea138, + 0x84f213a, + 0x84fe13c, + 0x861213f, + 0x861e184, + 0x862a187, + 0x863618a, + 0x864218d, + 0x864e190, + 0x865a193, + 0x8666196, + 0x8672199, + 0x867e19c, + 0x868a19f, + 0x86961a2, 0x86a21a5, 0x86ae1a8, - 0x86ba1ab, - 0x86c61ae, - 0x86d21b1, - 0x86de1b4, - 0x86ea1b7, - 0x86f61ba, - 0x87021bd, - 0x870e1c0, - 0x871a1c3, - 0x87261c6, - 0x87321c9, - 0x873a1cc, - 0x87461ce, - 0x87521d1, - 0x875e1d4, - 0x876a1d7, - 0x87761da, - 0x87821dd, - 0x878e1e0, - 0x879a1e3, - 0x87a61e6, - 0x87b21e9, - 0x87be1ec, - 0x87ea1ef, - 0x87f61fa, - 0x88021fd, - 0x880e200, - 0x881a203, - 0x8826206, - 0x882e209, + 0x86b61ab, + 0x86c21ad, + 0x86ce1b0, + 0x86da1b3, + 0x86e61b6, + 0x86f21b9, + 0x86fe1bc, + 0x870a1bf, + 0x87161c2, + 0x87221c5, + 0x872e1c8, + 0x873a1cb, + 0x87661ce, + 0x87721d9, + 0x877e1dc, + 0x878a1df, + 0x87961e2, + 0x87a21e5, + 0x87aa1e8, + 0x87b61ea, + 0x87c21ed, + 0x87ce1f0, + 0x87da1f3, + 0x87e61f6, + 0x87f21f9, + 0x87fe1fc, + 0x880a1ff, + 0x8816202, + 0x8822205, + 0x882e208, 0x883a20b, 0x884620e, - 0x8852211, - 0x885e214, - 0x886a217, - 0x887621a, - 0x888221d, - 0x888e220, - 0x889a223, - 0x88a6226, - 0x88b2229, + 0x884e211, + 0x885a213, + 0x8866216, + 0x8872219, + 0x887e21c, + 0x888a21f, + 0x8896222, + 0x88a2225, + 0x88ae228, + 0x88b222b, 0x88be22c, - 0x88ca22f, - 0x88d2232, - 0x88de234, - 0x88ea237, - 0x88f623a, - 0x890223d, - 0x890e240, - 0x891a243, - 0x8926246, - 0x8932249, - 0x893624c, - 0x894224d, - 0x895e250, - 0x8962257, - 0x8972258, - 0x899625c, - 0x899a265, - 0x89de266, - 0x89e2277, - 0x89f6278, - 0x8a2a27d, - 0x8a3a28a, - 0x8a4228e, - 0x8a66290, - 0x8a7e299, - 0x8a9629f, - 0x8aae2a5, - 0x8ac22ab, - 0x28b0a2b0, - 0x8b0e2c2, - 0x8b3a2c3, - 0x8b4a2ce, - 0x8b5e2d2, + 0x88da22f, + 0x88de236, + 0x88ee237, + 0x890e23b, + 0x8912243, + 0x8956244, + 0x895a255, + 0x896e256, + 0x89a225b, + 0x89b2268, + 0x89ba26c, + 0x89de26e, + 0x89f6277, + 0x8a0e27d, + 0x8a26283, + 0x8a3a289, + 0x28a8228e, + 0x8a862a0, + 0x8ab22a1, + 0x8ac22ac, + 0x8ad62b0, } -// max children 580 (capacity 1023) -// max text offset 30618 (capacity 32767) +// max children 571 (capacity 1023) +// max text offset 30545 (capacity 32767) // max text length 36 (capacity 63) -// max hi 8919 (capacity 16383) -// max lo 8914 (capacity 16383) +// max hi 8885 (capacity 16383) +// max lo 8880 (capacity 16383) diff --git a/vendor/modules.txt b/vendor/modules.txt index d5e19797511..12f9460241e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -52,7 +52,7 @@ github.com/Azure/azure-event-hubs-go/v3/persist github.com/Azure/azure-event-hubs-go/v3/storage # github.com/Azure/azure-pipeline-go v0.2.1 github.com/Azure/azure-pipeline-go/pipeline -# github.com/Azure/azure-sdk-for-go v40.4.0+incompatible +# github.com/Azure/azure-sdk-for-go v37.1.0+incompatible github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2019-06-01/insights github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-03-01/resources @@ -60,16 +60,16 @@ github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2017-10-01/storage github.com/Azure/azure-sdk-for-go/version # github.com/Azure/azure-storage-blob-go v0.8.0 github.com/Azure/azure-storage-blob-go/azblob -# github.com/Azure/go-amqp v0.12.7 +# github.com/Azure/go-amqp v0.12.6 github.com/Azure/go-amqp github.com/Azure/go-amqp/internal/testconn # github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 github.com/Azure/go-ansiterm github.com/Azure/go-ansiterm/winterm -# github.com/Azure/go-autorest/autorest v0.10.0 +# github.com/Azure/go-autorest/autorest v0.9.4 github.com/Azure/go-autorest/autorest github.com/Azure/go-autorest/autorest/azure -# github.com/Azure/go-autorest/autorest/adal v0.8.2 +# github.com/Azure/go-autorest/autorest/adal v0.8.1 github.com/Azure/go-autorest/autorest/adal # github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 github.com/Azure/go-autorest/autorest/azure/auth @@ -662,7 +662,7 @@ github.com/mitchellh/gox github.com/mitchellh/hashstructure # github.com/mitchellh/iochan v1.0.0 github.com/mitchellh/iochan -# github.com/mitchellh/mapstructure v1.2.0 +# github.com/mitchellh/mapstructure v1.1.2 github.com/mitchellh/mapstructure # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd github.com/modern-go/concurrent @@ -838,7 +838,7 @@ go.uber.org/zap/internal/color go.uber.org/zap/internal/exit go.uber.org/zap/zapcore go.uber.org/zap/zaptest/observer -# golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 +# golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 golang.org/x/crypto/blake2b golang.org/x/crypto/cast5 golang.org/x/crypto/ed25519 @@ -861,7 +861,7 @@ golang.org/x/exp/cmd/apidiff # golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f golang.org/x/lint golang.org/x/lint/golint -# golang.org/x/net v0.0.0-20200301022130-244492dfa37a +# golang.org/x/net v0.0.0-20200202094626-16171245cfb2 golang.org/x/net/bpf golang.org/x/net/context golang.org/x/net/context/ctxhttp From 74105526db276e749729e5eda39ac9fb7a5362ae Mon Sep 17 00:00:00 2001 From: Mariana Date: Fri, 20 Mar 2020 11:40:51 +0100 Subject: [PATCH 15/16] mage vendor --- go.sum | 22 - .../godror/godror/odpi/CONTRIBUTING.md | 1 + .../github.com/godror/godror/odpi/LICENSE.md | 217 + .../github.com/godror/godror/odpi/README.md | 63 + .../godror/godror/odpi/embed/README.md | 3 + .../github.com/godror/godror/odpi/embed/dpi.c | 50 + .../godror/godror/odpi/include/dpi.h | 1814 ++++++++ .../godror/godror/odpi/src/dpiConn.c | 2249 ++++++++++ .../godror/godror/odpi/src/dpiContext.c | 329 ++ .../godror/godror/odpi/src/dpiData.c | 899 ++++ .../godror/godror/odpi/src/dpiDebug.c | 183 + .../godror/godror/odpi/src/dpiDeqOptions.c | 369 ++ .../godror/godror/odpi/src/dpiEnqOptions.c | 173 + .../godror/godror/odpi/src/dpiEnv.c | 180 + .../godror/godror/odpi/src/dpiError.c | 222 + .../godror/godror/odpi/src/dpiErrorMessages.h | 90 + .../godror/godror/odpi/src/dpiGen.c | 307 ++ .../godror/godror/odpi/src/dpiGlobal.c | 291 ++ .../godror/godror/odpi/src/dpiHandleList.c | 116 + .../godror/godror/odpi/src/dpiHandlePool.c | 119 + .../godror/godror/odpi/src/dpiImpl.h | 1905 ++++++++ .../godror/godror/odpi/src/dpiLob.c | 504 +++ .../godror/godror/odpi/src/dpiMsgProps.c | 487 +++ .../godror/godror/odpi/src/dpiObject.c | 966 +++++ .../godror/godror/odpi/src/dpiObjectAttr.c | 114 + .../godror/godror/odpi/src/dpiObjectType.c | 344 ++ .../godror/godror/odpi/src/dpiOci.c | 3823 +++++++++++++++++ .../godror/godror/odpi/src/dpiOracleType.c | 504 +++ .../godror/godror/odpi/src/dpiPool.c | 586 +++ .../godror/godror/odpi/src/dpiQueue.c | 560 +++ .../godror/godror/odpi/src/dpiRowid.c | 134 + .../godror/godror/odpi/src/dpiSodaColl.c | 812 ++++ .../godror/odpi/src/dpiSodaCollCursor.c | 144 + .../godror/godror/odpi/src/dpiSodaDb.c | 431 ++ .../godror/godror/odpi/src/dpiSodaDoc.c | 231 + .../godror/godror/odpi/src/dpiSodaDocCursor.c | 144 + .../godror/godror/odpi/src/dpiStmt.c | 1898 ++++++++ .../godror/godror/odpi/src/dpiSubscr.c | 713 +++ .../godror/godror/odpi/src/dpiUtils.c | 401 ++ .../godror/godror/odpi/src/dpiVar.c | 1813 ++++++++ vendor/github.com/tsg/go-daemon/src/god.c | 313 ++ .../github.com/yuin/gopher-lua/parse/Makefile | 4 - 42 files changed, 24502 insertions(+), 26 deletions(-) create mode 100644 vendor/github.com/godror/godror/odpi/CONTRIBUTING.md create mode 100644 vendor/github.com/godror/godror/odpi/LICENSE.md create mode 100644 vendor/github.com/godror/godror/odpi/README.md create mode 100644 vendor/github.com/godror/godror/odpi/embed/README.md create mode 100644 vendor/github.com/godror/godror/odpi/embed/dpi.c create mode 100644 vendor/github.com/godror/godror/odpi/include/dpi.h create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiConn.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiContext.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiData.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiDebug.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiEnv.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiError.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiGen.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiGlobal.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiHandleList.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiImpl.h create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiLob.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiObject.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiObjectType.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiOci.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiOracleType.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiPool.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiQueue.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiRowid.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiStmt.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiSubscr.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiUtils.c create mode 100644 vendor/github.com/godror/godror/odpi/src/dpiVar.c create mode 100644 vendor/github.com/tsg/go-daemon/src/god.c delete mode 100644 vendor/github.com/yuin/gopher-lua/parse/Makefile diff --git a/go.sum b/go.sum index d62b65f8fd4..26dcb9910c1 100644 --- a/go.sum +++ b/go.sum @@ -31,29 +31,19 @@ code.cloudfoundry.org/rfc5424 v0.0.0-20180905210152-236a6d29298a/go.mod h1:tkZo8 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-amqp-common-go/v3 v3.0.0 h1:j9tjcwhypb/jek3raNrwlCIl7iKQYOug7CLpSyBBodc= github.com/Azure/azure-amqp-common-go/v3 v3.0.0/go.mod h1:SY08giD/XbhTz07tJdpw1SoxQXHPN30+DI3Z04SYqyg= -github.com/Azure/azure-event-hubs-go/v3 v3.1.0 h1:j+/WXzke3PTRu5gAgSpWgWJVfpwIyaedIqqgdgkjAe0= -github.com/Azure/azure-event-hubs-go/v3 v3.1.0/go.mod h1:hR40byNJjKkS74+3RhloPQ8sJ8zFQeJ920Uk3oYY0+k= github.com/Azure/azure-event-hubs-go/v3 v3.1.2 h1:S/NjCZ1Z2R4rHJd2Hbbad6rIhxJ4lZZebKTsKHweX4A= github.com/Azure/azure-event-hubs-go/v3 v3.1.2/go.mod h1:hR40byNJjKkS74+3RhloPQ8sJ8zFQeJ920Uk3oYY0+k= -github.com/Azure/azure-event-hubs-go/v3 v3.2.0 h1:CQlxKH5a4NX1ZmbdqXUPRwuNGh2XvtgmhkZvkEuWzhs= -github.com/Azure/azure-event-hubs-go/v3 v3.2.0/go.mod h1:BPIIJNH/l/fVHYq3Rm6eg4clbrULrQ3q7+icmqHyyLc= github.com/Azure/azure-pipeline-go v0.1.8/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.1.9/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg= github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-sdk-for-go v37.1.0+incompatible h1:aFlw3lP7ZHQi4m1kWCpcwYtczhDkGhDoRaMTaxcOf68= github.com/Azure/azure-sdk-for-go v37.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v40.0.0+incompatible h1:hVVkxE0XB/dozwERSNNgONUxmoCSXQzBRyJog+m+a0Y= -github.com/Azure/azure-sdk-for-go v40.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v40.4.0+incompatible h1:fqIZrZZOfzH4BikHmEtVax+ewacSVCY8u9hXNPUSxF4= -github.com/Azure/azure-sdk-for-go v40.4.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-storage-blob-go v0.6.0/go.mod h1:oGfmITT1V6x//CswqY2gtAHND+xIP64/qL7a5QJix0Y= github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-amqp v0.12.6 h1:34yItuwhA/nusvq2sPSNPQxZLCf/CtaogYH8n578mnY= github.com/Azure/go-amqp v0.12.6/go.mod h1:qApuH6OFTSKZFmCOxccvAv5rLizBQf4v8pRmG138DPo= -github.com/Azure/go-amqp v0.12.7 h1:/Uyqh30J5JrDFAOERQtEqP0qPWkrNXxr94vRnSa54Ac= -github.com/Azure/go-amqp v0.12.7/go.mod h1:qApuH6OFTSKZFmCOxccvAv5rLizBQf4v8pRmG138DPo= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v12.2.0+incompatible h1:2Fxszbg492oAJrcvJlgyVaTqnQYRkxmEK6VPCLLVpBI= @@ -63,14 +53,10 @@ github.com/Azure/go-autorest/autorest v0.9.3 h1:OZEIaBbMdUE/Js+BQKlpO81XlISgipr6 github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.9.4 h1:1cM+NmKw91+8h5vfjgzK4ZGLuN72k87XVZBWyGwNjUM= github.com/Azure/go-autorest/autorest v0.9.4/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= -github.com/Azure/go-autorest/autorest v0.10.0 h1:mvdtztBqcL8se7MdrUweNieTNi4kfNG6GOJuurQJpuY= -github.com/Azure/go-autorest/autorest v0.10.0/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= -github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0= -github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwpKNMpV+/FTWjwEbuPD495Tk= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U= @@ -510,8 +496,6 @@ github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWe github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.2.0 h1:pFIkD+d/36DA4zE+VL2xI0Th1yNh+CWaUcJkaGivz3A= -github.com/mitchellh/mapstructure v1.2.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -707,10 +691,6 @@ golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 h1:ULYEB3JvPRE/IfO+9uO7vK golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72 h1:+ELyKg6m8UBf0nPFSqD0mi7zUfwPyXo23HNjMnXPz7w= golang.org/x/crypto v0.0.0-20200204104054-c9f3fb736b72/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6 h1:TjszyFsQsyZNHwdVdZ5m7bjmreu0znc2kRYsEml9/Ww= -golang.org/x/crypto v0.0.0-20200317142112-1b76d66859c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -758,8 +738,6 @@ golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2 h1:CCH4IOTTfewWjGOlSp+zGcjutRKlBEZQ6wTn8ozI/nI= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190130055435-99b60b757ec1/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= diff --git a/vendor/github.com/godror/godror/odpi/CONTRIBUTING.md b/vendor/github.com/godror/godror/odpi/CONTRIBUTING.md new file mode 100644 index 00000000000..272ff94f74a --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/CONTRIBUTING.md @@ -0,0 +1 @@ +Sorry, Pull Requests for ODPI-C cannot be accepted. Please report bugs and ask questions using [GitHub issues](https://github.com/oracle/odpi/issues) diff --git a/vendor/github.com/godror/godror/odpi/LICENSE.md b/vendor/github.com/godror/godror/odpi/LICENSE.md new file mode 100644 index 00000000000..cb344b76c16 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/LICENSE.md @@ -0,0 +1,217 @@ +Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved. + +This program is free software: you can modify it and/or redistribute it under +the terms of: + +(i) the Universal Permissive License v 1.0 or at your option, any + later version (); and/or + +(ii) the Apache License v 2.0. () + + +The Universal Permissive License (UPL), Version 1.0 +=================================================== + +Subject to the condition set forth below, permission is hereby granted to any +person obtaining a copy of this software, associated documentation and/or data +(collectively the "Software"), free of charge and under any and all copyright +rights in the Software, and any and all patent rights owned or freely +licensable by each licensor hereunder covering either (i) the unmodified +Software as contributed to or provided by such licensor, or (ii) the Larger +Works (as defined below), to deal in both + +(a) the Software, and + +(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + one is included with the Software (each a "Larger Work" to which the + Software is contributed by such licensors), + +without restriction, including without limitation the rights to copy, create +derivative works of, display, perform, and distribute the Software and make, +use, sell, offer for sale, import, export, have made, and have sold the +Software and the Larger Work(s), and to sublicense the foregoing rights on +either these or other terms. + +This license is subject to the following condition: + +The above copyright notice and either this complete permission notice or at a +minimum a reference to the UPL must 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. + + +Apache License +============== + +Version 2.0, January 2004 + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. **Definitions**. + + "License" shall mean the terms and conditions for use, reproduction, and + distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by the + copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all other + entities that control, are controlled by, or are under common control with + that entity. For the purposes of this definition, "control" means (i) the + power, direct or indirect, to cause the direction or management of such + entity, whether by contract or otherwise, or (ii) ownership of fifty + percent (50%) or more of the outstanding shares, or (iii) beneficial + ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity exercising + permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation source, + and configuration files. + + "Object" form shall mean any form resulting from mechanical transformation + or translation of a Source form, including but not limited to compiled + object code, generated documentation, and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or Object form, + made available under the License, as indicated by a copyright notice that + is included in or attached to the work (an example is provided in the + Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object form, + that is based on (or derived from) the Work and for which the editorial + revisions, annotations, elaborations, or other modifications represent, as + a whole, an original work of authorship. For the purposes of this License, + Derivative Works shall not include works that remain separable from, or + merely link (or bind by name) to the interfaces of, the Work and Derivative + Works thereof. + + "Contribution" shall mean any work of authorship, including the original + version of the Work and any modifications or additions to that Work or + Derivative Works thereof, that is intentionally submitted to Licensor for + inclusion in the Work by the copyright owner or by an individual or Legal + Entity authorized to submit on behalf of the copyright owner. For the + purposes of this definition, "submitted" means any form of electronic, + verbal, or written communication sent to the Licensor or its + representatives, including but not limited to communication on electronic + mailing lists, source code control systems, and issue tracking systems that + are managed by, or on behalf of, the Licensor for the purpose of discussing + and improving the Work, but excluding communication that is conspicuously + marked or otherwise designated in writing by the copyright owner as "Not a + Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity on + behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. **Grant of Copyright License.** Subject to the terms and conditions of this + License, each Contributor hereby grants to You a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable copyright license to + reproduce, prepare Derivative Works of, publicly display, publicly perform, + sublicense, and distribute the Work and such Derivative Works in Source or + Object form. + +3. **Grant of Patent License.** Subject to the terms and conditions of this + License, each Contributor hereby grants to You a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable (except as stated in + this section) patent license to make, have made, use, offer to sell, sell, + import, and otherwise transfer the Work, where such license applies only to + those patent claims licensable by such Contributor that are necessarily + infringed by their Contribution(s) alone or by combination of their + Contribution(s) with the Work to which such Contribution(s) was submitted. + If You institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work or a + Contribution incorporated within the Work constitutes direct or + contributory patent infringement, then any patent licenses granted to You + under this License for that Work shall terminate as of the date such + litigation is filed. + +4. **Redistribution.** You may reproduce and distribute copies of the Work or + Derivative Works thereof in any medium, with or without modifications, and + in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a + copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You + distribute, all copyright, patent, trademark, and attribution notices + from the Source form of the Work, excluding those notices that do not + pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, + then any Derivative Works that You distribute must include a readable + copy of the attribution notices contained within such NOTICE file, + excluding those notices that do not pertain to any part of the + Derivative Works, in at least one of the following places: within a + NOTICE text file distributed as part of the Derivative Works; within + the Source form or documentation, if provided along with the Derivative + Works; or, within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents of the + NOTICE file are for informational purposes only and do not modify the + License. You may add Your own attribution notices within Derivative + Works that You distribute, alongside or as an addendum to the NOTICE + text from the Work, provided that such additional attribution notices + cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may + provide additional or different license terms and conditions for use, + reproduction, or distribution of Your modifications, or for any such + Derivative Works as a whole, provided Your use, reproduction, and + distribution of the Work otherwise complies with the conditions stated + in this License. + +5. **Submission of Contributions.** Unless You explicitly state otherwise, any + Contribution intentionally submitted for inclusion in the Work by You to + the Licensor shall be under the terms and conditions of this License, + without any additional terms or conditions. Notwithstanding the above, + nothing herein shall supersede or modify the terms of any separate license + agreement you may have executed with Licensor regarding such Contributions. + +6. **Trademarks.** This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, except + as required for reasonable and customary use in describing the origin of + the Work and reproducing the content of the NOTICE file. + +7. **Disclaimer of Warranty.** Unless required by applicable law or agreed to + in writing, Licensor provides the Work (and each Contributor provides its + Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied, including, without limitation, any + warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or + FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for + determining the appropriateness of using or redistributing the Work and + assume any risks associated with Your exercise of permissions under this + License. + +8. **Limitation of Liability.** In no event and under no legal theory, whether + in tort (including negligence), contract, or otherwise, unless required by + applicable law (such as deliberate and grossly negligent acts) or agreed to + in writing, shall any Contributor be liable to You for damages, including + any direct, indirect, special, incidental, or consequential damages of any + character arising as a result of this License or out of the use or + inability to use the Work (including but not limited to damages for loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor has been + advised of the possibility of such damages. + +9. **Accepting Warranty or Additional Liability.** While redistributing the + Work or Derivative Works thereof, You may choose to offer, and charge a fee + for, acceptance of support, warranty, indemnity, or other liability + obligations and/or rights consistent with this License. However, in + accepting such obligations, You may act only on Your own behalf and on Your + sole responsibility, not on behalf of any other Contributor, and only if + You agree to indemnify, defend, and hold each Contributor harmless for any + liability incurred by, or claims asserted against, such Contributor by + reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/vendor/github.com/godror/godror/odpi/README.md b/vendor/github.com/godror/godror/odpi/README.md new file mode 100644 index 00000000000..fa911cc2130 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/README.md @@ -0,0 +1,63 @@ +# ODPI-C version 3.3 + +Oracle Database Programming Interface for C (ODPI-C) is an open source library +of C code that simplifies access to Oracle Database for applications written in +C or C++. It is a wrapper over [Oracle Call Interface +(OCI)](http://www.oracle.com/technetwork/database/features/oci/index.html) that +makes applications and language interfaces easier to develop. + +ODPI-C supports basic and advanced features of Oracle Database and +Oracle Client. See the [homepage](https://oracle.github.io/odpi/) for +a list. + +## Installation + +See [ODPI-C Installation](https://oracle.github.io/odpi/doc/installation.html). + +## Documentation + +See the [ODPI-C Documentation](https://oracle.github.io/odpi/doc/index.html) and +[Release Notes](https://oracle.github.io/odpi/doc/releasenotes.html). + +## Samples + +See [/samples](https://github.com/oracle/odpi/tree/master/samples). + +## Help + +Please report bugs and ask questions using [GitHub issues](https://github.com/oracle/odpi/issues). + +## Tests + +See [/test](https://github.com/oracle/odpi/tree/master/test). + +## Contributing + +See [CONTRIBUTING](https://github.com/oracle/odpi/blob/master/CONTRIBUTING.md). + +## Drivers Using ODPI-C + +Oracle Drivers: +* [cx_Oracle](https://oracle.github.io/python-cx_Oracle) Python interface. +* [node-oracledb](https://oracle.github.io/node-oracledb) Node.js module. + +Third-party Drivers: +* [go-goracle](https://gopkg.in/goracle.v2) Go Driver. +* [mirmir](https://github.com/rustyhorde/mimir) Rust Bindings. +* [odpic-raw](https://github.com/leptonyu/odpic-raw) Haskell Raw Bindings. +* [ruby-ODPI ](https://github.com/kubo/ruby-odpi) Ruby Interface. +* [rust-oracle ](https://github.com/kubo/rust-oracle) Driver for Rust. +* [Oracle.jl](https://github.com/felipenoris/Oracle.jl) Driver for Julia. +* [oranif](https://github.com/K2InformaticsGmbH/oranif) Driver for Erlang. + +## License + +Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. + +This program is free software: you can modify it and/or redistribute it under +the terms of: + +(i) the Universal Permissive License v 1.0 or at your option, any + later version (); and/or + +(ii) the Apache License v 2.0. () diff --git a/vendor/github.com/godror/godror/odpi/embed/README.md b/vendor/github.com/godror/godror/odpi/embed/README.md new file mode 100644 index 00000000000..dfe0b4524c0 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/embed/README.md @@ -0,0 +1,3 @@ +This directory contains the file dpi.c which can be used to embed ODPI-C +within your project without having to manage the individual files that make up +the library. The files can also be compiled independently if that is preferred. diff --git a/vendor/github.com/godror/godror/odpi/embed/dpi.c b/vendor/github.com/godror/godror/odpi/embed/dpi.c new file mode 100644 index 00000000000..7d0c6dc83bb --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/embed/dpi.c @@ -0,0 +1,50 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpi.c +// Include this file in your project in order to embed ODPI-C source without +// having to compile files individually. Only the definitions in the file +// include/dpi.h are intended to be used publicly. Each file can also be +// compiled independently if that is preferable. +//----------------------------------------------------------------------------- + +#include "../src/dpiConn.c" +#include "../src/dpiContext.c" +#include "../src/dpiData.c" +#include "../src/dpiDebug.c" +#include "../src/dpiDeqOptions.c" +#include "../src/dpiEnqOptions.c" +#include "../src/dpiEnv.c" +#include "../src/dpiError.c" +#include "../src/dpiGen.c" +#include "../src/dpiGlobal.c" +#include "../src/dpiHandleList.c" +#include "../src/dpiHandlePool.c" +#include "../src/dpiLob.c" +#include "../src/dpiMsgProps.c" +#include "../src/dpiObjectAttr.c" +#include "../src/dpiObject.c" +#include "../src/dpiObjectType.c" +#include "../src/dpiOci.c" +#include "../src/dpiOracleType.c" +#include "../src/dpiPool.c" +#include "../src/dpiQueue.c" +#include "../src/dpiRowid.c" +#include "../src/dpiSodaColl.c" +#include "../src/dpiSodaCollCursor.c" +#include "../src/dpiSodaDb.c" +#include "../src/dpiSodaDoc.c" +#include "../src/dpiSodaDocCursor.c" +#include "../src/dpiStmt.c" +#include "../src/dpiSubscr.c" +#include "../src/dpiUtils.c" +#include "../src/dpiVar.c" diff --git a/vendor/github.com/godror/godror/odpi/include/dpi.h b/vendor/github.com/godror/godror/odpi/include/dpi.h new file mode 100644 index 00000000000..58b3a2d5867 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/include/dpi.h @@ -0,0 +1,1814 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpi.h +// Master include file for ODPI-C library. +//----------------------------------------------------------------------------- + +#ifndef DPI_PUBLIC +#define DPI_PUBLIC + +// define standard integer types for older versions of Microsoft Visual Studio +#ifdef _MSC_VER +#if _MSC_VER < 1600 +#define int8_t signed __int8 +#define int16_t signed __int16 +#define int32_t signed __int32 +#define int64_t signed __int64 +#define uint8_t unsigned __int8 +#define uint16_t unsigned __int16 +#define uint32_t unsigned __int32 +#define uint64_t unsigned __int64 +#endif +#endif + +#ifndef int8_t +#include +#endif + +// define __func__ for older versions of Microsoft Visual Studio +#ifdef _MSC_VER +#if _MSC_VER < 1900 +#define __func__ __FUNCTION__ +#endif +#endif + +// define ODPI-C version information +#define DPI_MAJOR_VERSION 3 +#define DPI_MINOR_VERSION 3 +#define DPI_PATCH_LEVEL 0 +#define DPI_VERSION_SUFFIX + +#define DPI_STR_HELPER(x) #x +#define DPI_STR(x) DPI_STR_HELPER(x) +#define DPI_VERSION_STRING \ + DPI_STR(DPI_MAJOR_VERSION) "." \ + DPI_STR(DPI_MINOR_VERSION) "." \ + DPI_STR(DPI_PATCH_LEVEL) \ + DPI_VERSION_SUFFIX +#define DPI_DEFAULT_DRIVER_NAME "ODPI-C : " DPI_VERSION_STRING + +#define DPI_VERSION_TO_NUMBER(major, minor, patch) \ + ((major * 10000) + (minor * 100) + patch) +#define DPI_VERSION_NUMBER \ + DPI_VERSION_TO_NUMBER(DPI_MAJOR_VERSION, DPI_MINOR_VERSION, \ + DPI_PATCH_LEVEL) + +#define DPI_ORACLE_VERSION_TO_NUMBER(versionNum, releaseNum, updateNum, \ + portReleaseNum, portUpdateNum) \ + ((versionNum * 100000000) + (releaseNum * 1000000) + \ + (updateNum * 10000) + (portReleaseNum * 100) + (portUpdateNum)) + +// define default array size to use +#define DPI_DEFAULT_FETCH_ARRAY_SIZE 100 + +// define ping interval (in seconds) used when getting connections +#define DPI_DEFAULT_PING_INTERVAL 60 + +// define ping timeout (in milliseconds) used when getting connections +#define DPI_DEFAULT_PING_TIMEOUT 5000 + +// define constants for dequeue wait (AQ) +#define DPI_DEQ_WAIT_NO_WAIT 0 +#define DPI_DEQ_WAIT_FOREVER ((uint32_t) -1) + +// define maximum precision that can be supported by an int64_t value +#define DPI_MAX_INT64_PRECISION 18 + +// define constants for success and failure of methods +#define DPI_SUCCESS 0 +#define DPI_FAILURE -1 + +// set debug level (DPI_DEBUG_LEVEL) as a bitmask of desired flags +// reporting is to stderr +// 0x0001: reports errors during free +// 0x0002: reports on reference count changes +// 0x0004: reports on public function calls +// 0x0008: reports on all errors +// 0x0010: reports on all SQL statements +// 0x0020: reports on all memory allocations/frees +#define DPI_DEBUG_LEVEL_FREES 0x0001 +#define DPI_DEBUG_LEVEL_REFS 0x0002 +#define DPI_DEBUG_LEVEL_FNS 0x0004 +#define DPI_DEBUG_LEVEL_ERRORS 0x0008 +#define DPI_DEBUG_LEVEL_SQL 0x0010 +#define DPI_DEBUG_LEVEL_MEM 0x0020 + + +//----------------------------------------------------------------------------- +// Enumerations +//----------------------------------------------------------------------------- + + +// connection/pool authorization modes +typedef uint32_t dpiAuthMode; +#define DPI_MODE_AUTH_DEFAULT 0x00000000 +#define DPI_MODE_AUTH_SYSDBA 0x00000002 +#define DPI_MODE_AUTH_SYSOPER 0x00000004 +#define DPI_MODE_AUTH_PRELIM 0x00000008 +#define DPI_MODE_AUTH_SYSASM 0x00008000 +#define DPI_MODE_AUTH_SYSBKP 0x00020000 +#define DPI_MODE_AUTH_SYSDGD 0x00040000 +#define DPI_MODE_AUTH_SYSKMT 0x00080000 +#define DPI_MODE_AUTH_SYSRAC 0x00100000 + +// connection close modes +typedef uint32_t dpiConnCloseMode; +#define DPI_MODE_CONN_CLOSE_DEFAULT 0x0000 +#define DPI_MODE_CONN_CLOSE_DROP 0x0001 +#define DPI_MODE_CONN_CLOSE_RETAG 0x0002 + +// connection/pool creation modes +typedef uint32_t dpiCreateMode; +#define DPI_MODE_CREATE_DEFAULT 0x00000000 +#define DPI_MODE_CREATE_THREADED 0x00000001 +#define DPI_MODE_CREATE_EVENTS 0x00000004 + +// dequeue modes for advanced queuing +typedef uint32_t dpiDeqMode; +#define DPI_MODE_DEQ_BROWSE 1 +#define DPI_MODE_DEQ_LOCKED 2 +#define DPI_MODE_DEQ_REMOVE 3 +#define DPI_MODE_DEQ_REMOVE_NO_DATA 4 + +// dequeue navigation flags for advanced queuing +typedef uint32_t dpiDeqNavigation; +#define DPI_DEQ_NAV_FIRST_MSG 1 +#define DPI_DEQ_NAV_NEXT_TRANSACTION 2 +#define DPI_DEQ_NAV_NEXT_MSG 3 + +// event types +typedef uint32_t dpiEventType; +#define DPI_EVENT_NONE 0 +#define DPI_EVENT_STARTUP 1 +#define DPI_EVENT_SHUTDOWN 2 +#define DPI_EVENT_SHUTDOWN_ANY 3 +#define DPI_EVENT_DEREG 5 +#define DPI_EVENT_OBJCHANGE 6 +#define DPI_EVENT_QUERYCHANGE 7 +#define DPI_EVENT_AQ 100 + +// statement execution modes +typedef uint32_t dpiExecMode; +#define DPI_MODE_EXEC_DEFAULT 0x00000000 +#define DPI_MODE_EXEC_DESCRIBE_ONLY 0x00000010 +#define DPI_MODE_EXEC_COMMIT_ON_SUCCESS 0x00000020 +#define DPI_MODE_EXEC_BATCH_ERRORS 0x00000080 +#define DPI_MODE_EXEC_PARSE_ONLY 0x00000100 +#define DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS 0x00100000 + +// statement fetch modes +typedef uint16_t dpiFetchMode; +#define DPI_MODE_FETCH_NEXT 0x0002 +#define DPI_MODE_FETCH_FIRST 0x0004 +#define DPI_MODE_FETCH_LAST 0x0008 +#define DPI_MODE_FETCH_PRIOR 0x0010 +#define DPI_MODE_FETCH_ABSOLUTE 0x0020 +#define DPI_MODE_FETCH_RELATIVE 0x0040 + +// message delivery modes in advanced queuing +typedef uint16_t dpiMessageDeliveryMode; +#define DPI_MODE_MSG_PERSISTENT 1 +#define DPI_MODE_MSG_BUFFERED 2 +#define DPI_MODE_MSG_PERSISTENT_OR_BUFFERED 3 + +// message states in advanced queuing +typedef uint32_t dpiMessageState; +#define DPI_MSG_STATE_READY 0 +#define DPI_MSG_STATE_WAITING 1 +#define DPI_MSG_STATE_PROCESSED 2 +#define DPI_MSG_STATE_EXPIRED 3 + +// native C types +typedef uint32_t dpiNativeTypeNum; +#define DPI_NATIVE_TYPE_INT64 3000 +#define DPI_NATIVE_TYPE_UINT64 3001 +#define DPI_NATIVE_TYPE_FLOAT 3002 +#define DPI_NATIVE_TYPE_DOUBLE 3003 +#define DPI_NATIVE_TYPE_BYTES 3004 +#define DPI_NATIVE_TYPE_TIMESTAMP 3005 +#define DPI_NATIVE_TYPE_INTERVAL_DS 3006 +#define DPI_NATIVE_TYPE_INTERVAL_YM 3007 +#define DPI_NATIVE_TYPE_LOB 3008 +#define DPI_NATIVE_TYPE_OBJECT 3009 +#define DPI_NATIVE_TYPE_STMT 3010 +#define DPI_NATIVE_TYPE_BOOLEAN 3011 +#define DPI_NATIVE_TYPE_ROWID 3012 + +// operation codes (database change and continuous query notification) +typedef uint32_t dpiOpCode; +#define DPI_OPCODE_ALL_OPS 0x0 +#define DPI_OPCODE_ALL_ROWS 0x1 +#define DPI_OPCODE_INSERT 0x2 +#define DPI_OPCODE_UPDATE 0x4 +#define DPI_OPCODE_DELETE 0x8 +#define DPI_OPCODE_ALTER 0x10 +#define DPI_OPCODE_DROP 0x20 +#define DPI_OPCODE_UNKNOWN 0x40 + +// Oracle types +typedef uint32_t dpiOracleTypeNum; +#define DPI_ORACLE_TYPE_NONE 2000 +#define DPI_ORACLE_TYPE_VARCHAR 2001 +#define DPI_ORACLE_TYPE_NVARCHAR 2002 +#define DPI_ORACLE_TYPE_CHAR 2003 +#define DPI_ORACLE_TYPE_NCHAR 2004 +#define DPI_ORACLE_TYPE_ROWID 2005 +#define DPI_ORACLE_TYPE_RAW 2006 +#define DPI_ORACLE_TYPE_NATIVE_FLOAT 2007 +#define DPI_ORACLE_TYPE_NATIVE_DOUBLE 2008 +#define DPI_ORACLE_TYPE_NATIVE_INT 2009 +#define DPI_ORACLE_TYPE_NUMBER 2010 +#define DPI_ORACLE_TYPE_DATE 2011 +#define DPI_ORACLE_TYPE_TIMESTAMP 2012 +#define DPI_ORACLE_TYPE_TIMESTAMP_TZ 2013 +#define DPI_ORACLE_TYPE_TIMESTAMP_LTZ 2014 +#define DPI_ORACLE_TYPE_INTERVAL_DS 2015 +#define DPI_ORACLE_TYPE_INTERVAL_YM 2016 +#define DPI_ORACLE_TYPE_CLOB 2017 +#define DPI_ORACLE_TYPE_NCLOB 2018 +#define DPI_ORACLE_TYPE_BLOB 2019 +#define DPI_ORACLE_TYPE_BFILE 2020 +#define DPI_ORACLE_TYPE_STMT 2021 +#define DPI_ORACLE_TYPE_BOOLEAN 2022 +#define DPI_ORACLE_TYPE_OBJECT 2023 +#define DPI_ORACLE_TYPE_LONG_VARCHAR 2024 +#define DPI_ORACLE_TYPE_LONG_RAW 2025 +#define DPI_ORACLE_TYPE_NATIVE_UINT 2026 +#define DPI_ORACLE_TYPE_MAX 2027 + +// session pool close modes +typedef uint32_t dpiPoolCloseMode; +#define DPI_MODE_POOL_CLOSE_DEFAULT 0x0000 +#define DPI_MODE_POOL_CLOSE_FORCE 0x0001 + +// modes used when acquiring a connection from a session pool +typedef uint8_t dpiPoolGetMode; +#define DPI_MODE_POOL_GET_WAIT 0 +#define DPI_MODE_POOL_GET_NOWAIT 1 +#define DPI_MODE_POOL_GET_FORCEGET 2 +#define DPI_MODE_POOL_GET_TIMEDWAIT 3 + +// purity values when acquiring a connection from a pool +typedef uint32_t dpiPurity; +#define DPI_PURITY_DEFAULT 0 +#define DPI_PURITY_NEW 1 +#define DPI_PURITY_SELF 2 + +// database shutdown modes +typedef uint32_t dpiShutdownMode; +#define DPI_MODE_SHUTDOWN_DEFAULT 0 +#define DPI_MODE_SHUTDOWN_TRANSACTIONAL 1 +#define DPI_MODE_SHUTDOWN_TRANSACTIONAL_LOCAL 2 +#define DPI_MODE_SHUTDOWN_IMMEDIATE 3 +#define DPI_MODE_SHUTDOWN_ABORT 4 +#define DPI_MODE_SHUTDOWN_FINAL 5 + +// SODA flags +#define DPI_SODA_FLAGS_DEFAULT 0x00 +#define DPI_SODA_FLAGS_ATOMIC_COMMIT 0x01 +#define DPI_SODA_FLAGS_CREATE_COLL_MAP 0x02 +#define DPI_SODA_FLAGS_INDEX_DROP_FORCE 0x04 + +// database startup modes +typedef uint32_t dpiStartupMode; +#define DPI_MODE_STARTUP_DEFAULT 0 +#define DPI_MODE_STARTUP_FORCE 1 +#define DPI_MODE_STARTUP_RESTRICT 2 + +// statement types +typedef uint16_t dpiStatementType; +#define DPI_STMT_TYPE_UNKNOWN 0 +#define DPI_STMT_TYPE_SELECT 1 +#define DPI_STMT_TYPE_UPDATE 2 +#define DPI_STMT_TYPE_DELETE 3 +#define DPI_STMT_TYPE_INSERT 4 +#define DPI_STMT_TYPE_CREATE 5 +#define DPI_STMT_TYPE_DROP 6 +#define DPI_STMT_TYPE_ALTER 7 +#define DPI_STMT_TYPE_BEGIN 8 +#define DPI_STMT_TYPE_DECLARE 9 +#define DPI_STMT_TYPE_CALL 10 +#define DPI_STMT_TYPE_EXPLAIN_PLAN 15 +#define DPI_STMT_TYPE_MERGE 16 +#define DPI_STMT_TYPE_ROLLBACK 17 +#define DPI_STMT_TYPE_COMMIT 21 + +// subscription grouping classes +typedef uint8_t dpiSubscrGroupingClass; +#define DPI_SUBSCR_GROUPING_CLASS_TIME 1 + +// subscription grouping types +typedef uint8_t dpiSubscrGroupingType; +#define DPI_SUBSCR_GROUPING_TYPE_SUMMARY 1 +#define DPI_SUBSCR_GROUPING_TYPE_LAST 2 + +// subscription namespaces +typedef uint32_t dpiSubscrNamespace; +#define DPI_SUBSCR_NAMESPACE_AQ 1 +#define DPI_SUBSCR_NAMESPACE_DBCHANGE 2 + +// subscription protocols +typedef uint32_t dpiSubscrProtocol; +#define DPI_SUBSCR_PROTO_CALLBACK 0 +#define DPI_SUBSCR_PROTO_MAIL 1 +#define DPI_SUBSCR_PROTO_PLSQL 2 +#define DPI_SUBSCR_PROTO_HTTP 3 + +// subscription quality of service +typedef uint32_t dpiSubscrQOS; +#define DPI_SUBSCR_QOS_RELIABLE 0x01 +#define DPI_SUBSCR_QOS_DEREG_NFY 0x02 +#define DPI_SUBSCR_QOS_ROWIDS 0x04 +#define DPI_SUBSCR_QOS_QUERY 0x08 +#define DPI_SUBSCR_QOS_BEST_EFFORT 0x10 + +// visibility of messages in advanced queuing +typedef uint32_t dpiVisibility; +#define DPI_VISIBILITY_IMMEDIATE 1 +#define DPI_VISIBILITY_ON_COMMIT 2 + + +//----------------------------------------------------------------------------- +// Handle Types +//----------------------------------------------------------------------------- +typedef struct dpiConn dpiConn; +typedef struct dpiPool dpiPool; +typedef struct dpiStmt dpiStmt; +typedef struct dpiVar dpiVar; +typedef struct dpiLob dpiLob; +typedef struct dpiObject dpiObject; +typedef struct dpiObjectAttr dpiObjectAttr; +typedef struct dpiObjectType dpiObjectType; +typedef struct dpiRowid dpiRowid; +typedef struct dpiSubscr dpiSubscr; +typedef struct dpiDeqOptions dpiDeqOptions; +typedef struct dpiEnqOptions dpiEnqOptions; +typedef struct dpiMsgProps dpiMsgProps; + + +//----------------------------------------------------------------------------- +// Complex Native Data Types (used for transferring data to/from ODPI-C) +//----------------------------------------------------------------------------- + +// structure used for transferring byte strings to/from ODPI-C +typedef struct { + char *ptr; + uint32_t length; + const char *encoding; +} dpiBytes; + +// structure used for transferring day/seconds intervals to/from ODPI-C +typedef struct { + int32_t days; + int32_t hours; + int32_t minutes; + int32_t seconds; + int32_t fseconds; +} dpiIntervalDS; + +// structure used for transferring years/months intervals to/from ODPI-C +typedef struct { + int32_t years; + int32_t months; +} dpiIntervalYM; + +// structure used for transferring dates to/from ODPI-C +typedef struct { + int16_t year; + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t second; + uint32_t fsecond; + int8_t tzHourOffset; + int8_t tzMinuteOffset; +} dpiTimestamp; + + +//----------------------------------------------------------------------------- +// Other Types +//----------------------------------------------------------------------------- + +// forward declarations +typedef struct dpiAppContext dpiAppContext; +typedef struct dpiCommonCreateParams dpiCommonCreateParams; +typedef struct dpiConnCreateParams dpiConnCreateParams; +typedef struct dpiContext dpiContext; +typedef struct dpiData dpiData; +typedef struct dpiDataTypeInfo dpiDataTypeInfo; +typedef struct dpiEncodingInfo dpiEncodingInfo; +typedef struct dpiErrorInfo dpiErrorInfo; +typedef struct dpiObjectAttrInfo dpiObjectAttrInfo; +typedef struct dpiObjectTypeInfo dpiObjectTypeInfo; +typedef struct dpiPoolCreateParams dpiPoolCreateParams; +typedef struct dpiQueryInfo dpiQueryInfo; +typedef struct dpiQueue dpiQueue; +typedef struct dpiShardingKeyColumn dpiShardingKeyColumn; +typedef struct dpiSodaColl dpiSodaColl; +typedef struct dpiSodaCollNames dpiSodaCollNames; +typedef struct dpiSodaCollCursor dpiSodaCollCursor; +typedef struct dpiSodaDb dpiSodaDb; +typedef struct dpiSodaDoc dpiSodaDoc; +typedef struct dpiSodaDocCursor dpiSodaDocCursor; +typedef struct dpiSodaOperOptions dpiSodaOperOptions; +typedef struct dpiStmtInfo dpiStmtInfo; +typedef struct dpiSubscrCreateParams dpiSubscrCreateParams; +typedef struct dpiSubscrMessage dpiSubscrMessage; +typedef struct dpiSubscrMessageQuery dpiSubscrMessageQuery; +typedef struct dpiSubscrMessageRow dpiSubscrMessageRow; +typedef struct dpiSubscrMessageTable dpiSubscrMessageTable; +typedef struct dpiVersionInfo dpiVersionInfo; + +// union used for providing a buffer of any data type +typedef union { + int asBoolean; + int64_t asInt64; + uint64_t asUint64; + float asFloat; + double asDouble; + dpiBytes asBytes; + dpiTimestamp asTimestamp; + dpiIntervalDS asIntervalDS; + dpiIntervalYM asIntervalYM; + dpiLob *asLOB; + dpiObject *asObject; + dpiStmt *asStmt; + dpiRowid *asRowid; +} dpiDataBuffer; + +// structure used for application context +struct dpiAppContext { + const char *namespaceName; + uint32_t namespaceNameLength; + const char *name; + uint32_t nameLength; + const char *value; + uint32_t valueLength; +}; + +// structure used for common parameters used for creating standalone +// connections and session pools +struct dpiCommonCreateParams { + dpiCreateMode createMode; + const char *encoding; + const char *nencoding; + const char *edition; + uint32_t editionLength; + const char *driverName; + uint32_t driverNameLength; +}; + +// structure used for creating connections +struct dpiConnCreateParams { + dpiAuthMode authMode; + const char *connectionClass; + uint32_t connectionClassLength; + dpiPurity purity; + const char *newPassword; + uint32_t newPasswordLength; + dpiAppContext *appContext; + uint32_t numAppContext; + int externalAuth; + void *externalHandle; + dpiPool *pool; + const char *tag; + uint32_t tagLength; + int matchAnyTag; + const char *outTag; + uint32_t outTagLength; + int outTagFound; + dpiShardingKeyColumn *shardingKeyColumns; + uint8_t numShardingKeyColumns; + dpiShardingKeyColumn *superShardingKeyColumns; + uint8_t numSuperShardingKeyColumns; + int outNewSession; +}; + +// structure used for transferring data to/from ODPI-C +struct dpiData { + int isNull; + dpiDataBuffer value; +}; + +// structure used for providing metadata about data types +struct dpiDataTypeInfo { + dpiOracleTypeNum oracleTypeNum; + dpiNativeTypeNum defaultNativeTypeNum; + uint16_t ociTypeCode; + uint32_t dbSizeInBytes; + uint32_t clientSizeInBytes; + uint32_t sizeInChars; + int16_t precision; + int8_t scale; + uint8_t fsPrecision; + dpiObjectType *objectType; +}; + +// structure used for transferring encoding information from ODPI-C +struct dpiEncodingInfo { + const char *encoding; + int32_t maxBytesPerCharacter; + const char *nencoding; + int32_t nmaxBytesPerCharacter; +}; + +// structure used for transferring error information from ODPI-C +struct dpiErrorInfo { + int32_t code; + uint16_t offset; + const char *message; + uint32_t messageLength; + const char *encoding; + const char *fnName; + const char *action; + const char *sqlState; + int isRecoverable; +}; + +// structure used for transferring object attribute information from ODPI-C +struct dpiObjectAttrInfo { + const char *name; + uint32_t nameLength; + dpiDataTypeInfo typeInfo; +}; + +// structure used for transferring object type information from ODPI-C +struct dpiObjectTypeInfo { + const char *schema; + uint32_t schemaLength; + const char *name; + uint32_t nameLength; + int isCollection; + dpiDataTypeInfo elementTypeInfo; + uint16_t numAttributes; +}; + +// structure used for creating pools +struct dpiPoolCreateParams { + uint32_t minSessions; + uint32_t maxSessions; + uint32_t sessionIncrement; + int pingInterval; + int pingTimeout; + int homogeneous; + int externalAuth; + dpiPoolGetMode getMode; + const char *outPoolName; + uint32_t outPoolNameLength; + uint32_t timeout; + uint32_t waitTimeout; + uint32_t maxLifetimeSession; + const char *plsqlFixupCallback; + uint32_t plsqlFixupCallbackLength; + uint32_t maxSessionsPerShard; +}; + +// structure used for transferring query metadata from ODPI-C +struct dpiQueryInfo { + const char *name; + uint32_t nameLength; + dpiDataTypeInfo typeInfo; + int nullOk; +}; + +// structure used for sharding key columns +struct dpiShardingKeyColumn { + dpiOracleTypeNum oracleTypeNum; + dpiNativeTypeNum nativeTypeNum; + dpiDataBuffer value; +}; + +// structure used for getting collection names from the database +struct dpiSodaCollNames { + uint32_t numNames; + const char **names; + uint32_t *nameLengths; +}; + +// structure used for SODA operations (find/replace/remove) +struct dpiSodaOperOptions { + uint32_t numKeys; + const char **keys; + uint32_t *keyLengths; + const char *key; + uint32_t keyLength; + const char *version; + uint32_t versionLength; + const char *filter; + uint32_t filterLength; + uint32_t skip; + uint32_t limit; +}; + +// structure used for transferring statement information from ODPI-C +struct dpiStmtInfo { + int isQuery; + int isPLSQL; + int isDDL; + int isDML; + dpiStatementType statementType; + int isReturning; +}; + +// callback for subscriptions +typedef void (*dpiSubscrCallback)(void* context, dpiSubscrMessage *message); + +// structure used for creating subscriptions +struct dpiSubscrCreateParams { + dpiSubscrNamespace subscrNamespace; + dpiSubscrProtocol protocol; + dpiSubscrQOS qos; + dpiOpCode operations; + uint32_t portNumber; + uint32_t timeout; + const char *name; + uint32_t nameLength; + dpiSubscrCallback callback; + void *callbackContext; + const char *recipientName; + uint32_t recipientNameLength; + const char *ipAddress; + uint32_t ipAddressLength; + uint8_t groupingClass; + uint32_t groupingValue; + uint8_t groupingType; + uint64_t outRegId; + int clientInitiated; +}; + +// structure used for transferring messages in subscription callbacks +struct dpiSubscrMessage { + dpiEventType eventType; + const char *dbName; + uint32_t dbNameLength; + dpiSubscrMessageTable *tables; + uint32_t numTables; + dpiSubscrMessageQuery *queries; + uint32_t numQueries; + dpiErrorInfo *errorInfo; + const void *txId; + uint32_t txIdLength; + int registered; + const char *queueName; + uint32_t queueNameLength; + const char *consumerName; + uint32_t consumerNameLength; +}; + +// structure used for transferring query information in messages in +// subscription callbacks (continuous query notification) +struct dpiSubscrMessageQuery { + uint64_t id; + dpiOpCode operation; + dpiSubscrMessageTable *tables; + uint32_t numTables; +}; + +// structure used for transferring row information in messages in +// subscription callbacks +struct dpiSubscrMessageRow { + dpiOpCode operation; + const char *rowid; + uint32_t rowidLength; +}; + +// structure used for transferring table information in messages in +// subscription callbacks +struct dpiSubscrMessageTable { + dpiOpCode operation; + const char *name; + uint32_t nameLength; + dpiSubscrMessageRow *rows; + uint32_t numRows; +}; + +// structure used for transferring version information +struct dpiVersionInfo { + int versionNum; + int releaseNum; + int updateNum; + int portReleaseNum; + int portUpdateNum; + uint32_t fullVersionNum; +}; + + +//----------------------------------------------------------------------------- +// Context Methods (dpiContext) +//----------------------------------------------------------------------------- + +// create a context handle and validate the version information +int dpiContext_create(unsigned int majorVersion, unsigned int minorVersion, + dpiContext **context, dpiErrorInfo *errorInfo); + +// destroy context handle +int dpiContext_destroy(dpiContext *context); + +// return the OCI client version in use +int dpiContext_getClientVersion(const dpiContext *context, + dpiVersionInfo *versionInfo); + +// get error information +void dpiContext_getError(const dpiContext *context, dpiErrorInfo *errorInfo); + +// initialize context parameters to default values +int dpiContext_initCommonCreateParams(const dpiContext *context, + dpiCommonCreateParams *params); + +// initialize connection create parameters to default values +int dpiContext_initConnCreateParams(const dpiContext *context, + dpiConnCreateParams *params); + +// initialize pool create parameters to default values +int dpiContext_initPoolCreateParams(const dpiContext *context, + dpiPoolCreateParams *params); + +// initialize SODA operation options to default values +int dpiContext_initSodaOperOptions(const dpiContext *context, + dpiSodaOperOptions *options); + +// initialize subscription create parameters to default values +int dpiContext_initSubscrCreateParams(const dpiContext *context, + dpiSubscrCreateParams *params); + + +//----------------------------------------------------------------------------- +// Connection Methods (dpiConn) +//----------------------------------------------------------------------------- + +// add a reference to a connection +int dpiConn_addRef(dpiConn *conn); + +// begin a distributed transaction +int dpiConn_beginDistribTrans(dpiConn *conn, long formatId, + const char *transactionId, uint32_t transactionIdLength, + const char *branchId, uint32_t branchIdLength); + +// break execution of the statement running on the connection +int dpiConn_breakExecution(dpiConn *conn); + +// change the password for the specified user +int dpiConn_changePassword(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *oldPassword, + uint32_t oldPasswordLength, const char *newPassword, + uint32_t newPasswordLength); + +// close the connection now, not when the reference count reaches zero +int dpiConn_close(dpiConn *conn, dpiConnCloseMode mode, const char *tag, + uint32_t tagLength); + +// commits the current active transaction +int dpiConn_commit(dpiConn *conn); + +// create a connection and return a reference to it +int dpiConn_create(const dpiContext *context, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + const dpiCommonCreateParams *commonParams, + dpiConnCreateParams *createParams, dpiConn **conn); + +// dequeue a message from a queue +int dpiConn_deqObject(dpiConn *conn, const char *queueName, + uint32_t queueNameLength, dpiDeqOptions *options, dpiMsgProps *props, + dpiObject *payload, const char **msgId, uint32_t *msgIdLength); + +// enqueue a message to a queue +int dpiConn_enqObject(dpiConn *conn, const char *queueName, + uint32_t queueNameLength, dpiEnqOptions *options, dpiMsgProps *props, + dpiObject *payload, const char **msgId, uint32_t *msgIdLength); + +// get call timeout in place for round-trips with this connection +int dpiConn_getCallTimeout(dpiConn *conn, uint32_t *value); + +// get current schema associated with the connection +int dpiConn_getCurrentSchema(dpiConn *conn, const char **value, + uint32_t *valueLength); + +// get edition associated with the connection +int dpiConn_getEdition(dpiConn *conn, const char **value, + uint32_t *valueLength); + +// return the encoding information used by the connection +int dpiConn_getEncodingInfo(dpiConn *conn, dpiEncodingInfo *info); + +// get external name associated with the connection +int dpiConn_getExternalName(dpiConn *conn, const char **value, + uint32_t *valueLength); + +// get the OCI service context handle associated with the connection +int dpiConn_getHandle(dpiConn *conn, void **handle); + +// get internal name associated with the connection +int dpiConn_getInternalName(dpiConn *conn, const char **value, + uint32_t *valueLength); + +// get logical transaction id associated with the connection +int dpiConn_getLTXID(dpiConn *conn, const char **value, uint32_t *valueLength); + +// create a new object type and return it for subsequent object creation +int dpiConn_getObjectType(dpiConn *conn, const char *name, uint32_t nameLength, + dpiObjectType **objType); + +// return information about the server version in use +int dpiConn_getServerVersion(dpiConn *conn, const char **releaseString, + uint32_t *releaseStringLength, dpiVersionInfo *versionInfo); + +// get SODA interface object +int dpiConn_getSodaDb(dpiConn *conn, dpiSodaDb **db); + +// return the statement cache size +int dpiConn_getStmtCacheSize(dpiConn *conn, uint32_t *cacheSize); + +// create a new dequeue options object and return it +int dpiConn_newDeqOptions(dpiConn *conn, dpiDeqOptions **options); + +// create a new enqueue options object and return it +int dpiConn_newEnqOptions(dpiConn *conn, dpiEnqOptions **options); + +// create a new message properties object and return it +int dpiConn_newMsgProps(dpiConn *conn, dpiMsgProps **props); + +// create a new AQ queue +int dpiConn_newQueue(dpiConn *conn, const char *name, uint32_t nameLength, + dpiObjectType *payloadType, dpiQueue **queue); + +// create a new temporary LOB +int dpiConn_newTempLob(dpiConn *conn, dpiOracleTypeNum lobType, dpiLob **lob); + +// create a new variable and return it for subsequent binding/defining +int dpiConn_newVar(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, + dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, + int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, + dpiData **data); + +// ping the connection to see if it is still alive +int dpiConn_ping(dpiConn *conn); + +// prepare a distributed transaction for commit +int dpiConn_prepareDistribTrans(dpiConn *conn, int *commitNeeded); + +// prepare a statement and return it for subsequent execution/fetching +int dpiConn_prepareStmt(dpiConn *conn, int scrollable, const char *sql, + uint32_t sqlLength, const char *tag, uint32_t tagLength, + dpiStmt **stmt); + +// release a reference to the connection +int dpiConn_release(dpiConn *conn); + +// rolls back the current active transaction +int dpiConn_rollback(dpiConn *conn); + +// set action associated with the connection +int dpiConn_setAction(dpiConn *conn, const char *value, uint32_t valueLength); + +// set call timeout for subsequent round-trips with this connection +int dpiConn_setCallTimeout(dpiConn *conn, uint32_t value); + +// set client identifier associated with the connection +int dpiConn_setClientIdentifier(dpiConn *conn, const char *value, + uint32_t valueLength); + +// set client info associated with the connection +int dpiConn_setClientInfo(dpiConn *conn, const char *value, + uint32_t valueLength); + +// set current schema associated with the connection +int dpiConn_setCurrentSchema(dpiConn *conn, const char *value, + uint32_t valueLength); + +// set database operation associated with the connection +int dpiConn_setDbOp(dpiConn *conn, const char *value, uint32_t valueLength); + +// set external name associated with the connection +int dpiConn_setExternalName(dpiConn *conn, const char *value, + uint32_t valueLength); + +// set internal name associated with the connection +int dpiConn_setInternalName(dpiConn *conn, const char *value, + uint32_t valueLength); + +// set module associated with the connection +int dpiConn_setModule(dpiConn *conn, const char *value, uint32_t valueLength); + +// set the statement cache size +int dpiConn_setStmtCacheSize(dpiConn *conn, uint32_t cacheSize); + +// shutdown the database +int dpiConn_shutdownDatabase(dpiConn *conn, dpiShutdownMode mode); + +// startup the database +int dpiConn_startupDatabase(dpiConn *conn, dpiStartupMode mode); + +// subscribe to events in the database +int dpiConn_subscribe(dpiConn *conn, dpiSubscrCreateParams *params, + dpiSubscr **subscr); + +// unsubscribe from events in the database +int dpiConn_unsubscribe(dpiConn *conn, dpiSubscr *subscr); + + +//----------------------------------------------------------------------------- +// Data Methods (dpiData) +//----------------------------------------------------------------------------- + +// return the boolean portion of the data +int dpiData_getBool(dpiData *data); + +// return the bytes portion of the data +dpiBytes *dpiData_getBytes(dpiData *data); + +// return the double portion of the data +double dpiData_getDouble(dpiData *data); + +// return the float portion of the data +float dpiData_getFloat(dpiData *data); + +// return the integer portion of the data +int64_t dpiData_getInt64(dpiData *data); + +// return the interval (days/seconds) portion of the data +dpiIntervalDS *dpiData_getIntervalDS(dpiData *data); + +// return the interval (years/months) portion of the data +dpiIntervalYM *dpiData_getIntervalYM(dpiData *data); + +// return whether data value is null or not +int dpiData_getIsNull(dpiData *data); + +// return the LOB portion of the data +dpiLob *dpiData_getLOB(dpiData *data); + +// return the object portion of the data +dpiObject *dpiData_getObject(dpiData *data); + +// return the statement portion of the data +dpiStmt *dpiData_getStmt(dpiData *data); + +// return the timestamp portion of the data +dpiTimestamp *dpiData_getTimestamp(dpiData *data); + +// return the unsigned integer portion of the data +uint64_t dpiData_getUint64(dpiData *data); + +// set the boolean portion of the data +void dpiData_setBool(dpiData *data, int value); + +// set the bytes portion of the data +void dpiData_setBytes(dpiData *data, char *ptr, uint32_t length); + +// set the double portion of the data +void dpiData_setDouble(dpiData *data, double value); + +// set the float portion of the data +void dpiData_setFloat(dpiData *data, float value); + +// set the integer portion of the data +void dpiData_setInt64(dpiData *data, int64_t value); + +// set the interval (days/seconds) portion of the data +void dpiData_setIntervalDS(dpiData *data, int32_t days, int32_t hours, + int32_t minutes, int32_t seconds, int32_t fsceconds); + +// set the interval (years/months) portion of the data +void dpiData_setIntervalYM(dpiData *data, int32_t years, int32_t months); + +// set the LOB portion of the data +void dpiData_setLOB(dpiData *data, dpiLob *lob); + +// set data to the null value +void dpiData_setNull(dpiData *data); + +// set the object portion of the data +void dpiData_setObject(dpiData *data, dpiObject *obj); + +// set the statement portion of the data +void dpiData_setStmt(dpiData *data, dpiStmt *stmt); + +// set the timestamp portion of the data +void dpiData_setTimestamp(dpiData *data, int16_t year, uint8_t month, + uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, + uint32_t fsecond, int8_t tzHourOffset, int8_t tzMinuteOffset); + +// set the unsigned integer portion of the data +void dpiData_setUint64(dpiData *data, uint64_t value); + + +//----------------------------------------------------------------------------- +// Dequeue Option Methods (dpiDeqOptions) +//----------------------------------------------------------------------------- + +// add a reference to dequeue options +int dpiDeqOptions_addRef(dpiDeqOptions *options); + +// return condition associated with dequeue options +int dpiDeqOptions_getCondition(dpiDeqOptions *options, const char **value, + uint32_t *valueLength); + +// return consumer name associated with dequeue options +int dpiDeqOptions_getConsumerName(dpiDeqOptions *options, const char **value, + uint32_t *valueLength); + +// return correlation associated with dequeue options +int dpiDeqOptions_getCorrelation(dpiDeqOptions *options, const char **value, + uint32_t *valueLength); + +// return mode associated with dequeue options +int dpiDeqOptions_getMode(dpiDeqOptions *options, dpiDeqMode *value); + +// return message id associated with dequeue options +int dpiDeqOptions_getMsgId(dpiDeqOptions *options, const char **value, + uint32_t *valueLength); + +// return navigation associated with dequeue options +int dpiDeqOptions_getNavigation(dpiDeqOptions *options, + dpiDeqNavigation *value); + +// return transformation associated with dequeue options +int dpiDeqOptions_getTransformation(dpiDeqOptions *options, const char **value, + uint32_t *valueLength); + +// return visibility associated with dequeue options +int dpiDeqOptions_getVisibility(dpiDeqOptions *options, dpiVisibility *value); + +// return wait time associated with dequeue options +int dpiDeqOptions_getWait(dpiDeqOptions *options, uint32_t *value); + +// release a reference from dequeue options +int dpiDeqOptions_release(dpiDeqOptions *options); + +// set condition associated with dequeue options +int dpiDeqOptions_setCondition(dpiDeqOptions *options, const char *value, + uint32_t valueLength); + +// set consumer name associated with dequeue options +int dpiDeqOptions_setConsumerName(dpiDeqOptions *options, const char *value, + uint32_t valueLength); + +// set correlation associated with dequeue options +int dpiDeqOptions_setCorrelation(dpiDeqOptions *options, const char *value, + uint32_t valueLength); + +// set delivery mode associated with dequeue options +int dpiDeqOptions_setDeliveryMode(dpiDeqOptions *options, + dpiMessageDeliveryMode value); + +// set mode associated with dequeue options +int dpiDeqOptions_setMode(dpiDeqOptions *options, dpiDeqMode value); + +// set message id associated with dequeue options +int dpiDeqOptions_setMsgId(dpiDeqOptions *options, const char *value, + uint32_t valueLength); + +// set navigation associated with dequeue options +int dpiDeqOptions_setNavigation(dpiDeqOptions *options, + dpiDeqNavigation value); + +// set transformation associated with dequeue options +int dpiDeqOptions_setTransformation(dpiDeqOptions *options, const char *value, + uint32_t valueLength); + +// set visibility associated with dequeue options +int dpiDeqOptions_setVisibility(dpiDeqOptions *options, dpiVisibility value); + +// set wait time associated with dequeue options +int dpiDeqOptions_setWait(dpiDeqOptions *options, uint32_t value); + + +//----------------------------------------------------------------------------- +// Enqueue Option Methods (dpiEnqOptions) +//----------------------------------------------------------------------------- + +// add a reference to enqueue options +int dpiEnqOptions_addRef(dpiEnqOptions *options); + +// return transformation associated with enqueue options +int dpiEnqOptions_getTransformation(dpiEnqOptions *options, const char **value, + uint32_t *valueLength); + +// return visibility associated with enqueue options +int dpiEnqOptions_getVisibility(dpiEnqOptions *options, dpiVisibility *value); + +// release a reference from enqueue options +int dpiEnqOptions_release(dpiEnqOptions *options); + +// set delivery mode associated with enqueue options +int dpiEnqOptions_setDeliveryMode(dpiEnqOptions *options, + dpiMessageDeliveryMode value); + +// set transformation associated with enqueue options +int dpiEnqOptions_setTransformation(dpiEnqOptions *options, const char *value, + uint32_t valueLength); + +// set visibility associated with enqueue options +int dpiEnqOptions_setVisibility(dpiEnqOptions *options, dpiVisibility value); + + +//----------------------------------------------------------------------------- +// LOB Methods (dpiLob) +//----------------------------------------------------------------------------- + +// add a reference to the LOB +int dpiLob_addRef(dpiLob *lob); + +// close the LOB +int dpiLob_close(dpiLob *lob); + +// close the LOB's resources +int dpiLob_closeResource(dpiLob *lob); + +// create a copy of the LOB +int dpiLob_copy(dpiLob *lob, dpiLob **copiedLob); + +// get buffer size in bytes for a LOB +int dpiLob_getBufferSize(dpiLob *lob, uint64_t sizeInChars, + uint64_t *sizeInBytes); + +// return the chunk size for the LOB +int dpiLob_getChunkSize(dpiLob *lob, uint32_t *size); + +// return the directory alias name and file name of a BFILE LOB +int dpiLob_getDirectoryAndFileName(dpiLob *lob, const char **directoryAlias, + uint32_t *directoryAliasLength, const char **fileName, + uint32_t *fileNameLength); + +// return if the file associated with a BFILE LOB exists +int dpiLob_getFileExists(dpiLob *lob, int *exists); + +// return if the LOB's resources are currently open +int dpiLob_getIsResourceOpen(dpiLob *lob, int *isOpen); + +// return the current size of the LOB +int dpiLob_getSize(dpiLob *lob, uint64_t *size); + +// open the LOB's resources (used to improve performance of multiple +// read/writes operations) +int dpiLob_openResource(dpiLob *lob); + +// read bytes from the LOB at the specified offset +int dpiLob_readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, + char *value, uint64_t *valueLength); + +// release a reference to the LOB +int dpiLob_release(dpiLob *lob); + +// set the directory name and file name of the BFILE LOB +int dpiLob_setDirectoryAndFileName(dpiLob *lob, const char *directoryAlias, + uint32_t directoryAliasLength, const char *fileName, + uint32_t fileNameLength); + +// sets the contents of a LOB from a byte string +int dpiLob_setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength); + +// trim the LOB to the specified size +int dpiLob_trim(dpiLob *lob, uint64_t newSize); + +// write bytes to the LOB at the specified offset +int dpiLob_writeBytes(dpiLob *lob, uint64_t offset, const char *value, + uint64_t valueLength); + + +//----------------------------------------------------------------------------- +// Message Properties Methods (dpiMsgProps) +//----------------------------------------------------------------------------- + +// add a reference to message properties +int dpiMsgProps_addRef(dpiMsgProps *props); + +// return the number of attempts made to deliver the message +int dpiMsgProps_getNumAttempts(dpiMsgProps *props, int32_t *value); + +// return correlation associated with the message +int dpiMsgProps_getCorrelation(dpiMsgProps *props, const char **value, + uint32_t *valueLength); + +// return the number of seconds the message was delayed +int dpiMsgProps_getDelay(dpiMsgProps *props, int32_t *value); + +// return the mode used for delivering the message +int dpiMsgProps_getDeliveryMode(dpiMsgProps *props, + dpiMessageDeliveryMode *value); + +// return the time the message was enqueued +int dpiMsgProps_getEnqTime(dpiMsgProps *props, dpiTimestamp *value); + +// return the name of the exception queue associated with the message +int dpiMsgProps_getExceptionQ(dpiMsgProps *props, const char **value, + uint32_t *valueLength); + +// return the number of seconds until the message expires +int dpiMsgProps_getExpiration(dpiMsgProps *props, int32_t *value); + +// return the message id for the message (after enqueuing or dequeuing) +int dpiMsgProps_getMsgId(dpiMsgProps *props, const char **value, + uint32_t *valueLength); + +// return the original message id for the message +int dpiMsgProps_getOriginalMsgId(dpiMsgProps *props, const char **value, + uint32_t *valueLength); + +// return the payload of the message (object or bytes) +int dpiMsgProps_getPayload(dpiMsgProps *props, dpiObject **obj, + const char **value, uint32_t *valueLength); + +// return the priority of the message +int dpiMsgProps_getPriority(dpiMsgProps *props, int32_t *value); + +// return the state of the message +int dpiMsgProps_getState(dpiMsgProps *props, dpiMessageState *value); + +// release a reference from message properties +int dpiMsgProps_release(dpiMsgProps *props); + +// set correlation associated with the message +int dpiMsgProps_setCorrelation(dpiMsgProps *props, const char *value, + uint32_t valueLength); + +// set the number of seconds to delay the message +int dpiMsgProps_setDelay(dpiMsgProps *props, int32_t value); + +// set the name of the exception queue associated with the message +int dpiMsgProps_setExceptionQ(dpiMsgProps *props, const char *value, + uint32_t valueLength); + +// set the number of seconds until the message expires +int dpiMsgProps_setExpiration(dpiMsgProps *props, int32_t value); + +// set the original message id for the message +int dpiMsgProps_setOriginalMsgId(dpiMsgProps *props, const char *value, + uint32_t valueLength); + +// set the payload of the message (as a series of bytes) +int dpiMsgProps_setPayloadBytes(dpiMsgProps *props, const char *value, + uint32_t valueLength); + +// set the payload of the message (as an object) +int dpiMsgProps_setPayloadObject(dpiMsgProps *props, dpiObject *obj); + +// set the priority of the message +int dpiMsgProps_setPriority(dpiMsgProps *props, int32_t value); + + +//----------------------------------------------------------------------------- +// Object Methods (dpiObject) +//----------------------------------------------------------------------------- + +// add a reference to the object +int dpiObject_addRef(dpiObject *obj); + +// append an element to the collection +int dpiObject_appendElement(dpiObject *obj, dpiNativeTypeNum nativeTypeNum, + dpiData *value); + +// copy the object and return the copied object +int dpiObject_copy(dpiObject *obj, dpiObject **copiedObj); + +// delete an element from the collection +int dpiObject_deleteElementByIndex(dpiObject *obj, int32_t index); + +// get the value of the specified attribute +int dpiObject_getAttributeValue(dpiObject *obj, dpiObjectAttr *attr, + dpiNativeTypeNum nativeTypeNum, dpiData *value); + +// return whether an element exists in a collection at the specified index +int dpiObject_getElementExistsByIndex(dpiObject *obj, int32_t index, + int *exists); + +// get the value of the element in a collection at the specified index +int dpiObject_getElementValueByIndex(dpiObject *obj, int32_t index, + dpiNativeTypeNum nativeTypeNum, dpiData *value); + +// return the first index used in a collection +int dpiObject_getFirstIndex(dpiObject *obj, int32_t *index, int *exists); + +// return the last index used in a collection +int dpiObject_getLastIndex(dpiObject *obj, int32_t *index, int *exists); + +// return the next index used in a collection given an index +int dpiObject_getNextIndex(dpiObject *obj, int32_t index, int32_t *nextIndex, + int *exists); + +// return the previous index used in a collection given an index +int dpiObject_getPrevIndex(dpiObject *obj, int32_t index, int32_t *prevIndex, + int *exists); + +// return the number of elements in a collection +int dpiObject_getSize(dpiObject *obj, int32_t *size); + +// release a reference to the object +int dpiObject_release(dpiObject *obj); + +// set the value of the specified attribute +int dpiObject_setAttributeValue(dpiObject *obj, dpiObjectAttr *attr, + dpiNativeTypeNum nativeTypeNum, dpiData *value); + +// set the value of the element in a collection at the specified index +int dpiObject_setElementValueByIndex(dpiObject *obj, int32_t index, + dpiNativeTypeNum nativeTypeNum, dpiData *value); + +// trim a number of elements from the end of a collection +int dpiObject_trim(dpiObject *obj, uint32_t numToTrim); + + +//----------------------------------------------------------------------------- +// Object Type Attribute Methods (dpiObjectAttr) +//----------------------------------------------------------------------------- + +// add a reference to the attribute +int dpiObjectAttr_addRef(dpiObjectAttr *attr); + +// return the name of the attribute +int dpiObjectAttr_getInfo(dpiObjectAttr *attr, dpiObjectAttrInfo *info); + +// release a reference to the attribute +int dpiObjectAttr_release(dpiObjectAttr *attr); + + +//----------------------------------------------------------------------------- +// Object Type Methods (dpiObjectType) +//----------------------------------------------------------------------------- + +// add a reference to the object type +int dpiObjectType_addRef(dpiObjectType *objType); + +// create an object of the specified type and return it +int dpiObjectType_createObject(dpiObjectType *objType, dpiObject **obj); + +// return the attributes available on the object type +int dpiObjectType_getAttributes(dpiObjectType *objType, uint16_t numAttributes, + dpiObjectAttr **attributes); + +// return information about the object type +int dpiObjectType_getInfo(dpiObjectType *objType, dpiObjectTypeInfo *info); + +// release a reference to the object type +int dpiObjectType_release(dpiObjectType *objType); + + +//----------------------------------------------------------------------------- +// Session Pools Methods (dpiPool) +//----------------------------------------------------------------------------- + +// acquire a connection from the pool and return it +int dpiPool_acquireConnection(dpiPool *pool, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + dpiConnCreateParams *createParams, dpiConn **conn); + +// add a reference to a pool +int dpiPool_addRef(dpiPool *pool); + +// destroy the pool now, not when its reference count reaches zero +int dpiPool_close(dpiPool *pool, dpiPoolCloseMode closeMode); + +// create a session pool and return it +int dpiPool_create(const dpiContext *context, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + const dpiCommonCreateParams *commonParams, + dpiPoolCreateParams *createParams, dpiPool **pool); + +// get the pool's busy count +int dpiPool_getBusyCount(dpiPool *pool, uint32_t *value); + +// return the encoding information used by the session pool +int dpiPool_getEncodingInfo(dpiPool *pool, dpiEncodingInfo *info); + +// get the pool's "get" mode +int dpiPool_getGetMode(dpiPool *pool, dpiPoolGetMode *value); + +// get the pool's maximum lifetime session +int dpiPool_getMaxLifetimeSession(dpiPool *pool, uint32_t *value); + +// get the pool's open count +int dpiPool_getOpenCount(dpiPool *pool, uint32_t *value); + +// return the statement cache size +int dpiPool_getStmtCacheSize(dpiPool *pool, uint32_t *cacheSize); + +// get the pool's timeout value +int dpiPool_getTimeout(dpiPool *pool, uint32_t *value); + +// get the pool's wait timeout value +int dpiPool_getWaitTimeout(dpiPool *pool, uint32_t *value); + +// release a reference to the pool +int dpiPool_release(dpiPool *pool); + +// set the pool's "get" mode +int dpiPool_setGetMode(dpiPool *pool, dpiPoolGetMode value); + +// set the pool's maximum lifetime session +int dpiPool_setMaxLifetimeSession(dpiPool *pool, uint32_t value); + +// set the statement cache size +int dpiPool_setStmtCacheSize(dpiPool *pool, uint32_t cacheSize); + +// set the pool's timeout value +int dpiPool_setTimeout(dpiPool *pool, uint32_t value); + +// set the pool's wait timeout value +int dpiPool_setWaitTimeout(dpiPool *pool, uint32_t value); + + +//----------------------------------------------------------------------------- +// AQ Queue Methods (dpiQueue) +//----------------------------------------------------------------------------- + +// add a reference to the queue +int dpiQueue_addRef(dpiQueue *queue); + +// dequeue multiple messages from the queue +int dpiQueue_deqMany(dpiQueue *queue, uint32_t *numProps, dpiMsgProps **props); + +// dequeue a single message from the queue +int dpiQueue_deqOne(dpiQueue *queue, dpiMsgProps **props); + +// enqueue multiple message to the queue +int dpiQueue_enqMany(dpiQueue *queue, uint32_t numProps, dpiMsgProps **props); + +// enqueue a single message to the queue +int dpiQueue_enqOne(dpiQueue *queue, dpiMsgProps *props); + +// get a reference to the dequeue options associated with the queue +int dpiQueue_getDeqOptions(dpiQueue *queue, dpiDeqOptions **options); + +// get a reference to the enqueue options associated with the queue +int dpiQueue_getEnqOptions(dpiQueue *queue, dpiEnqOptions **options); + +// release a reference to the queue +int dpiQueue_release(dpiQueue *queue); + + +//----------------------------------------------------------------------------- +// SODA Collection Methods (dpiSodaColl) +//----------------------------------------------------------------------------- + +// add a reference to the SODA collection +int dpiSodaColl_addRef(dpiSodaColl *coll); + +// create an index on the collection +int dpiSodaColl_createIndex(dpiSodaColl *coll, const char *indexSpec, + uint32_t indexSpecLength, uint32_t flags); + +// drop a SODA collection +int dpiSodaColl_drop(dpiSodaColl *coll, uint32_t flags, int *isDropped); + +// drop an index on the collection +int dpiSodaColl_dropIndex(dpiSodaColl *coll, const char *name, + uint32_t nameLength, uint32_t flags, int *isDropped); + +// find documents in a SODA collection and return a cursor +int dpiSodaColl_find(dpiSodaColl *coll, const dpiSodaOperOptions *options, + uint32_t flags, dpiSodaDocCursor **cursor); + +// find a single document in a SODA collection +int dpiSodaColl_findOne(dpiSodaColl *coll, const dpiSodaOperOptions *options, + uint32_t flags, dpiSodaDoc **doc); + +// get the data guide for the collection +int dpiSodaColl_getDataGuide(dpiSodaColl *coll, uint32_t flags, + dpiSodaDoc **doc); + +// get the count of documents that match the criteria +int dpiSodaColl_getDocCount(dpiSodaColl *coll, + const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count); + +// get the metadata of the collection +int dpiSodaColl_getMetadata(dpiSodaColl *coll, const char **value, + uint32_t *valueLength); + +// get the name of the collection +int dpiSodaColl_getName(dpiSodaColl *coll, const char **value, + uint32_t *valueLength); + +// insert multiple documents into the SODA collection +int dpiSodaColl_insertMany(dpiSodaColl *coll, uint32_t numDocs, + dpiSodaDoc **docs, uint32_t flags, dpiSodaDoc **insertedDocs); + +// insert a document into the SODA collection +int dpiSodaColl_insertOne(dpiSodaColl *coll, dpiSodaDoc *doc, uint32_t flags, + dpiSodaDoc **insertedDoc); + +// release a reference to the SODA collection +int dpiSodaColl_release(dpiSodaColl *coll); + +// remove documents from a SODA collection (with operation options) +int dpiSodaColl_remove(dpiSodaColl *coll, const dpiSodaOperOptions *options, + uint32_t flags, uint64_t *count); + +// replace a document in a SODA collection (with operation options) +int dpiSodaColl_replaceOne(dpiSodaColl *coll, + const dpiSodaOperOptions *options, dpiSodaDoc *doc, uint32_t flags, + int *replaced, dpiSodaDoc **replacedDoc); + + +//----------------------------------------------------------------------------- +// SODA Collection Cursor Methods (dpiSodaCollCursor) +//----------------------------------------------------------------------------- + +// add a reference to the SODA collection cursor +int dpiSodaCollCursor_addRef(dpiSodaCollCursor *cursor); + +// close the SODA collection cursor +int dpiSodaCollCursor_close(dpiSodaCollCursor *cursor); + +// get the next collection from the cursor +int dpiSodaCollCursor_getNext(dpiSodaCollCursor *cursor, uint32_t flags, + dpiSodaColl **coll); + +// release a reference to the SODA collection cursor +int dpiSodaCollCursor_release(dpiSodaCollCursor *cursor); + + +//----------------------------------------------------------------------------- +// SODA Database Methods (dpiSodaDb) +//----------------------------------------------------------------------------- + +// add a reference to the SODA database +int dpiSodaDb_addRef(dpiSodaDb *db); + +// create a new SODA collection +int dpiSodaDb_createCollection(dpiSodaDb *db, const char *name, + uint32_t nameLength, const char *metadata, uint32_t metadataLength, + uint32_t flags, dpiSodaColl **coll); + +// create a new SODA document +int dpiSodaDb_createDocument(dpiSodaDb *db, const char *key, + uint32_t keyLength, const char *content, uint32_t contentLength, + const char *mediaType, uint32_t mediaTypeLength, uint32_t flags, + dpiSodaDoc **doc); + +// free the memory allocated when getting an array of SODA collection names +int dpiSodaDb_freeCollectionNames(dpiSodaDb *db, dpiSodaCollNames *names); + +// return a cursor to iterate over SODA collections +int dpiSodaDb_getCollections(dpiSodaDb *db, const char *startName, + uint32_t startNameLength, uint32_t flags, dpiSodaCollCursor **cursor); + +// return an array of SODA collection names +int dpiSodaDb_getCollectionNames(dpiSodaDb *db, const char *startName, + uint32_t startNameLength, uint32_t limit, uint32_t flags, + dpiSodaCollNames *names); + +// open an existing SODA collection +int dpiSodaDb_openCollection(dpiSodaDb *db, const char *name, + uint32_t nameLength, uint32_t flags, dpiSodaColl **coll); + +// release a reference to the SODA database +int dpiSodaDb_release(dpiSodaDb *db); + + +//----------------------------------------------------------------------------- +// SODA Document Methods (dpiSodaDoc) +//----------------------------------------------------------------------------- + +// add a reference to the SODA document +int dpiSodaDoc_addRef(dpiSodaDoc *cursor); + +// get the content of the document +int dpiSodaDoc_getContent(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength, const char **encoding); + +// get the created timestamp associated with the document +int dpiSodaDoc_getCreatedOn(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength); + +// get the key associated with the document +int dpiSodaDoc_getKey(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength); + +// get the last modified timestamp associated with the document +int dpiSodaDoc_getLastModified(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength); + +// get the media type of the document +int dpiSodaDoc_getMediaType(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength); + +// get the version of the document +int dpiSodaDoc_getVersion(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength); + +// release a reference to the SODA document +int dpiSodaDoc_release(dpiSodaDoc *cursor); + + +//----------------------------------------------------------------------------- +// SODA Document Cursor Methods (dpiSodaDocCursor) +//----------------------------------------------------------------------------- + +// add a reference to the SODA document cursor +int dpiSodaDocCursor_addRef(dpiSodaDocCursor *cursor); + +// close the SODA document cursor +int dpiSodaDocCursor_close(dpiSodaDocCursor *cursor); + +// get the next document from the cursor +int dpiSodaDocCursor_getNext(dpiSodaDocCursor *cursor, uint32_t flags, + dpiSodaDoc **doc); + +// release a reference to the SODA document cursor +int dpiSodaDocCursor_release(dpiSodaDocCursor *cursor); + + +//----------------------------------------------------------------------------- +// Statement Methods (dpiStmt) +//----------------------------------------------------------------------------- + +// add a reference to a statement +int dpiStmt_addRef(dpiStmt *stmt); + +// bind a variable to the statement using the given name +int dpiStmt_bindByName(dpiStmt *stmt, const char *name, uint32_t nameLength, + dpiVar *var); + +// bind a variable to the statement at the given position +// positions are determined by the order in which names are introduced +int dpiStmt_bindByPos(dpiStmt *stmt, uint32_t pos, dpiVar *var); + +// bind a value to the statement using the given name +// this creates the variable by looking at the type and then binds it +int dpiStmt_bindValueByName(dpiStmt *stmt, const char *name, + uint32_t nameLength, dpiNativeTypeNum nativeTypeNum, dpiData *data); + +// bind a value to the statement at the given position +// this creates the variable by looking at the type and then binds it +int dpiStmt_bindValueByPos(dpiStmt *stmt, uint32_t pos, + dpiNativeTypeNum nativeTypeNum, dpiData *data); + +// close the statement now, not when its reference count reaches zero +int dpiStmt_close(dpiStmt *stmt, const char *tag, uint32_t tagLength); + +// define a variable to accept the data for the specified column (1 based) +int dpiStmt_define(dpiStmt *stmt, uint32_t pos, dpiVar *var); + +// define type of data to use for the specified column (1 based) +int dpiStmt_defineValue(dpiStmt *stmt, uint32_t pos, + dpiOracleTypeNum oracleTypeNum, dpiNativeTypeNum nativeTypeNum, + uint32_t size, int sizeIsBytes, dpiObjectType *objType); + +// execute the statement and return the number of query columns +// zero implies the statement is not a query +int dpiStmt_execute(dpiStmt *stmt, dpiExecMode mode, + uint32_t *numQueryColumns); + +// execute the statement multiple times (queries not supported) +int dpiStmt_executeMany(dpiStmt *stmt, dpiExecMode mode, uint32_t numIters); + +// fetch a single row and return the index into the defined variables +// this will internally perform any execute and array fetch as needed +int dpiStmt_fetch(dpiStmt *stmt, int *found, uint32_t *bufferRowIndex); + +// return the number of rows that are available in the defined variables +// up to the maximum specified; this will internally perform execute/array +// fetch only if no rows are available in the defined variables and there are +// more rows available to fetch +int dpiStmt_fetchRows(dpiStmt *stmt, uint32_t maxRows, + uint32_t *bufferRowIndex, uint32_t *numRowsFetched, int *moreRows); + +// get the number of batch errors that took place in the previous execution +int dpiStmt_getBatchErrorCount(dpiStmt *stmt, uint32_t *count); + +// get the batch errors that took place in the previous execution +int dpiStmt_getBatchErrors(dpiStmt *stmt, uint32_t numErrors, + dpiErrorInfo *errors); + +// get the number of bind variables that are in the prepared statement +int dpiStmt_getBindCount(dpiStmt *stmt, uint32_t *count); + +// get the names of the bind variables that are in the prepared statement +int dpiStmt_getBindNames(dpiStmt *stmt, uint32_t *numBindNames, + const char **bindNames, uint32_t *bindNameLengths); + +// get the number of rows to (internally) fetch at one time +int dpiStmt_getFetchArraySize(dpiStmt *stmt, uint32_t *arraySize); + +// get next implicit result from previous execution; NULL if no more exist +int dpiStmt_getImplicitResult(dpiStmt *stmt, dpiStmt **implicitResult); + +// return information about the statement +int dpiStmt_getInfo(dpiStmt *stmt, dpiStmtInfo *info); + +// get the rowid of the last row affected by a DML statement +int dpiStmt_getLastRowid(dpiStmt *stmt, dpiRowid **rowid); + +// get the number of query columns (zero implies the statement is not a query) +int dpiStmt_getNumQueryColumns(dpiStmt *stmt, uint32_t *numQueryColumns); + +// return metadata about the column at the specified position (1 based) +int dpiStmt_getQueryInfo(dpiStmt *stmt, uint32_t pos, dpiQueryInfo *info); + +// get the value for the specified column of the current row fetched +int dpiStmt_getQueryValue(dpiStmt *stmt, uint32_t pos, + dpiNativeTypeNum *nativeTypeNum, dpiData **data); + +// get the row count for the statement +// for queries, this is the number of rows that have been fetched so far +// for non-queries, this is the number of rows affected by the last execution +int dpiStmt_getRowCount(dpiStmt *stmt, uint64_t *count); + +// get the number of rows affected for each DML operation just executed +// using the mode DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS +int dpiStmt_getRowCounts(dpiStmt *stmt, uint32_t *numRowCounts, + uint64_t **rowCounts); + +// get subscription query id for continuous query notification +int dpiStmt_getSubscrQueryId(dpiStmt *stmt, uint64_t *queryId); + +// release a reference to the statement +int dpiStmt_release(dpiStmt *stmt); + +// scroll the statement to the desired row +// this is only valid for scrollable statements +int dpiStmt_scroll(dpiStmt *stmt, dpiFetchMode mode, int32_t offset, + int32_t rowCountOffset); + +// set the number of rows to (internally) fetch at one time +int dpiStmt_setFetchArraySize(dpiStmt *stmt, uint32_t arraySize); + + +//----------------------------------------------------------------------------- +// Rowid Methods (dpiRowid) +//----------------------------------------------------------------------------- + +// add a reference to the rowid +int dpiRowid_addRef(dpiRowid *rowid); + +// get string representation from rowid +int dpiRowid_getStringValue(dpiRowid *rowid, const char **value, + uint32_t *valueLength); + +// release a reference to the rowid +int dpiRowid_release(dpiRowid *subscr); + + +//----------------------------------------------------------------------------- +// Subscription Methods (dpiSubscr) +//----------------------------------------------------------------------------- + +// add a reference to the subscription +int dpiSubscr_addRef(dpiSubscr *subscr); + +// prepare statement for registration with subscription +int dpiSubscr_prepareStmt(dpiSubscr *subscr, const char *sql, + uint32_t sqlLength, dpiStmt **stmt); + +// release a reference to the subscription +int dpiSubscr_release(dpiSubscr *subscr); + + +//----------------------------------------------------------------------------- +// Variable Methods (dpiVar) +//----------------------------------------------------------------------------- + +// add a reference to the variable +int dpiVar_addRef(dpiVar *var); + +// copy the data from one variable to another variable +int dpiVar_copyData(dpiVar *var, uint32_t pos, dpiVar *sourceVar, + uint32_t sourcePos); + +// return the number of elements in a PL/SQL index-by table +int dpiVar_getNumElementsInArray(dpiVar *var, uint32_t *numElements); + +// return pointer to array of dpiData structures for transferring data +// this is needed for DML returning where the number of elements is modified +int dpiVar_getReturnedData(dpiVar *var, uint32_t pos, uint32_t *numElements, + dpiData **data); + +// return the size in bytes of the buffer used for fetching/binding +int dpiVar_getSizeInBytes(dpiVar *var, uint32_t *sizeInBytes); + +// release a reference to the variable +int dpiVar_release(dpiVar *var); + +// set the value of the variable from a byte string +int dpiVar_setFromBytes(dpiVar *var, uint32_t pos, const char *value, + uint32_t valueLength); + +// set the value of the variable from a LOB +int dpiVar_setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob); + +// set the value of the variable from an object +int dpiVar_setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj); + +// set the value of the variable from a rowid +int dpiVar_setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid); + +// set the value of the variable from a statement +int dpiVar_setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt); + +// set the number of elements in a PL/SQL index-by table +int dpiVar_setNumElementsInArray(dpiVar *var, uint32_t numElements); + +#endif diff --git a/vendor/github.com/godror/godror/odpi/src/dpiConn.c b/vendor/github.com/godror/godror/odpi/src/dpiConn.c new file mode 100644 index 00000000000..faa5dc5266b --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiConn.c @@ -0,0 +1,2249 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiConn.c +// Implementation of connection. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" +#include + +// forward declarations of internal functions only used in this file +static int dpiConn__attachExternal(dpiConn *conn, void *externalHandle, + dpiError *error); +static int dpiConn__createStandalone(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + const dpiCommonCreateParams *commonParams, + const dpiConnCreateParams *createParams, dpiError *error); +static int dpiConn__get(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + dpiConnCreateParams *createParams, dpiPool *pool, dpiError *error); +static int dpiConn__getHandles(dpiConn *conn, dpiError *error); +static int dpiConn__getServerCharset(dpiConn *conn, dpiError *error); +static int dpiConn__getSession(dpiConn *conn, uint32_t mode, + const char *connectString, uint32_t connectStringLength, + dpiConnCreateParams *params, void *authInfo, dpiError *error); +static int dpiConn__setAttributesFromCreateParams(dpiConn *conn, void *handle, + uint32_t handleType, const char *userName, uint32_t userNameLength, + const char *password, uint32_t passwordLength, + const dpiConnCreateParams *params, dpiError *error); +static int dpiConn__setShardingKey(dpiConn *conn, void **shardingKey, + void *handle, uint32_t handleType, uint32_t attribute, + const char *action, dpiShardingKeyColumn *columns, uint8_t numColumns, + dpiError *error); +static int dpiConn__setShardingKeyValue(dpiConn *conn, void *shardingKey, + dpiShardingKeyColumn *column, dpiError *error); + + +//----------------------------------------------------------------------------- +// dpiConn__attachExternal() [INTERNAL] +// Attach to the server and session of an existing service context handle. +//----------------------------------------------------------------------------- +static int dpiConn__attachExternal(dpiConn *conn, void *externalHandle, + dpiError *error) +{ + // mark connection as using an external handle so that no attempts are + // made to close it + conn->externalHandle = 1; + + // acquire handles from existing service context handle + conn->handle = externalHandle; + if (dpiConn__getHandles(conn, error) < 0) { + conn->handle = NULL; + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__check() [INTERNAL] +// Validate the connection handle and that it is still connected to the +// database. +//----------------------------------------------------------------------------- +static int dpiConn__check(dpiConn *conn, const char *fnName, dpiError *error) +{ + if (dpiGen__startPublicFn(conn, DPI_HTYPE_CONN, fnName, error) < 0) + return DPI_FAILURE; + return dpiConn__checkConnected(conn, error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__checkConnected() [INTERNAL] +// Check to see if the connection is still open and raise an exception if it +// is not. +//----------------------------------------------------------------------------- +int dpiConn__checkConnected(dpiConn *conn, dpiError *error) +{ + if (!conn->handle || conn->closing || (conn->pool && !conn->pool->handle)) + return dpiError__set(error, "check connected", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__close() [INTERNAL] +// Internal method used for closing the connection. Any transaction is rolled +// back and any handles allocated are freed. For connections acquired from a +// pool and that aren't marked as needed to be dropped, the last time used is +// updated. This is called from dpiConn_close() where errors are expected to be +// propagated and from dpiConn__free() where errors are ignored. +//----------------------------------------------------------------------------- +static int dpiConn__close(dpiConn *conn, uint32_t mode, const char *tag, + uint32_t tagLength, int propagateErrors, dpiError *error) +{ + int status, txnInProgress; + uint32_t serverStatus, i; + time_t *lastTimeUsed; + dpiObject *obj; + dpiStmt *stmt; + dpiLob *lob; + + // rollback any outstanding transaction, if one is in progress; drop the + // session if any errors take place + txnInProgress = 0; + if (!conn->deadSession && !conn->externalHandle && conn->sessionHandle) { + txnInProgress = 1; + if (conn->env->versionInfo->versionNum >= 12) + dpiOci__attrGet(conn->sessionHandle, DPI_OCI_HTYPE_SESSION, + &txnInProgress, NULL, DPI_OCI_ATTR_TRANSACTION_IN_PROGRESS, + NULL, error); + } + if (txnInProgress && + dpiOci__transRollback(conn, propagateErrors, error) < 0) + conn->deadSession = 1; + + // close all objects; note that no references are retained by the + // handle list (otherwise all objects would be left until an explicit + // close of the connection was made) so a reference needs to be acquired + // first, as otherwise the object may be freed while the close is being + // performed! + if (conn->objects && !conn->externalHandle) { + for (i = 0; i < conn->objects->numSlots; i++) { + obj = (dpiObject*) conn->objects->handles[i]; + if (!obj) + continue; + if (conn->env->threaded) { + dpiMutex__acquire(conn->env->mutex); + status = dpiGen__checkHandle(obj, DPI_HTYPE_OBJECT, NULL, + NULL); + if (status == DPI_SUCCESS) + obj->refCount += 1; + dpiMutex__release(conn->env->mutex); + if (status < 0) + continue; + } + status = dpiObject__close(obj, propagateErrors, error); + if (conn->env->threaded) + dpiGen__setRefCount(obj, error, -1); + if (status < 0) + return DPI_FAILURE; + } + } + + // close all open statements; note that no references are retained by the + // handle list (otherwise all statements would be left open until an + // explicit close was made of either the statement or the connection) so + // a reference needs to be acquired first, as otherwise the statement may + // be freed while the close is being performed! + if (conn->openStmts && !conn->externalHandle) { + for (i = 0; i < conn->openStmts->numSlots; i++) { + stmt = (dpiStmt*) conn->openStmts->handles[i]; + if (!stmt) + continue; + if (conn->env->threaded) { + dpiMutex__acquire(conn->env->mutex); + status = dpiGen__checkHandle(stmt, DPI_HTYPE_STMT, NULL, NULL); + if (status == DPI_SUCCESS) + stmt->refCount += 1; + dpiMutex__release(conn->env->mutex); + if (status < 0) + continue; + } + status = dpiStmt__close(stmt, NULL, 0, propagateErrors, error); + if (conn->env->threaded) + dpiGen__setRefCount(stmt, error, -1); + if (status < 0) + return DPI_FAILURE; + } + } + + // close all open LOBs; the same comments apply as for statements + if (conn->openLobs && !conn->externalHandle) { + for (i = 0; i < conn->openLobs->numSlots; i++) { + lob = (dpiLob*) conn->openLobs->handles[i]; + if (!lob) + continue; + if (conn->env->threaded) { + dpiMutex__acquire(conn->env->mutex); + status = dpiGen__checkHandle(lob, DPI_HTYPE_LOB, NULL, NULL); + if (status == DPI_SUCCESS) + lob->refCount += 1; + dpiMutex__release(conn->env->mutex); + if (status < 0) + continue; + } + status = dpiLob__close(lob, propagateErrors, error); + if (conn->env->threaded) + dpiGen__setRefCount(lob, error, -1); + if (status < 0) + return DPI_FAILURE; + } + } + + // handle connections created with an external handle + if (conn->externalHandle) { + conn->sessionHandle = NULL; + + // handle standalone connections + } else if (conn->standalone) { + + // end session and free session handle + if (dpiOci__sessionEnd(conn, propagateErrors, error) < 0) + return DPI_FAILURE; + dpiOci__handleFree(conn->sessionHandle, DPI_OCI_HTYPE_SESSION); + conn->sessionHandle = NULL; + + // detach from server and free server handle + if (dpiOci__serverDetach(conn, propagateErrors, error) < 0) + return DPI_FAILURE; + dpiOci__handleFree(conn->serverHandle, DPI_OCI_HTYPE_SERVER); + + // free service context handle + dpiOci__handleFree(conn->handle, DPI_OCI_HTYPE_SVCCTX); + + // handle pooled connections + } else { + + // if session is to be dropped, mark it as a dead session + if (mode & DPI_OCI_SESSRLS_DROPSESS) + conn->deadSession = 1; + + // update last time used (if the session isn't going to be dropped) + // clear last time used (if the session is going to be dropped) + // do nothing, however, if not using a pool or the pool is being closed + if (conn->sessionHandle && conn->pool && conn->pool->handle) { + + // get the pointer from the context associated with the session + lastTimeUsed = NULL; + if (dpiOci__contextGetValue(conn, DPI_CONTEXT_LAST_TIME_USED, + (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), + (void**) &lastTimeUsed, propagateErrors, error) < 0) + return DPI_FAILURE; + + // if pointer available and session is going to be dropped, clear + // memory in order to avoid memory leak in OCI + if (lastTimeUsed && conn->deadSession) { + dpiOci__contextSetValue(conn, DPI_CONTEXT_LAST_TIME_USED, + (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), + NULL, 0, error); + dpiOci__memoryFree(conn, lastTimeUsed, error); + lastTimeUsed = NULL; + + // otherwise, if the pointer is not available, allocate a new + // pointer and set it + } else if (!lastTimeUsed && !conn->deadSession) { + if (dpiOci__memoryAlloc(conn, (void**) &lastTimeUsed, + sizeof(time_t), propagateErrors, error) < 0) + return DPI_FAILURE; + if (dpiOci__contextSetValue(conn, DPI_CONTEXT_LAST_TIME_USED, + (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), + lastTimeUsed, propagateErrors, error) < 0) { + dpiOci__memoryFree(conn, lastTimeUsed, error); + lastTimeUsed = NULL; + } + } + + // set last time used (used when acquiring a session to determine + // if ping is required) + if (lastTimeUsed) + *lastTimeUsed = time(NULL); + + } + + // check server status; if not connected, ensure session is dropped + if (conn->serverHandle) { + if (dpiOci__attrGet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + &serverStatus, NULL, DPI_OCI_ATTR_SERVER_STATUS, + "get server status", error) < 0 || + serverStatus != DPI_OCI_SERVER_NORMAL) + conn->deadSession = 1; + } + + // release session + if (conn->deadSession) + mode |= DPI_OCI_SESSRLS_DROPSESS; + else if (dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 2, + NULL) == DPI_SUCCESS && (mode & DPI_MODE_CONN_CLOSE_RETAG) && + tag && tagLength > 0) + mode |= DPI_OCI_SESSRLS_MULTIPROPERTY_TAG; + if (dpiOci__sessionRelease(conn, tag, tagLength, mode, propagateErrors, + error) < 0) + return DPI_FAILURE; + conn->sessionHandle = NULL; + + } + conn->handle = NULL; + conn->serverHandle = NULL; + + // destroy sharding and super sharding key descriptors, if applicable + if (conn->shardingKey) { + dpiOci__descriptorFree(conn->shardingKey, DPI_OCI_DTYPE_SHARDING_KEY); + conn->shardingKey = NULL; + } + if (conn->superShardingKey) { + dpiOci__descriptorFree(conn->superShardingKey, + DPI_OCI_DTYPE_SHARDING_KEY); + conn->superShardingKey = NULL; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__create() [PRIVATE] +// Perform internal initialization of the connection. +//----------------------------------------------------------------------------- +int dpiConn__create(dpiConn *conn, const dpiContext *context, + const char *userName, uint32_t userNameLength, const char *password, + uint32_t passwordLength, const char *connectString, + uint32_t connectStringLength, dpiPool *pool, + const dpiCommonCreateParams *commonParams, + dpiConnCreateParams *createParams, dpiError *error) +{ + void *envHandle = NULL; + + // allocate handle lists for statements, LOBs and objects + if (dpiHandleList__create(&conn->openStmts, error) < 0) + return DPI_FAILURE; + if (dpiHandleList__create(&conn->openLobs, error) < 0) + return DPI_FAILURE; + if (dpiHandleList__create(&conn->objects, error) < 0) + return DPI_FAILURE; + + // if an external service context handle is provided, acquire the + // environment handle from it; need a temporary environment handle in order + // to do so + if (createParams->externalHandle) { + error->env = conn->env; + if (dpiOci__envNlsCreate(&conn->env->handle, DPI_OCI_DEFAULT, 0, 0, + error) < 0) + return DPI_FAILURE; + if (dpiOci__handleAlloc(conn->env->handle, &error->handle, + DPI_OCI_HTYPE_ERROR, "allocate temp OCI error", error) < 0) + return DPI_FAILURE; + if (dpiOci__attrGet(createParams->externalHandle, DPI_OCI_HTYPE_SVCCTX, + &envHandle, NULL, DPI_OCI_ATTR_ENV, "get env handle", + error) < 0) + return DPI_FAILURE; + dpiOci__handleFree(conn->env->handle, DPI_OCI_HTYPE_ENV); + error->handle = NULL; + conn->env->handle = NULL; + } + + // initialize environment (for non-pooled connections) + if (!pool && dpiEnv__init(conn->env, context, commonParams, envHandle, + error) < 0) + return DPI_FAILURE; + + // if a handle is specified, use it + if (createParams->externalHandle) + return dpiConn__attachExternal(conn, createParams->externalHandle, + error); + + // connection class, sharding and the use of session pools require the use + // of the OCISessionGet() method; all other cases use the OCISessionBegin() + // method which is more capable + if (pool || (createParams->connectionClass && + createParams->connectionClassLength > 0) || + createParams->shardingKeyColumns || + createParams->superShardingKeyColumns) + return dpiConn__get(conn, userName, userNameLength, password, + passwordLength, connectString, connectStringLength, + createParams, pool, error); + return dpiConn__createStandalone(conn, userName, userNameLength, password, + passwordLength, connectString, connectStringLength, commonParams, + createParams, error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__createStandalone() [PRIVATE] +// Create a standalone connection to the database using the parameters +// specified. +//----------------------------------------------------------------------------- +static int dpiConn__createStandalone(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + const dpiCommonCreateParams *commonParams, + const dpiConnCreateParams *createParams, dpiError *error) +{ + uint32_t credentialType, authMode; + + // mark the connection as a standalone connection + conn->standalone = 1; + + // allocate the server handle + if (dpiOci__handleAlloc(conn->env->handle, &conn->serverHandle, + DPI_OCI_HTYPE_SERVER, "allocate server handle", error) < 0) + return DPI_FAILURE; + + // attach to the server + if (dpiOci__serverAttach(conn, connectString, connectStringLength, + error) < 0) + return DPI_FAILURE; + + // allocate the service context handle + if (dpiOci__handleAlloc(conn->env->handle, &conn->handle, + DPI_OCI_HTYPE_SVCCTX, "allocate service context handle", + error) < 0) + return DPI_FAILURE; + + // set attribute for server handle + if (dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, conn->serverHandle, + 0, DPI_OCI_ATTR_SERVER, "set server handle", error) < 0) + return DPI_FAILURE; + + // allocate the session handle + if (dpiOci__handleAlloc(conn->env->handle, &conn->sessionHandle, + DPI_OCI_HTYPE_SESSION, "allocate session handle", error) < 0) + return DPI_FAILURE; + + // driver name and edition are only relevant for standalone connections + if (dpiUtils__setAttributesFromCommonCreateParams(conn->sessionHandle, + DPI_OCI_HTYPE_SESSION, commonParams, error) < 0) + return DPI_FAILURE; + + // populate attributes on the session handle + if (dpiConn__setAttributesFromCreateParams(conn, conn->sessionHandle, + DPI_OCI_HTYPE_SESSION, userName, userNameLength, password, + passwordLength, createParams, error) < 0) + return DPI_FAILURE; + + // set the session handle on the service context handle + if (dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, + conn->sessionHandle, 0, DPI_OCI_ATTR_SESSION, "set session handle", + error) < 0) + return DPI_FAILURE; + + // if a new password is specified, change it (this also creates the session + // so a call to OCISessionBegin() is not needed) + if (createParams->newPassword && createParams->newPasswordLength > 0) { + authMode = DPI_OCI_AUTH; + if (createParams->authMode & DPI_MODE_AUTH_SYSDBA) + authMode |= DPI_OCI_CPW_SYSDBA; + if (createParams->authMode & DPI_MODE_AUTH_SYSOPER) + authMode |= DPI_OCI_CPW_SYSOPER; + if (createParams->authMode & DPI_MODE_AUTH_SYSASM) + authMode |= DPI_OCI_CPW_SYSASM; + if (createParams->authMode & DPI_MODE_AUTH_SYSBKP) + authMode |= DPI_OCI_CPW_SYSBKP; + if (createParams->authMode & DPI_MODE_AUTH_SYSDGD) + authMode |= DPI_OCI_CPW_SYSDGD; + if (createParams->authMode & DPI_MODE_AUTH_SYSKMT) + authMode |= DPI_OCI_CPW_SYSKMT; + return dpiOci__passwordChange(conn, userName, userNameLength, password, + passwordLength, createParams->newPassword, + createParams->newPasswordLength, authMode, error); + } + + // begin the session + credentialType = (createParams->externalAuth) ? DPI_OCI_CRED_EXT : + DPI_OCI_CRED_RDBMS; + authMode = createParams->authMode | DPI_OCI_STMT_CACHE; + if (dpiOci__sessionBegin(conn, credentialType, authMode, error) < 0) + return DPI_FAILURE; + return dpiConn__getServerCharset(conn, error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__free() [INTERNAL] +// Free the memory and any resources associated with the connection. +//----------------------------------------------------------------------------- +void dpiConn__free(dpiConn *conn, dpiError *error) +{ + if (conn->handle) + dpiConn__close(conn, DPI_MODE_CONN_CLOSE_DEFAULT, NULL, 0, 0, + error); + if (conn->pool) { + dpiGen__setRefCount(conn->pool, error, -1); + conn->pool = NULL; + conn->env = NULL; + } + if (conn->env) { + dpiEnv__free(conn->env, error); + conn->env = NULL; + } + if (conn->releaseString) { + dpiUtils__freeMemory((void*) conn->releaseString); + conn->releaseString = NULL; + } + if (conn->openStmts) { + dpiHandleList__free(conn->openStmts); + conn->openStmts = NULL; + } + if (conn->openLobs) { + dpiHandleList__free(conn->openLobs); + conn->openLobs = NULL; + } + if (conn->objects) { + dpiHandleList__free(conn->objects); + conn->objects = NULL; + } + dpiUtils__freeMemory(conn); +} + + +//----------------------------------------------------------------------------- +// dpiConn__get() [INTERNAL] +// Create a connection to the database using the parameters specified. This +// method uses the simplified OCI session creation protocol which is required +// when using pools and session tagging. +//----------------------------------------------------------------------------- +static int dpiConn__get(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + dpiConnCreateParams *createParams, dpiPool *pool, dpiError *error) +{ + int externalAuth, status; + void *authInfo; + uint32_t mode; + + // clear pointers if length is 0 + if (userNameLength == 0) + userName = NULL; + if (passwordLength == 0) + password = NULL; + + // set things up for the call to acquire a session + if (pool) { + dpiGen__setRefCount(pool, error, 1); + conn->pool = pool; + mode = DPI_OCI_SESSGET_SPOOL; + externalAuth = pool->externalAuth; + if (userName && pool->homogeneous) + return dpiError__set(error, "check proxy", DPI_ERR_INVALID_PROXY); + + // if the userName is provided but no password is provided and external + // authentication is not being used, proxy authentication is taking + // place + if (userName && !password && !externalAuth) + mode |= DPI_OCI_SESSGET_CREDPROXY; + if (createParams->matchAnyTag) + mode |= DPI_OCI_SESSGET_SPOOL_MATCHANY; + if (dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 2, + NULL) == DPI_SUCCESS && createParams->tag && + createParams->tagLength > 0) + mode |= DPI_OCI_SESSGET_MULTIPROPERTY_TAG; + } else { + mode = DPI_OCI_SESSGET_STMTCACHE; + externalAuth = createParams->externalAuth; + } + if (createParams->authMode & DPI_MODE_AUTH_SYSDBA) + mode |= DPI_OCI_SESSGET_SYSDBA; + if (externalAuth) + mode |= DPI_OCI_SESSGET_CREDEXT; + + // create authorization handle + if (dpiOci__handleAlloc(conn->env->handle, &authInfo, + DPI_OCI_HTYPE_AUTHINFO, "allocate authinfo handle", error) < 0) + return DPI_FAILURE; + + // set attributes for create parameters + if (dpiConn__setAttributesFromCreateParams(conn, authInfo, + DPI_OCI_HTYPE_AUTHINFO, userName, userNameLength, password, + passwordLength, createParams, error) < 0) { + dpiOci__handleFree(authInfo, DPI_OCI_HTYPE_AUTHINFO); + return DPI_FAILURE; + } + + // get a session from the pool + status = dpiConn__getSession(conn, mode, connectString, + connectStringLength, createParams, authInfo, error); + dpiOci__handleFree(authInfo, DPI_OCI_HTYPE_AUTHINFO); + if (status < 0) + return status; + return dpiConn__getServerCharset(conn, error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__getAttributeText() [INTERNAL] +// Get the value of the OCI attribute from a text string. +//----------------------------------------------------------------------------- +static int dpiConn__getAttributeText(dpiConn *conn, uint32_t attribute, + const char **value, uint32_t *valueLength, const char *fnName) +{ + dpiError error; + int status; + + // validate parameters + if (dpiConn__check(conn, fnName, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, value) + DPI_CHECK_PTR_NOT_NULL(conn, valueLength) + + // determine pointer to pass (OCI uses different sizes) + switch (attribute) { + case DPI_OCI_ATTR_CURRENT_SCHEMA: + case DPI_OCI_ATTR_LTXID: + case DPI_OCI_ATTR_EDITION: + status = dpiOci__attrGet(conn->sessionHandle, + DPI_OCI_HTYPE_SESSION, (void*) value, valueLength, + attribute, "get session value", &error); + break; + case DPI_OCI_ATTR_INTERNAL_NAME: + case DPI_OCI_ATTR_EXTERNAL_NAME: + status = dpiOci__attrGet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + (void*) value, valueLength, attribute, "get server value", + &error); + break; + default: + status = dpiError__set(&error, "get attribute text", + DPI_ERR_NOT_SUPPORTED); + break; + } + + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__getHandles() [INTERNAL] +// Get the server and session handle from the service context handle. +//----------------------------------------------------------------------------- +static int dpiConn__getHandles(dpiConn *conn, dpiError *error) +{ + if (dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, + (void*) &conn->sessionHandle, NULL, DPI_OCI_ATTR_SESSION, + "get session handle", error) < 0) + return DPI_FAILURE; + if (dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, + (void*) &conn->serverHandle, NULL, DPI_OCI_ATTR_SERVER, + "get server handle", error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__getRawTDO() [INTERNAL] +// Internal method used for ensuring that the RAW TDO has been cached on the +//connection. +//----------------------------------------------------------------------------- +int dpiConn__getRawTDO(dpiConn *conn, dpiError *error) +{ + if (conn->rawTDO) + return DPI_SUCCESS; + return dpiOci__typeByName(conn, "SYS", 3, "RAW", 3, &conn->rawTDO, error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__getServerCharset() [INTERNAL] +// Internal method used for retrieving the server character set. This is used +// to determine if any conversion is required when transferring strings between +// the client and the server. +//----------------------------------------------------------------------------- +static int dpiConn__getServerCharset(dpiConn *conn, dpiError *error) +{ + return dpiOci__attrGet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + &conn->charsetId, NULL, DPI_OCI_ATTR_CHARSET_ID, + "get server charset id", error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__getServerVersion() [INTERNAL] +// Internal method used for ensuring that the server version has been cached +// on the connection. +//----------------------------------------------------------------------------- +int dpiConn__getServerVersion(dpiConn *conn, dpiError *error) +{ + uint32_t serverRelease; + char buffer[512]; + + // nothing to do if the server version has been determined earlier + if (conn->releaseString) + return DPI_SUCCESS; + + // get server version + if (dpiOci__serverRelease(conn, buffer, sizeof(buffer), &serverRelease, + error) < 0) + return DPI_FAILURE; + conn->releaseStringLength = (uint32_t) strlen(buffer); + if (dpiUtils__allocateMemory(1, conn->releaseStringLength, 0, + "allocate release string", (void**) &conn->releaseString, + error) < 0) + return DPI_FAILURE; + strncpy( (char*) conn->releaseString, buffer, conn->releaseStringLength); + conn->versionInfo.versionNum = (int)((serverRelease >> 24) & 0xFF); + if (conn->versionInfo.versionNum >= 18) { + conn->versionInfo.releaseNum = (int)((serverRelease >> 16) & 0xFF); + conn->versionInfo.updateNum = (int)((serverRelease >> 12) & 0x0F); + conn->versionInfo.portReleaseNum = (int)((serverRelease >> 4) & 0xFF); + conn->versionInfo.portUpdateNum = (int)((serverRelease) & 0xF); + } else { + conn->versionInfo.releaseNum = (int)((serverRelease >> 20) & 0x0F); + conn->versionInfo.updateNum = (int)((serverRelease >> 12) & 0xFF); + conn->versionInfo.portReleaseNum = (int)((serverRelease >> 8) & 0x0F); + conn->versionInfo.portUpdateNum = (int)((serverRelease) & 0xFF); + } + conn->versionInfo.fullVersionNum = (uint32_t) + DPI_ORACLE_VERSION_TO_NUMBER(conn->versionInfo.versionNum, + conn->versionInfo.releaseNum, + conn->versionInfo.updateNum, + conn->versionInfo.portReleaseNum, + conn->versionInfo.portUpdateNum); + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__getSession() [INTERNAL] +// Ping and loop until we get a good session. When a database instance goes +// down, it can leave several bad connections that need to be flushed out +// before a good connection can be acquired. If the connection is brand new +// (ping time context value has not been set) there is no need to do a ping. +// This also ensures that the loop cannot run forever! +//----------------------------------------------------------------------------- +static int dpiConn__getSession(dpiConn *conn, uint32_t mode, + const char *connectString, uint32_t connectStringLength, + dpiConnCreateParams *params, void *authInfo, dpiError *error) +{ + uint8_t savedBreakOnTimeout, breakOnTimeout; + uint32_t savedTimeout; + time_t *lastTimeUsed; + + while (1) { + + // acquire the new session + params->outNewSession = 0; + if (dpiOci__sessionGet(conn->env->handle, &conn->handle, authInfo, + connectString, connectStringLength, params->tag, + params->tagLength, ¶ms->outTag, ¶ms->outTagLength, + ¶ms->outTagFound, mode, error) < 0) + return DPI_FAILURE; + + // get session and server handles + if (dpiConn__getHandles(conn, error) < 0) + return DPI_FAILURE; + + // get last time used from session context + lastTimeUsed = NULL; + if (dpiOci__contextGetValue(conn, DPI_CONTEXT_LAST_TIME_USED, + (uint32_t) (sizeof(DPI_CONTEXT_LAST_TIME_USED) - 1), + (void**) &lastTimeUsed, 1, error) < 0) + return DPI_FAILURE; + + // if value is not found, a new connection has been created and there + // is no need to perform a ping; nor if we are creating a standalone + // connection + if (!lastTimeUsed || !conn->pool) { + params->outNewSession = 1; + break; + } + + // if ping interval is negative or the ping interval (in seconds) + // has not been exceeded yet, there is also no need to perform a ping + if (conn->pool->pingInterval < 0 || + *lastTimeUsed + conn->pool->pingInterval > time(NULL)) + break; + + // ping needs to be done at this point; set parameters to ensure that + // the ping does not take too long to complete; keep original values + dpiOci__attrGet(conn->serverHandle, + DPI_OCI_HTYPE_SERVER, &savedTimeout, NULL, + DPI_OCI_ATTR_RECEIVE_TIMEOUT, NULL, error); + dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + &conn->pool->pingTimeout, 0, DPI_OCI_ATTR_RECEIVE_TIMEOUT, + NULL, error); + if (conn->env->versionInfo->versionNum >= 12) { + dpiOci__attrGet(conn->serverHandle, + DPI_OCI_HTYPE_SERVER, &savedBreakOnTimeout, NULL, + DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT, NULL, error); + breakOnTimeout = 0; + dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + &breakOnTimeout, 0, DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT, + NULL, error); + } + + // if ping is successful, the connection is valid and can be returned + // restore original network parameters + if (dpiOci__ping(conn, error) == 0) { + dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + &savedTimeout, 0, DPI_OCI_ATTR_RECEIVE_TIMEOUT, NULL, + error); + if (conn->env->versionInfo->versionNum >= 12) + dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + &savedBreakOnTimeout, 0, + DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT, NULL, error); + break; + } + + // session is bad, need to release and drop it + dpiOci__sessionRelease(conn, NULL, 0, DPI_OCI_SESSRLS_DROPSESS, 0, + error); + conn->handle = NULL; + conn->serverHandle = NULL; + conn->sessionHandle = NULL; + conn->deadSession = 0; + + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__setAppContext() [INTERNAL] +// Populate the session handle with the application context. +//----------------------------------------------------------------------------- +static int dpiConn__setAppContext(void *handle, uint32_t handleType, + const dpiConnCreateParams *params, dpiError *error) +{ + void *listHandle, *entryHandle; + dpiAppContext *entry; + uint32_t i; + + // set the number of application context entries + if (dpiOci__attrSet(handle, handleType, (void*) ¶ms->numAppContext, + sizeof(params->numAppContext), DPI_OCI_ATTR_APPCTX_SIZE, + "set app context size", error) < 0) + return DPI_FAILURE; + + // get the application context list handle + if (dpiOci__attrGet(handle, handleType, &listHandle, NULL, + DPI_OCI_ATTR_APPCTX_LIST, "get context list handle", error) < 0) + return DPI_FAILURE; + + // set each application context entry + for (i = 0; i < params->numAppContext; i++) { + entry = ¶ms->appContext[i]; + + // retrieve the context element descriptor + if (dpiOci__paramGet(listHandle, DPI_OCI_DTYPE_PARAM, + &entryHandle, i + 1, "get context entry handle", error) < 0) + return DPI_FAILURE; + + // set the namespace name + if (dpiOci__attrSet(entryHandle, DPI_OCI_DTYPE_PARAM, + (void*) entry->namespaceName, entry->namespaceNameLength, + DPI_OCI_ATTR_APPCTX_NAME, "set namespace name", error) < 0) + return DPI_FAILURE; + + // set the name + if (dpiOci__attrSet(entryHandle, DPI_OCI_DTYPE_PARAM, + (void*) entry->name, entry->nameLength, + DPI_OCI_ATTR_APPCTX_ATTR, "set name", error) < 0) + return DPI_FAILURE; + + // set the value + if (dpiOci__attrSet(entryHandle, DPI_OCI_DTYPE_PARAM, + (void*) entry->value, entry->valueLength, + DPI_OCI_ATTR_APPCTX_VALUE, "set value", error) < 0) + return DPI_FAILURE; + + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__setAttributesFromCreateParams() [INTERNAL] +// Populate the authorization info structure or session handle using the +// create parameters specified. +//----------------------------------------------------------------------------- +static int dpiConn__setAttributesFromCreateParams(dpiConn *conn, void *handle, + uint32_t handleType, const char *userName, uint32_t userNameLength, + const char *password, uint32_t passwordLength, + const dpiConnCreateParams *params, dpiError *error) +{ + uint32_t purity; + + // set credentials + if (userName && userNameLength > 0 && dpiOci__attrSet(handle, + handleType, (void*) userName, userNameLength, + DPI_OCI_ATTR_USERNAME, "set user name", error) < 0) + return DPI_FAILURE; + if (password && passwordLength > 0 && dpiOci__attrSet(handle, + handleType, (void*) password, passwordLength, + DPI_OCI_ATTR_PASSWORD, "set password", error) < 0) + return DPI_FAILURE; + + // set connection class and purity parameters + if (params->connectionClass && params->connectionClassLength > 0 && + dpiOci__attrSet(handle, handleType, + (void*) params->connectionClass, + params->connectionClassLength, + DPI_OCI_ATTR_CONNECTION_CLASS, "set connection class", + error) < 0) + return DPI_FAILURE; + if (params->purity != DPI_OCI_ATTR_PURITY_DEFAULT) { + purity = params->purity; + if (dpiOci__attrSet(handle, handleType, &purity, + sizeof(purity), DPI_OCI_ATTR_PURITY, "set purity", error) < 0) + return DPI_FAILURE; + } + + // set sharding key and super sharding key parameters + if (params->shardingKeyColumns && params->numShardingKeyColumns > 0) { + if (dpiConn__setShardingKey(conn, &conn->shardingKey, handle, + handleType, DPI_OCI_ATTR_SHARDING_KEY, "set sharding key", + params->shardingKeyColumns, params->numShardingKeyColumns, + error) < 0) + return DPI_FAILURE; + } + if (params->superShardingKeyColumns && + params->numSuperShardingKeyColumns > 0) { + if (params->numShardingKeyColumns == 0) + return dpiError__set(error, "ensure sharding key", + DPI_ERR_MISSING_SHARDING_KEY); + if (dpiConn__setShardingKey(conn, &conn->superShardingKey, handle, + handleType, DPI_OCI_ATTR_SUPER_SHARDING_KEY, + "set super sharding key", params->superShardingKeyColumns, + params->numSuperShardingKeyColumns, error) < 0) + return DPI_FAILURE; + } + + // set application context, if applicable + if (handleType == DPI_OCI_HTYPE_SESSION && params->numAppContext > 0) + return dpiConn__setAppContext(handle, handleType, params, error); + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__setAttributeText() [INTERNAL] +// Set the value of the OCI attribute from a text string. +//----------------------------------------------------------------------------- +static int dpiConn__setAttributeText(dpiConn *conn, uint32_t attribute, + const char *value, uint32_t valueLength, const char *fnName) +{ + dpiError error; + int status; + + // validate parameters + if (dpiConn__check(conn, fnName, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, value) + + // determine pointer to pass (OCI uses different sizes) + switch (attribute) { + case DPI_OCI_ATTR_ACTION: + case DPI_OCI_ATTR_CLIENT_IDENTIFIER: + case DPI_OCI_ATTR_CLIENT_INFO: + case DPI_OCI_ATTR_CURRENT_SCHEMA: + case DPI_OCI_ATTR_EDITION: + case DPI_OCI_ATTR_MODULE: + case DPI_OCI_ATTR_DBOP: + status = dpiOci__attrSet(conn->sessionHandle, + DPI_OCI_HTYPE_SESSION, (void*) value, valueLength, + attribute, "set session value", &error); + break; + case DPI_OCI_ATTR_INTERNAL_NAME: + case DPI_OCI_ATTR_EXTERNAL_NAME: + status = dpiOci__attrSet(conn->serverHandle, DPI_OCI_HTYPE_SERVER, + (void*) value, valueLength, attribute, "set server value", + &error); + break; + default: + status = dpiError__set(&error, "set attribute text", + DPI_ERR_NOT_SUPPORTED); + break; + } + + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn__setShardingKey() [INTERNAL] +// Using the specified columns, create a sharding key and set it on the given +// handle. +//----------------------------------------------------------------------------- +static int dpiConn__setShardingKey(dpiConn *conn, void **shardingKey, + void *handle, uint32_t handleType, uint32_t attribute, + const char *action, dpiShardingKeyColumn *columns, uint8_t numColumns, + dpiError *error) +{ + uint8_t i; + + // this is only supported on 12.2 and higher clients + if (dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 2, + error) < 0) + return DPI_FAILURE; + + // create sharding key descriptor, if necessary + if (dpiOci__descriptorAlloc(conn->env->handle, shardingKey, + DPI_OCI_DTYPE_SHARDING_KEY, "allocate sharding key", error) < 0) + return DPI_FAILURE; + + // add each column to the sharding key + for (i = 0; i < numColumns; i++) { + if (dpiConn__setShardingKeyValue(conn, *shardingKey, &columns[i], + error) < 0) + return DPI_FAILURE; + } + + // add the sharding key to the handle + if (dpiOci__attrSet(handle, handleType, *shardingKey, 0, attribute, action, + error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiConn__setShardingKeyValue() [INTERNAL] +// Using the specified columns, create a sharding key and set it on the given +// handle. +//----------------------------------------------------------------------------- +static int dpiConn__setShardingKeyValue(dpiConn *conn, void *shardingKey, + dpiShardingKeyColumn *column, dpiError *error) +{ + dpiShardingOciDate shardingDateValue; + uint32_t colLen = 0, descType = 0; + const dpiOracleType *oracleType; + dpiOciNumber numberValue; + int convertOk, status; + dpiOciDate dateValue; + void *col = NULL; + uint16_t colType; + + oracleType = dpiOracleType__getFromNum(column->oracleTypeNum, error); + if (!oracleType) + return DPI_FAILURE; + convertOk = 0; + colType = oracleType->oracleType; + switch (column->oracleTypeNum) { + case DPI_ORACLE_TYPE_VARCHAR: + case DPI_ORACLE_TYPE_CHAR: + case DPI_ORACLE_TYPE_RAW: + if (column->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + col = column->value.asBytes.ptr; + colLen = column->value.asBytes.length; + convertOk = 1; + } + break; + case DPI_ORACLE_TYPE_NUMBER: + col = &numberValue; + colLen = sizeof(numberValue); + if (column->nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + if (dpiDataBuffer__toOracleNumberFromDouble(&column->value, + error, &numberValue) < 0) + return DPI_FAILURE; + convertOk = 1; + } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_INT64) { + if (dpiDataBuffer__toOracleNumberFromInteger(&column->value, + error, &numberValue) < 0) + return DPI_FAILURE; + convertOk = 1; + } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_UINT64) { + if (dpiDataBuffer__toOracleNumberFromUnsignedInteger( + &column->value, error, &numberValue) < 0) + return DPI_FAILURE; + convertOk = 1; + } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + if (dpiDataBuffer__toOracleNumberFromText(&column->value, + conn->env, error, &numberValue) < 0) + return DPI_FAILURE; + convertOk = 1; + } + break; + case DPI_ORACLE_TYPE_DATE: + if (column->nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) { + if (dpiDataBuffer__toOracleDate(&column->value, + &dateValue) < 0) + return DPI_FAILURE; + convertOk = 1; + } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + if (dpiDataBuffer__toOracleDateFromDouble(&column->value, + conn->env, error, &dateValue) < 0) + return DPI_FAILURE; + convertOk = 1; + } + + // for sharding only, the type must be SQLT_DAT, which uses a + // different format for storing the date values + if (convertOk) { + col = &shardingDateValue; + colLen = sizeof(shardingDateValue); + colType = DPI_SQLT_DAT; + shardingDateValue.century = + ((uint8_t) (dateValue.year / 100)) + 100; + shardingDateValue.year = (dateValue.year % 100) + 100; + shardingDateValue.month = dateValue.month; + shardingDateValue.day = dateValue.day; + shardingDateValue.hour = dateValue.hour + 1; + shardingDateValue.minute = dateValue.minute + 1; + shardingDateValue.second = dateValue.second + 1; + } + break; + case DPI_ORACLE_TYPE_TIMESTAMP: + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + colLen = sizeof(void*); + colType = DPI_SQLT_TIMESTAMP; + if (column->nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) { + descType = DPI_OCI_DTYPE_TIMESTAMP; + if (dpiOci__descriptorAlloc(conn->env->handle, &col, descType, + "alloc timestamp", error) < 0) + return DPI_FAILURE; + if (dpiDataBuffer__toOracleTimestamp(&column->value, conn->env, + error, col, 0) < 0) { + dpiOci__descriptorFree(col, descType); + return DPI_FAILURE; + } + convertOk = 1; + } else if (column->nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + descType = DPI_OCI_DTYPE_TIMESTAMP_LTZ; + if (dpiOci__descriptorAlloc(conn->env->handle, &col, descType, + "alloc LTZ timestamp", error) < 0) + return DPI_FAILURE; + if (dpiDataBuffer__toOracleTimestampFromDouble(&column->value, + conn->env, error, col) < 0) { + dpiOci__descriptorFree(col, descType); + return DPI_FAILURE; + } + convertOk = 1; + } + break; + default: + break; + } + if (!convertOk) + return dpiError__set(error, "check type", DPI_ERR_NOT_SUPPORTED); + + status = dpiOci__shardingKeyColumnAdd(shardingKey, col, colLen, colType, + error); + if (descType) + dpiOci__descriptorFree(col, descType); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiConn_addRef() [PUBLIC] +// Add a reference to the connection. +//----------------------------------------------------------------------------- +int dpiConn_addRef(dpiConn *conn) +{ + return dpiGen__addRef(conn, DPI_HTYPE_CONN, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_beginDistribTrans() [PUBLIC] +// Begin a distributed transaction. +//----------------------------------------------------------------------------- +int dpiConn_beginDistribTrans(dpiConn *conn, long formatId, + const char *transactionId, uint32_t transactionIdLength, + const char *branchId, uint32_t branchIdLength) +{ + void *transactionHandle; + dpiError error; + dpiOciXID xid; + int status; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, transactionId) + DPI_CHECK_PTR_AND_LENGTH(conn, branchId) + if (transactionIdLength > DPI_XA_MAXGTRIDSIZE) { + dpiError__set(&error, "check size of transaction id", + DPI_ERR_TRANS_ID_TOO_LARGE, transactionIdLength, + DPI_XA_MAXGTRIDSIZE); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + if (branchIdLength > DPI_XA_MAXBQUALSIZE) { + dpiError__set(&error, "check size of branch id", + DPI_ERR_BRANCH_ID_TOO_LARGE, branchIdLength, + DPI_XA_MAXBQUALSIZE); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + // determine if a transaction handle was previously allocated + if (dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, + (void*) &transactionHandle, NULL, DPI_OCI_ATTR_TRANS, + "get transaction handle", &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + + // if one was not found, create one and associate it with the connection + if (!transactionHandle) { + + // create new handle + if (dpiOci__handleAlloc(conn->env->handle, &transactionHandle, + DPI_OCI_HTYPE_TRANS, "create transaction handle", &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + + // associate the transaction with the connection + if (dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, + transactionHandle, 0, DPI_OCI_ATTR_TRANS, + "associate transaction", &error) < 0) { + dpiOci__handleFree(transactionHandle, DPI_OCI_HTYPE_TRANS); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + } + + // set the XID for the transaction, if applicable + if (formatId != -1) { + xid.formatID = formatId; + xid.gtrid_length = transactionIdLength; + xid.bqual_length = branchIdLength; + if (transactionIdLength > 0) + strncpy(xid.data, transactionId, transactionIdLength); + if (branchIdLength > 0) + strncpy(&xid.data[transactionIdLength], branchId, branchIdLength); + if (dpiOci__attrSet(transactionHandle, DPI_OCI_HTYPE_TRANS, &xid, + sizeof(dpiOciXID), DPI_OCI_ATTR_XID, "set XID", &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + // start the transaction + status = dpiOci__transStart(conn, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_breakExecution() [PUBLIC] +// Break (interrupt) the currently executing operation. +//----------------------------------------------------------------------------- +int dpiConn_breakExecution(dpiConn *conn) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + status = dpiOci__break(conn, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_changePassword() [PUBLIC] +// Change the password for the specified user. +//----------------------------------------------------------------------------- +int dpiConn_changePassword(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *oldPassword, + uint32_t oldPasswordLength, const char *newPassword, + uint32_t newPasswordLength) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, userName) + DPI_CHECK_PTR_AND_LENGTH(conn, oldPassword) + DPI_CHECK_PTR_AND_LENGTH(conn, newPassword) + status = dpiOci__passwordChange(conn, userName, userNameLength, + oldPassword, oldPasswordLength, newPassword, newPasswordLength, + DPI_OCI_DEFAULT, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_close() [PUBLIC] +// Close the connection and ensure it can no longer be used. +//----------------------------------------------------------------------------- +int dpiConn_close(dpiConn *conn, dpiConnCloseMode mode, const char *tag, + uint32_t tagLength) +{ + int propagateErrors = !(mode & DPI_MODE_CONN_CLOSE_DROP); + dpiError error; + int closing; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, tag) + if (mode && !conn->pool) { + dpiError__set(&error, "check in pool", DPI_ERR_CONN_NOT_IN_POOL); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + if (conn->externalHandle) { + dpiError__set(&error, "check external", DPI_ERR_CONN_IS_EXTERNAL); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + // determine whether connection is already being closed and if not, mark + // connection as being closed; this MUST be done while holding the lock + // (if in threaded mode) to avoid race conditions! + if (conn->env->threaded) + dpiMutex__acquire(conn->env->mutex); + closing = conn->closing; + conn->closing = 1; + if (conn->env->threaded) + dpiMutex__release(conn->env->mutex); + + // if connection is already being closed, raise an exception + if (closing) { + dpiError__set(&error, "check closing", DPI_ERR_NOT_CONNECTED); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + // if actual close fails, reset closing flag; again, this must be done + // while holding the lock (if in threaded mode) in order to avoid race + // conditions! + if (dpiConn__close(conn, mode, tag, tagLength, propagateErrors, + &error) < 0) { + if (conn->env->threaded) + dpiMutex__acquire(conn->env->mutex); + conn->closing = 0; + if (conn->env->threaded) + dpiMutex__release(conn->env->mutex); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_commit() [PUBLIC] +// Commit the transaction associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_commit(dpiConn *conn) +{ + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiOci__transCommit(conn, conn->commitMode, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + conn->commitMode = DPI_OCI_DEFAULT; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_create() [PUBLIC] +// Create a standalone connection to the database using the parameters +// specified. +//----------------------------------------------------------------------------- +int dpiConn_create(const dpiContext *context, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + const dpiCommonCreateParams *commonParams, + dpiConnCreateParams *createParams, dpiConn **conn) +{ + dpiCommonCreateParams localCommonParams; + dpiConnCreateParams localCreateParams; + dpiConn *tempConn; + dpiError error; + int status; + + // validate parameters + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(context, conn) + DPI_CHECK_PTR_AND_LENGTH(context, userName) + DPI_CHECK_PTR_AND_LENGTH(context, password) + DPI_CHECK_PTR_AND_LENGTH(context, connectString) + + // use default parameters if none provided + if (!commonParams) { + dpiContext__initCommonCreateParams(&localCommonParams); + commonParams = &localCommonParams; + } + + // size changed in 3.1; must use local variable until version 4 released + if (!createParams || context->dpiMinorVersion < 1) { + dpiContext__initConnCreateParams(&localCreateParams); + if (createParams) + memcpy(&localCreateParams, createParams, + sizeof(dpiConnCreateParams__v30)); + createParams = &localCreateParams; + } + + // password must not be specified if external authentication is desired + if (createParams->externalAuth && password && passwordLength > 0) { + dpiError__set(&error, "verify no password with external auth", + DPI_ERR_EXT_AUTH_WITH_CREDENTIALS); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + } + + // the username must be enclosed within [] if external authentication + // with proxy is desired + if (createParams->externalAuth && userName && userNameLength > 0 && + (userName[0] != '[' || userName[userNameLength - 1] != ']')) { + dpiError__set(&error, "verify proxy user name with external auth", + DPI_ERR_EXT_AUTH_INVALID_PROXY); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error ); + } + + // connectionClass and edition cannot be specified at the same time + if (createParams->connectionClass && + createParams->connectionClassLength > 0 && + commonParams->edition && commonParams->editionLength > 0) { + dpiError__set(&error, "check edition/conn class", + DPI_ERR_NO_EDITION_WITH_CONN_CLASS); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + } + + // newPassword and edition cannot be specified at the same time + if (createParams->newPassword && createParams->newPasswordLength > 0 && + commonParams->edition && commonParams->editionLength > 0) { + dpiError__set(&error, "check edition/new password", + DPI_ERR_NO_EDITION_WITH_NEW_PASSWORD); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + } + + // handle case where pool is specified + if (createParams->pool) { + if (dpiGen__checkHandle(createParams->pool, DPI_HTYPE_POOL, + "verify pool", &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + if (!createParams->pool->handle) { + dpiError__set(&error, "check pool", DPI_ERR_NOT_CONNECTED); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + } + status = dpiPool__acquireConnection(createParams->pool, userName, + userNameLength, password, passwordLength, createParams, conn, + &error); + return dpiGen__endPublicFn(context, status, &error); + } + + // create connection + if (dpiGen__allocate(DPI_HTYPE_CONN, NULL, (void**) &tempConn, &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + if (dpiConn__create(tempConn, context, userName, userNameLength, + password, passwordLength, connectString, connectStringLength, + NULL, commonParams, createParams, &error) < 0) { + dpiConn__free(tempConn, &error); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + } + + *conn = tempConn; + dpiHandlePool__release(tempConn->env->errorHandles, &error.handle); + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getSodaDb() [PUBLIC] +// Create a new SODA collection with the given name and metadata. +//----------------------------------------------------------------------------- +int dpiConn_getSodaDb(dpiConn *conn, dpiSodaDb **db) +{ + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiUtils__checkClientVersion(conn->env->versionInfo, 18, 3, + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiUtils__checkDatabaseVersion(conn, 18, 0, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__allocate(DPI_HTYPE_SODA_DB, conn->env, (void**) db, + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + dpiGen__setRefCount(conn, &error, 1); + (*db)->conn = conn; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_deqObject() [PUBLIC] +// Dequeue a message from the specified queue. +//----------------------------------------------------------------------------- +int dpiConn_deqObject(dpiConn *conn, const char *queueName, + uint32_t queueNameLength, dpiDeqOptions *options, dpiMsgProps *props, + dpiObject *payload, const char **msgId, uint32_t *msgIdLength) +{ + dpiError error; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__checkHandle(options, DPI_HTYPE_DEQ_OPTIONS, "verify options", + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__checkHandle(props, DPI_HTYPE_MSG_PROPS, + "verify message properties", &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__checkHandle(payload, DPI_HTYPE_OBJECT, "verify payload", + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, queueName) + DPI_CHECK_PTR_NOT_NULL(conn, msgId) + DPI_CHECK_PTR_NOT_NULL(conn, msgIdLength) + + // dequeue message + if (dpiOci__aqDeq(conn, queueName, options->handle, props->handle, + payload->type->tdo, &payload->instance, &payload->indicator, + &props->msgIdRaw, &error) < 0) { + if (error.buffer->code == 25228) { + *msgId = NULL; + *msgIdLength = 0; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); + } + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + dpiMsgProps__extractMsgId(props, msgId, msgIdLength); + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_enqObject() [PUBLIC] +// Enqueue a message to the specified queue. +//----------------------------------------------------------------------------- +int dpiConn_enqObject(dpiConn *conn, const char *queueName, + uint32_t queueNameLength, dpiEnqOptions *options, dpiMsgProps *props, + dpiObject *payload, const char **msgId, uint32_t *msgIdLength) +{ + dpiError error; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__checkHandle(options, DPI_HTYPE_ENQ_OPTIONS, "verify options", + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__checkHandle(props, DPI_HTYPE_MSG_PROPS, + "verify message properties", &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__checkHandle(payload, DPI_HTYPE_OBJECT, "verify payload", + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, queueName) + DPI_CHECK_PTR_NOT_NULL(conn, msgId) + DPI_CHECK_PTR_NOT_NULL(conn, msgIdLength) + + // enqueue message + if (dpiOci__aqEnq(conn, queueName, options->handle, props->handle, + payload->type->tdo, &payload->instance, &payload->indicator, + &props->msgIdRaw, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + dpiMsgProps__extractMsgId(props, msgId, msgIdLength); + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getCallTimeout() [PUBLIC] +// Return the call timeout (in milliseconds) used for round-trips to the +// database. This is only valid in Oracle Client 18c and higher. +//----------------------------------------------------------------------------- +int dpiConn_getCallTimeout(dpiConn *conn, uint32_t *value) +{ + dpiError error; + int status; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, value) + if (dpiUtils__checkClientVersion(conn->env->versionInfo, 18, 1, + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + + // get call timeout + status = dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, + (void*) value, 0, DPI_OCI_ATTR_CALL_TIMEOUT, "get call timeout", + &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getCurrentSchema() [PUBLIC] +// Return the current schema associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_getCurrentSchema(dpiConn *conn, const char **value, + uint32_t *valueLength) +{ + return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_CURRENT_SCHEMA, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getEdition() [PUBLIC] +// Return the edition associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_getEdition(dpiConn *conn, const char **value, + uint32_t *valueLength) +{ + return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_EDITION, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getEncodingInfo() [PUBLIC] +// Get the encodings from the connection. +//----------------------------------------------------------------------------- +int dpiConn_getEncodingInfo(dpiConn *conn, dpiEncodingInfo *info) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + status = dpiEnv__getEncodingInfo(conn->env, info); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getExternalName() [PUBLIC] +// Return the external name associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_getExternalName(dpiConn *conn, const char **value, + uint32_t *valueLength) +{ + return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_EXTERNAL_NAME, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getHandle() [PUBLIC] +// Get the OCI service context handle associated with the connection. This is +// available in order to allow for extensions to the library using OCI +// directly. +//----------------------------------------------------------------------------- +int dpiConn_getHandle(dpiConn *conn, void **handle) +{ + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, handle) + *handle = conn->handle; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getInternalName() [PUBLIC] +// Return the internal name associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_getInternalName(dpiConn *conn, const char **value, + uint32_t *valueLength) +{ + return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_INTERNAL_NAME, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getLTXID() [PUBLIC] +// Return the logical transaction id associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_getLTXID(dpiConn *conn, const char **value, uint32_t *valueLength) +{ + return dpiConn__getAttributeText(conn, DPI_OCI_ATTR_LTXID, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getObjectType() [PUBLIC] +// Look up an object type given its name and return it. +//----------------------------------------------------------------------------- +int dpiConn_getObjectType(dpiConn *conn, const char *name, uint32_t nameLength, + dpiObjectType **objType) +{ + void *describeHandle, *param, *tdo; + int status, useTypeByFullName; + dpiError error; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, name) + DPI_CHECK_PTR_NOT_NULL(conn, objType) + + // allocate describe handle + if (dpiOci__handleAlloc(conn->env->handle, &describeHandle, + DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + + // Oracle Client 12.1 is capable of using OCITypeByFullName() but will + // fail if accessing an Oracle 11.2 database + useTypeByFullName = 1; + if (conn->env->versionInfo->versionNum < 12) + useTypeByFullName = 0; + else if (dpiConn__getServerVersion(conn, &error) < 0) + return DPI_FAILURE; + else if (conn->versionInfo.versionNum < 12) + useTypeByFullName = 0; + + // new API is supported so use it + if (useTypeByFullName) { + if (dpiOci__typeByFullName(conn, name, nameLength, &tdo, &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + if (dpiOci__describeAny(conn, tdo, 0, DPI_OCI_OTYPE_PTR, + describeHandle, &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + // use older API + } else { + if (dpiOci__describeAny(conn, (void*) name, nameLength, + DPI_OCI_OTYPE_NAME, describeHandle, &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + } + + // get the parameter handle + if (dpiOci__attrGet(describeHandle, + DPI_OCI_HTYPE_DESCRIBE, ¶m, 0, DPI_OCI_ATTR_PARAM, + "get param", &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + // create object type + status = dpiObjectType__allocate(conn, param, DPI_OCI_ATTR_NAME, objType, + &error); + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getServerVersion() [PUBLIC] +// Get the server version string from the database. +//----------------------------------------------------------------------------- +int dpiConn_getServerVersion(dpiConn *conn, const char **releaseString, + uint32_t *releaseStringLength, dpiVersionInfo *versionInfo) +{ + dpiError error; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, versionInfo) + + // get server version + if (dpiConn__getServerVersion(conn, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (releaseString) + *releaseString = conn->releaseString; + if (releaseStringLength) + *releaseStringLength = conn->releaseStringLength; + memcpy(versionInfo, &conn->versionInfo, sizeof(dpiVersionInfo)); + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_getStmtCacheSize() [PUBLIC] +// Return the current size of the statement cache. +//----------------------------------------------------------------------------- +int dpiConn_getStmtCacheSize(dpiConn *conn, uint32_t *cacheSize) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, cacheSize) + status = dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, cacheSize, + NULL, DPI_OCI_ATTR_STMTCACHESIZE, "get stmt cache size", &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_newDeqOptions() [PUBLIC] +// Create a new dequeue options object and return it. +//----------------------------------------------------------------------------- +int dpiConn_newDeqOptions(dpiConn *conn, dpiDeqOptions **options) +{ + dpiDeqOptions *tempOptions; + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, options) + if (dpiGen__allocate(DPI_HTYPE_DEQ_OPTIONS, conn->env, + (void**) &tempOptions, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiDeqOptions__create(tempOptions, conn, &error) < 0) { + dpiDeqOptions__free(tempOptions, &error); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + *options = tempOptions; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_newEnqOptions() [PUBLIC] +// Create a new enqueue options object and return it. +//----------------------------------------------------------------------------- +int dpiConn_newEnqOptions(dpiConn *conn, dpiEnqOptions **options) +{ + dpiEnqOptions *tempOptions; + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, options) + if (dpiGen__allocate(DPI_HTYPE_ENQ_OPTIONS, conn->env, + (void**) &tempOptions, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiEnqOptions__create(tempOptions, conn, &error) < 0) { + dpiEnqOptions__free(tempOptions, &error); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + *options = tempOptions; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_newTempLob() [PUBLIC] +// Create a new temporary LOB and return it. +//----------------------------------------------------------------------------- +int dpiConn_newTempLob(dpiConn *conn, dpiOracleTypeNum lobType, dpiLob **lob) +{ + const dpiOracleType *type; + dpiLob *tempLob; + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, lob) + switch (lobType) { + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_NCLOB: + type = dpiOracleType__getFromNum(lobType, &error); + break; + default: + dpiError__set(&error, "check lob type", + DPI_ERR_INVALID_ORACLE_TYPE, lobType); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + if (dpiLob__allocate(conn, type, &tempLob, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiOci__lobCreateTemporary(tempLob, &error) < 0) { + dpiLob__free(tempLob, &error); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + *lob = tempLob; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_newMsgProps() [PUBLIC] +// Create a new message properties object and return it. +//----------------------------------------------------------------------------- +int dpiConn_newMsgProps(dpiConn *conn, dpiMsgProps **props) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, props) + status = dpiMsgProps__allocate(conn, props, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_newQueue() [PUBLIC] +// Create a new AQ queue object and return it. +//----------------------------------------------------------------------------- +int dpiConn_newQueue(dpiConn *conn, const char *name, uint32_t nameLength, + dpiObjectType *payloadType, dpiQueue **queue) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, name) + DPI_CHECK_PTR_NOT_NULL(conn, queue) + status = dpiQueue__allocate(conn, name, nameLength, payloadType, queue, + &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_newVar() [PUBLIC] +// Create a new variable and return it. +//----------------------------------------------------------------------------- +int dpiConn_newVar(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, + dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, + int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, + dpiData **data) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, var) + DPI_CHECK_PTR_NOT_NULL(conn, data) + status = dpiVar__allocate(conn, oracleTypeNum, nativeTypeNum, maxArraySize, + size, sizeIsBytes, isArray, objType, var, data, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_ping() [PUBLIC] +// Makes a round trip call to the server to confirm that the connection and +// server are still active. +//----------------------------------------------------------------------------- +int dpiConn_ping(dpiConn *conn) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + status = dpiOci__ping(conn, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_prepareDistribTrans() [PUBLIC] +// Prepare a distributed transaction for commit. A boolean is returned +// indicating if a commit is actually needed as an attempt to perform a commit +// when nothing is actually prepared results in ORA-24756 (transaction does not +// exist). This is determined by the return value from OCITransPrepare() which +// is OCI_SUCCESS_WITH_INFO if there is no transaction requiring commit. +//----------------------------------------------------------------------------- +int dpiConn_prepareDistribTrans(dpiConn *conn, int *commitNeeded) +{ + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, commitNeeded) + if (dpiOci__transPrepare(conn, commitNeeded, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (*commitNeeded) + conn->commitMode = DPI_OCI_TRANS_TWOPHASE; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_prepareStmt() [PUBLIC] +// Create a new statement and return it after preparing the specified SQL. +//----------------------------------------------------------------------------- +int dpiConn_prepareStmt(dpiConn *conn, int scrollable, const char *sql, + uint32_t sqlLength, const char *tag, uint32_t tagLength, + dpiStmt **stmt) +{ + dpiStmt *tempStmt; + dpiError error; + + *stmt = NULL; + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(conn, sql) + DPI_CHECK_PTR_AND_LENGTH(conn, tag) + DPI_CHECK_PTR_NOT_NULL(conn, stmt) + if (dpiStmt__allocate(conn, scrollable, &tempStmt, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiStmt__prepare(tempStmt, sql, sqlLength, tag, tagLength, + &error) < 0) { + dpiStmt__free(tempStmt, &error); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + *stmt = tempStmt; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_release() [PUBLIC] +// Release a reference to the connection. +//----------------------------------------------------------------------------- +int dpiConn_release(dpiConn *conn) +{ + return dpiGen__release(conn, DPI_HTYPE_CONN, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_rollback() [PUBLIC] +// Rollback the transaction associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_rollback(dpiConn *conn) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + status = dpiOci__transRollback(conn, 1, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setAction() [PUBLIC] +// Set the action associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setAction(dpiConn *conn, const char *value, uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_ACTION, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setCallTimeout() [PUBLIC] +// Set the call timeout (in milliseconds) used for round-trips to the +// database. This is only valid in Oracle Client 18c and higher. +//----------------------------------------------------------------------------- +int dpiConn_setCallTimeout(dpiConn *conn, uint32_t value) +{ + dpiError error; + int status; + + // validate parameters + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiUtils__checkClientVersion(conn->env->versionInfo, 18, 1, + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + + // set call timeout + status = dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, &value, + 0, DPI_OCI_ATTR_CALL_TIMEOUT, "set call timeout", &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setClientIdentifier() [PUBLIC] +// Set the client identifier associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setClientIdentifier(dpiConn *conn, const char *value, + uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_CLIENT_IDENTIFIER, + value, valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setClientInfo() [PUBLIC] +// Set the client info associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setClientInfo(dpiConn *conn, const char *value, + uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_CLIENT_INFO, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setCurrentSchema() [PUBLIC] +// Set the current schema associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setCurrentSchema(dpiConn *conn, const char *value, + uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_CURRENT_SCHEMA, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setDbOp() [PUBLIC] +// Set the database operation associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setDbOp(dpiConn *conn, const char *value, uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_DBOP, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setExternalName() [PUBLIC] +// Set the external name associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setExternalName(dpiConn *conn, const char *value, + uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_EXTERNAL_NAME, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setInternalName() [PUBLIC] +// Set the internal name associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setInternalName(dpiConn *conn, const char *value, + uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_INTERNAL_NAME, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setModule() [PUBLIC] +// Set the module associated with the connection. +//----------------------------------------------------------------------------- +int dpiConn_setModule(dpiConn *conn, const char *value, uint32_t valueLength) +{ + return dpiConn__setAttributeText(conn, DPI_OCI_ATTR_MODULE, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiConn_setStmtCacheSize() [PUBLIC] +// Set the size of the statement cache. +//----------------------------------------------------------------------------- +int dpiConn_setStmtCacheSize(dpiConn *conn, uint32_t cacheSize) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + status = dpiOci__attrSet(conn->handle, DPI_OCI_HTYPE_SVCCTX, &cacheSize, 0, + DPI_OCI_ATTR_STMTCACHESIZE, "set stmt cache size", &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_shutdownDatabase() [PUBLIC] +// Shutdown the database. Note that this must be done in two phases except in +// the situation where the instance is being aborted. +//----------------------------------------------------------------------------- +int dpiConn_shutdownDatabase(dpiConn *conn, dpiShutdownMode mode) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + status = dpiOci__dbShutdown(conn, mode, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_startupDatabase() [PUBLIC] +// Startup the database. This is equivalent to "startup nomount" in SQL*Plus. +//----------------------------------------------------------------------------- +int dpiConn_startupDatabase(dpiConn *conn, dpiStartupMode mode) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + status = dpiOci__dbStartup(conn, mode, &error); + return dpiGen__endPublicFn(conn, status, &error); +} + +//----------------------------------------------------------------------------- +// dpiConn_subscribe() [PUBLIC] +// Subscribe to events in the database. A subscription is created and +// returned. This replaces dpiConn_newSubscription(). +//----------------------------------------------------------------------------- +int dpiConn_subscribe(dpiConn *conn, dpiSubscrCreateParams *params, + dpiSubscr **subscr) +{ + dpiSubscr *tempSubscr; + dpiError error; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(conn, params) + DPI_CHECK_PTR_NOT_NULL(conn, subscr) + if (!conn->env->events) { + dpiError__set(&error, "subscribe", DPI_ERR_EVENTS_MODE_REQUIRED); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + if (dpiGen__allocate(DPI_HTYPE_SUBSCR, conn->env, (void**) &tempSubscr, + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiSubscr__create(tempSubscr, conn, params, &error) < 0) { + dpiSubscr__free(tempSubscr, &error); + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + } + + *subscr = tempSubscr; + return dpiGen__endPublicFn(conn, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiConn_unsubscribe() [PUBLIC] +// Unsubscribe from events in the database. Once this call completes +// successfully no further notifications will be sent. +//----------------------------------------------------------------------------- +int dpiConn_unsubscribe(dpiConn *conn, dpiSubscr *subscr) +{ + dpiError error; + int status; + + if (dpiConn__check(conn, __func__, &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (dpiGen__checkHandle(subscr, DPI_HTYPE_SUBSCR, "check subscription", + &error) < 0) + return dpiGen__endPublicFn(conn, DPI_FAILURE, &error); + if (subscr->registered) { + dpiMutex__acquire(subscr->mutex); + status = dpiOci__subscriptionUnRegister(conn, subscr, &error); + if (status == DPI_SUCCESS) + subscr->registered = 0; + dpiMutex__release(subscr->mutex); + if (status < 0) + return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); + } + + dpiGen__setRefCount(subscr, &error, -1); + return dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiContext.c b/vendor/github.com/godror/godror/odpi/src/dpiContext.c new file mode 100644 index 00000000000..e9adb18a33e --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiContext.c @@ -0,0 +1,329 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiContext.c +// Implementation of context. Each context uses a specific version of the +// ODPI-C library, which is checked for compatibility before allowing its use. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// maintain major and minor versions compiled into the library +static const unsigned int dpiMajorVersion = DPI_MAJOR_VERSION; +static const unsigned int dpiMinorVersion = DPI_MINOR_VERSION; + + +//----------------------------------------------------------------------------- +// dpiContext__create() [INTERNAL] +// Create a new context for interaction with the library. The major versions +// must match and the minor version of the caller must be less than or equal to +// the minor version compiled into the library. +//----------------------------------------------------------------------------- +static int dpiContext__create(const char *fnName, unsigned int majorVersion, + unsigned int minorVersion, dpiContext **context, dpiError *error) +{ + dpiContext *tempContext; + + // get error structure first (populates global environment if needed) + if (dpiGlobal__initError(fnName, error) < 0) + return DPI_FAILURE; + + // validate context handle + if (!context) + return dpiError__set(error, "check context handle", + DPI_ERR_NULL_POINTER_PARAMETER, "context"); + + // verify that the supplied version is supported by the library + if (dpiMajorVersion != majorVersion || minorVersion > dpiMinorVersion) + return dpiError__set(error, "check version", + DPI_ERR_VERSION_NOT_SUPPORTED, majorVersion, majorVersion, + minorVersion, dpiMajorVersion, dpiMinorVersion); + + // allocate context and initialize it + if (dpiGen__allocate(DPI_HTYPE_CONTEXT, NULL, (void**) &tempContext, + error) < 0) + return DPI_FAILURE; + tempContext->dpiMinorVersion = (uint8_t) minorVersion; + dpiOci__clientVersion(tempContext); + + *context = tempContext; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiContext__initCommonCreateParams() [INTERNAL] +// Initialize the common connection/pool creation parameters to default +// values. +//----------------------------------------------------------------------------- +void dpiContext__initCommonCreateParams(dpiCommonCreateParams *params) +{ + memset(params, 0, sizeof(dpiCommonCreateParams)); +} + + +//----------------------------------------------------------------------------- +// dpiContext__initConnCreateParams() [INTERNAL] +// Initialize the connection creation parameters to default values. Return +// the structure size as a convenience for calling functions which may have to +// differentiate between different ODPI-C application versions. +//----------------------------------------------------------------------------- +void dpiContext__initConnCreateParams(dpiConnCreateParams *params) +{ + memset(params, 0, sizeof(dpiConnCreateParams)); +} + + +//----------------------------------------------------------------------------- +// dpiContext__initPoolCreateParams() [INTERNAL] +// Initialize the pool creation parameters to default values. +//----------------------------------------------------------------------------- +void dpiContext__initPoolCreateParams(dpiPoolCreateParams *params) +{ + memset(params, 0, sizeof(dpiPoolCreateParams)); + params->minSessions = 1; + params->maxSessions = 1; + params->sessionIncrement = 0; + params->homogeneous = 1; + params->getMode = DPI_MODE_POOL_GET_NOWAIT; + params->pingInterval = DPI_DEFAULT_PING_INTERVAL; + params->pingTimeout = DPI_DEFAULT_PING_TIMEOUT; +} + + +//----------------------------------------------------------------------------- +// dpiContext__initSodaOperOptions() [INTERNAL] +// Initialize the SODA operation options to default values. +//----------------------------------------------------------------------------- +void dpiContext__initSodaOperOptions(dpiSodaOperOptions *options) +{ + memset(options, 0, sizeof(dpiSodaOperOptions)); +} + + +//----------------------------------------------------------------------------- +// dpiContext__initSubscrCreateParams() [INTERNAL] +// Initialize the subscription creation parameters to default values. +//----------------------------------------------------------------------------- +void dpiContext__initSubscrCreateParams(dpiSubscrCreateParams *params) +{ + memset(params, 0, sizeof(dpiSubscrCreateParams)); + params->subscrNamespace = DPI_SUBSCR_NAMESPACE_DBCHANGE; + params->groupingType = DPI_SUBSCR_GROUPING_TYPE_SUMMARY; +} + + +//----------------------------------------------------------------------------- +// dpiContext_create() [PUBLIC] +// Create a new context for interaction with the library. The major versions +// must match and the minor version of the caller must be less than or equal to +// the minor version compiled into the library. +//----------------------------------------------------------------------------- +int dpiContext_create(unsigned int majorVersion, unsigned int minorVersion, + dpiContext **context, dpiErrorInfo *errorInfo) +{ + dpiError error; + int status; + + if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) + dpiDebug__print("fn start %s\n", __func__); + status = dpiContext__create(__func__, majorVersion, minorVersion, context, + &error); + if (status < 0) + dpiError__getInfo(&error, errorInfo); + if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) + dpiDebug__print("fn end %s -> %d\n", __func__, status); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiContext_destroy() [PUBLIC] +// Destroy an existing context. The structure will be checked for validity +// first. +//----------------------------------------------------------------------------- +int dpiContext_destroy(dpiContext *context) +{ + char message[80]; + dpiError error; + + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + dpiUtils__clearMemory(&context->checkInt, sizeof(context->checkInt)); + if (dpiDebugLevel & DPI_DEBUG_LEVEL_REFS) + dpiDebug__print("ref %p (%s) -> 0\n", context, context->typeDef->name); + if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) + (void) sprintf(message, "fn end %s(%p) -> %d", __func__, context, + DPI_SUCCESS); + dpiUtils__freeMemory(context); + if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) + dpiDebug__print("%s\n", message); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiContext_getClientVersion() [PUBLIC] +// Return the version of the Oracle client that is in use. +//----------------------------------------------------------------------------- +int dpiContext_getClientVersion(const dpiContext *context, + dpiVersionInfo *versionInfo) +{ + dpiError error; + + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(context, versionInfo) + memcpy(versionInfo, context->versionInfo, sizeof(dpiVersionInfo)); + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiContext_getError() [PUBLIC] +// Return information about the error that was last populated. +//----------------------------------------------------------------------------- +void dpiContext_getError(const dpiContext *context, dpiErrorInfo *info) +{ + dpiError error; + + dpiGlobal__initError(NULL, &error); + dpiGen__checkHandle(context, DPI_HTYPE_CONTEXT, "check handle", &error); + dpiError__getInfo(&error, info); +} + + +//----------------------------------------------------------------------------- +// dpiContext_initCommonCreateParams() [PUBLIC] +// Initialize the common connection/pool creation parameters to default +// values. +//----------------------------------------------------------------------------- +int dpiContext_initCommonCreateParams(const dpiContext *context, + dpiCommonCreateParams *params) +{ + dpiError error; + + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(context, params) + dpiContext__initCommonCreateParams(params); + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiContext_initConnCreateParams() [PUBLIC] +// Initialize the connection creation parameters to default values. +//----------------------------------------------------------------------------- +int dpiContext_initConnCreateParams(const dpiContext *context, + dpiConnCreateParams *params) +{ + dpiConnCreateParams localParams; + dpiError error; + + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(context, params) + + // size changed in version 3.1; can be dropped once version 4 released + if (context->dpiMinorVersion > 0) + dpiContext__initConnCreateParams(params); + else { + dpiContext__initConnCreateParams(&localParams); + memcpy(params, &localParams, sizeof(dpiConnCreateParams__v30)); + } + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiContext_initPoolCreateParams() [PUBLIC] +// Initialize the pool creation parameters to default values. +//----------------------------------------------------------------------------- +int dpiContext_initPoolCreateParams(const dpiContext *context, + dpiPoolCreateParams *params) +{ + dpiPoolCreateParams localParams; + dpiError error; + + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(context, params) + + // size changed in versions 3.1 and 3.3 + // changes can be dropped once version 4 released + if (context->dpiMinorVersion > 2) { + dpiContext__initPoolCreateParams(params); + } else { + dpiContext__initPoolCreateParams(&localParams); + if (context->dpiMinorVersion > 0) { + memcpy(params, &localParams, sizeof(dpiPoolCreateParams__v32)); + } else { + memcpy(params, &localParams, sizeof(dpiPoolCreateParams__v30)); + } + } + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiContext_initSodaOperOptions() [PUBLIC] +// Initialize the SODA operation options to default values. +//----------------------------------------------------------------------------- +int dpiContext_initSodaOperOptions(const dpiContext *context, + dpiSodaOperOptions *options) +{ + dpiError error; + + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(context, options) + dpiContext__initSodaOperOptions(options); + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiContext_initSubscrCreateParams() [PUBLIC] +// Initialize the subscription creation parameters to default values. +//----------------------------------------------------------------------------- +int dpiContext_initSubscrCreateParams(const dpiContext *context, + dpiSubscrCreateParams *params) +{ + dpiSubscrCreateParams localParams; + dpiError error; + + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(context, params) + + // size changed in versions 3.2 and 3.3 + // changes can be dropped once version 4 released + if (context->dpiMinorVersion > 2) { + dpiContext__initSubscrCreateParams(params); + } else { + dpiContext__initSubscrCreateParams(&localParams); + if (context->dpiMinorVersion > 1) { + memcpy(params, &localParams, sizeof(dpiSubscrCreateParams__v32)); + } else { + memcpy(params, &localParams, sizeof(dpiSubscrCreateParams__v30)); + } + } + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiData.c b/vendor/github.com/godror/godror/odpi/src/dpiData.c new file mode 100644 index 00000000000..57d3faac309 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiData.c @@ -0,0 +1,899 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiData.c +// Implementation of transformation routines. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// constants used for converting timestamps to/from an interval +#define DPI_MS_DAY 86400000 // 24 * 60 * 60 * 1000 +#define DPI_MS_HOUR 3600000 // 60 * 60 * 1000 +#define DPI_MS_MINUTE 60000 // 60 * 1000 +#define DPI_MS_SECOND 1000 // ms per sec +#define DPI_MS_FSECOND 1000000 // 1000 * 1000 + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleDate() [INTERNAL] +// Populate the data from an dpiOciDate structure. +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleDate(dpiDataBuffer *data, + dpiOciDate *oracleValue) +{ + dpiTimestamp *timestamp = &data->asTimestamp; + + timestamp->year = oracleValue->year; + timestamp->month = oracleValue->month; + timestamp->day = oracleValue->day; + timestamp->hour = oracleValue->hour; + timestamp->minute = oracleValue->minute; + timestamp->second = oracleValue->second; + timestamp->fsecond = 0; + timestamp->tzHourOffset = 0; + timestamp->tzMinuteOffset = 0; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleDateAsDouble() [INTERNAL] +// Populate the data from an dpiOciDate structure as a double value (number +// of milliseconds since January 1, 1970). +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleDateAsDouble(dpiDataBuffer *data, + dpiEnv *env, dpiError *error, dpiOciDate *oracleValue) +{ + void *timestamp; + int status; + + // allocate and populate a timestamp with the value of the date + if (dpiOci__descriptorAlloc(env->handle, ×tamp, + DPI_OCI_DTYPE_TIMESTAMP_LTZ, "alloc timestamp", error) < 0) + return DPI_FAILURE; + if (dpiOci__dateTimeConstruct(env->handle, timestamp, oracleValue->year, + oracleValue->month, oracleValue->day, oracleValue->hour, + oracleValue->minute, oracleValue->second, 0, NULL, 0, error) < 0) { + dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP_LTZ); + return DPI_FAILURE; + } + + // now calculate the number of milliseconds since January 1, 1970 + status = dpiDataBuffer__fromOracleTimestampAsDouble(data, env, error, + timestamp); + dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP_LTZ); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleIntervalDS() [INTERNAL] +// Populate the data from an OCIInterval structure (days/seconds). +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue) +{ + dpiIntervalDS *interval = &data->asIntervalDS; + + return dpiOci__intervalGetDaySecond(env->handle, &interval->days, + &interval->hours, &interval->minutes, &interval->seconds, + &interval->fseconds, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleIntervalYM() [INTERNAL] +// Populate the data from an OCIInterval structure (years/months). +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue) +{ + dpiIntervalYM *interval = &data->asIntervalYM; + + return dpiOci__intervalGetYearMonth(env->handle, &interval->years, + &interval->months, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleNumberAsDouble() [INTERNAL] +// Populate the data from an OCINumber structure as a double. +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleNumberAsDouble(dpiDataBuffer *data, + dpiError *error, void *oracleValue) +{ + return dpiOci__numberToReal(&data->asDouble, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleNumberAsInteger() [INTERNAL] +// Populate the data from an OCINumber structure as an integer. +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleNumberAsInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue) +{ + return dpiOci__numberToInt(oracleValue, &data->asInt64, sizeof(int64_t), + DPI_OCI_NUMBER_SIGNED, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleNumberAsUnsignedInteger() [INTERNAL] +// Populate the data from an OCINumber structure as an unsigned integer. +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleNumberAsUnsignedInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue) +{ + return dpiOci__numberToInt(oracleValue, &data->asUint64, sizeof(uint64_t), + DPI_OCI_NUMBER_UNSIGNED, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleNumberAsText() [INTERNAL] +// Populate the data from an OCINumber structure as text. +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleNumberAsText(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue) +{ + uint8_t *target, numDigits, digits[DPI_NUMBER_MAX_DIGITS]; + int16_t decimalPointIndex, i; + uint16_t *targetUtf16; + uint32_t numBytes; + dpiBytes *bytes; + int isNegative; + + // parse the OCINumber structure + if (dpiUtils__parseOracleNumber(oracleValue, &isNegative, + &decimalPointIndex, &numDigits, digits, error) < 0) + return DPI_FAILURE; + + // calculate the number of bytes that will be required for the string + numBytes = numDigits; + if (isNegative) + numBytes++; + if (decimalPointIndex <= 0) + numBytes += -decimalPointIndex + 2; + else if (decimalPointIndex < numDigits) + numBytes++; + else if (decimalPointIndex > numDigits) + numBytes += decimalPointIndex - numDigits; + if (env->charsetId == DPI_CHARSET_ID_UTF16) + numBytes *= 2; + + // verify that the provided buffer is large enough + bytes = &data->asBytes; + if (numBytes > bytes->length) + return dpiError__set(error, "check number to text size", + DPI_ERR_BUFFER_SIZE_TOO_SMALL, bytes->length); + bytes->length = numBytes; + + // UTF-16 must be handled differently; the platform endianness is used in + // order to be compatible with OCI which has this restriction + if (env->charsetId == DPI_CHARSET_ID_UTF16) { + targetUtf16 = (uint16_t*) bytes->ptr; + + // if negative, include the sign + if (isNegative) + *targetUtf16++ = '-'; + + // if the decimal point index is 0 or less, add the decimal point and + // any leading zeroes that are needed + if (decimalPointIndex <= 0) { + *targetUtf16++ = '0'; + *targetUtf16++ = '.'; + for (; decimalPointIndex < 0; decimalPointIndex++) + *targetUtf16++ = '0'; + } + + // add each of the digits + for (i = 0; i < numDigits; i++) { + if (i > 0 && i == decimalPointIndex) + *targetUtf16++ = '.'; + *targetUtf16++ = '0' + digits[i]; + } + + // if the decimal point index exceeds the number of digits, add any + // trailing zeroes that are needed + if (decimalPointIndex > numDigits) { + for (i = numDigits; i < decimalPointIndex; i++) + *targetUtf16++ = '0'; + } + + // the following should be the same logic as the section above for UTF-16, + // simply with single byte encodings instead + } else { + target = (uint8_t*) bytes->ptr; + + // if negative, include the sign + if (isNegative) + *target++ = '-'; + + // if the decimal point index is 0 or less, add the decimal point and + // any leading zeroes that are needed + if (decimalPointIndex <= 0) { + *target++ = '0'; + *target++ = '.'; + for (; decimalPointIndex < 0; decimalPointIndex++) + *target++ = '0'; + } + + // add each of the digits + for (i = 0; i < numDigits; i++) { + if (i > 0 && i == decimalPointIndex) + *target++ = '.'; + *target++ = '0' + digits[i]; + } + + // if the decimal point index exceeds the number of digits, add any + // trailing zeroes that are needed + if (decimalPointIndex > numDigits) { + for (i = numDigits; i < decimalPointIndex; i++) + *target++ = '0'; + } + + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleTimestamp() [INTERNAL] +// Populate the data from an OCIDateTime structure. +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue, int withTZ) +{ + dpiTimestamp *timestamp = &data->asTimestamp; + + if (dpiOci__dateTimeGetDate(env->handle, oracleValue, ×tamp->year, + ×tamp->month, ×tamp->day, error) < 0) + return DPI_FAILURE; + if (dpiOci__dateTimeGetTime(env->handle, oracleValue, ×tamp->hour, + ×tamp->minute, ×tamp->second, ×tamp->fsecond, + error) < 0) + return DPI_FAILURE; + if (withTZ) { + if (dpiOci__dateTimeGetTimeZoneOffset(env->handle, oracleValue, + ×tamp->tzHourOffset, ×tamp->tzMinuteOffset, + error) < 0) + return DPI_FAILURE; + } else { + timestamp->tzHourOffset = 0; + timestamp->tzMinuteOffset = 0; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__fromOracleTimestampAsDouble() [INTERNAL] +// Populate the data from an OCIDateTime structure as a double value (number +// of milliseconds since January 1, 1970). +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleTimestampAsDouble(dpiDataBuffer *data, + dpiEnv *env, dpiError *error, void *oracleValue) +{ + int32_t day, hour, minute, second, fsecond; + void *interval; + int status; + + // allocate interval to use in calculation + if (dpiOci__descriptorAlloc(env->handle, &interval, + DPI_OCI_DTYPE_INTERVAL_DS, "alloc interval", error) < 0) + return DPI_FAILURE; + + // subtract dates to determine interval between date and base date + if (dpiOci__dateTimeSubtract(env->handle, oracleValue, env->baseDate, + interval, error) < 0) { + dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); + return DPI_FAILURE; + } + + // get the days, hours, minutes and seconds from the interval + status = dpiOci__intervalGetDaySecond(env->handle, &day, &hour, &minute, + &second, &fsecond, interval, error); + dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); + if (status < 0) + return DPI_FAILURE; + + // calculate milliseconds since January 1, 1970 + data->asDouble = ((double) day) * DPI_MS_DAY + hour * DPI_MS_HOUR + + minute * DPI_MS_MINUTE + second * DPI_MS_SECOND + + fsecond / DPI_MS_FSECOND; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleDate() [INTERNAL] +// Populate the data in an dpiOciDate structure. +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleDate(dpiDataBuffer *data, dpiOciDate *oracleValue) +{ + dpiTimestamp *timestamp = &data->asTimestamp; + + oracleValue->year = timestamp->year; + oracleValue->month = timestamp->month; + oracleValue->day = timestamp->day; + oracleValue->hour = timestamp->hour; + oracleValue->minute = timestamp->minute; + oracleValue->second = timestamp->second; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleDateFromDouble() [INTERNAL] +// Populate the data in an dpiOciDate structure given a double (number of +// milliseconds since January 1, 1970). +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleDateFromDouble(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, dpiOciDate *oracleValue) +{ + void *timestamp, *timestampLTZ; + uint32_t fsecond; + + // allocate a descriptor to acquire a timestamp + if (dpiOci__descriptorAlloc(env->handle, ×tampLTZ, + DPI_OCI_DTYPE_TIMESTAMP_LTZ, "alloc timestamp", error) < 0) + return DPI_FAILURE; + if (dpiDataBuffer__toOracleTimestampFromDouble(data, env, error, + timestampLTZ) < 0) { + dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); + return DPI_FAILURE; + } + + // allocate a plain timestamp and convert to it + if (dpiOci__descriptorAlloc(env->handle, ×tamp, + DPI_OCI_DTYPE_TIMESTAMP, "alloc plain timestamp", error) < 0) { + dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); + return DPI_FAILURE; + } + if (dpiOci__dateTimeConvert(env->handle, timestampLTZ, timestamp, + error) < 0) { + dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); + dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); + return DPI_FAILURE; + } + dpiOci__descriptorFree(timestampLTZ, DPI_OCI_DTYPE_TIMESTAMP_LTZ); + + // populate date structure + if (dpiOci__dateTimeGetDate(env->handle, timestamp, &oracleValue->year, + &oracleValue->month, &oracleValue->day, error) < 0) { + dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); + return DPI_FAILURE; + } + if (dpiOci__dateTimeGetTime(env->handle, timestamp, &oracleValue->hour, + &oracleValue->minute, &oracleValue->second, &fsecond, error) < 0) { + dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); + return DPI_FAILURE; + } + + dpiOci__descriptorFree(timestamp, DPI_OCI_DTYPE_TIMESTAMP); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleIntervalDS() [INTERNAL] +// Populate the data in an OCIInterval structure (days/seconds). +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue) +{ + dpiIntervalDS *interval = &data->asIntervalDS; + + return dpiOci__intervalSetDaySecond(env->handle, interval->days, + interval->hours, interval->minutes, interval->seconds, + interval->fseconds, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleIntervalYM() [INTERNAL] +// Populate the data in an OCIInterval structure (years/months). +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue) +{ + dpiIntervalYM *interval = &data->asIntervalYM; + + return dpiOci__intervalSetYearMonth(env->handle, interval->years, + interval->months, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleNumberFromDouble() [INTERNAL] +// Populate the data in an OCINumber structure from a double. +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleNumberFromDouble(dpiDataBuffer *data, + dpiError *error, void *oracleValue) +{ + if (isnan(data->asDouble)) + return dpiError__set(error, "convert double to Oracle number", + DPI_ERR_NAN); + return dpiOci__numberFromReal(data->asDouble, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleNumberFromInteger() [INTERNAL] +// Populate the data in an OCINumber structure from an integer. +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleNumberFromInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue) +{ + return dpiOci__numberFromInt(&data->asInt64, sizeof(int64_t), + DPI_OCI_NUMBER_SIGNED, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleNumberFromText() [INTERNAL] +// Populate the data in an OCINumber structure from text. +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleNumberFromText(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue) +{ + uint8_t numDigits, digits[DPI_NUMBER_AS_TEXT_CHARS], *source, *target, i; + int isNegative, prependZero, appendSentinel; + dpiBytes *value = &data->asBytes; + int16_t decimalPointIndex; + uint8_t byte, numPairs; + int8_t ociExponent; + + // parse the string into its constituent components + if (dpiUtils__parseNumberString(value->ptr, value->length, env->charsetId, + &isNegative, &decimalPointIndex, &numDigits, digits, error) < 0) + return DPI_FAILURE; + + // if the exponent is odd, prepend a zero + prependZero = (decimalPointIndex > 0 && decimalPointIndex % 2 == 1) || + (decimalPointIndex < 0 && decimalPointIndex % 2 == -1); + if (prependZero && numDigits != 0) { + digits[numDigits++] = 0; + decimalPointIndex++; + } + + // determine the number of digit pairs; if the number of digits is odd, + // append a zero to make the number of digits even + if (numDigits % 2 == 1) + digits[numDigits++] = 0; + numPairs = numDigits / 2; + + // append a sentinel 102 byte for negative numbers if there is room + appendSentinel = (isNegative && numDigits > 0 && + numDigits < DPI_NUMBER_MAX_DIGITS); + + // initialize the OCINumber value + // the length is the number of pairs, plus one for the exponent + // include an extra byte for the sentinel if applicable + target = (uint8_t*) oracleValue; + *target++ = (uint8_t) (numPairs + 1 + appendSentinel); + + // if the number of digits is zero, the value is itself zero since all + // leading and trailing zeroes are removed from the digits string; the OCI + // value for zero is a special case + if (numDigits == 0) { + *target = 128; + return DPI_SUCCESS; + } + + // calculate the exponent + ociExponent = (int8_t) ((decimalPointIndex - 2) / 2 + 193); + if (isNegative) + ociExponent = ~ociExponent; + *target++ = (uint8_t) ociExponent; + + // calculate the mantissa bytes + source = digits; + for (i = 0; i < numPairs; i++) { + if (i == 0 && prependZero) + byte = *source++; + else { + byte = *source++ * 10; + byte += *source++; + } + if (isNegative) + byte = 101 - byte; + else byte++; + *target++ = byte; + } + + // append 102 byte for negative numbers if the number of digits is less + // than the maximum allowable + if (appendSentinel) + *target = 102; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleNumberFromUnsignedInteger() [INTERNAL] +// Populate the data in an OCINumber structure from an integer. +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleNumberFromUnsignedInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue) +{ + return dpiOci__numberFromInt(&data->asUint64, sizeof(uint64_t), + DPI_OCI_NUMBER_UNSIGNED, oracleValue, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleTimestamp() [INTERNAL] +// Populate the data in an OCIDateTime structure. +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue, int withTZ) +{ + dpiTimestamp *timestamp = &data->asTimestamp; + char tzOffsetBuffer[10], *tzOffset = NULL; + size_t tzOffsetLength = 0; + char sign; + + if (withTZ) { + sign = (timestamp->tzHourOffset < 0 || timestamp->tzMinuteOffset < 0) ? + '-' : '+'; + tzOffsetLength = (size_t) sprintf(tzOffsetBuffer, "%c%.2d:%.2d", sign, + abs(timestamp->tzHourOffset), abs(timestamp->tzMinuteOffset)); + tzOffset = tzOffsetBuffer; + } + return dpiOci__dateTimeConstruct(env->handle, oracleValue, timestamp->year, + timestamp->month, timestamp->day, timestamp->hour, + timestamp->minute, timestamp->second, timestamp->fsecond, tzOffset, + tzOffsetLength, error); +} + + +//----------------------------------------------------------------------------- +// dpiDataBuffer__toOracleTimestampFromDouble() [INTERNAL] +// Populate the data in an OCIDateTime structure, given the number of +// milliseconds since January 1, 1970. +//----------------------------------------------------------------------------- +int dpiDataBuffer__toOracleTimestampFromDouble(dpiDataBuffer *data, + dpiEnv *env, dpiError *error, void *oracleValue) +{ + int32_t day, hour, minute, second, fsecond; + void *interval; + int status; + double ms; + + // allocate interval to use in calculation + if (dpiOci__descriptorAlloc(env->handle, &interval, + DPI_OCI_DTYPE_INTERVAL_DS, "alloc interval", error) < 0) + return DPI_FAILURE; + + // determine the interval + ms = data->asDouble; + day = (int32_t) (ms / DPI_MS_DAY); + ms = ms - ((double) day) * DPI_MS_DAY; + hour = (int32_t) (ms / DPI_MS_HOUR); + ms = ms - (hour * DPI_MS_HOUR); + minute = (int32_t) (ms / DPI_MS_MINUTE); + ms = ms - (minute * DPI_MS_MINUTE); + second = (int32_t) (ms / DPI_MS_SECOND); + ms = ms - (second * DPI_MS_SECOND); + fsecond = (int32_t)(ms * DPI_MS_FSECOND); + if (dpiOci__intervalSetDaySecond(env->handle, day, hour, minute, second, + fsecond, interval, error) < 0) { + dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); + return DPI_FAILURE; + } + + // add the interval to the base date + status = dpiOci__dateTimeIntervalAdd(env->handle, env->baseDate, interval, + oracleValue, error); + dpiOci__descriptorFree(interval, DPI_OCI_DTYPE_INTERVAL_DS); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiData_getBool() [PUBLIC] +// Return the boolean portion of the data. +//----------------------------------------------------------------------------- +int dpiData_getBool(dpiData *data) +{ + return data->value.asBoolean; +} + + +//----------------------------------------------------------------------------- +// dpiData_getBytes() [PUBLIC] +// Return the bytes portion of the data. +//----------------------------------------------------------------------------- +dpiBytes *dpiData_getBytes(dpiData *data) +{ + return &data->value.asBytes; +} + + +//----------------------------------------------------------------------------- +// dpiData_getDouble() [PUBLIC] +// Return the double portion of the data. +//----------------------------------------------------------------------------- +double dpiData_getDouble(dpiData *data) +{ + return data->value.asDouble; +} + + +//----------------------------------------------------------------------------- +// dpiData_getFloat() [PUBLIC] +// Return the float portion of the data. +//----------------------------------------------------------------------------- +float dpiData_getFloat(dpiData *data) +{ + return data->value.asFloat; +} + + +//----------------------------------------------------------------------------- +// dpiData_getInt64() [PUBLIC] +// Return the integer portion of the data. +//----------------------------------------------------------------------------- +int64_t dpiData_getInt64(dpiData *data) +{ + return data->value.asInt64; +} + + +//----------------------------------------------------------------------------- +// dpiData_getIntervalDS() [PUBLIC] +// Return the interval (days/seconds) portion of the data. +//----------------------------------------------------------------------------- +dpiIntervalDS *dpiData_getIntervalDS(dpiData *data) +{ + return &data->value.asIntervalDS; +} + + +//----------------------------------------------------------------------------- +// dpiData_getIntervalYM() [PUBLIC] +// Return the interval (years/months) portion of the data. +//----------------------------------------------------------------------------- +dpiIntervalYM *dpiData_getIntervalYM(dpiData *data) +{ + return &data->value.asIntervalYM; +} + + +//----------------------------------------------------------------------------- +// dpiData_getIsNull() [PUBLIC] +// Return a boolean indicating if the value is null or not. +//----------------------------------------------------------------------------- +int dpiData_getIsNull(dpiData *data) +{ + return data->isNull; +} + + +//----------------------------------------------------------------------------- +// dpiData_getLOB() [PUBLIC] +// Return the LOB portion of the data. +//----------------------------------------------------------------------------- +dpiLob *dpiData_getLOB(dpiData *data) +{ + return data->value.asLOB; +} + + +//----------------------------------------------------------------------------- +// dpiData_getObject() [PUBLIC] +// Return the object portion of the data. +//----------------------------------------------------------------------------- +dpiObject *dpiData_getObject(dpiData *data) +{ + return data->value.asObject; +} + + +//----------------------------------------------------------------------------- +// dpiData_getStmt() [PUBLIC] +// Return the statement portion of the data. +//----------------------------------------------------------------------------- +dpiStmt *dpiData_getStmt(dpiData *data) +{ + return data->value.asStmt; +} + + +//----------------------------------------------------------------------------- +// dpiData_getTimestamp() [PUBLIC] +// Return the timestamp portion of the data. +//----------------------------------------------------------------------------- +dpiTimestamp *dpiData_getTimestamp(dpiData *data) +{ + return &data->value.asTimestamp; +} + + +//----------------------------------------------------------------------------- +// dpiData_getUint64() [PUBLIC] +// Return the unsigned integer portion of the data. +//----------------------------------------------------------------------------- +uint64_t dpiData_getUint64(dpiData *data) +{ + return data->value.asUint64; +} + + +//----------------------------------------------------------------------------- +// dpiData_setBool() [PUBLIC] +// Set the boolean portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setBool(dpiData *data, int value) +{ + data->isNull = 0; + data->value.asBoolean = value; +} + + +//----------------------------------------------------------------------------- +// dpiData_setBytes() [PUBLIC] +// Set the bytes portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setBytes(dpiData *data, char *ptr, uint32_t length) +{ + data->isNull = 0; + data->value.asBytes.ptr = ptr; + data->value.asBytes.length = length; +} + + +//----------------------------------------------------------------------------- +// dpiData_setDouble() [PUBLIC] +// Set the double portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setDouble(dpiData *data, double value) +{ + data->isNull = 0; + data->value.asDouble = value; +} + + +//----------------------------------------------------------------------------- +// dpiData_setFloat() [PUBLIC] +// Set the float portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setFloat(dpiData *data, float value) +{ + data->isNull = 0; + data->value.asFloat = value; +} + + +//----------------------------------------------------------------------------- +// dpiData_setInt64() [PUBLIC] +// Set the integer portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setInt64(dpiData *data, int64_t value) +{ + data->isNull = 0; + data->value.asInt64 = value; +} + + +//----------------------------------------------------------------------------- +// dpiData_setIntervalDS() [PUBLIC] +// Set the interval (days/seconds) portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setIntervalDS(dpiData *data, int32_t days, int32_t hours, + int32_t minutes, int32_t seconds, int32_t fseconds) +{ + dpiIntervalDS *interval = &data->value.asIntervalDS; + + data->isNull = 0; + interval->days = days; + interval->hours = hours; + interval->minutes = minutes; + interval->seconds = seconds; + interval->fseconds = fseconds; +} + + +//----------------------------------------------------------------------------- +// dpiData_setIntervalYM() [PUBLIC] +// Set the interval (years/months) portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setIntervalYM(dpiData *data, int32_t years, int32_t months) +{ + dpiIntervalYM *interval = &data->value.asIntervalYM; + + data->isNull = 0; + interval->years = years; + interval->months = months; +} + + +//----------------------------------------------------------------------------- +// dpiData_setLOB() [PUBLIC] +// Set the LOB portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setLOB(dpiData *data, dpiLob *lob) +{ + data->isNull = 0; + data->value.asLOB = lob; +} + + +//----------------------------------------------------------------------------- +// dpiData_setNull() [PUBLIC] +// Set the data to be treated as a null value. +//----------------------------------------------------------------------------- +void dpiData_setNull(dpiData *data) +{ + data->isNull = 1; +} + + +//----------------------------------------------------------------------------- +// dpiData_setObject() [PUBLIC] +// Set the object portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setObject(dpiData *data, dpiObject *obj) +{ + data->isNull = 0; + data->value.asObject = obj; +} + + +//----------------------------------------------------------------------------- +// dpiData_setStmt() [PUBLIC] +// Set the statement portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setStmt(dpiData *data, dpiStmt *obj) +{ + data->isNull = 0; + data->value.asStmt = obj; +} + + +//----------------------------------------------------------------------------- +// dpiData_setTimestamp() [PUBLIC] +// Set the timestamp portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setTimestamp(dpiData *data, int16_t year, uint8_t month, + uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, + uint32_t fsecond, int8_t tzHourOffset, int8_t tzMinuteOffset) +{ + dpiTimestamp *timestamp = &data->value.asTimestamp; + + data->isNull = 0; + timestamp->year = year; + timestamp->month = month; + timestamp->day = day; + timestamp->hour = hour; + timestamp->minute = minute; + timestamp->second = second; + timestamp->fsecond = fsecond; + timestamp->tzHourOffset = tzHourOffset; + timestamp->tzMinuteOffset = tzMinuteOffset; +} + + +//----------------------------------------------------------------------------- +// dpiData_setUint64() [PUBLIC] +// Set the unsigned integer portion of the data. +//----------------------------------------------------------------------------- +void dpiData_setUint64(dpiData *data, uint64_t value) +{ + data->isNull = 0; + data->value.asUint64 = value; +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiDebug.c b/vendor/github.com/godror/godror/odpi/src/dpiDebug.c new file mode 100644 index 00000000000..28b8776475f --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiDebug.c @@ -0,0 +1,183 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiDebug.c +// Methods used for debugging ODPI-C. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +#define DPI_DEBUG_THREAD_FORMAT "%.5" PRIu64 +#define DPI_DEBUG_DATE_FORMAT "%.4d-%.2d-%.2d" +#define DPI_DEBUG_TIME_FORMAT "%.2d:%.2d:%.2d.%.3d" + +// debug level (populated by environment variable DPI_DEBUG_LEVEL) +unsigned long dpiDebugLevel = 0; + +// debug prefix format (populated by environment variable DPI_DEBUG_PREFIX) +static char dpiDebugPrefixFormat[64] = "ODPI [%i] %d %t: "; + +// debug file for printing (currently unchangeable) +static FILE *dpiDebugStream = NULL; + + +//----------------------------------------------------------------------------- +// dpiDebug__getFormatWithPrefix() [INTERNAL] +// Adjust the provided format to include the prefix requested by the user. +// This method is not permitted to fail, so if there is not enough space, the +// prefix is truncated as needed -- although this is a very unlikely scenario. +//----------------------------------------------------------------------------- +static void dpiDebug__getFormatWithPrefix(const char *format, + char *formatWithPrefix, size_t maxFormatWithPrefixSize) +{ + char *sourcePtr, *targetPtr; + int gotTime, tempSize; + uint64_t threadId; + size_t size; +#ifdef _WIN32 + SYSTEMTIME time; +#else + struct timeval timeOfDay; + struct tm time; +#endif + + gotTime = 0; + sourcePtr = dpiDebugPrefixFormat; + targetPtr = formatWithPrefix; + size = maxFormatWithPrefixSize - strlen(format); + while (*sourcePtr && size > 20) { + + // all characters except '%' are copied verbatim to the target + if (*sourcePtr != '%') { + *targetPtr++ = *sourcePtr++; + maxFormatWithPrefixSize--; + continue; + } + + // handle the different directives + sourcePtr++; + switch (*sourcePtr) { + case 'i': +#ifdef _WIN32 + threadId = (uint64_t) GetCurrentThreadId(); +#elif defined __linux + threadId = (uint64_t) syscall(SYS_gettid); +#elif defined __APPLE__ + pthread_threadid_np(NULL, &threadId); +#else + threadId = (uint64_t) pthread_self(); +#endif + tempSize = sprintf(targetPtr, DPI_DEBUG_THREAD_FORMAT, + threadId); + size -= tempSize; + targetPtr += tempSize; + sourcePtr++; + break; + case 'd': + case 't': + if (!gotTime) { + gotTime = 1; +#ifdef _WIN32 + GetLocalTime(&time); +#else + gettimeofday(&timeOfDay, NULL); + localtime_r(&timeOfDay.tv_sec, &time); +#endif + } +#ifdef _WIN32 + if (*sourcePtr == 'd') + tempSize = sprintf(targetPtr, DPI_DEBUG_DATE_FORMAT, + time.wYear, time.wMonth, time.wDay); + else tempSize = sprintf(targetPtr, DPI_DEBUG_TIME_FORMAT, + time.wHour, time.wMinute, time.wSecond, + time.wMilliseconds); +#else + if (*sourcePtr == 'd') + tempSize = sprintf(targetPtr, DPI_DEBUG_DATE_FORMAT, + time.tm_year + 1900, time.tm_mon + 1, + time.tm_mday); + else tempSize = sprintf(targetPtr, DPI_DEBUG_TIME_FORMAT, + time.tm_hour, time.tm_min, time.tm_sec, + (int) (timeOfDay.tv_usec / 1000)); +#endif + size -= tempSize; + targetPtr += tempSize; + sourcePtr++; + break; + case '\0': + break; + default: + *targetPtr++ = '%'; + *targetPtr++ = *sourcePtr++; + break; + } + } + + // append original format + strcpy(targetPtr, format); +} + + +//----------------------------------------------------------------------------- +// dpiDebug__initialize() [INTERNAL] +// Initialize debugging infrastructure. This reads the environment variables +// and populates the global variables used for determining which messages to +// print and what prefix should be placed in front of each message. +//----------------------------------------------------------------------------- +void dpiDebug__initialize(void) +{ + char *envValue; + + // determine the value of the environment variable DPI_DEBUG_LEVEL and + // convert to an integer; if the value in the environment variable is not a + // valid integer, it is ignored + envValue = getenv("DPI_DEBUG_LEVEL"); + if (envValue) + dpiDebugLevel = (unsigned long) strtol(envValue, NULL, 10); + + // determine the value of the environment variable DPI_DEBUG_PREFIX and + // store it in the static buffer available for it; a static buffer is used + // since this runs during startup and may not fail; if the value of the + // environment variable is too large for the buffer, the value is ignored + // and the default value is used instead + envValue = getenv("DPI_DEBUG_PREFIX"); + if (envValue && strlen(envValue) < sizeof(dpiDebugPrefixFormat)) + strcpy(dpiDebugPrefixFormat, envValue); + + // messages are written to stderr + dpiDebugStream = stderr; + + // for any debugging level > 0 print a message indicating that tracing + // has started + if (dpiDebugLevel) { + dpiDebug__print("ODPI-C %s\n", DPI_VERSION_STRING); + dpiDebug__print("debugging messages initialized at level %lu\n", + dpiDebugLevel); + } +} + + +//----------------------------------------------------------------------------- +// dpiDebug__print() [INTERNAL] +// Print the specified debugging message with a newly calculated prefix. +//----------------------------------------------------------------------------- +void dpiDebug__print(const char *format, ...) +{ + char formatWithPrefix[512]; + va_list varArgs; + + dpiDebug__getFormatWithPrefix(format, formatWithPrefix, + sizeof(formatWithPrefix)); + va_start(varArgs, format); + (void) vfprintf(dpiDebugStream, formatWithPrefix, varArgs); + va_end(varArgs); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c b/vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c new file mode 100644 index 00000000000..35cb84727ae --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiDeqOptions.c @@ -0,0 +1,369 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiDeqOptions.c +// Implementation of AQ dequeue options. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiDeqOptions__create() [INTERNAL] +// Create a new subscription structure and return it. In case of error NULL +// is returned. +//----------------------------------------------------------------------------- +int dpiDeqOptions__create(dpiDeqOptions *options, dpiConn *conn, + dpiError *error) +{ + dpiGen__setRefCount(conn, error, 1); + options->conn = conn; + return dpiOci__descriptorAlloc(conn->env->handle, &options->handle, + DPI_OCI_DTYPE_AQDEQ_OPTIONS, "allocate descriptor", error); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions__free() [INTERNAL] +// Free the memory for a dequeue options structure. +//----------------------------------------------------------------------------- +void dpiDeqOptions__free(dpiDeqOptions *options, dpiError *error) +{ + if (options->handle) { + dpiOci__descriptorFree(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS); + options->handle = NULL; + } + if (options->conn) { + dpiGen__setRefCount(options->conn, error, -1); + options->conn = NULL; + } + dpiUtils__freeMemory(options); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions__getAttrValue() [INTERNAL] +// Get the attribute value in OCI. +//----------------------------------------------------------------------------- +static int dpiDeqOptions__getAttrValue(dpiDeqOptions *options, + uint32_t attribute, const char *fnName, void *value, + uint32_t *valueLength) +{ + dpiError error; + int status; + + if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, fnName, + &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(options, value) + DPI_CHECK_PTR_NOT_NULL(options, valueLength) + status = dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, + value, valueLength, attribute, "get attribute value", &error); + return dpiGen__endPublicFn(options, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions__setAttrValue() [INTERNAL] +// Set the attribute value in OCI. +//----------------------------------------------------------------------------- +static int dpiDeqOptions__setAttrValue(dpiDeqOptions *options, + uint32_t attribute, const char *fnName, const void *value, + uint32_t valueLength) +{ + dpiError error; + int status; + + if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, fnName, + &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(options, value) + status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, + (void*) value, valueLength, attribute, "set attribute value", + &error); + return dpiGen__endPublicFn(options, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_addRef() [PUBLIC] +// Add a reference to the dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_addRef(dpiDeqOptions *options) +{ + return dpiGen__addRef(options, DPI_HTYPE_DEQ_OPTIONS, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getCondition() [PUBLIC] +// Return condition associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getCondition(dpiDeqOptions *options, const char **value, + uint32_t *valueLength) +{ + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_DEQCOND, __func__, + (void*) value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getConsumerName() [PUBLIC] +// Return consumer name associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getConsumerName(dpiDeqOptions *options, const char **value, + uint32_t *valueLength) +{ + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_CONSUMER_NAME, + __func__, (void*) value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getCorrelation() [PUBLIC] +// Return correlation associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getCorrelation(dpiDeqOptions *options, const char **value, + uint32_t *valueLength) +{ + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_CORRELATION, + __func__, (void*) value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getMode() [PUBLIC] +// Return mode associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getMode(dpiDeqOptions *options, dpiDeqMode *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_DEQ_MODE, + __func__, value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getMsgId() [PUBLIC] +// Return message id associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getMsgId(dpiDeqOptions *options, const char **value, + uint32_t *valueLength) +{ + dpiError error; + void *rawValue; + + if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, __func__, + &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(options, value) + DPI_CHECK_PTR_NOT_NULL(options, valueLength) + if (dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, + &rawValue, NULL, DPI_OCI_ATTR_DEQ_MSGID, "get attribute value", + &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + dpiOci__rawPtr(options->env->handle, rawValue, (void**) value); + dpiOci__rawSize(options->env->handle, rawValue, valueLength); + return dpiGen__endPublicFn(options, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getNavigation() [PUBLIC] +// Return navigation associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getNavigation(dpiDeqOptions *options, + dpiDeqNavigation *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_NAVIGATION, + __func__, value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getTransformation() [PUBLIC] +// Return transformation associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getTransformation(dpiDeqOptions *options, const char **value, + uint32_t *valueLength) +{ + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, + __func__, (void*) value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getVisibility() [PUBLIC] +// Return visibility associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getVisibility(dpiDeqOptions *options, dpiVisibility *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_VISIBILITY, + __func__, value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_getWait() [PUBLIC] +// Return the number of seconds to wait for a message when dequeuing. +//----------------------------------------------------------------------------- +int dpiDeqOptions_getWait(dpiDeqOptions *options, uint32_t *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiDeqOptions__getAttrValue(options, DPI_OCI_ATTR_WAIT, __func__, + value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_release() [PUBLIC] +// Release a reference to the dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_release(dpiDeqOptions *options) +{ + return dpiGen__release(options, DPI_HTYPE_DEQ_OPTIONS, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setCondition() [PUBLIC] +// Set condition associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setCondition(dpiDeqOptions *options, const char *value, + uint32_t valueLength) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_DEQCOND, __func__, + value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setConsumerName() [PUBLIC] +// Set consumer name associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setConsumerName(dpiDeqOptions *options, const char *value, + uint32_t valueLength) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_CONSUMER_NAME, + __func__, value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setCorrelation() [PUBLIC] +// Set correlation associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setCorrelation(dpiDeqOptions *options, const char *value, + uint32_t valueLength) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_CORRELATION, + __func__, value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setDeliveryMode() [PUBLIC] +// Set the delivery mode associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setDeliveryMode(dpiDeqOptions *options, + dpiMessageDeliveryMode value) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_MSG_DELIVERY_MODE, + __func__, &value, 0); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setMode() [PUBLIC] +// Set the mode associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setMode(dpiDeqOptions *options, dpiDeqMode value) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_DEQ_MODE, + __func__, &value, 0); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setMsgId() [PUBLIC] +// Set the message id associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setMsgId(dpiDeqOptions *options, const char *value, + uint32_t valueLength) +{ + void *rawValue = NULL; + dpiError error; + int status; + + if (dpiGen__startPublicFn(options, DPI_HTYPE_DEQ_OPTIONS, __func__, + &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(options, value) + if (dpiOci__rawAssignBytes(options->env->handle, value, valueLength, + &rawValue, &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQDEQ_OPTIONS, + (void*) &rawValue, valueLength, DPI_OCI_ATTR_DEQ_MSGID, + "set value", &error); + dpiOci__rawResize(options->env->handle, &rawValue, 0, &error); + return dpiGen__endPublicFn(options, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setNavigation() [PUBLIC] +// Set navigation associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setNavigation(dpiDeqOptions *options, dpiDeqNavigation value) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_NAVIGATION, + __func__, &value, 0); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setTransformation() [PUBLIC] +// Set transformation associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setTransformation(dpiDeqOptions *options, const char *value, + uint32_t valueLength) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, + __func__, value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setVisibility() [PUBLIC] +// Set visibility associated with dequeue options. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setVisibility(dpiDeqOptions *options, dpiVisibility value) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_VISIBILITY, + __func__, &value, 0); +} + + +//----------------------------------------------------------------------------- +// dpiDeqOptions_setWait() [PUBLIC] +// Set the number of seconds to wait for a message when dequeuing. +//----------------------------------------------------------------------------- +int dpiDeqOptions_setWait(dpiDeqOptions *options, uint32_t value) +{ + return dpiDeqOptions__setAttrValue(options, DPI_OCI_ATTR_WAIT, __func__, + &value, 0); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c b/vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c new file mode 100644 index 00000000000..24bf60a3229 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiEnqOptions.c @@ -0,0 +1,173 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiEnqOptions.c +// Implementation of AQ enqueue options. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiEnqOptions__create() [INTERNAL] +// Create a new subscription structure and return it. In case of error NULL +// is returned. +//----------------------------------------------------------------------------- +int dpiEnqOptions__create(dpiEnqOptions *options, dpiConn *conn, + dpiError *error) +{ + dpiGen__setRefCount(conn, error, 1); + options->conn = conn; + return dpiOci__descriptorAlloc(conn->env->handle, &options->handle, + DPI_OCI_DTYPE_AQENQ_OPTIONS, "allocate descriptor", error); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions__free() [INTERNAL] +// Free the memory for a enqueue options structure. +//----------------------------------------------------------------------------- +void dpiEnqOptions__free(dpiEnqOptions *options, dpiError *error) +{ + if (options->handle) { + dpiOci__descriptorFree(options->handle, DPI_OCI_DTYPE_AQENQ_OPTIONS); + options->handle = NULL; + } + if (options->conn) { + dpiGen__setRefCount(options->conn, error, -1); + options->conn = NULL; + } + dpiUtils__freeMemory(options); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions__getAttrValue() [INTERNAL] +// Get the attribute value in OCI. +//----------------------------------------------------------------------------- +static int dpiEnqOptions__getAttrValue(dpiEnqOptions *options, + uint32_t attribute, const char *fnName, void *value, + uint32_t *valueLength) +{ + dpiError error; + int status; + + if (dpiGen__startPublicFn(options, DPI_HTYPE_ENQ_OPTIONS, fnName, + &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(options, value) + DPI_CHECK_PTR_NOT_NULL(options, valueLength) + status = dpiOci__attrGet(options->handle, DPI_OCI_DTYPE_AQENQ_OPTIONS, + value, valueLength, attribute, "get attribute value", &error); + return dpiGen__endPublicFn(options, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions__setAttrValue() [INTERNAL] +// Set the attribute value in OCI. +//----------------------------------------------------------------------------- +static int dpiEnqOptions__setAttrValue(dpiEnqOptions *options, + uint32_t attribute, const char *fnName, const void *value, + uint32_t valueLength) +{ + dpiError error; + int status; + + if (dpiGen__startPublicFn(options, DPI_HTYPE_ENQ_OPTIONS, fnName, + &error) < 0) + return dpiGen__endPublicFn(options, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(options, value) + status = dpiOci__attrSet(options->handle, DPI_OCI_DTYPE_AQENQ_OPTIONS, + (void*) value, valueLength, attribute, "set attribute value", + &error); + return dpiGen__endPublicFn(options, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions_addRef() [PUBLIC] +// Add a reference to the enqueue options. +//----------------------------------------------------------------------------- +int dpiEnqOptions_addRef(dpiEnqOptions *options) +{ + return dpiGen__addRef(options, DPI_HTYPE_ENQ_OPTIONS, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions_getTransformation() [PUBLIC] +// Return transformation associated with enqueue options. +//----------------------------------------------------------------------------- +int dpiEnqOptions_getTransformation(dpiEnqOptions *options, const char **value, + uint32_t *valueLength) +{ + return dpiEnqOptions__getAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, + __func__, (void*) value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions_getVisibility() [PUBLIC] +// Return visibility associated with enqueue options. +//----------------------------------------------------------------------------- +int dpiEnqOptions_getVisibility(dpiEnqOptions *options, dpiVisibility *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiEnqOptions__getAttrValue(options, DPI_OCI_ATTR_VISIBILITY, + __func__, value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions_release() [PUBLIC] +// Release a reference to the enqueue options. +//----------------------------------------------------------------------------- +int dpiEnqOptions_release(dpiEnqOptions *options) +{ + return dpiGen__release(options, DPI_HTYPE_ENQ_OPTIONS, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions_setDeliveryMode() [PUBLIC] +// Set the delivery mode associated with enqueue options. +//----------------------------------------------------------------------------- +int dpiEnqOptions_setDeliveryMode(dpiEnqOptions *options, + dpiMessageDeliveryMode value) +{ + return dpiEnqOptions__setAttrValue(options, DPI_OCI_ATTR_MSG_DELIVERY_MODE, + __func__, &value, 0); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions_setTransformation() [PUBLIC] +// Set transformation associated with enqueue options. +//----------------------------------------------------------------------------- +int dpiEnqOptions_setTransformation(dpiEnqOptions *options, const char *value, + uint32_t valueLength) +{ + return dpiEnqOptions__setAttrValue(options, DPI_OCI_ATTR_TRANSFORMATION, + __func__, value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiEnqOptions_setVisibility() [PUBLIC] +// Set visibility associated with enqueue options. +//----------------------------------------------------------------------------- +int dpiEnqOptions_setVisibility(dpiEnqOptions *options, dpiVisibility value) +{ + return dpiEnqOptions__setAttrValue(options, DPI_OCI_ATTR_VISIBILITY, + __func__, &value, 0); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiEnv.c b/vendor/github.com/godror/godror/odpi/src/dpiEnv.c new file mode 100644 index 00000000000..c1a2c3f7d61 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiEnv.c @@ -0,0 +1,180 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiEnv.c +// Implementation of environment. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiEnv__free() [INTERNAL] +// Free the memory associated with the environment. +//----------------------------------------------------------------------------- +void dpiEnv__free(dpiEnv *env, dpiError *error) +{ + if (env->threaded) + dpiMutex__destroy(env->mutex); + if (env->handle && !env->externalHandle) { + dpiOci__handleFree(env->handle, DPI_OCI_HTYPE_ENV); + env->handle = NULL; + } + if (env->errorHandles) { + dpiHandlePool__free(env->errorHandles); + env->errorHandles = NULL; + error->handle = NULL; + } + dpiUtils__freeMemory(env); +} + + +//----------------------------------------------------------------------------- +// dpiEnv__getCharacterSetIdAndName() [INTERNAL] +// Retrieve and store the IANA character set name for the attribute. +//----------------------------------------------------------------------------- +static int dpiEnv__getCharacterSetIdAndName(dpiEnv *env, uint16_t attribute, + uint16_t *charsetId, char *encoding, dpiError *error) +{ + *charsetId = 0; + dpiOci__attrGet(env->handle, DPI_OCI_HTYPE_ENV, charsetId, NULL, attribute, + "get environment", error); + return dpiGlobal__lookupEncoding(*charsetId, encoding, error); +} + + +//----------------------------------------------------------------------------- +// dpiEnv__getEncodingInfo() [INTERNAL] +// Populate the structure with the encoding info. +//----------------------------------------------------------------------------- +int dpiEnv__getEncodingInfo(dpiEnv *env, dpiEncodingInfo *info) +{ + info->encoding = env->encoding; + info->maxBytesPerCharacter = env->maxBytesPerCharacter; + info->nencoding = env->nencoding; + info->nmaxBytesPerCharacter = env->nmaxBytesPerCharacter; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiEnv__init() [INTERNAL] +// Initialize the environment structure. If an external handle is provided it +// is used directly; otherwise, a new OCI environment handle is created. In +// either case, information about the environment is stored for later use. +//----------------------------------------------------------------------------- +int dpiEnv__init(dpiEnv *env, const dpiContext *context, + const dpiCommonCreateParams *params, void *externalHandle, + dpiError *error) +{ + char timezoneBuffer[20]; + size_t timezoneLength; + + // store context and version information + env->context = context; + env->versionInfo = context->versionInfo; + + // an external handle is available, use it directly + if (externalHandle) { + env->handle = externalHandle; + env->externalHandle = 1; + + // otherwise, lookup encodings + } else { + + // lookup encoding + if (params->encoding && dpiGlobal__lookupCharSet(params->encoding, + &env->charsetId, error) < 0) + return DPI_FAILURE; + + // check for identical encoding before performing lookup of national + // character set encoding + if (params->nencoding && params->encoding && + strcmp(params->nencoding, params->encoding) == 0) + env->ncharsetId = env->charsetId; + else if (params->nencoding && + dpiGlobal__lookupCharSet(params->nencoding, + &env->ncharsetId, error) < 0) + return DPI_FAILURE; + + // both charsetId and ncharsetId must be zero or both must be non-zero + // use NLS routine to look up missing value, if needed + if (env->charsetId && !env->ncharsetId) { + if (dpiOci__nlsEnvironmentVariableGet(DPI_OCI_NLS_NCHARSET_ID, + &env->ncharsetId, error) < 0) + return DPI_FAILURE; + } else if (!env->charsetId && env->ncharsetId) { + if (dpiOci__nlsEnvironmentVariableGet(DPI_OCI_NLS_CHARSET_ID, + &env->charsetId, error) < 0) + return DPI_FAILURE; + } + + // create new environment handle + if (dpiOci__envNlsCreate(&env->handle, + params->createMode | DPI_OCI_OBJECT, + env->charsetId, env->ncharsetId, error) < 0) + return DPI_FAILURE; + + } + + // create the error handle pool + if (dpiHandlePool__create(&env->errorHandles, error) < 0) + return DPI_FAILURE; + error->env = env; + + // if threaded, create mutex for reference counts + if (params->createMode & DPI_OCI_THREADED) + dpiMutex__initialize(env->mutex); + + // determine encodings in use + if (dpiEnv__getCharacterSetIdAndName(env, DPI_OCI_ATTR_CHARSET_ID, + &env->charsetId, env->encoding, error) < 0) + return DPI_FAILURE; + if (dpiEnv__getCharacterSetIdAndName(env, DPI_OCI_ATTR_NCHARSET_ID, + &env->ncharsetId, env->nencoding, error) < 0) + return DPI_FAILURE; + + // acquire max bytes per character + if (dpiOci__nlsNumericInfoGet(env->handle, &env->maxBytesPerCharacter, + DPI_OCI_NLS_CHARSET_MAXBYTESZ, error) < 0) + return DPI_FAILURE; + + // for NCHAR we have no idea of how many so we simply take the worst case + // unless the charsets are identical + if (env->ncharsetId == env->charsetId) + env->nmaxBytesPerCharacter = env->maxBytesPerCharacter; + else env->nmaxBytesPerCharacter = 4; + + // allocate base date descriptor (for converting to/from time_t) + if (dpiOci__descriptorAlloc(env->handle, &env->baseDate, + DPI_OCI_DTYPE_TIMESTAMP_LTZ, "alloc base date descriptor", + error) < 0) + return DPI_FAILURE; + + // populate base date with January 1, 1970 + if (dpiOci__nlsCharSetConvert(env->handle, env->charsetId, timezoneBuffer, + sizeof(timezoneBuffer), DPI_CHARSET_ID_ASCII, "+00:00", 6, + &timezoneLength, error) < 0) + return DPI_FAILURE; + if (dpiOci__dateTimeConstruct(env->handle, env->baseDate, 1970, 1, 1, 0, 0, + 0, 0, timezoneBuffer, timezoneLength, error) < 0) + return DPI_FAILURE; + + // set whether or not we are threaded + if (params->createMode & DPI_MODE_CREATE_THREADED) + env->threaded = 1; + + // set whether or not events mode has been set + if (params->createMode & DPI_MODE_CREATE_EVENTS) + env->events = 1; + + return DPI_SUCCESS; +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiError.c b/vendor/github.com/godror/godror/odpi/src/dpiError.c new file mode 100644 index 00000000000..aac57b92f18 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiError.c @@ -0,0 +1,222 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiError.c +// Implementation of error. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" +#include "dpiErrorMessages.h" + +//----------------------------------------------------------------------------- +// dpiError__getInfo() [INTERNAL] +// Get the error state from the error structure. Returns DPI_FAILURE as a +// convenience to the caller. +//----------------------------------------------------------------------------- +int dpiError__getInfo(dpiError *error, dpiErrorInfo *info) +{ + if (!info) + return DPI_FAILURE; + info->code = error->buffer->code; + info->offset = error->buffer->offset; + info->message = error->buffer->message; + info->messageLength = error->buffer->messageLength; + info->fnName = error->buffer->fnName; + info->action = error->buffer->action; + info->isRecoverable = error->buffer->isRecoverable; + info->encoding = error->buffer->encoding; + switch(info->code) { + case 12154: // TNS:could not resolve the connect identifier specified + info->sqlState = "42S02"; + break; + case 22: // invalid session ID; access denied + case 378: // buffer pools cannot be created as specified + case 602: // Internal programming exception + case 603: // ORACLE server session terminated by fatal error + case 604: // error occurred at recursive SQL level + case 609: // could not attach to incoming connection + case 1012: // not logged on + case 1033: // ORACLE initialization or shutdown in progress + case 1041: // internal error. hostdef extension doesn't exist + case 1043: // user side memory corruption + case 1089: // immediate shutdown or close in progress + case 1090: // shutdown in progress + case 1092: // ORACLE instance terminated. Disconnection forced + case 3113: // end-of-file on communication channel + case 3114: // not connected to ORACLE + case 3122: // attempt to close ORACLE-side window on user side + case 3135: // connection lost contact + case 12153: // TNS:not connected + case 27146: // post/wait initialization failed + case 28511: // lost RPC connection to heterogeneous remote agent + info->sqlState = "01002"; + break; + default: + if (error->buffer->code == 0 && + error->buffer->errorNum == (dpiErrorNum) 0) + info->sqlState = "00000"; + else info->sqlState = "HY000"; + break; + } + return DPI_FAILURE; +} + + +//----------------------------------------------------------------------------- +// dpiError__initHandle() [INTERNAL] +// Retrieve the OCI error handle to use for error handling, from a pool of +// error handles common to the environment handle stored on the error. This +// environment also controls the encoding of OCI errors (which uses the CHAR +// encoding of the environment). +//----------------------------------------------------------------------------- +int dpiError__initHandle(dpiError *error) +{ + if (dpiHandlePool__acquire(error->env->errorHandles, &error->handle, + error) < 0) + return DPI_FAILURE; + if (!error->handle) { + if (dpiOci__handleAlloc(error->env->handle, &error->handle, + DPI_OCI_HTYPE_ERROR, "allocate OCI error", error) < 0) + return DPI_FAILURE; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiError__set() [INTERNAL] +// Set the error buffer to the specified DPI error. Returns DPI_FAILURE as a +// convenience to the caller. +//----------------------------------------------------------------------------- +int dpiError__set(dpiError *error, const char *action, dpiErrorNum errorNum, + ...) +{ + va_list varArgs; + + if (error) { + error->buffer->code = 0; + error->buffer->isRecoverable = 0; + error->buffer->offset = 0; + strcpy(error->buffer->encoding, DPI_CHARSET_NAME_UTF8); + error->buffer->action = action; + error->buffer->errorNum = errorNum; + va_start(varArgs, errorNum); + error->buffer->messageLength = + (uint32_t) vsnprintf(error->buffer->message, + sizeof(error->buffer->message), + dpiErrorMessages[errorNum - DPI_ERR_NO_ERR], varArgs); + va_end(varArgs); + if (dpiDebugLevel & DPI_DEBUG_LEVEL_ERRORS) + dpiDebug__print("internal error %.*s (%s / %s)\n", + error->buffer->messageLength, error->buffer->message, + error->buffer->fnName, action); + } + return DPI_FAILURE; +} + + +//----------------------------------------------------------------------------- +// dpiError__setFromOCI() [INTERNAL] +// Called when an OCI error has occurred and sets the error structure with +// the contents of that error. Note that trailing newlines and spaces are +// truncated from the message if they exist. If the connection is not NULL a +// check is made to see if the connection is no longer viable. The value +// DPI_FAILURE is returned as a convenience to the caller. +//----------------------------------------------------------------------------- +int dpiError__setFromOCI(dpiError *error, int status, dpiConn *conn, + const char *action) +{ + uint32_t callTimeout; + + // special error cases + if (status == DPI_OCI_INVALID_HANDLE) + return dpiError__set(error, action, DPI_ERR_INVALID_HANDLE, "OCI"); + else if (!error) + return DPI_FAILURE; + else if (!error->handle) + return dpiError__set(error, action, DPI_ERR_ERR_NOT_INITIALIZED); + else if (status != DPI_OCI_ERROR && status != DPI_OCI_NO_DATA) + return dpiError__set(error, action, + DPI_ERR_UNEXPECTED_OCI_RETURN_VALUE, status, + error->buffer->fnName); + + // fetch OCI error + error->buffer->action = action; + strcpy(error->buffer->encoding, error->env->encoding); + if (dpiOci__errorGet(error->handle, DPI_OCI_HTYPE_ERROR, + error->env->charsetId, action, error) < 0) + return DPI_FAILURE; + if (dpiDebugLevel & DPI_DEBUG_LEVEL_ERRORS) + dpiDebug__print("OCI error %.*s (%s / %s)\n", + error->buffer->messageLength, error->buffer->message, + error->buffer->fnName, action); + + // determine if error is recoverable (Transaction Guard) + // if the attribute cannot be read properly, simply leave it as false; + // otherwise, that error will mask the one that we really want to see + error->buffer->isRecoverable = 0; + dpiOci__attrGet(error->handle, DPI_OCI_HTYPE_ERROR, + (void*) &error->buffer->isRecoverable, 0, + DPI_OCI_ATTR_ERROR_IS_RECOVERABLE, NULL, error); + + // check for certain errors which indicate that the session is dead and + // should be dropped from the session pool (if a session pool was used) + // also check for call timeout and raise unified message instead + if (conn && !conn->deadSession) { + switch (error->buffer->code) { + case 22: // invalid session ID; access denied + case 28: // your session has been killed + case 31: // your session has been marked for kill + case 45: // your session has been terminated with no replay + case 378: // buffer pools cannot be created as specified + case 602: // internal programming exception + case 603: // ORACLE server session terminated by fatal error + case 609: // could not attach to incoming connection + case 1012: // not logged on + case 1041: // internal error. hostdef extension doesn't exist + case 1043: // user side memory corruption + case 1089: // immediate shutdown or close in progress + case 1092: // ORACLE instance terminated. Disconnection forced + case 2396: // exceeded maximum idle time, please connect again + case 3113: // end-of-file on communication channel + case 3114: // not connected to ORACLE + case 3122: // attempt to close ORACLE-side window on user side + case 3135: // connection lost contact + case 12153: // TNS:not connected + case 12537: // TNS:connection closed + case 12547: // TNS:lost contact + case 12570: // TNS:packet reader failure + case 12583: // TNS:no reader + case 27146: // post/wait initialization failed + case 28511: // lost RPC connection + case 56600: // an illegal OCI function call was issued + conn->deadSession = 1; + break; + case 3136: // inbound connection timed out + case 3156: // OCI call timed out + case 12161: // TNS:internal error: partial data received + callTimeout = 0; + if (conn->env->versionInfo->versionNum >= 18) + dpiOci__attrGet(conn->handle, DPI_OCI_HTYPE_SVCCTX, + (void*) &callTimeout, 0, DPI_OCI_ATTR_CALL_TIMEOUT, + NULL, error); + if (callTimeout > 0) { + dpiError__set(error, action, DPI_ERR_CALL_TIMEOUT, + callTimeout, error->buffer->code); + error->buffer->code = 0; + } + break; + } + } + + return DPI_FAILURE; +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h b/vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h new file mode 100644 index 00000000000..1de52a2b17b --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiErrorMessages.h @@ -0,0 +1,90 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiErrorMessages.h +// Definition of error messages used in ODPI-C. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +static const char* const dpiErrorMessages[DPI_ERR_MAX - DPI_ERR_NO_ERR] = { + "DPI-1000: no error", // DPI_ERR_NO_ERR + "DPI-1001: out of memory", // DPI_ERR_NO_MEMORY + "DPI-1002: invalid %s handle", // DPI_ERR_INVALID_HANDLE + "DPI-1003: OCI error handle is not initialized", // DPI_ERR_ERR_NOT_INITIALIZED + "DPI-1004: unable to get error message", // DPI_ERR_GET_FAILED + "DPI-1005: unable to acquire Oracle environment handle", // DPI_ERR_CREATE_ENV + "DPI-1006: unable to convert text to session character set", // DPI_ERR_CONVERT_TEXT + "DPI-1007: no query has been executed", // DPI_ERR_QUERY_NOT_EXECUTED + "DPI-1008: data type %d is not supported", // DPI_ERR_UNHANDLED_DATA_TYPE + "DPI-1009: zero-based position %u is not valid with max array size of %u", // DPI_ERR_INVALID_ARRAY_POSITION + "DPI-1010: not connected", // DPI_ERR_NOT_CONNECTED + "DPI-1011: connection was not acquired from a session pool", // DPI_ERR_CONN_NOT_IN_POOL + "DPI-1012: proxy authentication is not possible with homogeneous pools", // DPI_ERR_INVALID_PROXY + "DPI-1013: not supported", // DPI_ERR_NOT_SUPPORTED + "DPI-1014: conversion between Oracle type %d and native type %d is not implemented", // DPI_ERR_UNHANDLED_CONVERSION + "DPI-1015: array size of %u is too large", // DPI_ERR_ARRAY_SIZE_TOO_BIG + "DPI-1016: invalid date", // DPI_ERR_INVALID_DATE + "DPI-1017: value is null", // DPI_ERR_VALUE_IS_NULL + "DPI-1018: array size of %u is too small", // DPI_ERR_ARRAY_SIZE_TOO_SMALL + "DPI-1019: buffer size of %u is too small", // DPI_ERR_BUFFER_SIZE_TOO_SMALL + "DPI-1020: application requires ODPI-C %d (min %d.%d) but is using a shared library at version %d.%d", // DPI_ERR_VERSION_NOT_SUPPORTED + "DPI-1021: Oracle type %u is invalid", // DPI_ERR_INVALID_ORACLE_TYPE + "DPI-1022: attribute %.*s is not part of object type %.*s.%.*s", // DPI_ERR_WRONG_ATTR + "DPI-1023: object %.*s.%.*s is not a collection", // DPI_ERR_NOT_COLLECTION + "DPI-1024: element at index %d does not exist", // DPI_ERR_INVALID_INDEX + "DPI-1025: no object type specified for object variable", // DPI_ERR_NO_OBJECT_TYPE + "DPI-1026: invalid character set %s", // DPI_ERR_INVALID_CHARSET + "DPI-1027: scroll operation would go out of the result set", // DPI_ERR_SCROLL_OUT_OF_RS + "DPI-1028: query position %u is invalid", // DPI_ERR_QUERY_POSITION_INVALID + "DPI-1029: no row currently fetched", // DPI_ERR_NO_ROW_FETCHED + "DPI-1030: unable to get or set error structure for thread local storage", // DPI_ERR_TLS_ERROR + "DPI-1031: array size cannot be zero", // DPI_ERR_ARRAY_SIZE_ZERO + "DPI-1032: user name and password cannot be set when using external authentication", // DPI_ERR_EXT_AUTH_WITH_CREDENTIALS + "DPI-1033: unable to get row offset", // DPI_ERR_CANNOT_GET_ROW_OFFSET + "DPI-1034: connection created from external handle cannot be closed", // DPI_ERR_CONN_IS_EXTERNAL + "DPI-1035: size of the transaction ID is %u and cannot exceed %u", // DPI_ERR_TRANS_ID_TOO_LARGE + "DPI-1036: size of the branch ID is %u and cannot exceed %u", // DPI_ERR_BRANCH_ID_TOO_LARGE + "DPI-1037: column at array position %u fetched with error %u", // DPI_ERR_COLUMN_FETCH + "DPI-1039: statement was already closed", // DPI_ERR_STMT_CLOSED + "DPI-1040: LOB was already closed", // DPI_ERR_LOB_CLOSED + "DPI-1041: invalid character set id %d", // DPI_ERR_INVALID_CHARSET_ID + "DPI-1042: invalid OCI number", // DPI_ERR_INVALID_OCI_NUMBER + "DPI-1043: invalid number", // DPI_ERR_INVALID_NUMBER + "DPI-1044: value cannot be represented as an Oracle number", // DPI_ERR_NUMBER_NO_REPR + "DPI-1045: strings converted to numbers can only be up to 172 characters long", // DPI_ERR_NUMBER_STRING_TOO_LONG + "DPI-1046: parameter %s cannot be a NULL pointer", // DPI_ERR_NULL_POINTER_PARAMETER + "DPI-1047: Cannot locate a %s-bit Oracle Client library: \"%s\". See https://oracle.github.io/odpi/doc/installation.html#%s for help", // DPI_ERR_LOAD_LIBRARY + "DPI-1049: symbol %s not found in OCI library", // DPI_ERR_LOAD_SYMBOL + "DPI-1050: Oracle Client library is at version %d.%d but version %d.%d or higher is needed", // DPI_ERR_ORACLE_CLIENT_TOO_OLD + "DPI-1052: unable to get NLS environment variable", // DPI_ERR_NLS_ENV_VAR_GET, + "DPI-1053: parameter %s cannot be a NULL pointer while corresponding length parameter is non-zero", // DPI_ERR_PTR_LENGTH_MISMATCH + "DPI-1055: value is not a number (NaN) and cannot be used in Oracle numbers", // DPI_ERR_NAN + "DPI-1056: found object of type %.*s.%.*s when expecting object of type %.*s.%.*s", // DPI_ERR_WRONG_TYPE + "DPI-1057: buffer size of %u is too large (max %u)", // DPI_ERR_BUFFER_SIZE_TOO_LARGE + "DPI-1058: edition not supported with connection class", // DPI_ERR_NO_EDITION_WITH_CONN_CLASS + "DPI-1059: bind variables are not supported in DDL statements", // DPI_ERR_NO_BIND_VARS_IN_DDL + "DPI-1060: subscription was already closed", // DPI_ERR_SUBSCR_CLOSED + "DPI-1061: edition is not supported when a new password is specified", // DPI_ERR_NO_EDITION_WITH_NEW_PASSWORD + "DPI-1062: unexpected OCI return value %d in function %s", // DPI_ERR_UNEXPECTED_OCI_RETURN_VALUE + "DPI-1063: modes DPI_MODE_EXEC_BATCH_ERRORS and DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS can only be used with insert, update, delete and merge statements", // DPI_ERR_EXEC_MODE_ONLY_FOR_DML + "DPI-1064: array variables are not supported with dpiStmt_executeMany()", // DPI_ERR_ARRAY_VAR_NOT_SUPPORTED + "DPI-1065: events mode is required to subscribe to events in the database", // DPI_ERR_EVENTS_MODE_REQUIRED + "DPI-1066: Oracle Database is at version %d.%d but version %d.%d or higher is needed", // DPI_ERR_ORACLE_DB_TOO_OLD + "DPI-1067: call timeout of %u ms exceeded with ORA-%d", // DPI_ERR_CALL_TIMEOUT + "DPI-1068: SODA cursor was already closed", // DPI_ERR_SODA_CURSOR_CLOSED + "DPI-1069: proxy user name must be enclosed in [] when using external authentication", // DPI_ERR_EXT_AUTH_INVALID_PROXY + "DPI-1070: no payload provided in message properties", // DPI_ERR_QUEUE_NO_PAYLOAD + "DPI-1071: payload type in message properties must match the payload type of the queue", // DPI_ERR_QUEUE_WRONG_PAYLOAD_TYPE + "DPI-1072: the Oracle Client library version is unsupported", // DPI_ERR_ORACLE_CLIENT_UNSUPPORTED + "DPI-1073: sharding key is required when specifying a super sharding key", // DPI_ERR_MISSING_SHARDING_KEY +}; diff --git a/vendor/github.com/godror/godror/odpi/src/dpiGen.c b/vendor/github.com/godror/godror/odpi/src/dpiGen.c new file mode 100644 index 00000000000..f671adf2a21 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiGen.c @@ -0,0 +1,307 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiGen.c +// Generic routines for managing the types available through public APIs. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// definition of handle types +//----------------------------------------------------------------------------- +static const dpiTypeDef dpiAllTypeDefs[DPI_HTYPE_MAX - DPI_HTYPE_NONE - 1] = { + { + "dpiConn", // name + sizeof(dpiConn), // size of structure + 0x49DC600C, // check integer + (dpiTypeFreeProc) dpiConn__free + }, + { + "dpiPool", // name + sizeof(dpiPool), // size of structure + 0x18E1AA4B, // check integer + (dpiTypeFreeProc) dpiPool__free + }, + { + "dpiStmt", // name + sizeof(dpiStmt), // size of structure + 0x31B02B2E, // check integer + (dpiTypeFreeProc) dpiStmt__free + }, + { + "dpiVar", // name + sizeof(dpiVar), // size of structure + 0x2AE8C6DC, // check integer + (dpiTypeFreeProc) dpiVar__free + }, + { + "dpiLob", // name + sizeof(dpiLob), // size of structure + 0xD8F31746, // check integer + (dpiTypeFreeProc) dpiLob__free + }, + { + "dpiObject", // name + sizeof(dpiObject), // size of structure + 0x38616080, // check integer + (dpiTypeFreeProc) dpiObject__free + }, + { + "dpiObjectType", // name + sizeof(dpiObjectType), // size of structure + 0x86036059, // check integer + (dpiTypeFreeProc) dpiObjectType__free + }, + { + "dpiObjectAttr", // name + sizeof(dpiObjectAttr), // size of structure + 0xea6d5dde, // check integer + (dpiTypeFreeProc) dpiObjectAttr__free + }, + { + "dpiSubscr", // name + sizeof(dpiSubscr), // size of structure + 0xa415a1c0, // check integer + (dpiTypeFreeProc) dpiSubscr__free + }, + { + "dpiDeqOptions", // name + sizeof(dpiDeqOptions), // size of structure + 0x70ee498d, // check integer + (dpiTypeFreeProc) dpiDeqOptions__free + }, + { + "dpiEnqOptions", // name + sizeof(dpiEnqOptions), // size of structure + 0x682f3946, // check integer + (dpiTypeFreeProc) dpiEnqOptions__free + }, + { + "dpiMsgProps", // name + sizeof(dpiMsgProps), // size of structure + 0xa2b75506, // check integer + (dpiTypeFreeProc) dpiMsgProps__free + }, + { + "dpiRowid", // name + sizeof(dpiRowid), // size of structure + 0x6204fa04, // check integer + (dpiTypeFreeProc) dpiRowid__free + }, + { + "dpiContext", // name + sizeof(dpiContext), // size of structure + 0xd81b9181, // check integer + NULL + }, + { + "dpiSodaColl", // name + sizeof(dpiSodaColl), // size of structure + 0x3684db22, // check integer + (dpiTypeFreeProc) dpiSodaColl__free + }, + { + "dpiSodaCollCursor", // name + sizeof(dpiSodaCollCursor), // size of structure + 0xcdc73b86, // check integer + (dpiTypeFreeProc) dpiSodaCollCursor__free + }, + { + "dpiSodaDb", // name + sizeof(dpiSodaDb), // size of structure + 0x1f386121, // check integer + (dpiTypeFreeProc) dpiSodaDb__free + }, + { + "dpiSodaDoc", // name + sizeof(dpiSodaDoc), // size of structure + 0xaffd950a, // check integer + (dpiTypeFreeProc) dpiSodaDoc__free + }, + { + "dpiSodaDocCursor", // name + sizeof(dpiSodaDocCursor), // size of structure + 0x80ceb83b, // check integer + (dpiTypeFreeProc) dpiSodaDocCursor__free + }, + { + "dpiQueue", // name + sizeof(dpiQueue), // size of structure + 0x54904ba2, // check integer + (dpiTypeFreeProc) dpiQueue__free + } +}; + + +//----------------------------------------------------------------------------- +// dpiGen__addRef() [INTERNAL] +// Add a reference to the specified handle. +//----------------------------------------------------------------------------- +int dpiGen__addRef(void *ptr, dpiHandleTypeNum typeNum, const char *fnName) +{ + dpiError error; + + if (dpiGen__startPublicFn(ptr, typeNum, fnName, &error) < 0) + return dpiGen__endPublicFn(ptr, DPI_FAILURE, &error); + dpiGen__setRefCount(ptr, &error, 1); + return dpiGen__endPublicFn(ptr, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiGen__allocate() [INTERNAL] +// Allocate memory for the specified type and initialize the base fields. The +// type specified is assumed to be valid. If the environment is specified, use +// it; otherwise, create a new one. No additional initialization is performed. +//----------------------------------------------------------------------------- +int dpiGen__allocate(dpiHandleTypeNum typeNum, dpiEnv *env, void **handle, + dpiError *error) +{ + const dpiTypeDef *typeDef; + dpiBaseType *value; + + typeDef = &dpiAllTypeDefs[typeNum - DPI_HTYPE_NONE - 1]; + if (dpiUtils__allocateMemory(1, typeDef->size, 1, "allocate handle", + (void**) &value, error) < 0) + return DPI_FAILURE; + value->typeDef = typeDef; + value->checkInt = typeDef->checkInt; + value->refCount = 1; + if (!env && typeNum != DPI_HTYPE_CONTEXT) { + if (dpiUtils__allocateMemory(1, sizeof(dpiEnv), 1, "allocate env", + (void**) &env, error) < 0) { + dpiUtils__freeMemory(value); + return DPI_FAILURE; + } + } + value->env = env; + if (dpiDebugLevel & DPI_DEBUG_LEVEL_REFS) + dpiDebug__print("ref %p (%s) -> 1 [NEW]\n", value, typeDef->name); + + *handle = value; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiGen__checkHandle() [INTERNAL] +// Check that the specific handle is valid, that it matches the type +// requested and that the check integer is still in place. +//----------------------------------------------------------------------------- +int dpiGen__checkHandle(const void *ptr, dpiHandleTypeNum typeNum, + const char *action, dpiError *error) +{ + dpiBaseType *value = (dpiBaseType*) ptr; + const dpiTypeDef *typeDef; + + typeDef = &dpiAllTypeDefs[typeNum - DPI_HTYPE_NONE - 1]; + if (!ptr || value->typeDef != typeDef || + value->checkInt != typeDef->checkInt) + return dpiError__set(error, action, DPI_ERR_INVALID_HANDLE, + typeDef->name); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiGen__endPublicFn() [INTERNAL] +// This method should be the last call made in any public method using an +// ODPI-C handle (other than dpiContext which is handled differently). +//----------------------------------------------------------------------------- +int dpiGen__endPublicFn(const void *ptr, int returnValue, dpiError *error) +{ + if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) + dpiDebug__print("fn end %s(%p) -> %d\n", error->buffer->fnName, ptr, + returnValue); + if (error->handle) + dpiHandlePool__release(error->env->errorHandles, &error->handle); + + return returnValue; +} + + +//----------------------------------------------------------------------------- +// dpiGen__release() [INTERNAL] +// Release a reference to the specified handle. If the reference count +// reaches zero, the resources associated with the handle are released and +// the memory associated with the handle is freed. Any internal references +// held to other handles are also released. +//----------------------------------------------------------------------------- +int dpiGen__release(void *ptr, dpiHandleTypeNum typeNum, const char *fnName) +{ + dpiError error; + + if (dpiGen__startPublicFn(ptr, typeNum, fnName, &error) < 0) + return dpiGen__endPublicFn(ptr, DPI_FAILURE, &error); + dpiGen__setRefCount(ptr, &error, -1); + return dpiGen__endPublicFn(ptr, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiGen__setRefCount() [INTERNAL] +// Increase or decrease the reference count by the given amount. The handle +// is assumed to be valid at this point. If the environment is in threaded +// mode, acquire the mutex first before making any adjustments to the reference +// count. If the operation sets the reference count to zero, release all +// resources and free the memory associated with the structure. +//----------------------------------------------------------------------------- +void dpiGen__setRefCount(void *ptr, dpiError *error, int increment) +{ + dpiBaseType *value = (dpiBaseType*) ptr; + unsigned localRefCount; + + // if threaded need to protect modification of the refCount with a mutex; + // also ensure that if the reference count reaches zero that it is + // immediately marked invalid in order to avoid race conditions + if (value->env->threaded) + dpiMutex__acquire(value->env->mutex); + value->refCount += increment; + localRefCount = value->refCount; + if (localRefCount == 0) + dpiUtils__clearMemory(&value->checkInt, sizeof(value->checkInt)); + if (value->env->threaded) + dpiMutex__release(value->env->mutex); + + // reference count debugging + if (dpiDebugLevel & DPI_DEBUG_LEVEL_REFS) + dpiDebug__print("ref %p (%s) -> %d\n", ptr, value->typeDef->name, + localRefCount); + + // if the refCount has reached zero, call the free routine + if (localRefCount == 0) + (*value->typeDef->freeProc)(value, error); +} + + +//----------------------------------------------------------------------------- +// dpiGen__startPublicFn() [INTERNAL] +// This method should be the first call made in any public method using an +// ODPI-C handle (other than dpiContext which is handled differently). The +// handle is checked for validity and an error handle is acquired for use in +// all subsequent calls. +//----------------------------------------------------------------------------- +int dpiGen__startPublicFn(const void *ptr, dpiHandleTypeNum typeNum, + const char *fnName, dpiError *error) +{ + dpiBaseType *value = (dpiBaseType*) ptr; + + if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS) + dpiDebug__print("fn start %s(%p)\n", fnName, ptr); + if (dpiGlobal__initError(fnName, error) < 0) + return DPI_FAILURE; + if (dpiGen__checkHandle(ptr, typeNum, "check main handle", error) < 0) + return DPI_FAILURE; + error->env = value->env; + return DPI_SUCCESS; +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiGlobal.c b/vendor/github.com/godror/godror/odpi/src/dpiGlobal.c new file mode 100644 index 00000000000..6599d870421 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiGlobal.c @@ -0,0 +1,291 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiGlobal.c +// Global environment used for managing errors in a thread safe manner as +// well as for looking up encodings. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// cross platform way of defining an initializer that runs at application +// startup (similar to what is done for the constructor calls for static C++ +// objects) +#if defined(_MSC_VER) + #pragma section(".CRT$XCU", read) + #define DPI_INITIALIZER_HELPER(f, p) \ + static void f(void); \ + __declspec(allocate(".CRT$XCU")) void (*f##_)(void) = f; \ + __pragma(comment(linker,"/include:" p #f "_")) \ + static void f(void) + #ifdef _WIN64 + #define DPI_INITIALIZER(f) DPI_INITIALIZER_HELPER(f, "") + #else + #define DPI_INITIALIZER(f) DPI_INITIALIZER_HELPER(f, "_") + #endif +#else + #define DPI_INITIALIZER(f) \ + static void f(void) __attribute__((constructor)); \ + static void f(void) +#endif + +// a global OCI environment is used for managing error buffers in a thread-safe +// manner; each thread is given its own error buffer; OCI error handles, +// though, must be created within the OCI environment created for use by +// standalone connections and session pools +static void *dpiGlobalEnvHandle = NULL; +static void *dpiGlobalErrorHandle = NULL; +static void *dpiGlobalThreadKey = NULL; +static dpiErrorBuffer dpiGlobalErrorBuffer; +static int dpiGlobalInitialized = 0; + +// a global mutex is used to ensure that only one thread is used to perform +// initialization of ODPI-C +static dpiMutexType dpiGlobalMutex; + +//----------------------------------------------------------------------------- +// dpiGlobal__extendedInitialize() [INTERNAL] +// Create the global environment used for managing error buffers in a +// thread-safe manner. This environment is solely used for implementing thread +// local storage for the error buffers and for looking up encodings given an +// IANA or Oracle character set name. +//----------------------------------------------------------------------------- +static int dpiGlobal__extendedInitialize(dpiError *error) +{ + int status; + + // create threaded OCI environment for storing error buffers and for + // looking up character sets; use character set AL32UTF8 solely to avoid + // the overhead of processing the environment variables; no error messages + // from this environment are ever used (ODPI-C specific error messages are + // used) + if (dpiOci__envNlsCreate(&dpiGlobalEnvHandle, DPI_OCI_THREADED, + DPI_CHARSET_ID_UTF8, DPI_CHARSET_ID_UTF8, error) < 0) + return DPI_FAILURE; + + // create global error handle + if (dpiOci__handleAlloc(dpiGlobalEnvHandle, &dpiGlobalErrorHandle, + DPI_OCI_HTYPE_ERROR, "create global error", error) < 0) { + dpiOci__handleFree(dpiGlobalEnvHandle, DPI_OCI_HTYPE_ENV); + return DPI_FAILURE; + } + + // create global thread key + status = dpiOci__threadKeyInit(dpiGlobalEnvHandle, dpiGlobalErrorHandle, + &dpiGlobalThreadKey, (void*) dpiUtils__freeMemory, error); + if (status < 0) { + dpiOci__handleFree(dpiGlobalEnvHandle, DPI_OCI_HTYPE_ENV); + return DPI_FAILURE; + } + + // mark library as fully initialized + dpiGlobalInitialized = 1; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiGlobal__finalize() [INTERNAL] +// Called when the process terminates and ensures that everything is cleaned +// up. +//----------------------------------------------------------------------------- +static void dpiGlobal__finalize(void) +{ + void *errorBuffer = NULL; + dpiError error; + + dpiMutex__acquire(dpiGlobalMutex); + dpiGlobalInitialized = 0; + error.buffer = &dpiGlobalErrorBuffer; + if (dpiGlobalThreadKey) { + dpiOci__threadKeyGet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, + dpiGlobalThreadKey, &errorBuffer, &error); + if (errorBuffer) { + dpiOci__threadKeySet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, + dpiGlobalThreadKey, NULL, &error); + dpiUtils__freeMemory(errorBuffer); + } + dpiOci__threadKeyDestroy(dpiGlobalEnvHandle, dpiGlobalErrorHandle, + &dpiGlobalThreadKey, &error); + dpiGlobalThreadKey = NULL; + } + if (dpiGlobalEnvHandle) { + dpiOci__handleFree(dpiGlobalEnvHandle, DPI_OCI_HTYPE_ENV); + dpiGlobalEnvHandle = NULL; + } + dpiMutex__release(dpiGlobalMutex); +} + + +//----------------------------------------------------------------------------- +// dpiGlobal__initError() [INTERNAL] +// Get the thread local error structure for use in all other functions. If +// an error structure cannot be determined for some reason, the global error +// buffer structure is returned instead. +//----------------------------------------------------------------------------- +int dpiGlobal__initError(const char *fnName, dpiError *error) +{ + dpiErrorBuffer *tempErrorBuffer; + + // initialize error buffer output to global error buffer structure; this is + // the value that is used if an error takes place before the thread local + // error structure can be returned + error->handle = NULL; + error->buffer = &dpiGlobalErrorBuffer; + if (fnName) + error->buffer->fnName = fnName; + + // initialize global environment, if necessary + // this should only ever be done once by the first thread to execute this + if (!dpiGlobalInitialized) { + dpiMutex__acquire(dpiGlobalMutex); + if (!dpiGlobalInitialized) + dpiGlobal__extendedInitialize(error); + dpiMutex__release(dpiGlobalMutex); + if (!dpiGlobalInitialized) + return DPI_FAILURE; + } + + // look up the error buffer specific to this thread + if (dpiOci__threadKeyGet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, + dpiGlobalThreadKey, (void**) &tempErrorBuffer, error) < 0) + return DPI_FAILURE; + + // if NULL, key has never been set for this thread, allocate new error + // and set it + if (!tempErrorBuffer) { + if (dpiUtils__allocateMemory(1, sizeof(dpiErrorBuffer), 1, + "allocate error buffer", (void**) &tempErrorBuffer, error) < 0) + return DPI_FAILURE; + if (dpiOci__threadKeySet(dpiGlobalEnvHandle, dpiGlobalErrorHandle, + dpiGlobalThreadKey, tempErrorBuffer, error) < 0) { + dpiUtils__freeMemory(tempErrorBuffer); + return DPI_FAILURE; + } + } + + // if a function name has been specified, clear error + // the only time a function name is not specified is for + // dpiContext_getError() when the error information is being retrieved + if (fnName) { + tempErrorBuffer->code = 0; + tempErrorBuffer->offset = 0; + tempErrorBuffer->errorNum = (dpiErrorNum) 0; + tempErrorBuffer->isRecoverable = 0; + tempErrorBuffer->messageLength = 0; + tempErrorBuffer->fnName = fnName; + tempErrorBuffer->action = "start"; + strcpy(tempErrorBuffer->encoding, DPI_CHARSET_NAME_UTF8); + } + + error->buffer = tempErrorBuffer; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiGlobal__initialize() [INTERNAL] +// Initialization function that runs at process startup or when the library +// is first loaded. Some operating systems have limits on what can be run in +// this function, so most work is done in the dpiGlobal__extendedInitialize() +// function that runs when the first call to dpiContext_create() is made. +//----------------------------------------------------------------------------- +DPI_INITIALIZER(dpiGlobal__initialize) +{ + memset(&dpiGlobalErrorBuffer, 0, sizeof(dpiGlobalErrorBuffer)); + strcpy(dpiGlobalErrorBuffer.encoding, DPI_CHARSET_NAME_UTF8); + dpiMutex__initialize(dpiGlobalMutex); + dpiDebug__initialize(); + atexit(dpiGlobal__finalize); +} + + +//----------------------------------------------------------------------------- +// dpiGlobal__lookupCharSet() [INTERNAL] +// Lookup the character set id that can be used in the call to +// OCINlsEnvCreate(). +//----------------------------------------------------------------------------- +int dpiGlobal__lookupCharSet(const char *name, uint16_t *charsetId, + dpiError *error) +{ + char oraCharsetName[DPI_OCI_NLS_MAXBUFSZ]; + + // check for well-known encodings first + if (strcmp(name, DPI_CHARSET_NAME_UTF8) == 0) + *charsetId = DPI_CHARSET_ID_UTF8; + else if (strcmp(name, DPI_CHARSET_NAME_UTF16) == 0) + *charsetId = DPI_CHARSET_ID_UTF16; + else if (strcmp(name, DPI_CHARSET_NAME_ASCII) == 0) + *charsetId = DPI_CHARSET_ID_ASCII; + else if (strcmp(name, DPI_CHARSET_NAME_UTF16LE) == 0 || + strcmp(name, DPI_CHARSET_NAME_UTF16BE) == 0) + return dpiError__set(error, "check encoding", DPI_ERR_NOT_SUPPORTED); + + // perform lookup; check for the Oracle character set name first and if + // that fails, lookup using the IANA character set name + else { + if (dpiOci__nlsCharSetNameToId(dpiGlobalEnvHandle, name, charsetId, + error) < 0) + return DPI_FAILURE; + if (!*charsetId) { + if (dpiOci__nlsNameMap(dpiGlobalEnvHandle, oraCharsetName, + sizeof(oraCharsetName), name, DPI_OCI_NLS_CS_IANA_TO_ORA, + error) < 0) + return dpiError__set(error, "lookup charset", + DPI_ERR_INVALID_CHARSET, name); + dpiOci__nlsCharSetNameToId(dpiGlobalEnvHandle, oraCharsetName, + charsetId, error); + } + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiGlobal__lookupEncoding() [INTERNAL] +// Get the IANA character set name (encoding) given the Oracle character set +// id. +//----------------------------------------------------------------------------- +int dpiGlobal__lookupEncoding(uint16_t charsetId, char *encoding, + dpiError *error) +{ + char oracleName[DPI_OCI_NLS_MAXBUFSZ]; + + // check for well-known encodings first + switch (charsetId) { + case DPI_CHARSET_ID_UTF8: + strcpy(encoding, DPI_CHARSET_NAME_UTF8); + return DPI_SUCCESS; + case DPI_CHARSET_ID_UTF16: + strcpy(encoding, DPI_CHARSET_NAME_UTF16); + return DPI_SUCCESS; + case DPI_CHARSET_ID_ASCII: + strcpy(encoding, DPI_CHARSET_NAME_ASCII); + return DPI_SUCCESS; + } + + // get character set name + if (dpiOci__nlsCharSetIdToName(dpiGlobalEnvHandle, oracleName, + sizeof(oracleName), charsetId, error) < 0) + return dpiError__set(error, "lookup Oracle character set name", + DPI_ERR_INVALID_CHARSET_ID, charsetId); + + // get IANA character set name + if (dpiOci__nlsNameMap(dpiGlobalEnvHandle, encoding, DPI_OCI_NLS_MAXBUFSZ, + oracleName, DPI_OCI_NLS_CS_ORA_TO_IANA, error) < 0) + return dpiError__set(error, "lookup IANA name", + DPI_ERR_INVALID_CHARSET_ID, charsetId); + + return DPI_SUCCESS; +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiHandleList.c b/vendor/github.com/godror/godror/odpi/src/dpiHandleList.c new file mode 100644 index 00000000000..2f3864067bb --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiHandleList.c @@ -0,0 +1,116 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiHandleList.c +// Implementation of a list of handles which are managed in a thread-safe +// manner. The references to these handles are assumed to be held by other +// structures. No references are held by the list of handles defined here. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiHandleList__addHandle() [INTERNAL] +// Add a handle to the list. The list is expanded in sets of 8 handles as +// needed. A current position is maintained to reduce the number of scans of +// the list are required. An empty slot is designated by a NULL pointer. +//----------------------------------------------------------------------------- +int dpiHandleList__addHandle(dpiHandleList *list, void *handle, + uint32_t *slotNum, dpiError *error) +{ + uint32_t numSlots, i; + void **tempHandles; + + dpiMutex__acquire(list->mutex); + if (list->numUsedSlots == list->numSlots) { + numSlots = list->numSlots + 8; + if (dpiUtils__allocateMemory(numSlots, sizeof(void*), 1, + "allocate slots", (void**) &tempHandles, error) < 0) { + dpiMutex__release(list->mutex); + return DPI_FAILURE; + } + memcpy(tempHandles, list->handles, list->numSlots * sizeof(void*)); + dpiUtils__freeMemory(list->handles); + list->handles = tempHandles; + list->numSlots = numSlots; + *slotNum = list->numUsedSlots++; + list->currentPos = list->numUsedSlots; + } else { + for (i = 0; i < list->numSlots; i++) { + if (!list->handles[list->currentPos]) + break; + list->currentPos++; + if (list->currentPos == list->numSlots) + list->currentPos = 0; + } + list->numUsedSlots++; + *slotNum = list->currentPos++; + if (list->currentPos == list->numSlots) + list->currentPos = 0; + } + list->handles[*slotNum] = handle; + dpiMutex__release(list->mutex); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiHandleList__create() [INTERNAL] +// Create a new (empty) list of handles. +//----------------------------------------------------------------------------- +int dpiHandleList__create(dpiHandleList **list, dpiError *error) +{ + dpiHandleList *tempList; + + if (dpiUtils__allocateMemory(1, sizeof(dpiHandleList), 0, + "allocate handle list", (void**) &tempList, error) < 0) + return DPI_FAILURE; + tempList->numSlots = 8; + tempList->numUsedSlots = 0; + if (dpiUtils__allocateMemory(tempList->numSlots, sizeof(void*), 1, + "allocate handle list slots", (void**) &tempList->handles, + error) < 0) { + dpiUtils__freeMemory(tempList); + return DPI_FAILURE; + } + dpiMutex__initialize(tempList->mutex); + tempList->currentPos = 0; + *list = tempList; + return DPI_SUCCESS; +} + +//----------------------------------------------------------------------------- +// dpiHandleList__free() [INTERNAL] +// Free the memory associated with the handle list. +//----------------------------------------------------------------------------- +void dpiHandleList__free(dpiHandleList *list) +{ + if (list->handles) { + dpiUtils__freeMemory(list->handles); + list->handles = NULL; + } + dpiMutex__destroy(list->mutex); + dpiUtils__freeMemory(list); +} + + +//----------------------------------------------------------------------------- +// dpiHandleList__removeHandle() [INTERNAL] +// Remove the handle at the specified location from the list. +//----------------------------------------------------------------------------- +void dpiHandleList__removeHandle(dpiHandleList *list, uint32_t slotNum) +{ + dpiMutex__acquire(list->mutex); + list->handles[slotNum] = NULL; + list->numUsedSlots--; + dpiMutex__release(list->mutex); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c b/vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c new file mode 100644 index 00000000000..456f094f136 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiHandlePool.c @@ -0,0 +1,119 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiHandlePool.c +// Implementation of a pool of handles which can be acquired and released in +// a thread-safe manner. The pool is a circular queue where handles are +// acquired from the front and released to the back. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiHandlePool__acquire() [INTERNAL] +// Acquire a handle from the pool. If a handle is available, it will be +// cleared out of the pool and returned to the caller. It is the caller's +// responsibility to return the handle back to the pool when it is finished +// with it. If no handle is available, a NULL value is returned. The caller is +// expected to create a new handle and return it to the pool when it is +// finished with it. +//----------------------------------------------------------------------------- +int dpiHandlePool__acquire(dpiHandlePool *pool, void **handle, dpiError *error) +{ + void **tempHandles; + uint32_t numSlots; + + dpiMutex__acquire(pool->mutex); + if (pool->acquirePos != pool->releasePos) { + *handle = pool->handles[pool->acquirePos]; + pool->handles[pool->acquirePos++] = NULL; + if (pool->acquirePos == pool->numSlots) + pool->acquirePos = 0; + } else { + *handle = NULL; + pool->numUsedSlots++; + if (pool->numUsedSlots > pool->numSlots) { + numSlots = pool->numSlots + 8; + if (dpiUtils__allocateMemory(numSlots, sizeof(void*), 1, + "allocate slots", (void**) &tempHandles, error) < 0) { + dpiMutex__release(pool->mutex); + return DPI_FAILURE; + } + memcpy(tempHandles, pool->handles, pool->numSlots * sizeof(void*)); + dpiUtils__freeMemory(pool->handles); + pool->handles = tempHandles; + pool->numSlots = numSlots; + } + } + dpiMutex__release(pool->mutex); + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiHandlePool__create() [INTERNAL] +// Create a new handle pool. +//----------------------------------------------------------------------------- +int dpiHandlePool__create(dpiHandlePool **pool, dpiError *error) +{ + dpiHandlePool *tempPool; + + if (dpiUtils__allocateMemory(1, sizeof(dpiHandlePool), 0, + "allocate handle pool", (void**) &tempPool, error) < 0) + return DPI_FAILURE; + tempPool->numSlots = 8; + tempPool->numUsedSlots = 0; + if (dpiUtils__allocateMemory(tempPool->numSlots, sizeof(void*), 1, + "allocate handle pool slots", (void**) &tempPool->handles, + error) < 0) { + dpiUtils__freeMemory(tempPool); + return DPI_FAILURE; + } + dpiMutex__initialize(tempPool->mutex); + tempPool->acquirePos = 0; + tempPool->releasePos = 0; + *pool = tempPool; + return DPI_SUCCESS; +} + +//----------------------------------------------------------------------------- +// dpiHandlePool__free() [INTERNAL] +// Free the memory associated with the error pool. +//----------------------------------------------------------------------------- +void dpiHandlePool__free(dpiHandlePool *pool) +{ + if (pool->handles) { + dpiUtils__freeMemory(pool->handles); + pool->handles = NULL; + } + dpiMutex__destroy(pool->mutex); + dpiUtils__freeMemory(pool); +} + + +//----------------------------------------------------------------------------- +// dpiHandlePool__release() [INTERNAL] +// Release a handle back to the pool. No checks are performed on the handle +// that is being returned to the pool; It will simply be placed back in the +// pool. The handle is then NULLed in order to avoid multiple attempts to +// release the handle back to the pool. +//----------------------------------------------------------------------------- +void dpiHandlePool__release(dpiHandlePool *pool, void **handle) +{ + dpiMutex__acquire(pool->mutex); + pool->handles[pool->releasePos++] = *handle; + *handle = NULL; + if (pool->releasePos == pool->numSlots) + pool->releasePos = 0; + dpiMutex__release(pool->mutex); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiImpl.h b/vendor/github.com/godror/godror/odpi/src/dpiImpl.h new file mode 100644 index 00000000000..ec2ede13955 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiImpl.h @@ -0,0 +1,1905 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiImpl.h +// Master include file for implementation of ODPI-C library. The definitions +// in this file are subject to change without warning. Only the definitions in +// the file dpi.h are intended to be used publicly. +//----------------------------------------------------------------------------- + +#ifndef DPI_IMPL +#define DPI_IMPL + +// Visual Studio 2005 introduced deprecation warnings for "insecure" and POSIX +// functions; silence these warnings +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS 1 +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include "dpi.h" + +#ifdef _WIN32 +#include +#ifndef isnan +#define isnan _isnan +#endif +#else +#include +#include +#include +#endif +#ifdef __linux +#include +#include +#endif + +#ifdef _MSC_VER +#if _MSC_VER < 1900 +#define PRId64 "I64d" +#define PRIu64 "I64u" +#define snprintf _snprintf +#endif +#endif + +#ifndef PRIu64 +#include +#endif + +#ifdef __GNUC__ +#define UNUSED __attribute((unused)) +#else +#define UNUSED +#endif + +// define debugging level (defined in dpiGlobal.c) +extern unsigned long dpiDebugLevel; + +// define max error size +#define DPI_MAX_ERROR_SIZE 3072 + +// define context name for ping interval +#define DPI_CONTEXT_LAST_TIME_USED "DPI_LAST_TIME_USED" + +// define size of buffer used for numbers transferred to/from Oracle as text +#define DPI_NUMBER_AS_TEXT_CHARS 172 + +// define maximum number of digits possible in an Oracle number +#define DPI_NUMBER_MAX_DIGITS 38 + +// define maximum size in bytes supported by basic string handling +#define DPI_MAX_BASIC_BUFFER_SIZE 32767 + +// define internal chunk size used for dynamic binding/fetching +#define DPI_DYNAMIC_BYTES_CHUNK_SIZE 65536 + +// define maximum buffer size permitted in variables +#define DPI_MAX_VAR_BUFFER_SIZE (1024 * 1024 * 1024 - 2) + +// define subscription grouping repeat count +#define DPI_SUBSCR_GROUPING_FOREVER -1 + +// define number of rows to prefetch +#define DPI_PREFETCH_ROWS_DEFAULT 2 + +// define well-known character sets +#define DPI_CHARSET_ID_ASCII 1 +#define DPI_CHARSET_ID_UTF8 873 +#define DPI_CHARSET_ID_UTF16 1000 +#define DPI_CHARSET_ID_UTF16BE 2000 +#define DPI_CHARSET_ID_UTF16LE 2002 +#define DPI_CHARSET_NAME_ASCII "ASCII" +#define DPI_CHARSET_NAME_UTF8 "UTF-8" +#define DPI_CHARSET_NAME_UTF16 "UTF-16" +#define DPI_CHARSET_NAME_UTF16BE "UTF-16BE" +#define DPI_CHARSET_NAME_UTF16LE "UTF-16LE" + +// define handle types used for allocating OCI handles +#define DPI_OCI_HTYPE_ENV 1 +#define DPI_OCI_HTYPE_ERROR 2 +#define DPI_OCI_HTYPE_SVCCTX 3 +#define DPI_OCI_HTYPE_STMT 4 +#define DPI_OCI_HTYPE_BIND 5 +#define DPI_OCI_HTYPE_DEFINE 6 +#define DPI_OCI_HTYPE_DESCRIBE 7 +#define DPI_OCI_HTYPE_SERVER 8 +#define DPI_OCI_HTYPE_SESSION 9 +#define DPI_OCI_HTYPE_AUTHINFO 9 +#define DPI_OCI_HTYPE_TRANS 10 +#define DPI_OCI_HTYPE_SUBSCRIPTION 13 +#define DPI_OCI_HTYPE_SPOOL 27 +#define DPI_OCI_HTYPE_SODA_COLLECTION 30 +#define DPI_OCI_HTYPE_SODA_DOCUMENT 31 +#define DPI_OCI_HTYPE_SODA_COLL_CURSOR 32 +#define DPI_OCI_HTYPE_SODA_OPER_OPTIONS 33 +#define DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS 34 +#define DPI_OCI_HTYPE_SODA_DOC_CURSOR 36 + +// define OCI descriptor types +#define DPI_OCI_DTYPE_LOB 50 +#define DPI_OCI_DTYPE_PARAM 53 +#define DPI_OCI_DTYPE_ROWID 54 +#define DPI_OCI_DTYPE_AQENQ_OPTIONS 57 +#define DPI_OCI_DTYPE_AQDEQ_OPTIONS 58 +#define DPI_OCI_DTYPE_AQMSG_PROPERTIES 59 +#define DPI_OCI_DTYPE_INTERVAL_YM 62 +#define DPI_OCI_DTYPE_INTERVAL_DS 63 +#define DPI_OCI_DTYPE_AQNFY_DESCRIPTOR 64 +#define DPI_OCI_DTYPE_TIMESTAMP 68 +#define DPI_OCI_DTYPE_TIMESTAMP_TZ 69 +#define DPI_OCI_DTYPE_TIMESTAMP_LTZ 70 +#define DPI_OCI_DTYPE_CHDES 77 +#define DPI_OCI_DTYPE_TABLE_CHDES 78 +#define DPI_OCI_DTYPE_ROW_CHDES 79 +#define DPI_OCI_DTYPE_CQDES 80 +#define DPI_OCI_DTYPE_SHARDING_KEY 83 + +// define values used for getting/setting OCI attributes +#define DPI_OCI_ATTR_DATA_SIZE 1 +#define DPI_OCI_ATTR_DATA_TYPE 2 +#define DPI_OCI_ATTR_ENV 5 +#define DPI_OCI_ATTR_PRECISION 5 +#define DPI_OCI_ATTR_SCALE 6 +#define DPI_OCI_ATTR_NAME 4 +#define DPI_OCI_ATTR_SERVER 6 +#define DPI_OCI_ATTR_SESSION 7 +#define DPI_OCI_ATTR_IS_NULL 7 +#define DPI_OCI_ATTR_TRANS 8 +#define DPI_OCI_ATTR_TYPE_NAME 8 +#define DPI_OCI_ATTR_SCHEMA_NAME 9 +#define DPI_OCI_ATTR_ROW_COUNT 9 +#define DPI_OCI_ATTR_PREFETCH_ROWS 11 +#define DPI_OCI_ATTR_PARAM_COUNT 18 +#define DPI_OCI_ATTR_ROWID 19 +#define DPI_OCI_ATTR_USERNAME 22 +#define DPI_OCI_ATTR_PASSWORD 23 +#define DPI_OCI_ATTR_STMT_TYPE 24 +#define DPI_OCI_ATTR_INTERNAL_NAME 25 +#define DPI_OCI_ATTR_EXTERNAL_NAME 26 +#define DPI_OCI_ATTR_XID 27 +#define DPI_OCI_ATTR_CHARSET_ID 31 +#define DPI_OCI_ATTR_CHARSET_FORM 32 +#define DPI_OCI_ATTR_MAXDATA_SIZE 33 +#define DPI_OCI_ATTR_ROWS_RETURNED 42 +#define DPI_OCI_ATTR_VISIBILITY 47 +#define DPI_OCI_ATTR_CONSUMER_NAME 50 +#define DPI_OCI_ATTR_DEQ_MODE 51 +#define DPI_OCI_ATTR_NAVIGATION 52 +#define DPI_OCI_ATTR_WAIT 53 +#define DPI_OCI_ATTR_DEQ_MSGID 54 +#define DPI_OCI_ATTR_PRIORITY 55 +#define DPI_OCI_ATTR_DELAY 56 +#define DPI_OCI_ATTR_EXPIRATION 57 +#define DPI_OCI_ATTR_CORRELATION 58 +#define DPI_OCI_ATTR_ATTEMPTS 59 +#define DPI_OCI_ATTR_EXCEPTION_QUEUE 61 +#define DPI_OCI_ATTR_ENQ_TIME 62 +#define DPI_OCI_ATTR_MSG_STATE 63 +#define DPI_OCI_ATTR_ORIGINAL_MSGID 69 +#define DPI_OCI_ATTR_QUEUE_NAME 70 +#define DPI_OCI_ATTR_NUM_DML_ERRORS 73 +#define DPI_OCI_ATTR_DML_ROW_OFFSET 74 +#define DPI_OCI_ATTR_SUBSCR_NAME 94 +#define DPI_OCI_ATTR_SUBSCR_CALLBACK 95 +#define DPI_OCI_ATTR_SUBSCR_CTX 96 +#define DPI_OCI_ATTR_SUBSCR_NAMESPACE 98 +#define DPI_OCI_ATTR_REF_TDO 110 +#define DPI_OCI_ATTR_PARAM 124 +#define DPI_OCI_ATTR_PARSE_ERROR_OFFSET 129 +#define DPI_OCI_ATTR_SERVER_STATUS 143 +#define DPI_OCI_ATTR_STATEMENT 144 +#define DPI_OCI_ATTR_DEQCOND 146 +#define DPI_OCI_ATTR_SUBSCR_RECPTPROTO 149 +#define DPI_OCI_ATTR_CURRENT_POSITION 164 +#define DPI_OCI_ATTR_STMTCACHESIZE 176 +#define DPI_OCI_ATTR_BIND_COUNT 190 +#define DPI_OCI_ATTR_TRANSFORMATION 196 +#define DPI_OCI_ATTR_ROWS_FETCHED 197 +#define DPI_OCI_ATTR_SPOOL_STMTCACHESIZE 208 +#define DPI_OCI_ATTR_TYPECODE 216 +#define DPI_OCI_ATTR_STMT_IS_RETURNING 218 +#define DPI_OCI_ATTR_CURRENT_SCHEMA 224 +#define DPI_OCI_ATTR_SUBSCR_QOSFLAGS 225 +#define DPI_OCI_ATTR_COLLECTION_ELEMENT 227 +#define DPI_OCI_ATTR_SUBSCR_TIMEOUT 227 +#define DPI_OCI_ATTR_NUM_TYPE_ATTRS 228 +#define DPI_OCI_ATTR_SUBSCR_CQ_QOSFLAGS 229 +#define DPI_OCI_ATTR_LIST_TYPE_ATTRS 229 +#define DPI_OCI_ATTR_SUBSCR_CQ_REGID 230 +#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_CLASS 231 +#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_VALUE 232 +#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_TYPE 233 +#define DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_REPEAT_COUNT 235 +#define DPI_OCI_ATTR_NCHARSET_ID 262 +#define DPI_OCI_ATTR_APPCTX_SIZE 273 +#define DPI_OCI_ATTR_APPCTX_LIST 274 +#define DPI_OCI_ATTR_APPCTX_NAME 275 +#define DPI_OCI_ATTR_APPCTX_ATTR 276 +#define DPI_OCI_ATTR_APPCTX_VALUE 277 +#define DPI_OCI_ATTR_CLIENT_IDENTIFIER 278 +#define DPI_OCI_ATTR_CHAR_SIZE 286 +#define DPI_OCI_ATTR_EDITION 288 +#define DPI_OCI_ATTR_CQ_QUERYID 304 +#define DPI_OCI_ATTR_SPOOL_TIMEOUT 308 +#define DPI_OCI_ATTR_SPOOL_GETMODE 309 +#define DPI_OCI_ATTR_SPOOL_BUSY_COUNT 310 +#define DPI_OCI_ATTR_SPOOL_OPEN_COUNT 311 +#define DPI_OCI_ATTR_MODULE 366 +#define DPI_OCI_ATTR_ACTION 367 +#define DPI_OCI_ATTR_CLIENT_INFO 368 +#define DPI_OCI_ATTR_SUBSCR_PORTNO 390 +#define DPI_OCI_ATTR_CHNF_ROWIDS 402 +#define DPI_OCI_ATTR_CHNF_OPERATIONS 403 +#define DPI_OCI_ATTR_CHDES_DBNAME 405 +#define DPI_OCI_ATTR_CHDES_NFYTYPE 406 +#define DPI_OCI_ATTR_NFY_FLAGS 406 +#define DPI_OCI_ATTR_CHDES_XID 407 +#define DPI_OCI_ATTR_MSG_DELIVERY_MODE 407 +#define DPI_OCI_ATTR_CHDES_TABLE_CHANGES 408 +#define DPI_OCI_ATTR_CHDES_TABLE_NAME 409 +#define DPI_OCI_ATTR_CHDES_TABLE_OPFLAGS 410 +#define DPI_OCI_ATTR_CHDES_TABLE_ROW_CHANGES 411 +#define DPI_OCI_ATTR_CHDES_ROW_ROWID 412 +#define DPI_OCI_ATTR_CHDES_ROW_OPFLAGS 413 +#define DPI_OCI_ATTR_CHNF_REGHANDLE 414 +#define DPI_OCI_ATTR_CQDES_OPERATION 422 +#define DPI_OCI_ATTR_CQDES_TABLE_CHANGES 423 +#define DPI_OCI_ATTR_CQDES_QUERYID 424 +#define DPI_OCI_ATTR_DRIVER_NAME 424 +#define DPI_OCI_ATTR_CHDES_QUERIES 425 +#define DPI_OCI_ATTR_CONNECTION_CLASS 425 +#define DPI_OCI_ATTR_PURITY 426 +#define DPI_OCI_ATTR_RECEIVE_TIMEOUT 436 +#define DPI_OCI_ATTR_LOBPREFETCH_LENGTH 440 +#define DPI_OCI_ATTR_SUBSCR_IPADDR 452 +#define DPI_OCI_ATTR_UB8_ROW_COUNT 457 +#define DPI_OCI_ATTR_SPOOL_AUTH 460 +#define DPI_OCI_ATTR_LTXID 462 +#define DPI_OCI_ATTR_DML_ROW_COUNT_ARRAY 469 +#define DPI_OCI_ATTR_ERROR_IS_RECOVERABLE 472 +#define DPI_OCI_ATTR_TRANSACTION_IN_PROGRESS 484 +#define DPI_OCI_ATTR_DBOP 485 +#define DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION 490 +#define DPI_OCI_ATTR_BREAK_ON_NET_TIMEOUT 495 +#define DPI_OCI_ATTR_SHARDING_KEY 496 +#define DPI_OCI_ATTR_SUPER_SHARDING_KEY 497 +#define DPI_OCI_ATTR_FIXUP_CALLBACK 501 +#define DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT 506 +#define DPI_OCI_ATTR_CALL_TIMEOUT 531 +#define DPI_OCI_ATTR_SODA_COLL_NAME 535 +#define DPI_OCI_ATTR_SODA_COLL_DESCRIPTOR 536 +#define DPI_OCI_ATTR_SODA_CTNT_SQL_TYPE 549 +#define DPI_OCI_ATTR_SODA_KEY 563 +#define DPI_OCI_ATTR_SODA_LASTMOD_TIMESTAMP 564 +#define DPI_OCI_ATTR_SODA_CREATE_TIMESTAMP 565 +#define DPI_OCI_ATTR_SODA_VERSION 566 +#define DPI_OCI_ATTR_SODA_CONTENT 567 +#define DPI_OCI_ATTR_SODA_JSON_CHARSET_ID 568 +#define DPI_OCI_ATTR_SODA_DETECT_JSON_ENC 569 +#define DPI_OCI_ATTR_SODA_MEDIA_TYPE 571 +#define DPI_OCI_ATTR_SODA_CTNT_FORMAT 572 +#define DPI_OCI_ATTR_SODA_FILTER 576 +#define DPI_OCI_ATTR_SODA_SKIP 577 +#define DPI_OCI_ATTR_SODA_LIMIT 578 +#define DPI_OCI_ATTR_SODA_DOC_COUNT 593 +#define DPI_OCI_ATTR_SPOOL_MAX_PER_SHARD 602 + +// define OCI object type constants +#define DPI_OCI_OTYPE_NAME 1 +#define DPI_OCI_OTYPE_PTR 3 + +// define OCI data type constants +#define DPI_SQLT_CHR 1 +#define DPI_SQLT_NUM 2 +#define DPI_SQLT_INT 3 +#define DPI_SQLT_FLT 4 +#define DPI_SQLT_VNU 6 +#define DPI_SQLT_PDN 7 +#define DPI_SQLT_LNG 8 +#define DPI_SQLT_VCS 9 +#define DPI_SQLT_DAT 12 +#define DPI_SQLT_BFLOAT 21 +#define DPI_SQLT_BDOUBLE 22 +#define DPI_SQLT_BIN 23 +#define DPI_SQLT_LBI 24 +#define DPI_SQLT_UIN 68 +#define DPI_SQLT_LVB 95 +#define DPI_SQLT_AFC 96 +#define DPI_SQLT_IBFLOAT 100 +#define DPI_SQLT_IBDOUBLE 101 +#define DPI_SQLT_RDD 104 +#define DPI_SQLT_NTY 108 +#define DPI_SQLT_CLOB 112 +#define DPI_SQLT_BLOB 113 +#define DPI_SQLT_BFILE 114 +#define DPI_SQLT_RSET 116 +#define DPI_SQLT_NCO 122 +#define DPI_SQLT_ODT 156 +#define DPI_SQLT_DATE 184 +#define DPI_SQLT_TIMESTAMP 187 +#define DPI_SQLT_TIMESTAMP_TZ 188 +#define DPI_SQLT_INTERVAL_YM 189 +#define DPI_SQLT_INTERVAL_DS 190 +#define DPI_SQLT_TIMESTAMP_LTZ 232 +#define DPI_OCI_TYPECODE_SMALLINT 246 +#define DPI_SQLT_REC 250 +#define DPI_SQLT_BOL 252 +#define DPI_OCI_TYPECODE_ROWID 262 +#define DPI_OCI_TYPECODE_LONG 263 +#define DPI_OCI_TYPECODE_LONG_RAW 264 +#define DPI_OCI_TYPECODE_BINARY_INTEGER 265 +#define DPI_OCI_TYPECODE_PLS_INTEGER 266 + +// define session pool constants +#define DPI_OCI_SPD_FORCE 0x0001 +#define DPI_OCI_SPC_HOMOGENEOUS 0x0002 +#define DPI_OCI_SPC_STMTCACHE 0x0004 + +// define OCI session pool get constants +#define DPI_OCI_SESSGET_SPOOL 0x0001 +#define DPI_OCI_SESSGET_STMTCACHE 0x0004 +#define DPI_OCI_SESSGET_CREDPROXY 0x0008 +#define DPI_OCI_SESSGET_CREDEXT 0x0010 +#define DPI_OCI_SESSGET_SPOOL_MATCHANY 0x0020 +#define DPI_OCI_SESSGET_SYSDBA 0x0100 +#define DPI_OCI_SESSGET_MULTIPROPERTY_TAG 0x0400 + +// define OCI authentication constants +#define DPI_OCI_CPW_SYSDBA 0x00000010 +#define DPI_OCI_CPW_SYSOPER 0x00000020 +#define DPI_OCI_CPW_SYSASM 0x00800040 +#define DPI_OCI_CPW_SYSBKP 0x00000080 +#define DPI_OCI_CPW_SYSDGD 0x00000100 +#define DPI_OCI_CPW_SYSKMT 0x00000200 + +// define NLS constants +#define DPI_OCI_NLS_CS_IANA_TO_ORA 0 +#define DPI_OCI_NLS_CS_ORA_TO_IANA 1 +#define DPI_OCI_NLS_CHARSET_MAXBYTESZ 91 +#define DPI_OCI_NLS_CHARSET_ID 93 +#define DPI_OCI_NLS_NCHARSET_ID 94 +#define DPI_OCI_NLS_MAXBUFSZ 100 +#define DPI_SQLCS_IMPLICIT 1 +#define DPI_SQLCS_NCHAR 2 + +// define XA constants +#define DPI_XA_MAXGTRIDSIZE 64 +#define DPI_XA_MAXBQUALSIZE 64 +#define DPI_XA_XIDDATASIZE 128 + +// define null indicator values +#define DPI_OCI_IND_NULL -1 +#define DPI_OCI_IND_NOTNULL 0 + +// define subscription QOS values +#define DPI_OCI_SUBSCR_QOS_RELIABLE 0x01 +#define DPI_OCI_SUBSCR_QOS_PURGE_ON_NTFN 0x10 +#define DPI_OCI_SUBSCR_CQ_QOS_QUERY 0x01 +#define DPI_OCI_SUBSCR_CQ_QOS_BEST_EFFORT 0x02 + +// define miscellaneous OCI constants +#define DPI_OCI_CONTINUE -24200 +#define DPI_OCI_INVALID_HANDLE -2 +#define DPI_OCI_ERROR -1 +#define DPI_OCI_DEFAULT 0 +#define DPI_OCI_SUCCESS 0 +#define DPI_OCI_ONE_PIECE 0 +#define DPI_OCI_ATTR_PURITY_DEFAULT 0 +#define DPI_OCI_NUMBER_UNSIGNED 0 +#define DPI_OCI_SUCCESS_WITH_INFO 1 +#define DPI_OCI_NTV_SYNTAX 1 +#define DPI_OCI_MEMORY_CLEARED 1 +#define DPI_OCI_SESSRLS_DROPSESS 1 +#define DPI_OCI_SESSRLS_MULTIPROPERTY_TAG 4 +#define DPI_OCI_SERVER_NORMAL 1 +#define DPI_OCI_TYPEGET_ALL 1 +#define DPI_OCI_TRANS_NEW 1 +#define DPI_OCI_LOCK_NONE 1 +#define DPI_OCI_TEMP_BLOB 1 +#define DPI_OCI_CRED_RDBMS 1 +#define DPI_OCI_LOB_READONLY 1 +#define DPI_OCI_JSON_FORMAT_OSON 1 +#define DPI_OCI_TEMP_CLOB 2 +#define DPI_OCI_CRED_EXT 2 +#define DPI_OCI_LOB_READWRITE 2 +#define DPI_OCI_DATA_AT_EXEC 2 +#define DPI_OCI_DYNAMIC_FETCH 2 +#define DPI_OCI_NUMBER_SIGNED 2 +#define DPI_OCI_PIN_ANY 3 +#define DPI_OCI_PTYPE_TYPE 6 +#define DPI_OCI_AUTH 8 +#define DPI_OCI_DURATION_SESSION 10 +#define DPI_OCI_NUMBER_SIZE 22 +#define DPI_OCI_NO_DATA 100 +#define DPI_OCI_STRLS_CACHE_DELETE 0x0010 +#define DPI_OCI_THREADED 0x00000001 +#define DPI_OCI_OBJECT 0x00000002 +#define DPI_OCI_SODA_ATOMIC_COMMIT 0x00000001 +#define DPI_OCI_SODA_AS_STORED 0x00000002 +#define DPI_OCI_SODA_AS_AL32UTF8 0x00000004 +#define DPI_OCI_STMT_SCROLLABLE_READONLY 0x00000008 +#define DPI_OCI_STMT_CACHE 0x00000040 +#define DPI_OCI_SODA_COLL_CREATE_MAP 0x00010000 +#define DPI_OCI_SODA_INDEX_DROP_FORCE 0x00010000 +#define DPI_OCI_TRANS_TWOPHASE 0x01000000 +#define DPI_OCI_SECURE_NOTIFICATION 0x20000000 + +//----------------------------------------------------------------------------- +// Macros +//----------------------------------------------------------------------------- +#define DPI_CHECK_PTR_NOT_NULL(handle, parameter) \ + if (!parameter) { \ + dpiError__set(&error, "check parameter " #parameter, \ + DPI_ERR_NULL_POINTER_PARAMETER, #parameter); \ + return dpiGen__endPublicFn(handle, DPI_FAILURE, &error); \ + } + +#define DPI_CHECK_PTR_AND_LENGTH(handle, parameter) \ + if (!parameter && parameter ## Length > 0) { \ + dpiError__set(&error, "check parameter " #parameter, \ + DPI_ERR_PTR_LENGTH_MISMATCH, #parameter); \ + return dpiGen__endPublicFn(handle, DPI_FAILURE, &error); \ + } + + +//----------------------------------------------------------------------------- +// Enumerations +//----------------------------------------------------------------------------- + +// error numbers +typedef enum { + DPI_ERR_NO_ERR = 1000, + DPI_ERR_NO_MEMORY, + DPI_ERR_INVALID_HANDLE, + DPI_ERR_ERR_NOT_INITIALIZED, + DPI_ERR_GET_FAILED, + DPI_ERR_CREATE_ENV, + DPI_ERR_CONVERT_TEXT, + DPI_ERR_QUERY_NOT_EXECUTED, + DPI_ERR_UNHANDLED_DATA_TYPE, + DPI_ERR_INVALID_ARRAY_POSITION, + DPI_ERR_NOT_CONNECTED, + DPI_ERR_CONN_NOT_IN_POOL, + DPI_ERR_INVALID_PROXY, + DPI_ERR_NOT_SUPPORTED, + DPI_ERR_UNHANDLED_CONVERSION, + DPI_ERR_ARRAY_SIZE_TOO_BIG, + DPI_ERR_INVALID_DATE, + DPI_ERR_VALUE_IS_NULL, + DPI_ERR_ARRAY_SIZE_TOO_SMALL, + DPI_ERR_BUFFER_SIZE_TOO_SMALL, + DPI_ERR_VERSION_NOT_SUPPORTED, + DPI_ERR_INVALID_ORACLE_TYPE, + DPI_ERR_WRONG_ATTR, + DPI_ERR_NOT_COLLECTION, + DPI_ERR_INVALID_INDEX, + DPI_ERR_NO_OBJECT_TYPE, + DPI_ERR_INVALID_CHARSET, + DPI_ERR_SCROLL_OUT_OF_RS, + DPI_ERR_QUERY_POSITION_INVALID, + DPI_ERR_NO_ROW_FETCHED, + DPI_ERR_TLS_ERROR, + DPI_ERR_ARRAY_SIZE_ZERO, + DPI_ERR_EXT_AUTH_WITH_CREDENTIALS, + DPI_ERR_CANNOT_GET_ROW_OFFSET, + DPI_ERR_CONN_IS_EXTERNAL, + DPI_ERR_TRANS_ID_TOO_LARGE, + DPI_ERR_BRANCH_ID_TOO_LARGE, + DPI_ERR_COLUMN_FETCH, + DPI_ERR_STMT_CLOSED, + DPI_ERR_LOB_CLOSED, + DPI_ERR_INVALID_CHARSET_ID, + DPI_ERR_INVALID_OCI_NUMBER, + DPI_ERR_INVALID_NUMBER, + DPI_ERR_NUMBER_NO_REPR, + DPI_ERR_NUMBER_STRING_TOO_LONG, + DPI_ERR_NULL_POINTER_PARAMETER, + DPI_ERR_LOAD_LIBRARY, + DPI_ERR_LOAD_SYMBOL, + DPI_ERR_ORACLE_CLIENT_TOO_OLD, + DPI_ERR_NLS_ENV_VAR_GET, + DPI_ERR_PTR_LENGTH_MISMATCH, + DPI_ERR_NAN, + DPI_ERR_WRONG_TYPE, + DPI_ERR_BUFFER_SIZE_TOO_LARGE, + DPI_ERR_NO_EDITION_WITH_CONN_CLASS, + DPI_ERR_NO_BIND_VARS_IN_DDL, + DPI_ERR_SUBSCR_CLOSED, + DPI_ERR_NO_EDITION_WITH_NEW_PASSWORD, + DPI_ERR_UNEXPECTED_OCI_RETURN_VALUE, + DPI_ERR_EXEC_MODE_ONLY_FOR_DML, + DPI_ERR_ARRAY_VAR_NOT_SUPPORTED, + DPI_ERR_EVENTS_MODE_REQUIRED, + DPI_ERR_ORACLE_DB_TOO_OLD, + DPI_ERR_CALL_TIMEOUT, + DPI_ERR_SODA_CURSOR_CLOSED, + DPI_ERR_EXT_AUTH_INVALID_PROXY, + DPI_ERR_QUEUE_NO_PAYLOAD, + DPI_ERR_QUEUE_WRONG_PAYLOAD_TYPE, + DPI_ERR_ORACLE_CLIENT_UNSUPPORTED, + DPI_ERR_MISSING_SHARDING_KEY, + DPI_ERR_MAX +} dpiErrorNum; + +// handle types +typedef enum { + DPI_HTYPE_NONE = 4000, + DPI_HTYPE_CONN, + DPI_HTYPE_POOL, + DPI_HTYPE_STMT, + DPI_HTYPE_VAR, + DPI_HTYPE_LOB, + DPI_HTYPE_OBJECT, + DPI_HTYPE_OBJECT_TYPE, + DPI_HTYPE_OBJECT_ATTR, + DPI_HTYPE_SUBSCR, + DPI_HTYPE_DEQ_OPTIONS, + DPI_HTYPE_ENQ_OPTIONS, + DPI_HTYPE_MSG_PROPS, + DPI_HTYPE_ROWID, + DPI_HTYPE_CONTEXT, + DPI_HTYPE_SODA_COLL, + DPI_HTYPE_SODA_COLL_CURSOR, + DPI_HTYPE_SODA_DB, + DPI_HTYPE_SODA_DOC, + DPI_HTYPE_SODA_DOC_CURSOR, + DPI_HTYPE_QUEUE, + DPI_HTYPE_MAX +} dpiHandleTypeNum; + + +//----------------------------------------------------------------------------- +// Mutex definitions +//----------------------------------------------------------------------------- +#ifdef _WIN32 + typedef CRITICAL_SECTION dpiMutexType; + #define dpiMutex__initialize(m) InitializeCriticalSection(&m) + #define dpiMutex__destroy(m) DeleteCriticalSection(&m) + #define dpiMutex__acquire(m) EnterCriticalSection(&m) + #define dpiMutex__release(m) LeaveCriticalSection(&m) +#else + typedef pthread_mutex_t dpiMutexType; + #define dpiMutex__initialize(m) pthread_mutex_init(&m, NULL) + #define dpiMutex__destroy(m) pthread_mutex_destroy(&m) + #define dpiMutex__acquire(m) pthread_mutex_lock(&m) + #define dpiMutex__release(m) pthread_mutex_unlock(&m) +#endif + + +//----------------------------------------------------------------------------- +// old type definitions (to be dropped) +//----------------------------------------------------------------------------- + +// structure used for creating pools (3.0) +typedef struct { + uint32_t minSessions; + uint32_t maxSessions; + uint32_t sessionIncrement; + int pingInterval; + int pingTimeout; + int homogeneous; + int externalAuth; + dpiPoolGetMode getMode; + const char *outPoolName; + uint32_t outPoolNameLength; + uint32_t timeout; + uint32_t waitTimeout; + uint32_t maxLifetimeSession; +} dpiPoolCreateParams__v30; + +// structure used for creating pools (3.2) +typedef struct { + uint32_t minSessions; + uint32_t maxSessions; + uint32_t sessionIncrement; + int pingInterval; + int pingTimeout; + int homogeneous; + int externalAuth; + dpiPoolGetMode getMode; + const char *outPoolName; + uint32_t outPoolNameLength; + uint32_t timeout; + uint32_t waitTimeout; + uint32_t maxLifetimeSession; + const char *plsqlFixupCallback; + uint32_t plsqlFixupCallbackLength; +} dpiPoolCreateParams__v32; + +// structure used for creating connections (3.0) +typedef struct { + dpiAuthMode authMode; + const char *connectionClass; + uint32_t connectionClassLength; + dpiPurity purity; + const char *newPassword; + uint32_t newPasswordLength; + dpiAppContext *appContext; + uint32_t numAppContext; + int externalAuth; + void *externalHandle; + dpiPool *pool; + const char *tag; + uint32_t tagLength; + int matchAnyTag; + const char *outTag; + uint32_t outTagLength; + int outTagFound; + dpiShardingKeyColumn *shardingKeyColumns; + uint8_t numShardingKeyColumns; + dpiShardingKeyColumn *superShardingKeyColumns; + uint8_t numSuperShardingKeyColumns; +} dpiConnCreateParams__v30; + +// structure used for creating subscriptions (3.0 and 3.1) +typedef struct { + dpiSubscrNamespace subscrNamespace; + dpiSubscrProtocol protocol; + dpiSubscrQOS qos; + dpiOpCode operations; + uint32_t portNumber; + uint32_t timeout; + const char *name; + uint32_t nameLength; + dpiSubscrCallback callback; + void *callbackContext; + const char *recipientName; + uint32_t recipientNameLength; + const char *ipAddress; + uint32_t ipAddressLength; + uint8_t groupingClass; + uint32_t groupingValue; + uint8_t groupingType; +} dpiSubscrCreateParams__v30; + +// structure used for creating subscriptions (3.2) +typedef struct { + dpiSubscrNamespace subscrNamespace; + dpiSubscrProtocol protocol; + dpiSubscrQOS qos; + dpiOpCode operations; + uint32_t portNumber; + uint32_t timeout; + const char *name; + uint32_t nameLength; + dpiSubscrCallback callback; + void *callbackContext; + const char *recipientName; + uint32_t recipientNameLength; + const char *ipAddress; + uint32_t ipAddressLength; + uint8_t groupingClass; + uint32_t groupingValue; + uint8_t groupingType; + uint64_t outRegId; +} dpiSubscrCreateParams__v32; + + +//----------------------------------------------------------------------------- +// OCI type definitions +//----------------------------------------------------------------------------- + +// representation of OCI Number type +typedef struct { + unsigned char value[DPI_OCI_NUMBER_SIZE]; +} dpiOciNumber; + +// representation of OCI Date type +typedef struct { + int16_t year; + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t second; +} dpiOciDate; + +// alternative representation of OCI Date type used for sharding +typedef struct { + uint8_t century; + uint8_t year; + uint8_t month; + uint8_t day; + uint8_t hour; + uint8_t minute; + uint8_t second; +} dpiShardingOciDate; + +// representation of OCI XID type (two-phase commit) +typedef struct { + long formatID; + long gtrid_length; + long bqual_length; + char data[DPI_XA_XIDDATASIZE]; +} dpiOciXID; + + +//----------------------------------------------------------------------------- +// Internal implementation type definitions +//----------------------------------------------------------------------------- + +// used to manage a list of shared handles in a thread-safe manner; currently +// used for managing the list of open statements, LOBs and created objects for +// a connection (so that they can be closed before the connection itself is +// closed); the functions for managing this structure can be found in the file +// dpiHandleList.c; empty slots in the array are represented by a NULL handle +typedef struct { + void **handles; // array of handles managed by list + uint32_t numSlots; // length of handles array + uint32_t numUsedSlots; // actual number of managed handles + uint32_t currentPos; // next position to search + dpiMutexType mutex; // enables thread safety +} dpiHandleList; + +// used to manage a pool of shared handles in a thread-safe manner; currently +// used for managing the pool of error handles in the dpiEnv structure; the +// functions for managing this structure are found in the file dpiHandlePool.c +typedef struct { + void **handles; // array of handles managed by pool + uint32_t numSlots; // length of handles array + uint32_t numUsedSlots; // actual number of managed handles + uint32_t acquirePos; // position from which to acquire + uint32_t releasePos; // position to place released handles + dpiMutexType mutex; // enables thread safety +} dpiHandlePool; + +// used to save error information internally; one of these is stored for each +// thread using OCIThreadKeyGet() and OCIThreadKeySet() with a globally created +// OCI environment handle; it is also used when getting batch error information +// with the function dpiStmt_getBatchErrors() +typedef struct { + int32_t code; // Oracle error code or 0 + uint16_t offset; // parse error offset or row offset + dpiErrorNum errorNum; // OCPI-C error number + const char *fnName; // ODPI-C function name + const char *action; // internal action + char encoding[DPI_OCI_NLS_MAXBUFSZ]; // encoding (IANA name) + char message[DPI_MAX_ERROR_SIZE]; // buffer for storing messages + uint32_t messageLength; // length of message in buffer + int isRecoverable; // is recoverable? +} dpiErrorBuffer; + +// represents an OCI environment; a pointer to this structure is stored on each +// handle exposed publicly but it is created only when a pool is created or +// when a standalone connection is created; connections acquired from a pool +// shared the same environment as the pool; the functions for manipulating the +// environment are found in the file dpiEnv.c; all values are read-only after +// initialization of environment is complete +typedef struct { + const dpiContext *context; // context used to create environment + void *handle; // OCI environment handle + dpiMutexType mutex; // for reference count (threaded mode) + char encoding[DPI_OCI_NLS_MAXBUFSZ]; // CHAR encoding (IANA name) + int32_t maxBytesPerCharacter; // max bytes per CHAR character + uint16_t charsetId; // CHAR encoding (Oracle charset ID) + char nencoding[DPI_OCI_NLS_MAXBUFSZ]; // NCHAR encoding (IANA name) + int32_t nmaxBytesPerCharacter; // max bytes per NCHAR character + uint16_t ncharsetId; // NCHAR encoding (Oracle charset ID) + dpiHandlePool *errorHandles; // pool of OCI error handles + dpiVersionInfo *versionInfo; // OCI client version info + void *baseDate; // midnight, January 1, 1970 + int threaded; // threaded mode enabled? + int events; // events mode enabled? + int externalHandle; // external handle? +} dpiEnv; + +// used to manage all errors that take place in the library; the implementation +// for the functions that use this structure are found in dpiError.c; a pointer +// to this structure is passed to all internal functions and the first thing +// that takes place in every public function is a call to this this error +// structure +typedef struct { + dpiErrorBuffer *buffer; // buffer to store error information + void *handle; // OCI error handle or NULL + dpiEnv *env; // env which created OCI error handle +} dpiError; + +// function signature for all methods that free publicly exposed handles +typedef void (*dpiTypeFreeProc)(void*, dpiError*); + +// strcture used to provide metadata for the different types of handles exposed +// publicly; a list of these structures (defined as constants) can be found in +// the file dpiGen.c; the enumeration dpiHandleTypeNum is used to identify the +// structures instead of being used directly +typedef struct { + const char *name; // name (used in error messages) + size_t size; // size of structure, in bytes + uint32_t checkInt; // check integer (unique) + dpiTypeFreeProc freeProc; // procedure to call to free handle +} dpiTypeDef; + +// all structures exposed publicly by handle have these members +#define dpiType_HEAD \ + const dpiTypeDef *typeDef; \ + uint32_t checkInt; \ + unsigned refCount; \ + dpiEnv *env; + +// contains the base attributes that all handles exposed publicly have; generic +// functions for checking and manipulating handles are found in the file +// dpiGen.c; the check integer is used to verify the validity of the handle and +// is reset to zero when the handle is freed; the reference count is used to +// manage how many references (either publicly or internally) are held; when +// the reference count reaches zero the handle is freed +typedef struct { + dpiType_HEAD +} dpiBaseType; + +// represents the different types of Oracle data that the library supports; an +// array of these structures (defined as constants) can be found in the file +// dpiOracleType.c; the enumeration dpiOracleTypeNum is used to identify the +// structures +typedef struct dpiOracleType { + dpiOracleTypeNum oracleTypeNum; // enumeration value identifying type + dpiNativeTypeNum defaultNativeTypeNum; // default native (C) type + uint16_t oracleType; // OCI type code + uint8_t charsetForm; // specifies CHAR or NCHAR encoding + uint32_t sizeInBytes; // buffer size (fixed) or 0 (variable) + int isCharacterData; // is type character data? + int canBeInArray; // can type be in an index-by table? + int requiresPreFetch; // prefetch processing required? +} dpiOracleType; + +// represents a chunk of data that has been allocated dynamically for use in +// dynamic fetching of LONG or LONG RAW columns, or when the calling +// application wishes to use strings or raw byte strings instead of LOBs; an +// array of these chunks is found in the structure dpiDynamicBytes +typedef struct { + char *ptr; // pointer to buffer + uint32_t length; // actual length of buffer + uint32_t allocatedLength; // allocated length of buffer +} dpiDynamicBytesChunk; + +// represents a set of chunks allocated dynamically for use in dynamic fetching +// of LONG or LONG RAW columns, or when the calling application wishes to use +// strings or raw byte strings instead of LOBS +typedef struct { + uint32_t numChunks; // actual number of chunks + uint32_t allocatedChunks; // allocated number of chunks + dpiDynamicBytesChunk *chunks; // array of chunks +} dpiDynamicBytes; + +// represents a single bound variable; an array of these is retained in the +// dpiStmt structure in order to retain references to the variables that were +// bound to the statement, which ensures that the values remain valid while the +// statement is executed; the position is populated for bind by position +// (otherwise it is 0) and the name/nameLength are populated for bind by name +// (otherwise they are NULL/0) +typedef struct { + dpiVar *var; + uint32_t pos; + const char *name; + uint32_t nameLength; +} dpiBindVar; + +// intended to avoid the need for casts; contains references to LOBs, objects +// and statements (as part of dpiVar) +typedef union { + void *asHandle; + dpiObject *asObject; + dpiStmt *asStmt; + dpiLob *asLOB; + dpiRowid *asRowid; +} dpiReferenceBuffer; + +// intended to avoid the need for casts; contains the actual values that are +// bound or fetched (as part of dpiVar); it is also used for getting data into +// and out of Oracle object instances +typedef union { + void *asRaw; + char *asBytes; + float *asFloat; + double *asDouble; + int32_t *asInt32; + int64_t *asInt64; + uint64_t *asUint64; + dpiOciNumber *asNumber; + dpiOciDate *asDate; + void **asTimestamp; + void **asInterval; + void **asLobLocator; + void **asString; + void **asRawData; + void **asStmt; + void **asRowid; + int *asBoolean; + void **asObject; + void **asCollection; +} dpiOracleData; + +// intended to avoid the need for casts; contains the memory needed to supply +// buffers to Oracle when values are being transferred to or from the Oracle +// database +typedef union { + int32_t asInt32; + int64_t asInt64; + uint64_t asUint64; + float asFloat; + double asDouble; + dpiOciNumber asNumber; + dpiOciDate asDate; + int asBoolean; + void *asString; + void *asRawData; + void *asTimestamp; + void *asLobLocator; + void *asRaw; +} dpiOracleDataBuffer; + +// represents memory areas used for transferring data to and from the database +// and is used by the dpiVar structure; most statements only use one buffer, +// but DML returning statements can use multiple buffers since multiple rows +// can be returned for each execution of the statement +typedef struct { + uint32_t maxArraySize; // max number of rows in arrays + uint32_t actualArraySize; // actual number of rows in arrays + int16_t *indicator; // array of indicator values + uint16_t *returnCode; // array of return code values + uint16_t *actualLength16; // array of actual lengths (11.2 only) + uint32_t *actualLength32; // array of actual lengths (12.1+) + void **objectIndicator; // array of object indicator values + dpiReferenceBuffer *references; // array of references (specific types) + dpiDynamicBytes *dynamicBytes; // array of dynamically alloced chunks + char *tempBuffer; // buffer for numeric conversion + dpiData *externalData; // array of buffers (externally used) + dpiOracleData data; // Oracle data buffers (internal only) +} dpiVarBuffer; + +// represents memory areas used for enqueuing and dequeuing messages from +// queues +typedef struct { + uint32_t numElements; // number of elements in next arrays + dpiMsgProps **props; // array of dpiMsgProps handles + void **handles; // array of OCI msg prop handles + void **instances; // array of instances + void **indicators; // array of indicators + int16_t *rawIndicators; // array of indicators (RAW queues) + void **msgIds; // array of OCI message ids +} dpiQueueBuffer; + + +//----------------------------------------------------------------------------- +// External implementation type definitions +//----------------------------------------------------------------------------- + +// represents session pools and is exposed publicly as a handle of type +// DPI_HTYPE_POOL; the implementation for this is found in the file +// dpiPool.c +struct dpiPool { + dpiType_HEAD + void *handle; // OCI session pool handle + const char *name; // pool name (CHAR encoding) + uint32_t nameLength; // length of pool name + int pingInterval; // interval (seconds) between pings + int pingTimeout; // timeout (milliseconds) for ping + int homogeneous; // homogeneous pool? + int externalAuth; // use external authentication? +}; + +// represents connections to the database and is exposed publicly as a handle +// of type DPI_HTYPE_CONN; the implementation for this is found in the file +// dpiConn.c; the list of statement, LOB and object handles created by this +// connection is maintained and all of these are automatically closed when the +// connection itself is closed (in order to avoid memory leaks and segfaults if +// the correct order is not observed) +struct dpiConn { + dpiType_HEAD + dpiPool *pool; // pool acquired from or NULL + void *handle; // OCI service context handle + void *serverHandle; // OCI server handle + void *sessionHandle; // OCI session handle + void *shardingKey; // OCI sharding key descriptor + void *superShardingKey; // OCI supper sharding key descriptor + const char *releaseString; // cached release string or NULL + uint32_t releaseStringLength; // cached release string length or 0 + void *rawTDO; // cached RAW TDO + dpiVersionInfo versionInfo; // Oracle database version info + uint32_t commitMode; // commit mode (for two-phase commits) + uint16_t charsetId; // database character set ID + dpiHandleList *openStmts; // list of statements created + dpiHandleList *openLobs; // list of LOBs created + dpiHandleList *objects; // list of objects created + int externalHandle; // OCI handle provided directly? + int deadSession; // dead session (drop from pool)? + int standalone; // standalone connection (not pooled)? + int closing; // connection is being closed? +}; + +// represents the context in which all activity in the library takes place; the +// implementation for this is found in the file dpiContext.c; the minor +// version of the calling application is retained in order to adjust as needed +// for differing sizes of public structures +struct dpiContext { + dpiType_HEAD + dpiVersionInfo *versionInfo; // OCI client version info + uint8_t dpiMinorVersion; // ODPI-C minor version of application +}; + +// represents statements of all types (queries, DML, DDL, PL/SQL) and is +// exposed publicly as a handle of type DPI_HTYPE_STMT; the implementation for +// this is found in the file dpiStmt.c +struct dpiStmt { + dpiType_HEAD + dpiConn *conn; // connection which created this + uint32_t openSlotNum; // slot in connection handle list + void *handle; // OCI statement handle + dpiStmt *parentStmt; // parent statement (implicit results) + uint32_t fetchArraySize; // rows to fetch each time + uint32_t bufferRowCount; // number of rows in fetch buffers + uint32_t bufferRowIndex; // index into buffers for current row + uint32_t numQueryVars; // number of query variables + dpiVar **queryVars; // array of query variables + dpiQueryInfo *queryInfo; // array of query metadata + uint32_t allocatedBindVars; // number of allocated bind variables + uint32_t numBindVars; // actual nubmer of bind variables + dpiBindVar *bindVars; // array of bind variables + uint32_t numBatchErrors; // number of batch errors + dpiErrorBuffer *batchErrors; // array of batch errors + uint64_t rowCount; // rows affected or rows fetched so far + uint64_t bufferMinRow; // row num of first row in buffers + uint16_t statementType; // type of statement + dpiRowid *lastRowid; // rowid of last affected row + int isOwned; // owned by structure? + int hasRowsToFetch; // potentially more rows to fetch? + int scrollable; // scrollable cursor? + int isReturning; // statement has RETURNING clause? + int deleteFromCache; // drop from statement cache on close? + int closing; // statement is being closed? +}; + +// represents memory areas used for transferring data to and from the database +// and is exposed publicly as a handle of type DPI_HTYPE_VAR; the +// implementation for this is found in the file dpiVar.c; variables can be +// bound to a statement or fetched into by a statement +struct dpiVar { + dpiType_HEAD + dpiConn *conn; // connection which created this + const dpiOracleType *type; // type of data contained in variable + dpiNativeTypeNum nativeTypeNum; // native (C) type of data + int requiresPreFetch; // requires prefetch processing? + int isArray; // is an index-by table (array)? + uint32_t sizeInBytes; // size in bytes of each row + int isDynamic; // dynamically bound or defined? + dpiObjectType *objectType; // object type (or NULL) + dpiVarBuffer buffer; // main buffer for data + dpiVarBuffer *dynBindBuffers; // array of buffers (DML returning) + dpiError *error; // error (only for dynamic bind/define) +}; + +// represents large objects (CLOB, BLOB, NCLOB and BFILE) and is exposed +// publicly as a handle of type DPI_HTYPE_LOB; the implementation for this is +// found in the file dpiLob.c +struct dpiLob { + dpiType_HEAD + dpiConn *conn; // connection which created this + uint32_t openSlotNum; // slot in connection handle list + const dpiOracleType *type; // type of LOB + void *locator; // OCI LOB locator descriptor + char *buffer; // stores dir alias/name for BFILE + int closing; // is LOB being closed? +}; + +// represents object attributes of the types created by the SQL command CREATE +// OR REPLACE TYPE and is exposed publicly as a handle of type +// DPI_HTYPE_OBJECT_ATTR; the implementation for this is found in the file +// dpiObjectAttr.c +struct dpiObjectAttr { + dpiType_HEAD + dpiObjectType *belongsToType; // type attribute belongs to + const char *name; // name of attribute (CHAR encoding) + uint32_t nameLength; // length of name of attribute + dpiDataTypeInfo typeInfo; // attribute data type info +}; + +// represents types created by the SQL command CREATE OR REPLACE TYPE and is +// exposed publicly as a handle of type DPI_HTYPE_OBJECT_TYPE; the +// implementation for this is found in the file dpiObjectType.c +struct dpiObjectType { + dpiType_HEAD + dpiConn *conn; // connection which created this + void *tdo; // OCI type descriptor object + uint16_t typeCode; // OCI type code + const char *schema; // schema owning type (CHAR encoding) + uint32_t schemaLength; // length of schema owning type + const char *name; // name of type (CHAR encoding) + uint32_t nameLength; // length of name of type + dpiDataTypeInfo elementTypeInfo; // type info of elements of collection + int isCollection; // is type a collection? + uint16_t numAttributes; // number of attributes type has +}; + +// represents objects of the types created by the SQL command CREATE OR REPLACE +// TYPE and is exposed publicly as a handle of type DPI_HTYPE_OBJECT; the +// implementation for this is found in the file dpiObject.c +struct dpiObject { + dpiType_HEAD + dpiObjectType *type; // type of object + uint32_t openSlotNum; // slot in connection handle list + void *instance; // OCI instance + void *indicator; // OCI indicator + dpiObject *dependsOnObj; // extracted from parent obj, or NULL + int freeIndicator; // should indicator be freed? + int closing; // is object being closed? +}; + +// represents the unique identifier of a row in Oracle Database and is exposed +// publicly as a handle of type DPI_HTYPE_ROWID; the implementation for this is +// found in the file dpiRowid.c +struct dpiRowid { + dpiType_HEAD + void *handle; // OCI rowid descriptor + char *buffer; // cached string rep (or NULL) + uint16_t bufferLength; // length of string rep (or 0) +}; + +// represents a subscription to events such as continuous query notification +// (CQN) and object change notification and is exposed publicly as a handle of +// type DPI_HTYPE_SUBSCR; the implementation for this is found in the file +// dpiSubscr.c +struct dpiSubscr { + dpiType_HEAD + dpiConn *conn; // connection which created this + void *handle; // OCI subscription handle + dpiMutexType mutex; // enables thread safety + dpiSubscrNamespace subscrNamespace; // OCI namespace + dpiSubscrQOS qos; // quality of service flags + dpiSubscrCallback callback; // callback when event is propagated + void *callbackContext; // context pointer for callback + int clientInitiated; // client initiated? + int registered; // registered with database? +}; + +// represents the available options for dequeueing messages when using advanced +// queueing and is exposed publicly as a handle of type DPI_HTYPE_DEQ_OPTIONS; +// the implementation for this is found in dpiDeqOptions.c +struct dpiDeqOptions { + dpiType_HEAD + dpiConn *conn; // connection which created this + void *handle; // OCI dequeue options handle +}; + +// represents the available options for enqueueing messages when using advanced +// queueing and is exposed publicly as a handle of type DPI_HTYPE_ENQ_OPTIONS; +// the implementation for this is found in dpiEnqOptions.c +struct dpiEnqOptions { + dpiType_HEAD + dpiConn *conn; // connection which created this + void *handle; // OCI enqueue options handle +}; + +// represents the available properties for messages when using advanced queuing +// and is exposed publicly as a handle of type DPI_HTYPE_MSG_PROPS; the +// implementation for this is found in the file dpiMsgProps.c +struct dpiMsgProps { + dpiType_HEAD + dpiConn *conn; // connection which created this + void *handle; // OCI message properties handle + dpiObject *payloadObj; // payload (object) + void *payloadRaw; // payload (RAW) + void *msgIdRaw; // message ID (RAW) +}; + +// represents SODA collections and is exposed publicly as a handle of type +// DPI_HTYPE_SODA_COLL; the implementation for this is found in the file +// dpiSodaColl.c +struct dpiSodaColl { + dpiType_HEAD + dpiSodaDb *db; // database which created this + void *handle; // OCI SODA collection handle + int binaryContent; // content stored in BLOB? +}; + +// represents cursors that iterate over SODA collections and is exposed +// publicly as a handle of type DPI_HTYPE_SODA_COLL_CURSOR; the implementation +// for this is found in the file dpiSodaCollCursor.c +struct dpiSodaCollCursor { + dpiType_HEAD + dpiSodaDb *db; // database which created this + void *handle; // OCI SODA collection cursor handle +}; + +// represents a SODA database (contains SODA collections) and is exposed +// publicly as a handle of type DPI_HTYPE_SODA_DB; the implementation for this +// is found in the file dpiSodaDb.c +struct dpiSodaDb { + dpiType_HEAD + dpiConn *conn; // connection which created this +}; + +// represents a SODA document and is exposed publicly as a handle of type +// DPI_HTYPE_SODA_DOC; the implementation for this is found in the file +// dpiSodaDoc.c +struct dpiSodaDoc { + dpiType_HEAD + dpiSodaDb *db; // database which created this + void *handle; // OCI SODA document handle + int binaryContent; // binary content? +}; + +// represents a SODA document cursor and is exposed publicly as a handle of +// type DPI_HTYPE_SODA_DOC_CURSOR; the implementation for this is found in the +// file dpiSodaDocCursor.c +struct dpiSodaDocCursor { + dpiType_HEAD + dpiSodaColl *coll; // collection which created this + void *handle; // OCI SODA document cursor handle +}; + +// represents a queue used in AQ (advanced queuing) and is exposed publicly as +// a handle of type DPI_HTYPE_QUEUE; the implementation for this is found in +// the file dpiQueue.c +struct dpiQueue { + dpiType_HEAD + dpiConn *conn; // connection which created this + const char *name; // name of the queue (NULL-terminated) + dpiObjectType *payloadType; // object type (for object payloads) + dpiDeqOptions *deqOptions; // dequeue options + dpiEnqOptions *enqOptions; // enqueue options + dpiQueueBuffer buffer; // buffer area +}; + + +//----------------------------------------------------------------------------- +// definition of internal dpiContext methods +//----------------------------------------------------------------------------- +void dpiContext__initCommonCreateParams(dpiCommonCreateParams *params); +void dpiContext__initConnCreateParams(dpiConnCreateParams *params); +void dpiContext__initPoolCreateParams(dpiPoolCreateParams *params); +void dpiContext__initSodaOperOptions(dpiSodaOperOptions *options); +void dpiContext__initSubscrCreateParams(dpiSubscrCreateParams *params); + + +//----------------------------------------------------------------------------- +// definition of internal dpiDataBuffer methods +//----------------------------------------------------------------------------- +int dpiDataBuffer__fromOracleDate(dpiDataBuffer *data, + dpiOciDate *oracleValue); +int dpiDataBuffer__fromOracleDateAsDouble(dpiDataBuffer *data, + dpiEnv *env, dpiError *error, dpiOciDate *oracleValue); +int dpiDataBuffer__fromOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue); +int dpiDataBuffer__fromOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue); +int dpiDataBuffer__fromOracleNumberAsDouble(dpiDataBuffer *data, + dpiError *error, void *oracleValue); +int dpiDataBuffer__fromOracleNumberAsInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue); +int dpiDataBuffer__fromOracleNumberAsText(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue); +int dpiDataBuffer__fromOracleNumberAsUnsignedInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue); +int dpiDataBuffer__fromOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue, int withTZ); +int dpiDataBuffer__fromOracleTimestampAsDouble(dpiDataBuffer *data, + dpiEnv *env, dpiError *error, void *oracleValue); +int dpiDataBuffer__toOracleDate(dpiDataBuffer *data, dpiOciDate *oracleValue); +int dpiDataBuffer__toOracleDateFromDouble(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, dpiOciDate *oracleValue); +int dpiDataBuffer__toOracleIntervalDS(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue); +int dpiDataBuffer__toOracleIntervalYM(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue); +int dpiDataBuffer__toOracleNumberFromDouble(dpiDataBuffer *data, + dpiError *error, void *oracleValue); +int dpiDataBuffer__toOracleNumberFromInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue); +int dpiDataBuffer__toOracleNumberFromText(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue); +int dpiDataBuffer__toOracleNumberFromUnsignedInteger(dpiDataBuffer *data, + dpiError *error, void *oracleValue); +int dpiDataBuffer__toOracleTimestamp(dpiDataBuffer *data, dpiEnv *env, + dpiError *error, void *oracleValue, int withTZ); +int dpiDataBuffer__toOracleTimestampFromDouble(dpiDataBuffer *data, + dpiEnv *env, dpiError *error, void *oracleValue); + + +//----------------------------------------------------------------------------- +// definition of internal dpiEnv methods +//----------------------------------------------------------------------------- +void dpiEnv__free(dpiEnv *env, dpiError *error); +int dpiEnv__init(dpiEnv *env, const dpiContext *context, + const dpiCommonCreateParams *params, void *externalHandle, + dpiError *error); +int dpiEnv__getEncodingInfo(dpiEnv *env, dpiEncodingInfo *info); + + +//----------------------------------------------------------------------------- +// definition of internal dpiError methods +//----------------------------------------------------------------------------- +int dpiError__getInfo(dpiError *error, dpiErrorInfo *info); +int dpiError__initHandle(dpiError *error); +int dpiError__set(dpiError *error, const char *context, dpiErrorNum errorNum, + ...); +int dpiError__setFromOCI(dpiError *error, int status, dpiConn *conn, + const char *action); + + +//----------------------------------------------------------------------------- +// definition of internal dpiGen methods +//----------------------------------------------------------------------------- +int dpiGen__addRef(void *ptr, dpiHandleTypeNum typeNum, const char *fnName); +int dpiGen__allocate(dpiHandleTypeNum typeNum, dpiEnv *env, void **handle, + dpiError *error); +int dpiGen__checkHandle(const void *ptr, dpiHandleTypeNum typeNum, + const char *context, dpiError *error); +int dpiGen__endPublicFn(const void *ptr, int returnValue, dpiError *error); +int dpiGen__release(void *ptr, dpiHandleTypeNum typeNum, const char *fnName); +void dpiGen__setRefCount(void *ptr, dpiError *error, int increment); +int dpiGen__startPublicFn(const void *ptr, dpiHandleTypeNum typeNum, + const char *fnName, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiGlobal methods +//----------------------------------------------------------------------------- +int dpiGlobal__initError(const char *fnName, dpiError *error); +int dpiGlobal__lookupCharSet(const char *name, uint16_t *charsetId, + dpiError *error); +int dpiGlobal__lookupEncoding(uint16_t charsetId, char *encoding, + dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiOracleType methods +//----------------------------------------------------------------------------- +const dpiOracleType *dpiOracleType__getFromNum(dpiOracleTypeNum oracleTypeNum, + dpiError *error); +int dpiOracleType__populateTypeInfo(dpiConn *conn, void *handle, + uint32_t handleType, dpiDataTypeInfo *info, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiConn methods +//----------------------------------------------------------------------------- +int dpiConn__checkConnected(dpiConn *conn, dpiError *error); +int dpiConn__create(dpiConn *conn, const dpiContext *context, + const char *userName, uint32_t userNameLength, const char *password, + uint32_t passwordLength, const char *connectString, + uint32_t connectStringLength, dpiPool *pool, + const dpiCommonCreateParams *commonParams, + dpiConnCreateParams *createParams, dpiError *error); +void dpiConn__free(dpiConn *conn, dpiError *error); +int dpiConn__getRawTDO(dpiConn *conn, dpiError *error); +int dpiConn__getServerVersion(dpiConn *conn, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiPool methods +//----------------------------------------------------------------------------- +int dpiPool__acquireConnection(dpiPool *pool, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + dpiConnCreateParams *params, dpiConn **conn, dpiError *error); +void dpiPool__free(dpiPool *pool, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiStmt methods +//----------------------------------------------------------------------------- +int dpiStmt__allocate(dpiConn *conn, int scrollable, dpiStmt **stmt, + dpiError *error); +int dpiStmt__close(dpiStmt *stmt, const char *tag, uint32_t tagLength, + int propagateErrors, dpiError *error); +void dpiStmt__free(dpiStmt *stmt, dpiError *error); +int dpiStmt__init(dpiStmt *stmt, dpiError *error); +int dpiStmt__prepare(dpiStmt *stmt, const char *sql, uint32_t sqlLength, + const char *tag, uint32_t tagLength, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiVar methods +//----------------------------------------------------------------------------- +int dpiVar__allocate(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, + dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, + int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, + dpiData **data, dpiError *error); +int dpiVar__convertToLob(dpiVar *var, dpiError *error); +int dpiVar__copyData(dpiVar *var, uint32_t pos, dpiData *sourceData, + dpiError *error); +int32_t dpiVar__defineCallback(dpiVar *var, void *defnp, uint32_t iter, + void **bufpp, uint32_t **alenpp, uint8_t *piecep, void **indpp, + uint16_t **rcodepp); +int dpiVar__extendedPreFetch(dpiVar *var, dpiVarBuffer *buffer, + dpiError *error); +void dpiVar__free(dpiVar *var, dpiError *error); +int32_t dpiVar__inBindCallback(dpiVar *var, void *bindp, uint32_t iter, + uint32_t index, void **bufpp, uint32_t *alenp, uint8_t *piecep, + void **indpp); +int dpiVar__getValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, + int inFetch, dpiError *error); +int dpiVar__setValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, + dpiData *data, dpiError *error); +int32_t dpiVar__outBindCallback(dpiVar *var, void *bindp, uint32_t iter, + uint32_t index, void **bufpp, uint32_t **alenpp, uint8_t *piecep, + void **indpp, uint16_t **rcodepp); + + +//----------------------------------------------------------------------------- +// definition of internal dpiLob methods +//----------------------------------------------------------------------------- +int dpiLob__allocate(dpiConn *conn, const dpiOracleType *type, dpiLob **lob, + dpiError *error); +int dpiLob__close(dpiLob *lob, int propagateErrors, dpiError *error); +void dpiLob__free(dpiLob *lob, dpiError *error); +int dpiLob__readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, + char *value, uint64_t *valueLength, dpiError *error); +int dpiLob__setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength, + dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiObject methods +//----------------------------------------------------------------------------- +int dpiObject__allocate(dpiObjectType *objType, void *instance, + void *indicator, dpiObject *dependsOnObj, dpiObject **obj, + dpiError *error); +int dpiObject__close(dpiObject *obj, int propagateErrors, dpiError *error); +void dpiObject__free(dpiObject *obj, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiObjectType methods +//----------------------------------------------------------------------------- +int dpiObjectType__allocate(dpiConn *conn, void *param, + uint32_t nameAttribute, dpiObjectType **objType, dpiError *error); +void dpiObjectType__free(dpiObjectType *objType, dpiError *error); +int dpiObjectType__isXmlType(dpiObjectType *objType); + + +//----------------------------------------------------------------------------- +// definition of internal dpiObjectAttr methods +//----------------------------------------------------------------------------- +int dpiObjectAttr__allocate(dpiObjectType *objType, void *param, + dpiObjectAttr **attr, dpiError *error); +int dpiObjectAttr__check(dpiObjectAttr *attr, dpiError *error); +void dpiObjectAttr__free(dpiObjectAttr *attr, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiRowid methods +//----------------------------------------------------------------------------- +int dpiRowid__allocate(dpiConn *conn, dpiRowid **rowid, dpiError *error); +void dpiRowid__free(dpiRowid *rowid, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiSubscr methods +//----------------------------------------------------------------------------- +void dpiSubscr__free(dpiSubscr *subscr, dpiError *error); +int dpiSubscr__create(dpiSubscr *subscr, dpiConn *conn, + dpiSubscrCreateParams *params, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiDeqOptions methods +//----------------------------------------------------------------------------- +int dpiDeqOptions__create(dpiDeqOptions *options, dpiConn *conn, + dpiError *error); +void dpiDeqOptions__free(dpiDeqOptions *options, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiEnqOptions methods +//----------------------------------------------------------------------------- +int dpiEnqOptions__create(dpiEnqOptions *options, dpiConn *conn, + dpiError *error); +void dpiEnqOptions__free(dpiEnqOptions *options, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiSodaColl methods +//----------------------------------------------------------------------------- +int dpiSodaColl__allocate(dpiSodaDb *db, void *handle, dpiSodaColl **coll, + dpiError *error); +void dpiSodaColl__free(dpiSodaColl *coll, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiSodaCollCursor methods +//----------------------------------------------------------------------------- +int dpiSodaCollCursor__allocate(dpiSodaDb *db, void *handle, + dpiSodaCollCursor **cursor, dpiError *error); +void dpiSodaCollCursor__free(dpiSodaCollCursor *cursor, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiSodaDb methods +//----------------------------------------------------------------------------- +void dpiSodaDb__free(dpiSodaDb *db, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiSodaDoc methods +//----------------------------------------------------------------------------- +int dpiSodaDoc__allocate(dpiSodaDb *db, void *handle, dpiSodaDoc **doc, + dpiError *error); +void dpiSodaDoc__free(dpiSodaDoc *doc, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiSodaDocCursor methods +//----------------------------------------------------------------------------- +int dpiSodaDocCursor__allocate(dpiSodaColl *coll, void *handle, + dpiSodaDocCursor **cursor, dpiError *error); +void dpiSodaDocCursor__free(dpiSodaDocCursor *cursor, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiQueue methods +//----------------------------------------------------------------------------- +int dpiQueue__allocate(dpiConn *conn, const char *name, uint32_t nameLength, + dpiObjectType *payloadType, dpiQueue **queue, dpiError *error); +void dpiQueue__free(dpiQueue *queue, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiOci methods +//----------------------------------------------------------------------------- +int dpiOci__aqDeq(dpiConn *conn, const char *queueName, void *options, + void *msgProps, void *payloadType, void **payload, void **payloadInd, + void **msgId, dpiError *error); +int dpiOci__aqDeqArray(dpiConn *conn, const char *queueName, void *options, + uint32_t *numIters, void **msgProps, void *payloadType, void **payload, void **payloadInd, void **msgId, dpiError *error); +int dpiOci__aqEnq(dpiConn *conn, const char *queueName, void *options, + void *msgProps, void *payloadType, void **payload, void **payloadInd, + void **msgId, dpiError *error); +int dpiOci__aqEnqArray(dpiConn *conn, const char *queueName, void *options, + uint32_t *numIters, void **msgProps, void *payloadType, void **payload, + void **payloadInd, void **msgId, dpiError *error); +int dpiOci__arrayDescriptorAlloc(void *envHandle, void **handle, + uint32_t handleType, uint32_t arraySize, dpiError *error); +int dpiOci__arrayDescriptorFree(void **handle, uint32_t handleType); +int dpiOci__attrGet(const void *handle, uint32_t handleType, void *ptr, + uint32_t *size, uint32_t attribute, const char *action, + dpiError *error); +int dpiOci__attrSet(void *handle, uint32_t handleType, void *ptr, + uint32_t size, uint32_t attribute, const char *action, + dpiError *error); +int dpiOci__bindByName(dpiStmt *stmt, void **bindHandle, const char *name, + int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error); +int dpiOci__bindByName2(dpiStmt *stmt, void **bindHandle, const char *name, + int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error); +int dpiOci__bindByPos(dpiStmt *stmt, void **bindHandle, uint32_t pos, + int dynamicBind, dpiVar *var, dpiError *error); +int dpiOci__bindByPos2(dpiStmt *stmt, void **bindHandle, uint32_t pos, + int dynamicBind, dpiVar *var, dpiError *error); +int dpiOci__bindDynamic(dpiVar *var, void *bindHandle, dpiError *error); +int dpiOci__bindObject(dpiVar *var, void *bindHandle, dpiError *error); +int dpiOci__break(dpiConn *conn, dpiError *error); +void dpiOci__clientVersion(dpiContext *context); +int dpiOci__collAppend(dpiConn *conn, const void *elem, const void *elemInd, + void *coll, dpiError *error); +int dpiOci__collAssignElem(dpiConn *conn, int32_t index, const void *elem, + const void *elemInd, void *coll, dpiError *error); +int dpiOci__collGetElem(dpiConn *conn, void *coll, int32_t index, int *exists, + void **elem, void **elemInd, dpiError *error); +int dpiOci__collSize(dpiConn *conn, void *coll, int32_t *size, + dpiError *error); +int dpiOci__collTrim(dpiConn *conn, uint32_t numToTrim, void *coll, + dpiError *error); +int dpiOci__contextGetValue(dpiConn *conn, const char *key, uint32_t keyLength, + void **value, int checkError, dpiError *error); +int dpiOci__contextSetValue(dpiConn *conn, const char *key, uint32_t keyLength, + void *value, int checkError, dpiError *error); +int dpiOci__dateTimeConstruct(void *envHandle, void *handle, int16_t year, + uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, + uint8_t second, uint32_t fsecond, const char *tz, size_t tzLength, + dpiError *error); +int dpiOci__dateTimeConvert(void *envHandle, void *inDate, void *outDate, + dpiError *error); +int dpiOci__dateTimeGetDate(void *envHandle, void *handle, int16_t *year, + uint8_t *month, uint8_t *day, dpiError *error); +int dpiOci__dateTimeGetTime(void *envHandle, void *handle, uint8_t *hour, + uint8_t *minute, uint8_t *second, uint32_t *fsecond, dpiError *error); +int dpiOci__dateTimeGetTimeZoneOffset(void *envHandle, void *handle, + int8_t *tzHourOffset, int8_t *tzMinuteOffset, dpiError *error); +int dpiOci__dateTimeIntervalAdd(void *envHandle, void *handle, void *interval, + void *outHandle, dpiError *error); +int dpiOci__dateTimeSubtract(void *envHandle, void *handle1, void *handle2, + void *interval, dpiError *error); +int dpiOci__dbShutdown(dpiConn *conn, uint32_t mode, dpiError *error); +int dpiOci__dbStartup(dpiConn *conn, uint32_t mode, dpiError *error); +int dpiOci__defineByPos(dpiStmt *stmt, void **defineHandle, uint32_t pos, + dpiVar *var, dpiError *error); +int dpiOci__defineByPos2(dpiStmt *stmt, void **defineHandle, uint32_t pos, + dpiVar *var, dpiError *error); +int dpiOci__defineDynamic(dpiVar *var, void *defineHandle, dpiError *error); +int dpiOci__defineObject(dpiVar *var, void *defineHandle, dpiError *error); +int dpiOci__describeAny(dpiConn *conn, void *obj, uint32_t objLength, + uint8_t objType, void *describeHandle, dpiError *error); +int dpiOci__descriptorAlloc(void *envHandle, void **handle, + const uint32_t handleType, const char *action, dpiError *error); +int dpiOci__descriptorFree(void *handle, uint32_t handleType); +int dpiOci__envNlsCreate(void **envHandle, uint32_t mode, uint16_t charsetId, + uint16_t ncharsetId, dpiError *error); +int dpiOci__errorGet(void *handle, uint32_t handleType, uint16_t charsetId, + const char *action, dpiError *error); +int dpiOci__handleAlloc(void *envHandle, void **handle, uint32_t handleType, + const char *action, dpiError *error); +int dpiOci__handleFree(void *handle, uint32_t handleType); +int dpiOci__intervalGetDaySecond(void *envHandle, int32_t *day, int32_t *hour, + int32_t *minute, int32_t *second, int32_t *fsecond, + const void *interval, dpiError *error); +int dpiOci__intervalGetYearMonth(void *envHandle, int32_t *year, + int32_t *month, const void *interval, dpiError *error); +int dpiOci__intervalSetDaySecond(void *envHandle, int32_t day, int32_t hour, + int32_t minute, int32_t second, int32_t fsecond, void *interval, + dpiError *error); +int dpiOci__intervalSetYearMonth(void *envHandle, int32_t year, int32_t month, + void *interval, dpiError *error); +int dpiOci__lobClose(dpiLob *lob, dpiError *error); +int dpiOci__lobCreateTemporary(dpiLob *lob, dpiError *error); +int dpiOci__lobFileExists(dpiLob *lob, int *exists, dpiError *error); +int dpiOci__lobFileGetName(dpiLob *lob, char *dirAlias, + uint16_t *dirAliasLength, char *name, uint16_t *nameLength, + dpiError *error); +int dpiOci__lobFileSetName(dpiLob *lob, const char *dirAlias, + uint16_t dirAliasLength, const char *name, uint16_t nameLength, + dpiError *error); +int dpiOci__lobFreeTemporary(dpiConn *conn, void *lobLocator, int checkError, + dpiError *error); +int dpiOci__lobGetChunkSize(dpiLob *lob, uint32_t *size, dpiError *error); +int dpiOci__lobGetLength2(dpiLob *lob, uint64_t *size, dpiError *error); +int dpiOci__lobIsOpen(dpiLob *lob, int *isOpen, dpiError *error); +int dpiOci__lobIsTemporary(dpiLob *lob, int *isTemporary, int checkError, + dpiError *error); +int dpiOci__lobLocatorAssign(dpiLob *lob, void **copiedHandle, + dpiError *error); +int dpiOci__lobOpen(dpiLob *lob, dpiError *error); +int dpiOci__lobRead2(dpiLob *lob, uint64_t offset, uint64_t *amountInBytes, + uint64_t *amountInChars, char *buffer, uint64_t bufferLength, + dpiError *error); +int dpiOci__lobTrim2(dpiLob *lob, uint64_t newLength, dpiError *error); +int dpiOci__lobWrite2(dpiLob *lob, uint64_t offset, const char *value, + uint64_t valueLength, dpiError *error); +int dpiOci__memoryAlloc(dpiConn *conn, void **ptr, uint32_t size, + int checkError, dpiError *error); +int dpiOci__memoryFree(dpiConn *conn, void *ptr, dpiError *error); +int dpiOci__nlsCharSetConvert(void *envHandle, uint16_t destCharsetId, + char *dest, size_t destLength, uint16_t sourceCharsetId, + const char *source, size_t sourceLength, size_t *resultSize, + dpiError *error); +int dpiOci__nlsCharSetIdToName(void *envHandle, char *buf, size_t bufLength, + uint16_t charsetId, dpiError *error); +int dpiOci__nlsCharSetNameToId(void *envHandle, const char *name, + uint16_t *charsetId, dpiError *error); +int dpiOci__nlsEnvironmentVariableGet(uint16_t item, void *value, + dpiError *error); +int dpiOci__nlsNameMap(void *envHandle, char *buf, size_t bufLength, + const char *source, uint32_t flag, dpiError *error); +int dpiOci__nlsNumericInfoGet(void *envHandle, int32_t *value, uint16_t item, + dpiError *error); +int dpiOci__numberFromInt(const void *value, unsigned int valueLength, + unsigned int flags, void *number, dpiError *error); +int dpiOci__numberFromReal(const double value, void *number, dpiError *error); +int dpiOci__numberToInt(void *number, void *value, unsigned int valueLength, + unsigned int flags, dpiError *error); +int dpiOci__numberToReal(double *value, void *number, dpiError *error); +int dpiOci__objectCopy(dpiObject *obj, void *sourceInstance, + void *sourceIndicator, dpiError *error); +int dpiOci__objectFree(void *envHandle, void *data, int checkError, + dpiError *error); +int dpiOci__objectGetAttr(dpiObject *obj, dpiObjectAttr *attr, + int16_t *scalarValueIndicator, void **valueIndicator, void **value, + void **tdo, dpiError *error); +int dpiOci__objectGetInd(dpiObject *obj, dpiError *error); +int dpiOci__objectNew(dpiObject *obj, dpiError *error); +int dpiOci__objectPin(void *envHandle, void *objRef, void **obj, + dpiError *error); +int dpiOci__objectSetAttr(dpiObject *obj, dpiObjectAttr *attr, + int16_t scalarValueIndicator, void *valueIndicator, const void *value, + dpiError *error); +int dpiOci__paramGet(const void *handle, uint32_t handleType, void **parameter, + uint32_t pos, const char *action, dpiError *error); +int dpiOci__passwordChange(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *oldPassword, + uint32_t oldPasswordLength, const char *newPassword, + uint32_t newPasswordLength, uint32_t mode, dpiError *error); +int dpiOci__ping(dpiConn *conn, dpiError *error); +int dpiOci__rawAssignBytes(void *envHandle, const char *value, + uint32_t valueLength, void **handle, dpiError *error); +int dpiOci__rawPtr(void *envHandle, void *handle, void **ptr); +int dpiOci__rawResize(void *envHandle, void **handle, uint32_t newSize, + dpiError *error); +int dpiOci__rawSize(void *envHandle, void *handle, uint32_t *size); +int dpiOci__rowidToChar(dpiRowid *rowid, char *buffer, uint16_t *bufferSize, + dpiError *error); +int dpiOci__serverAttach(dpiConn *conn, const char *connectString, + uint32_t connectStringLength, dpiError *error); +int dpiOci__serverDetach(dpiConn *conn, int checkError, dpiError *error); +int dpiOci__serverRelease(dpiConn *conn, char *buffer, uint32_t bufferSize, + uint32_t *version, dpiError *error); +int dpiOci__sessionBegin(dpiConn *conn, uint32_t credentialType, + uint32_t mode, dpiError *error); +int dpiOci__sessionEnd(dpiConn *conn, int checkError, dpiError *error); +int dpiOci__sessionGet(void *envHandle, void **handle, void *authInfo, + const char *connectString, uint32_t connectStringLength, + const char *tag, uint32_t tagLength, const char **outTag, + uint32_t *outTagLength, int *found, uint32_t mode, dpiError *error); +int dpiOci__sessionPoolCreate(dpiPool *pool, const char *connectString, + uint32_t connectStringLength, uint32_t minSessions, + uint32_t maxSessions, uint32_t sessionIncrement, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + uint32_t mode, dpiError *error); +int dpiOci__sessionPoolDestroy(dpiPool *pool, uint32_t mode, int checkError, + dpiError *error); +int dpiOci__sessionRelease(dpiConn *conn, const char *tag, uint32_t tagLength, + uint32_t mode, int checkError, dpiError *error); +int dpiOci__shardingKeyColumnAdd(void *shardingKey, void *col, uint32_t colLen, + uint16_t colType, dpiError *error); +int dpiOci__sodaBulkInsert(dpiSodaColl *coll, void **documents, + uint32_t numDocuments, void *outputOptions, uint32_t mode, + dpiError *error); +int dpiOci__sodaBulkInsertAndGet(dpiSodaColl *coll, void **documents, + uint32_t numDocuments, void *outputOptions, uint32_t mode, + dpiError *error); +int dpiOci__sodaCollCreateWithMetadata(dpiSodaDb *db, const char *name, + uint32_t nameLength, const char *metadata, uint32_t metadataLength, + uint32_t mode, void **handle, dpiError *error); +int dpiOci__sodaCollDrop(dpiSodaColl *coll, int *isDropped, uint32_t mode, + dpiError *error); +int dpiOci__sodaCollGetNext(dpiConn *conn, void *cursorHandle, + void **collectionHandle, uint32_t mode, dpiError *error); +int dpiOci__sodaCollList(dpiSodaDb *db, const char *startingName, + uint32_t startingNameLength, void **handle, uint32_t mode, + dpiError *error); +int dpiOci__sodaCollOpen(dpiSodaDb *db, const char *name, uint32_t nameLength, + uint32_t mode, void **handle, dpiError *error); +int dpiOci__sodaDataGuideGet(dpiSodaColl *coll, void **handle, uint32_t mode, + dpiError *error); +int dpiOci__sodaDocCount(dpiSodaColl *coll, void *options, uint32_t mode, + uint64_t *count, dpiError *error); +int dpiOci__sodaDocGetNext(dpiSodaDocCursor *cursor, void **handle, + uint32_t mode, dpiError *error); +int dpiOci__sodaFind(dpiSodaColl *coll, const void *options, uint32_t flags, + uint32_t mode, void **handle, dpiError *error); +int dpiOci__sodaFindOne(dpiSodaColl *coll, const void *options, uint32_t flags, + uint32_t mode, void **handle, dpiError *error); +int dpiOci__sodaIndexCreate(dpiSodaColl *coll, const char *indexSpec, + uint32_t indexSpecLength, uint32_t mode, dpiError *error); +int dpiOci__sodaIndexDrop(dpiSodaColl *coll, const char *name, + uint32_t nameLength, uint32_t mode, int *isDropped, dpiError *error); +int dpiOci__sodaInsert(dpiSodaColl *coll, void *handle, uint32_t mode, + dpiError *error); +int dpiOci__sodaInsertAndGet(dpiSodaColl *coll, void **handle, uint32_t mode, + dpiError *error); +int dpiOci__sodaOperKeysSet(const dpiSodaOperOptions *options, void *handle, + dpiError *error); +int dpiOci__sodaRemove(dpiSodaColl *coll, void *options, uint32_t mode, + uint64_t *count, dpiError *error); +int dpiOci__sodaReplOne(dpiSodaColl *coll, const void *options, void *handle, + uint32_t mode, int *isReplaced, dpiError *error); +int dpiOci__sodaReplOneAndGet(dpiSodaColl *coll, const void *options, + void **handle, uint32_t mode, int *isReplaced, dpiError *error); +int dpiOci__sodaSave(dpiSodaColl *coll, void *handle, uint32_t mode, + dpiError *error); +int dpiOci__sodaSaveAndGet(dpiSodaColl *coll, void **handle, uint32_t mode, + dpiError *error); +int dpiOci__stmtExecute(dpiStmt *stmt, uint32_t numIters, uint32_t mode, + dpiError *error); +int dpiOci__stmtFetch2(dpiStmt *stmt, uint32_t numRows, uint16_t fetchMode, + int32_t offset, dpiError *error); +int dpiOci__stmtGetBindInfo(dpiStmt *stmt, uint32_t size, uint32_t startLoc, + int32_t *numFound, char *names[], uint8_t nameLengths[], + char *indNames[], uint8_t indNameLengths[], uint8_t isDuplicate[], + void *bindHandles[], dpiError *error); +int dpiOci__stmtGetNextResult(dpiStmt *stmt, void **handle, dpiError *error); +int dpiOci__stmtPrepare2(dpiStmt *stmt, const char *sql, uint32_t sqlLength, + const char *tag, uint32_t tagLength, dpiError *error); +int dpiOci__stmtRelease(dpiStmt *stmt, const char *tag, uint32_t tagLength, + int checkError, dpiError *error); +int dpiOci__stringAssignText(void *envHandle, const char *value, + uint32_t valueLength, void **handle, dpiError *error); +int dpiOci__stringPtr(void *envHandle, void *handle, char **ptr); +int dpiOci__stringResize(void *envHandle, void **handle, uint32_t newSize, + dpiError *error); +int dpiOci__stringSize(void *envHandle, void *handle, uint32_t *size); +int dpiOci__subscriptionRegister(dpiConn *conn, void **handle, uint32_t mode, + dpiError *error); +int dpiOci__subscriptionUnRegister(dpiConn *conn, dpiSubscr *subscr, + dpiError *error); +int dpiOci__tableDelete(dpiObject *obj, int32_t index, dpiError *error); +int dpiOci__tableExists(dpiObject *obj, int32_t index, int *exists, + dpiError *error); +int dpiOci__tableFirst(dpiObject *obj, int32_t *index, dpiError *error); +int dpiOci__tableLast(dpiObject *obj, int32_t *index, dpiError *error); +int dpiOci__tableNext(dpiObject *obj, int32_t index, int32_t *nextIndex, + int *exists, dpiError *error); +int dpiOci__tablePrev(dpiObject *obj, int32_t index, int32_t *prevIndex, + int *exists, dpiError *error); +int dpiOci__tableSize(dpiObject *obj, int32_t *size, dpiError *error); +int dpiOci__threadKeyDestroy(void *envHandle, void *errorHandle, void **key, + dpiError *error); +int dpiOci__threadKeyGet(void *envHandle, void *errorHandle, void *key, + void **value, dpiError *error); +int dpiOci__threadKeyInit(void *envHandle, void *errorHandle, void **key, + void *destroyFunc, dpiError *error); +int dpiOci__threadKeySet(void *envHandle, void *errorHandle, void *key, + void *value, dpiError *error); +int dpiOci__transCommit(dpiConn *conn, uint32_t flags, dpiError *error); +int dpiOci__transPrepare(dpiConn *conn, int *commitNeeded, dpiError *error); +int dpiOci__transRollback(dpiConn *conn, int checkError, dpiError *error); +int dpiOci__transStart(dpiConn *conn, dpiError *error); +int dpiOci__typeByFullName(dpiConn *conn, const char *name, + uint32_t nameLength, void **tdo, dpiError *error); +int dpiOci__typeByName(dpiConn *conn, const char *schema, + uint32_t schemaLength, const char *name, uint32_t nameLength, + void **tdo, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiMsgProps methods +//----------------------------------------------------------------------------- +int dpiMsgProps__allocate(dpiConn *conn, dpiMsgProps **props, dpiError *error); +void dpiMsgProps__extractMsgId(dpiMsgProps *props, const char **msgId, + uint32_t *msgIdLength); +void dpiMsgProps__free(dpiMsgProps *props, dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiHandlePool methods +//----------------------------------------------------------------------------- +int dpiHandlePool__acquire(dpiHandlePool *pool, void **handle, + dpiError *error); +int dpiHandlePool__create(dpiHandlePool **pool, dpiError *error); +void dpiHandlePool__free(dpiHandlePool *pool); +void dpiHandlePool__release(dpiHandlePool *pool, void **handle); + + +//----------------------------------------------------------------------------- +// definition of internal dpiHandleList methods +//----------------------------------------------------------------------------- +int dpiHandleList__addHandle(dpiHandleList *list, void *handle, + uint32_t *slotNum, dpiError *error); +int dpiHandleList__create(dpiHandleList **list, dpiError *error); +void dpiHandleList__free(dpiHandleList *list); +void dpiHandleList__removeHandle(dpiHandleList *list, uint32_t slotNum); + + +//----------------------------------------------------------------------------- +// definition of internal dpiUtils methods +//----------------------------------------------------------------------------- +int dpiUtils__allocateMemory(size_t numMembers, size_t memberSize, + int clearMemory, const char *action, void **ptr, dpiError *error); +int dpiUtils__checkClientVersion(dpiVersionInfo *versionInfo, + int minVersionNum, int minReleaseNum, dpiError *error); +int dpiUtils__checkDatabaseVersion(dpiConn *conn, int minVersionNum, + int minReleaseNum, dpiError *error); +void dpiUtils__clearMemory(void *ptr, size_t length); +void dpiUtils__freeMemory(void *ptr); +int dpiUtils__getAttrStringWithDup(const char *action, const void *ociHandle, + uint32_t ociHandleType, uint32_t ociAttribute, const char **value, + uint32_t *valueLength, dpiError *error); +int dpiUtils__parseNumberString(const char *value, uint32_t valueLength, + uint16_t charsetId, int *isNegative, int16_t *decimalPointIndex, + uint8_t *numDigits, uint8_t *digits, dpiError *error); +int dpiUtils__parseOracleNumber(void *oracleValue, int *isNegative, + int16_t *decimalPointIndex, uint8_t *numDigits, uint8_t *digits, + dpiError *error); +int dpiUtils__setAttributesFromCommonCreateParams(void *handle, + uint32_t handleType, const dpiCommonCreateParams *params, + dpiError *error); + + +//----------------------------------------------------------------------------- +// definition of internal dpiDebug methods +//----------------------------------------------------------------------------- +void dpiDebug__initialize(void); +void dpiDebug__print(const char *format, ...); + +#endif diff --git a/vendor/github.com/godror/godror/odpi/src/dpiLob.c b/vendor/github.com/godror/godror/odpi/src/dpiLob.c new file mode 100644 index 00000000000..55dfcebad6e --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiLob.c @@ -0,0 +1,504 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiLob.c +// Implementation of LOB data. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiLob__allocate() [INTERNAL] +// Allocate and initialize LOB object. +//----------------------------------------------------------------------------- +int dpiLob__allocate(dpiConn *conn, const dpiOracleType *type, dpiLob **lob, + dpiError *error) +{ + dpiLob *tempLob; + + if (dpiGen__allocate(DPI_HTYPE_LOB, conn->env, (void**) &tempLob, + error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(conn, error, 1); + tempLob->conn = conn; + tempLob->type = type; + if (dpiOci__descriptorAlloc(conn->env->handle, &tempLob->locator, + DPI_OCI_DTYPE_LOB, "allocate descriptor", error) < 0) { + dpiLob__free(tempLob, error); + return DPI_FAILURE; + } + if (dpiHandleList__addHandle(conn->openLobs, tempLob, + &tempLob->openSlotNum, error) < 0) { + dpiOci__descriptorFree(tempLob->locator, DPI_OCI_DTYPE_LOB); + tempLob->locator = NULL; + dpiLob__free(tempLob, error); + return DPI_FAILURE; + } + + *lob = tempLob; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiLob__check() [INTERNAL] +// Check that the LOB is valid and get an error handle for subsequent calls. +//----------------------------------------------------------------------------- +static int dpiLob__check(dpiLob *lob, const char *fnName, dpiError *error) +{ + if (dpiGen__startPublicFn(lob, DPI_HTYPE_LOB, fnName, error) < 0) + return DPI_FAILURE; + if (!lob->locator) + return dpiError__set(error, "check closed", DPI_ERR_LOB_CLOSED); + return dpiConn__checkConnected(lob->conn, error); +} + + +//----------------------------------------------------------------------------- +// dpiLob__close() [INTERNAL] +// Internal method used for closing the LOB. +//----------------------------------------------------------------------------- +int dpiLob__close(dpiLob *lob, int propagateErrors, dpiError *error) +{ + int isTemporary, closing, status = DPI_SUCCESS; + + // determine whether LOB is already being closed and if not, mark LOB as + // being closed; this MUST be done while holding the lock (if in threaded + // mode) to avoid race conditions! + if (lob->env->threaded) + dpiMutex__acquire(lob->env->mutex); + closing = lob->closing; + lob->closing = 1; + if (lob->env->threaded) + dpiMutex__release(lob->env->mutex); + + // if LOB is already being closed, nothing needs to be done + if (closing) + return DPI_SUCCESS; + + // perform actual work of closing LOB + if (lob->locator) { + if (!lob->conn->deadSession && lob->conn->handle) { + status = dpiOci__lobIsTemporary(lob, &isTemporary, propagateErrors, + error); + if (isTemporary && status == DPI_SUCCESS) + status = dpiOci__lobFreeTemporary(lob->conn, + lob->locator, propagateErrors, error); + } + dpiOci__descriptorFree(lob->locator, DPI_OCI_DTYPE_LOB); + if (!lob->conn->closing) + dpiHandleList__removeHandle(lob->conn->openLobs, lob->openSlotNum); + lob->locator = NULL; + } + if (lob->buffer) { + dpiUtils__freeMemory(lob->buffer); + lob->buffer = NULL; + } + + // if actual close fails, reset closing flag; again, this must be done + // while holding the lock (if in threaded mode) in order to avoid race + // conditions! + if (status < 0) { + if (lob->env->threaded) + dpiMutex__acquire(lob->env->mutex); + lob->closing = 0; + if (lob->env->threaded) + dpiMutex__release(lob->env->mutex); + } + + return status; +} + + +//----------------------------------------------------------------------------- +// dpiLob__free() [INTERNAL] +// Free the memory for a LOB. +//----------------------------------------------------------------------------- +void dpiLob__free(dpiLob *lob, dpiError *error) +{ + dpiLob__close(lob, 0, error); + if (lob->conn) { + dpiGen__setRefCount(lob->conn, error, -1); + lob->conn = NULL; + } + dpiUtils__freeMemory(lob); +} + + +//----------------------------------------------------------------------------- +// dpiLob__readBytes() [INTERNAL] +// Return a portion (or all) of the data in the LOB. +//----------------------------------------------------------------------------- +int dpiLob__readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, + char *value, uint64_t *valueLength, dpiError *error) +{ + uint64_t lengthInBytes = 0, lengthInChars = 0; + int isOpen = 0; + + // amount is in characters for character LOBs and bytes for binary LOBs + if (lob->type->isCharacterData) + lengthInChars = amount; + else lengthInBytes = amount; + + // for files, open the file if needed + if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BFILE) { + if (dpiOci__lobIsOpen(lob, &isOpen, error) < 0) + return DPI_FAILURE; + if (!isOpen) { + if (dpiOci__lobOpen(lob, error) < 0) + return DPI_FAILURE; + } + } + + // read the bytes from the LOB + if (dpiOci__lobRead2(lob, offset, &lengthInBytes, &lengthInChars, + value, *valueLength, error) < 0) + return DPI_FAILURE; + *valueLength = lengthInBytes; + + // if file was opened in this routine, close it again + if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BFILE && !isOpen) { + if (dpiOci__lobClose(lob, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiLob__setFromBytes() [INTERNAL] +// Clear the LOB completely and then write the specified bytes to it. +//----------------------------------------------------------------------------- +int dpiLob__setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength, + dpiError *error) +{ + if (dpiOci__lobTrim2(lob, 0, error) < 0) + return DPI_FAILURE; + if (valueLength == 0) + return DPI_SUCCESS; + return dpiOci__lobWrite2(lob, 1, value, valueLength, error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_addRef() [PUBLIC] +// Add a reference to the LOB. +//----------------------------------------------------------------------------- +int dpiLob_addRef(dpiLob *lob) +{ + return dpiGen__addRef(lob, DPI_HTYPE_LOB, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiLob_close() [PUBLIC] +// Close the LOB and make it unusable for further operations. +//----------------------------------------------------------------------------- +int dpiLob_close(dpiLob *lob) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + status = dpiLob__close(lob, 1, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_closeResource() [PUBLIC] +// Close the LOB's resources. +//----------------------------------------------------------------------------- +int dpiLob_closeResource(dpiLob *lob) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + status = dpiOci__lobClose(lob, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_copy() [PUBLIC] +// Create a copy of the LOB and return it. +//----------------------------------------------------------------------------- +int dpiLob_copy(dpiLob *lob, dpiLob **copiedLob) +{ + dpiLob *tempLob; + dpiError error; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, copiedLob) + if (dpiLob__allocate(lob->conn, lob->type, &tempLob, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + if (dpiOci__lobLocatorAssign(lob, &tempLob->locator, &error) < 0) { + dpiLob__free(tempLob, &error); + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + } + *copiedLob = tempLob; + return dpiGen__endPublicFn(lob, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_getBufferSize() [PUBLIC] +// Get the required size of a buffer given the number of characters. If the +// LOB does not refer to a character LOB the value is returned unchanged. +//----------------------------------------------------------------------------- +int dpiLob_getBufferSize(dpiLob *lob, uint64_t sizeInChars, + uint64_t *sizeInBytes) +{ + dpiError error; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, sizeInBytes) + if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_CLOB) + *sizeInBytes = sizeInChars * lob->env->maxBytesPerCharacter; + else if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_NCLOB) + *sizeInBytes = sizeInChars * lob->env->nmaxBytesPerCharacter; + else *sizeInBytes = sizeInChars; + return dpiGen__endPublicFn(lob, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_getChunkSize() [PUBLIC] +// Return the chunk size associated with the LOB. +//----------------------------------------------------------------------------- +int dpiLob_getChunkSize(dpiLob *lob, uint32_t *size) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, size) + status = dpiOci__lobGetChunkSize(lob, size, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_getDirectoryAndFileName() [PUBLIC] +// Return the directory alias and file name for the BFILE lob. +//----------------------------------------------------------------------------- +int dpiLob_getDirectoryAndFileName(dpiLob *lob, const char **directoryAlias, + uint32_t *directoryAliasLength, const char **fileName, + uint32_t *fileNameLength) +{ + uint16_t ociDirectoryAliasLength, ociFileNameLength; + dpiError error; + + // validate parameters + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, directoryAlias) + DPI_CHECK_PTR_NOT_NULL(lob, directoryAliasLength) + DPI_CHECK_PTR_NOT_NULL(lob, fileName) + DPI_CHECK_PTR_NOT_NULL(lob, fileNameLength) + + // get directory and file name + ociDirectoryAliasLength = 30; + ociFileNameLength = 255; + if (!lob->buffer) { + if (dpiUtils__allocateMemory(1, + ociDirectoryAliasLength + ociFileNameLength, 0, + "allocate name buffer", (void**) &lob->buffer, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + } + *directoryAlias = lob->buffer; + *fileName = lob->buffer + ociDirectoryAliasLength; + if (dpiOci__lobFileGetName(lob, (char*) *directoryAlias, + &ociDirectoryAliasLength, (char*) *fileName, &ociFileNameLength, + &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + *directoryAliasLength = ociDirectoryAliasLength; + *fileNameLength = ociFileNameLength; + return dpiGen__endPublicFn(lob, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_getFileExists() [PUBLIC] +// Return whether or not the file pointed to by the locator exists. +//----------------------------------------------------------------------------- +int dpiLob_getFileExists(dpiLob *lob, int *exists) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, exists) + status = dpiOci__lobFileExists(lob, exists, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_getIsResourceOpen() [PUBLIC] +// Return whether or not the LOB' resources are open. +//----------------------------------------------------------------------------- +int dpiLob_getIsResourceOpen(dpiLob *lob, int *isOpen) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, isOpen) + status = dpiOci__lobIsOpen(lob, isOpen, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_getSize() [PUBLIC] +// Returns the size of the LOB. +//----------------------------------------------------------------------------- +int dpiLob_getSize(dpiLob *lob, uint64_t *size) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, size) + status = dpiOci__lobGetLength2(lob, size, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_openResource() [PUBLIC] +// Open the LOB's resources to speed further accesses. +//----------------------------------------------------------------------------- +int dpiLob_openResource(dpiLob *lob) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + status = dpiOci__lobOpen(lob, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_readBytes() [PUBLIC] +// Return a portion (or all) of the data in the LOB. +//----------------------------------------------------------------------------- +int dpiLob_readBytes(dpiLob *lob, uint64_t offset, uint64_t amount, + char *value, uint64_t *valueLength) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, value) + DPI_CHECK_PTR_NOT_NULL(lob, valueLength) + status = dpiLob__readBytes(lob, offset, amount, value, valueLength, + &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_release() [PUBLIC] +// Release a reference to the LOB. +//----------------------------------------------------------------------------- +int dpiLob_release(dpiLob *lob) +{ + return dpiGen__release(lob, DPI_HTYPE_LOB, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiLob_setDirectoryAndFileName() [PUBLIC] +// Set the directory alias and file name for the BFILE LOB. +//----------------------------------------------------------------------------- +int dpiLob_setDirectoryAndFileName(dpiLob *lob, const char *directoryAlias, + uint32_t directoryAliasLength, const char *fileName, + uint32_t fileNameLength) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, directoryAlias) + DPI_CHECK_PTR_NOT_NULL(lob, fileName) + status = dpiOci__lobFileSetName(lob, directoryAlias, + (uint16_t) directoryAliasLength, fileName, + (uint16_t) fileNameLength, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_setFromBytes() [PUBLIC] +// Clear the LOB completely and then write the specified bytes to it. +//----------------------------------------------------------------------------- +int dpiLob_setFromBytes(dpiLob *lob, const char *value, uint64_t valueLength) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(lob, value) + status = dpiLob__setFromBytes(lob, value, valueLength, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_trim() [PUBLIC] +// Trim the LOB to the specified length. +//----------------------------------------------------------------------------- +int dpiLob_trim(dpiLob *lob, uint64_t newSize) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + status = dpiOci__lobTrim2(lob, newSize, &error); + return dpiGen__endPublicFn(lob, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiLob_writeBytes() [PUBLIC] +// Write the data to the LOB at the offset specified. +//----------------------------------------------------------------------------- +int dpiLob_writeBytes(dpiLob *lob, uint64_t offset, const char *value, + uint64_t valueLength) +{ + dpiError error; + int status; + + if (dpiLob__check(lob, __func__, &error) < 0) + return dpiGen__endPublicFn(lob, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(lob, value) + status = dpiOci__lobWrite2(lob, offset, value, valueLength, &error); + return dpiGen__endPublicFn(lob, status, &error); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c b/vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c new file mode 100644 index 00000000000..518d2e7d20b --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiMsgProps.c @@ -0,0 +1,487 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiMsgProps.c +// Implementation of AQ message properties. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiMsgProps__allocate() [INTERNAL] +// Create a new message properties structure and return it. In case of error +// NULL is returned. +//----------------------------------------------------------------------------- +int dpiMsgProps__allocate(dpiConn *conn, dpiMsgProps **props, dpiError *error) +{ + dpiMsgProps *tempProps; + + if (dpiGen__allocate(DPI_HTYPE_MSG_PROPS, conn->env, (void**) &tempProps, + error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(conn, error, 1); + tempProps->conn = conn; + if (dpiOci__descriptorAlloc(conn->env->handle, &tempProps->handle, + DPI_OCI_DTYPE_AQMSG_PROPERTIES, "allocate descriptor", + error) < 0) { + dpiMsgProps__free(tempProps, error); + return DPI_FAILURE; + } + + *props = tempProps; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps__extractMsgId() [INTERNAL] +// Extract bytes from the OCIRaw value containing the message id. +//----------------------------------------------------------------------------- +void dpiMsgProps__extractMsgId(dpiMsgProps *props, const char **msgId, + uint32_t *msgIdLength) +{ + dpiOci__rawPtr(props->env->handle, props->msgIdRaw, (void**) msgId); + dpiOci__rawSize(props->env->handle, props->msgIdRaw, msgIdLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps__free() [INTERNAL] +// Free the memory for a message properties structure. +//----------------------------------------------------------------------------- +void dpiMsgProps__free(dpiMsgProps *props, dpiError *error) +{ + if (props->handle) { + dpiOci__descriptorFree(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES); + props->handle = NULL; + } + if (props->payloadObj) { + dpiGen__setRefCount(props->payloadObj, error, -1); + props->payloadObj = NULL; + } + if (props->payloadRaw) { + dpiOci__rawResize(props->env->handle, &props->payloadRaw, 0, error); + props->payloadRaw = NULL; + } + if (props->msgIdRaw) { + dpiOci__rawResize(props->env->handle, &props->msgIdRaw, 0, error); + props->msgIdRaw = NULL; + } + if (props->conn) { + dpiGen__setRefCount(props->conn, error, -1); + props->conn = NULL; + } + dpiUtils__freeMemory(props); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps__getAttrValue() [INTERNAL] +// Get the attribute value in OCI. +//----------------------------------------------------------------------------- +static int dpiMsgProps__getAttrValue(dpiMsgProps *props, uint32_t attribute, + const char *fnName, void *value, uint32_t *valueLength) +{ + dpiError error; + int status; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, fnName, &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(props, value) + DPI_CHECK_PTR_NOT_NULL(props, valueLength) + status = dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, + value, valueLength, attribute, "get attribute value", &error); + return dpiGen__endPublicFn(props, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps__setAttrValue() [INTERNAL] +// Set the attribute value in OCI. +//----------------------------------------------------------------------------- +static int dpiMsgProps__setAttrValue(dpiMsgProps *props, uint32_t attribute, + const char *fnName, const void *value, uint32_t valueLength) +{ + dpiError error; + int status; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, fnName, &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(props, value) + status = dpiOci__attrSet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, + (void*) value, valueLength, attribute, "set attribute value", + &error); + return dpiGen__endPublicFn(props, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_addRef() [PUBLIC] +// Add a reference to the message properties. +//----------------------------------------------------------------------------- +int dpiMsgProps_addRef(dpiMsgProps *props) +{ + return dpiGen__addRef(props, DPI_HTYPE_MSG_PROPS, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getCorrelation() [PUBLIC] +// Return correlation associated with the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_getCorrelation(dpiMsgProps *props, const char **value, + uint32_t *valueLength) +{ + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_CORRELATION, __func__, + (void*) value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getDelay() [PUBLIC] +// Return the number of seconds the message was delayed. +//----------------------------------------------------------------------------- +int dpiMsgProps_getDelay(dpiMsgProps *props, int32_t *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_DELAY, __func__, + value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getDeliveryMode() [PUBLIC] +// Return the mode used for delivering the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_getDeliveryMode(dpiMsgProps *props, + dpiMessageDeliveryMode *value) +{ + uint32_t valueLength = sizeof(uint16_t); + + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_MSG_DELIVERY_MODE, + __func__, value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getEnqTime() [PUBLIC] +// Return the time the message was enqueued. +//----------------------------------------------------------------------------- +int dpiMsgProps_getEnqTime(dpiMsgProps *props, dpiTimestamp *value) +{ + dpiOciDate ociValue; + dpiError error; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(props, value) + if (dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, + &ociValue, NULL, DPI_OCI_ATTR_ENQ_TIME, "get attribute value", + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + value->year = ociValue.year; + value->month = ociValue.month; + value->day = ociValue.day; + value->hour = ociValue.hour; + value->minute = ociValue.minute; + value->second = ociValue.second; + value->fsecond = 0; + value->tzHourOffset = 0; + value->tzMinuteOffset = 0; + return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getExceptionQ() [PUBLIC] +// Return the name of the exception queue associated with the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_getExceptionQ(dpiMsgProps *props, const char **value, + uint32_t *valueLength) +{ + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_EXCEPTION_QUEUE, + __func__, (void*) value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getExpiration() [PUBLIC] +// Return the number of seconds until the message expires. +//----------------------------------------------------------------------------- +int dpiMsgProps_getExpiration(dpiMsgProps *props, int32_t *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_EXPIRATION, __func__, + value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getNumAttempts() [PUBLIC] +// Return the number of attempts made to deliver the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_getNumAttempts(dpiMsgProps *props, int32_t *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_ATTEMPTS, __func__, + value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getMsgId() [PUBLIC] +// Return the message id for the message (available after enqueuing or +// dequeuing a message). +//----------------------------------------------------------------------------- +int dpiMsgProps_getMsgId(dpiMsgProps *props, const char **value, + uint32_t *valueLength) +{ + dpiError error; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(props, value) + DPI_CHECK_PTR_NOT_NULL(props, valueLength) + if (!props->msgIdRaw) { + *value = NULL; + *valueLength = 0; + } else { + dpiOci__rawPtr(props->env->handle, props->msgIdRaw, (void**) value); + dpiOci__rawSize(props->env->handle, props->msgIdRaw, valueLength); + } + return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getOriginalMsgId() [PUBLIC] +// Return the original message id for the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_getOriginalMsgId(dpiMsgProps *props, const char **value, + uint32_t *valueLength) +{ + dpiError error; + void *rawValue; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(props, value) + DPI_CHECK_PTR_NOT_NULL(props, valueLength) + if (dpiOci__attrGet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, + &rawValue, NULL, DPI_OCI_ATTR_ORIGINAL_MSGID, + "get attribute value", &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + dpiOci__rawPtr(props->env->handle, rawValue, (void**) value); + dpiOci__rawSize(props->env->handle, rawValue, valueLength); + return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getPayload() [PUBLIC] +// Get the payload for the message (as an object or a series of bytes). +//----------------------------------------------------------------------------- +int dpiMsgProps_getPayload(dpiMsgProps *props, dpiObject **obj, + const char **value, uint32_t *valueLength) +{ + dpiError error; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + if (obj) + *obj = props->payloadObj; + if (value && valueLength) { + if (props->payloadRaw) { + dpiOci__rawPtr(props->env->handle, props->payloadRaw, + (void**) value); + dpiOci__rawSize(props->env->handle, props->payloadRaw, + valueLength); + } else { + *value = NULL; + *valueLength = 0; + } + } + + return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getPriority() [PUBLIC] +// Return the priority of the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_getPriority(dpiMsgProps *props, int32_t *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_PRIORITY, __func__, + value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_getState() [PUBLIC] +// Return the state of the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_getState(dpiMsgProps *props, dpiMessageState *value) +{ + uint32_t valueLength = sizeof(uint32_t); + + + return dpiMsgProps__getAttrValue(props, DPI_OCI_ATTR_MSG_STATE, __func__, + value, &valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_release() [PUBLIC] +// Release a reference to the message properties. +//----------------------------------------------------------------------------- +int dpiMsgProps_release(dpiMsgProps *props) +{ + return dpiGen__release(props, DPI_HTYPE_MSG_PROPS, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setCorrelation() [PUBLIC] +// Set correlation associated with the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_setCorrelation(dpiMsgProps *props, const char *value, + uint32_t valueLength) +{ + return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_CORRELATION, __func__, + value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setDelay() [PUBLIC] +// Set the number of seconds to delay the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_setDelay(dpiMsgProps *props, int32_t value) +{ + return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_DELAY, __func__, + &value, 0); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setExceptionQ() [PUBLIC] +// Set the name of the exception queue associated with the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_setExceptionQ(dpiMsgProps *props, const char *value, + uint32_t valueLength) +{ + return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_EXCEPTION_QUEUE, + __func__, value, valueLength); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setExpiration() [PUBLIC] +// Set the number of seconds until the message expires. +//----------------------------------------------------------------------------- +int dpiMsgProps_setExpiration(dpiMsgProps *props, int32_t value) +{ + return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_EXPIRATION, __func__, + &value, 0); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setOriginalMsgId() [PUBLIC] +// Set the original message id for the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_setOriginalMsgId(dpiMsgProps *props, const char *value, + uint32_t valueLength) +{ + void *rawValue = NULL; + dpiError error; + int status; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(props, value) + if (dpiOci__rawAssignBytes(props->env->handle, value, valueLength, + &rawValue, &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + status = dpiOci__attrSet(props->handle, DPI_OCI_DTYPE_AQMSG_PROPERTIES, + (void*) rawValue, 0, DPI_OCI_ATTR_ORIGINAL_MSGID, "set value", + &error); + dpiOci__rawResize(props->env->handle, &rawValue, 0, &error); + return dpiGen__endPublicFn(props, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setPayloadBytes() [PUBLIC] +// Set the payload for the message (as a series of bytes). +//----------------------------------------------------------------------------- +int dpiMsgProps_setPayloadBytes(dpiMsgProps *props, const char *value, + uint32_t valueLength) +{ + dpiError error; + int status; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(props, value) + if (props->payloadRaw) { + dpiOci__rawResize(props->env->handle, &props->payloadRaw, 0, &error); + props->payloadRaw = NULL; + } + status = dpiOci__rawAssignBytes(props->env->handle, value, valueLength, + &props->payloadRaw, &error); + return dpiGen__endPublicFn(props, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setPayloadObject() [PUBLIC] +// Set the payload for the message (as an object). +//----------------------------------------------------------------------------- +int dpiMsgProps_setPayloadObject(dpiMsgProps *props, dpiObject *obj) +{ + dpiError error; + + if (dpiGen__startPublicFn(props, DPI_HTYPE_MSG_PROPS, __func__, + &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + if (dpiGen__checkHandle(obj, DPI_HTYPE_OBJECT, "check object", &error) < 0) + return dpiGen__endPublicFn(props, DPI_FAILURE, &error); + if (props->payloadObj) + dpiGen__setRefCount(props->payloadObj, &error, -1); + dpiGen__setRefCount(obj, &error, 1); + props->payloadObj = obj; + return dpiGen__endPublicFn(props, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiMsgProps_setPriority() [PUBLIC] +// Set the priority of the message. +//----------------------------------------------------------------------------- +int dpiMsgProps_setPriority(dpiMsgProps *props, int32_t value) +{ + return dpiMsgProps__setAttrValue(props, DPI_OCI_ATTR_PRIORITY, __func__, + &value, 0); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiObject.c b/vendor/github.com/godror/godror/odpi/src/dpiObject.c new file mode 100644 index 00000000000..338c68aeeda --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiObject.c @@ -0,0 +1,966 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiObject.c +// Implementation of objects. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// forward declarations of internal functions only used in this file +int dpiObject__closeHelper(dpiObject *obj, int checkError, dpiError *error); + + +//----------------------------------------------------------------------------- +// dpiObject__allocate() [INTERNAL] +// Allocate and initialize an object structure. +//----------------------------------------------------------------------------- +int dpiObject__allocate(dpiObjectType *objType, void *instance, + void *indicator, dpiObject *dependsOnObj, dpiObject **obj, + dpiError *error) +{ + dpiObject *tempObj; + + if (dpiGen__allocate(DPI_HTYPE_OBJECT, objType->env, (void**) &tempObj, + error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(objType, error, 1); + tempObj->type = objType; + tempObj->instance = instance; + tempObj->indicator = indicator; + if (dependsOnObj) { + dpiGen__setRefCount(dependsOnObj, error, 1); + tempObj->dependsOnObj = dependsOnObj; + } + if (!instance) { + if (dpiOci__objectNew(tempObj, error) < 0) { + dpiObject__free(tempObj, error); + return DPI_FAILURE; + } + if (dpiOci__objectGetInd(tempObj, error) < 0) { + dpiObject__free(tempObj, error); + return DPI_FAILURE; + } + } + if (tempObj->instance && !dependsOnObj) { + if (dpiHandleList__addHandle(objType->conn->objects, tempObj, + &tempObj->openSlotNum, error) < 0) { + dpiObject__free(tempObj, error); + return DPI_FAILURE; + } + } + *obj = tempObj; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObject__check() [INTERNAL] +// Determine if the object handle provided is available for use. +//----------------------------------------------------------------------------- +static int dpiObject__check(dpiObject *obj, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(obj, DPI_HTYPE_OBJECT, fnName, error) < 0) + return DPI_FAILURE; + return dpiConn__checkConnected(obj->type->conn, error); +} + + +//----------------------------------------------------------------------------- +// dpiObject__checkIsCollection() [INTERNAL] +// Check if the object is a collection, and if not, raise an exception. +//----------------------------------------------------------------------------- +static int dpiObject__checkIsCollection(dpiObject *obj, const char *fnName, + dpiError *error) +{ + if (dpiObject__check(obj, fnName, error) < 0) + return DPI_FAILURE; + if (!obj->type->isCollection) + return dpiError__set(error, "check collection", DPI_ERR_NOT_COLLECTION, + obj->type->schemaLength, obj->type->schema, + obj->type->nameLength, obj->type->name); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObject__clearOracleValue() [INTERNAL] +// Clear the Oracle value after use. +//----------------------------------------------------------------------------- +static void dpiObject__clearOracleValue(dpiObject *obj, dpiError *error, + dpiOracleDataBuffer *buffer, dpiLob *lob, + dpiOracleTypeNum oracleTypeNum) +{ + switch (oracleTypeNum) { + case DPI_ORACLE_TYPE_CHAR: + case DPI_ORACLE_TYPE_NCHAR: + case DPI_ORACLE_TYPE_VARCHAR: + case DPI_ORACLE_TYPE_NVARCHAR: + if (buffer->asString) + dpiOci__stringResize(obj->env->handle, &buffer->asString, 0, + error); + break; + case DPI_ORACLE_TYPE_RAW: + if (buffer->asRawData) + dpiOci__rawResize(obj->env->handle, &buffer->asRawData, 0, + error); + break; + case DPI_ORACLE_TYPE_TIMESTAMP: + if (buffer->asTimestamp) + dpiOci__descriptorFree(buffer->asTimestamp, + DPI_OCI_DTYPE_TIMESTAMP); + break; + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + if (buffer->asTimestamp) + dpiOci__descriptorFree(buffer->asTimestamp, + DPI_OCI_DTYPE_TIMESTAMP_TZ); + break; + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + if (buffer->asTimestamp) + dpiOci__descriptorFree(buffer->asTimestamp, + DPI_OCI_DTYPE_TIMESTAMP_LTZ); + break; + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_NCLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_BFILE: + if (lob) + dpiGen__setRefCount(lob, error, -1); + break; + default: + break; + }; +} + + +//----------------------------------------------------------------------------- +// dpiObject__close() [INTERNAL] +// Close the object (frees the memory for the instance). This is needed to +// avoid trying to do so after the connection which created the object is +// closed. In some future release of the Oracle Client libraries this may not +// be needed, at which point this code and all of the code for managing the +// list of objects created by a collection can be removed. +//----------------------------------------------------------------------------- +int dpiObject__close(dpiObject *obj, int checkError, dpiError *error) +{ + int closing; + + // determine whether object is already being closed and if not, mark + // object as being closed; this MUST be done while holding the lock (if + // in threaded mode) to avoid race conditions! + if (obj->env->threaded) + dpiMutex__acquire(obj->env->mutex); + closing = obj->closing; + obj->closing = 1; + if (obj->env->threaded) + dpiMutex__release(obj->env->mutex); + + // if object is already being closed, nothing needs to be done + if (closing) + return DPI_SUCCESS; + + // perform actual work of closing object; if this fails, reset closing + // flag; again, this must be done while holding the lock (if in threaded + // mode) in order to avoid race conditions! + if (obj->instance && !obj->dependsOnObj) { + if (dpiObject__closeHelper(obj, checkError, error) < 0) { + if (obj->env->threaded) + dpiMutex__acquire(obj->env->mutex); + obj->closing = 0; + if (obj->env->threaded) + dpiMutex__release(obj->env->mutex); + return DPI_FAILURE; + } + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObject__closeHelper() [INTERNAL] +// Helper function for closing an object. +//----------------------------------------------------------------------------- +int dpiObject__closeHelper(dpiObject *obj, int checkError, dpiError *error) +{ + if (dpiOci__objectFree(obj->env->handle, obj->instance, checkError, + error) < 0) + return DPI_FAILURE; + obj->instance = NULL; + if (obj->freeIndicator && dpiOci__objectFree(obj->env->handle, + obj->indicator, checkError, error) < 0) + return DPI_FAILURE; + obj->indicator = NULL; + if (!obj->type->conn->closing) + dpiHandleList__removeHandle(obj->type->conn->objects, + obj->openSlotNum); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObject__free() [INTERNAL] +// Free the memory for an object. +//----------------------------------------------------------------------------- +void dpiObject__free(dpiObject *obj, dpiError *error) +{ + dpiObject__close(obj, 0, error); + if (obj->type) { + dpiGen__setRefCount(obj->type, error, -1); + obj->type = NULL; + } + if (obj->dependsOnObj) { + dpiGen__setRefCount(obj->dependsOnObj, error, -1); + obj->dependsOnObj = NULL; + } + dpiUtils__freeMemory(obj); +} + + +//----------------------------------------------------------------------------- +// dpiObject__fromOracleValue() [INTERNAL] +// Populate data from the Oracle value or return an error if this is not +// possible. +//----------------------------------------------------------------------------- +static int dpiObject__fromOracleValue(dpiObject *obj, dpiError *error, + const dpiDataTypeInfo *typeInfo, dpiOracleData *value, + int16_t *indicator, dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + dpiOracleTypeNum valueOracleTypeNum; + dpiBytes *asBytes; + + // null values are immediately returned (type is irrelevant) + if (*indicator == DPI_OCI_IND_NULL) { + data->isNull = 1; + return DPI_SUCCESS; + } + + // convert all other values + data->isNull = 0; + valueOracleTypeNum = typeInfo->oracleTypeNum; + switch (valueOracleTypeNum) { + case DPI_ORACLE_TYPE_CHAR: + case DPI_ORACLE_TYPE_NCHAR: + case DPI_ORACLE_TYPE_VARCHAR: + case DPI_ORACLE_TYPE_NVARCHAR: + if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + asBytes = &data->value.asBytes; + dpiOci__stringPtr(obj->env->handle, *value->asString, + &asBytes->ptr); + dpiOci__stringSize(obj->env->handle, *value->asString, + &asBytes->length); + if (valueOracleTypeNum == DPI_ORACLE_TYPE_NCHAR || + valueOracleTypeNum == DPI_ORACLE_TYPE_NVARCHAR) + asBytes->encoding = obj->env->nencoding; + else asBytes->encoding = obj->env->encoding; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_RAW: + if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + asBytes = &data->value.asBytes; + dpiOci__rawPtr(obj->env->handle, *value->asRawData, + (void**) &asBytes->ptr); + dpiOci__rawSize(obj->env->handle, *value->asRawData, + &asBytes->length); + asBytes->encoding = NULL; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_NATIVE_INT: + if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) { + data->value.asInt64 = *value->asInt32; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_NATIVE_FLOAT: + if (nativeTypeNum == DPI_NATIVE_TYPE_FLOAT) { + data->value.asFloat = *value->asFloat; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_NATIVE_DOUBLE: + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + data->value.asDouble = *value->asDouble; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_NUMBER: + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) + return dpiDataBuffer__fromOracleNumberAsDouble(&data->value, + error, value->asNumber); + else if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) + return dpiDataBuffer__fromOracleNumberAsInteger(&data->value, + error, value->asNumber); + else if (nativeTypeNum == DPI_NATIVE_TYPE_UINT64) + return dpiDataBuffer__fromOracleNumberAsUnsignedInteger( + &data->value, error, value->asNumber); + else if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) + return dpiDataBuffer__fromOracleNumberAsText(&data->value, + obj->env, error, value->asNumber); + break; + case DPI_ORACLE_TYPE_DATE: + if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) + return dpiDataBuffer__fromOracleDate(&data->value, + value->asDate); + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) + return dpiDataBuffer__fromOracleDateAsDouble(&data->value, + obj->env, error, value->asDate); + break; + case DPI_ORACLE_TYPE_TIMESTAMP: + if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) + return dpiDataBuffer__fromOracleTimestamp(&data->value, + obj->env, error, *value->asTimestamp, 0); + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) + return dpiDataBuffer__fromOracleTimestampAsDouble(&data->value, + obj->env, error, *value->asTimestamp); + break; + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) + return dpiDataBuffer__fromOracleTimestamp(&data->value, + obj->env, error, *value->asTimestamp, 1); + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) + return dpiDataBuffer__fromOracleTimestampAsDouble(&data->value, + obj->env, error, *value->asTimestamp); + break; + case DPI_ORACLE_TYPE_OBJECT: + if (typeInfo->objectType && + nativeTypeNum == DPI_NATIVE_TYPE_OBJECT) { + void *instance = (typeInfo->objectType->isCollection) ? + *value->asCollection : value->asRaw; + dpiObject *tempObj; + if (dpiObject__allocate(typeInfo->objectType, instance, + indicator, obj, &tempObj, error) < 0) + return DPI_FAILURE; + data->value.asObject = tempObj; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_BOOLEAN: + if (nativeTypeNum == DPI_NATIVE_TYPE_BOOLEAN) { + data->value.asBoolean = *(value->asBoolean); + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_NCLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_BFILE: + if (nativeTypeNum == DPI_NATIVE_TYPE_LOB) { + const dpiOracleType *lobType; + void *tempLocator; + dpiLob *tempLob; + lobType = dpiOracleType__getFromNum(typeInfo->oracleTypeNum, + error); + if (dpiLob__allocate(obj->type->conn, lobType, &tempLob, + error) < 0) + return DPI_FAILURE; + tempLocator = tempLob->locator; + tempLob->locator = *(value->asLobLocator); + if (dpiOci__lobLocatorAssign(tempLob, &tempLocator, + error) < 0) { + tempLob->locator = tempLocator; + dpiLob__free(tempLob, error); + return DPI_FAILURE; + } + tempLob->locator = tempLocator; + data->value.asLOB = tempLob; + return DPI_SUCCESS; + } + break; + default: + break; + }; + + return dpiError__set(error, "from Oracle value", + DPI_ERR_UNHANDLED_CONVERSION, valueOracleTypeNum, nativeTypeNum); +} + + +//----------------------------------------------------------------------------- +// dpiObject__toOracleValue() [INTERNAL] +// Convert value from external type to the OCI data type required. +//----------------------------------------------------------------------------- +static int dpiObject__toOracleValue(dpiObject *obj, dpiError *error, + const dpiDataTypeInfo *dataTypeInfo, dpiOracleDataBuffer *buffer, + dpiLob **lob, void **ociValue, int16_t *valueIndicator, + void **objectIndicator, dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + dpiOracleTypeNum valueOracleTypeNum; + uint32_t handleType; + dpiObject *otherObj; + dpiBytes *bytes; + + // nulls are handled easily + *objectIndicator = NULL; + if (data->isNull) { + *ociValue = NULL; + *valueIndicator = DPI_OCI_IND_NULL; + buffer->asRaw = NULL; + return DPI_SUCCESS; + } + + // convert all other values + *valueIndicator = DPI_OCI_IND_NOTNULL; + valueOracleTypeNum = dataTypeInfo->oracleTypeNum; + switch (valueOracleTypeNum) { + case DPI_ORACLE_TYPE_CHAR: + case DPI_ORACLE_TYPE_NCHAR: + case DPI_ORACLE_TYPE_VARCHAR: + case DPI_ORACLE_TYPE_NVARCHAR: + buffer->asString = NULL; + if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + bytes = &data->value.asBytes; + if (dpiOci__stringAssignText(obj->env->handle, bytes->ptr, + bytes->length, &buffer->asString, error) < 0) + return DPI_FAILURE; + *ociValue = buffer->asString; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_RAW: + buffer->asRawData = NULL; + if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + bytes = &data->value.asBytes; + if (dpiOci__rawAssignBytes(obj->env->handle, bytes->ptr, + bytes->length, &buffer->asRawData, error) < 0) + return DPI_FAILURE; + *ociValue = buffer->asRawData; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_NATIVE_INT: + if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) { + buffer->asInt32 = (int32_t) data->value.asInt64; + *ociValue = &buffer->asInt32; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_NUMBER: + *ociValue = &buffer->asNumber; + if (nativeTypeNum == DPI_NATIVE_TYPE_INT64) + return dpiDataBuffer__toOracleNumberFromInteger(&data->value, + error, &buffer->asNumber); + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) + return dpiDataBuffer__toOracleNumberFromDouble(&data->value, + error, &buffer->asNumber); + if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) + return dpiDataBuffer__toOracleNumberFromText(&data->value, + obj->env, error, &buffer->asNumber); + break; + case DPI_ORACLE_TYPE_NATIVE_FLOAT: + if (nativeTypeNum == DPI_NATIVE_TYPE_FLOAT) { + buffer->asFloat = data->value.asFloat; + *ociValue = &buffer->asFloat; + return DPI_SUCCESS; + } else if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + buffer->asFloat = (float) data->value.asDouble; + *ociValue = &buffer->asFloat; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_NATIVE_DOUBLE: + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + buffer->asDouble = data->value.asDouble; + *ociValue = &buffer->asDouble; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_DATE: + *ociValue = &buffer->asDate; + if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) + return dpiDataBuffer__toOracleDate(&data->value, + &buffer->asDate); + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) + return dpiDataBuffer__toOracleDateFromDouble(&data->value, + obj->env, error, &buffer->asDate); + break; + case DPI_ORACLE_TYPE_TIMESTAMP: + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + buffer->asTimestamp = NULL; + if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP || + nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + if (valueOracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP_LTZ || + nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) { + handleType = DPI_OCI_DTYPE_TIMESTAMP_LTZ; + } else if (valueOracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP) { + handleType = DPI_OCI_DTYPE_TIMESTAMP; + } else { + handleType = DPI_OCI_DTYPE_TIMESTAMP_TZ; + } + if (dpiOci__descriptorAlloc(obj->env->handle, + &buffer->asTimestamp, handleType, "allocate timestamp", + error) < 0) + return DPI_FAILURE; + *ociValue = buffer->asTimestamp; + if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP) + return dpiDataBuffer__toOracleTimestamp(&data->value, + obj->env, error, buffer->asTimestamp, + (valueOracleTypeNum != DPI_ORACLE_TYPE_TIMESTAMP)); + return dpiDataBuffer__toOracleTimestampFromDouble(&data->value, + obj->env, error, buffer->asTimestamp); + } + break; + case DPI_ORACLE_TYPE_OBJECT: + otherObj = data->value.asObject; + if (nativeTypeNum == DPI_NATIVE_TYPE_OBJECT) { + if (otherObj->type->tdo != dataTypeInfo->objectType->tdo) + return dpiError__set(error, "check type", + DPI_ERR_WRONG_TYPE, otherObj->type->schemaLength, + otherObj->type->schema, otherObj->type->nameLength, + otherObj->type->name, + dataTypeInfo->objectType->schemaLength, + dataTypeInfo->objectType->schema, + dataTypeInfo->objectType->nameLength, + dataTypeInfo->objectType->name); + *ociValue = otherObj->instance; + *objectIndicator = otherObj->indicator; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_BOOLEAN: + if (nativeTypeNum == DPI_NATIVE_TYPE_BOOLEAN) { + buffer->asBoolean = data->value.asBoolean; + *ociValue = &buffer->asBoolean; + return DPI_SUCCESS; + } + break; + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_NCLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_BFILE: + buffer->asLobLocator = NULL; + if (nativeTypeNum == DPI_NATIVE_TYPE_LOB) { + *ociValue = data->value.asLOB->locator; + return DPI_SUCCESS; + } else if (nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + const dpiOracleType *lobType; + lobType = dpiOracleType__getFromNum(valueOracleTypeNum, error); + if (dpiLob__allocate(obj->type->conn, lobType, lob, error) < 0) + return DPI_FAILURE; + bytes = &data->value.asBytes; + if (dpiLob__setFromBytes(*lob, bytes->ptr, bytes->length, + error) < 0) + return DPI_FAILURE; + buffer->asLobLocator = (*lob)->locator; + *ociValue = (*lob)->locator; + return DPI_SUCCESS; + } + break; + + default: + break; + } + + return dpiError__set(error, "to Oracle value", + DPI_ERR_UNHANDLED_CONVERSION, valueOracleTypeNum, nativeTypeNum); +} + + +//----------------------------------------------------------------------------- +// dpiObject_addRef() [PUBLIC] +// Add a reference to the object. +//----------------------------------------------------------------------------- +int dpiObject_addRef(dpiObject *obj) +{ + return dpiGen__addRef(obj, DPI_HTYPE_OBJECT, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiObject_appendElement() [PUBLIC] +// Append an element to the collection. +//----------------------------------------------------------------------------- +int dpiObject_appendElement(dpiObject *obj, dpiNativeTypeNum nativeTypeNum, + dpiData *data) +{ + dpiOracleDataBuffer valueBuffer; + int16_t scalarValueIndicator; + dpiLob *lob = NULL; + void *indicator; + dpiError error; + void *ociValue; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, data) + status = dpiObject__toOracleValue(obj, &error, &obj->type->elementTypeInfo, + &valueBuffer, &lob, &ociValue, &scalarValueIndicator, + (void**) &indicator, nativeTypeNum, data); + if (status == DPI_SUCCESS) { + if (!indicator) + indicator = &scalarValueIndicator; + status = dpiOci__collAppend(obj->type->conn, ociValue, indicator, + obj->instance, &error); + } + dpiObject__clearOracleValue(obj, &error, &valueBuffer, lob, + obj->type->elementTypeInfo.oracleTypeNum); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_copy() [PUBLIC] +// Create a copy of the object and return it. Return NULL upon error. +//----------------------------------------------------------------------------- +int dpiObject_copy(dpiObject *obj, dpiObject **copiedObj) +{ + dpiObject *tempObj; + dpiError error; + + if (dpiObject__check(obj, __func__, &error) < 0) + return DPI_FAILURE; + DPI_CHECK_PTR_NOT_NULL(obj, copiedObj) + if (dpiObject__allocate(obj->type, NULL, NULL, NULL, &tempObj, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + if (dpiOci__objectCopy(tempObj, obj->instance, obj->indicator, + &error) < 0) { + dpiObject__free(tempObj, &error); + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + } + *copiedObj = tempObj; + return dpiGen__endPublicFn(obj, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_deleteElementByIndex() [PUBLIC] +// Delete the element at the specified index in the collection. +//----------------------------------------------------------------------------- +int dpiObject_deleteElementByIndex(dpiObject *obj, int32_t index) +{ + dpiError error; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + status = dpiOci__tableDelete(obj, index, &error); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getAttributeValue() [PUBLIC] +// Get the value of the given attribute from the object. +//----------------------------------------------------------------------------- +int dpiObject_getAttributeValue(dpiObject *obj, dpiObjectAttr *attr, + dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + int16_t scalarValueIndicator; + void *valueIndicator, *tdo; + dpiOracleData value; + dpiError error; + int status; + + // validate parameters + if (dpiObject__check(obj, __func__, &error) < 0) + return DPI_FAILURE; + DPI_CHECK_PTR_NOT_NULL(obj, data) + if (dpiGen__checkHandle(attr, DPI_HTYPE_OBJECT_ATTR, "get attribute value", + &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + if (attr->belongsToType->tdo != obj->type->tdo) { + dpiError__set(&error, "get attribute value", DPI_ERR_WRONG_ATTR, + attr->nameLength, attr->name, obj->type->schemaLength, + obj->type->schema, obj->type->nameLength, obj->type->name); + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + } + + // get attribute value + if (dpiOci__objectGetAttr(obj, attr, &scalarValueIndicator, + &valueIndicator, &value.asRaw, &tdo, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + + // determine the proper null indicator + if (!valueIndicator) + valueIndicator = &scalarValueIndicator; + + // check to see if type is supported + if (!attr->typeInfo.oracleTypeNum) { + dpiError__set(&error, "get attribute value", + DPI_ERR_UNHANDLED_DATA_TYPE, attr->typeInfo.ociTypeCode); + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + } + + // convert to output data format + status = dpiObject__fromOracleValue(obj, &error, &attr->typeInfo, &value, + (int16_t*) valueIndicator, nativeTypeNum, data); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getElementExistsByIndex() [PUBLIC] +// Return boolean indicating if an element exists in the collection at the +// specified index. +//----------------------------------------------------------------------------- +int dpiObject_getElementExistsByIndex(dpiObject *obj, int32_t index, + int *exists) +{ + dpiError error; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, exists) + status = dpiOci__tableExists(obj, index, exists, &error); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getElementValueByIndex() [PUBLIC] +// Return the element at the given index in the collection. +//----------------------------------------------------------------------------- +int dpiObject_getElementValueByIndex(dpiObject *obj, int32_t index, + dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + dpiOracleData value; + int exists, status; + void *indicator; + dpiError error; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, data) + if (dpiOci__collGetElem(obj->type->conn, obj->instance, index, &exists, + &value.asRaw, &indicator, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + if (!exists) { + dpiError__set(&error, "get element value", DPI_ERR_INVALID_INDEX, + index); + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + } + status = dpiObject__fromOracleValue(obj, &error, + &obj->type->elementTypeInfo, &value, (int16_t*) indicator, + nativeTypeNum, data); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getFirstIndex() [PUBLIC] +// Return the index of the first entry in the collection. +//----------------------------------------------------------------------------- +int dpiObject_getFirstIndex(dpiObject *obj, int32_t *index, int *exists) +{ + dpiError error; + int32_t size; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, index) + DPI_CHECK_PTR_NOT_NULL(obj, exists) + if (dpiOci__tableSize(obj, &size, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + *exists = (size != 0); + if (*exists) + status = dpiOci__tableFirst(obj, index, &error); + else status = DPI_SUCCESS; + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getLastIndex() [PUBLIC] +// Return the index of the last entry in the collection. +//----------------------------------------------------------------------------- +int dpiObject_getLastIndex(dpiObject *obj, int32_t *index, int *exists) +{ + dpiError error; + int32_t size; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, index) + DPI_CHECK_PTR_NOT_NULL(obj, exists) + if (dpiOci__tableSize(obj, &size, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + *exists = (size != 0); + if (*exists) + status = dpiOci__tableLast(obj, index, &error); + else status = DPI_SUCCESS; + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getNextIndex() [PUBLIC] +// Return the index of the next entry in the collection following the index +// specified. If there is no next entry, exists is set to 0. +//----------------------------------------------------------------------------- +int dpiObject_getNextIndex(dpiObject *obj, int32_t index, int32_t *nextIndex, + int *exists) +{ + dpiError error; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, nextIndex) + DPI_CHECK_PTR_NOT_NULL(obj, exists) + status = dpiOci__tableNext(obj, index, nextIndex, exists, &error); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getPrevIndex() [PUBLIC] +// Return the index of the previous entry in the collection preceding the +// index specified. If there is no previous entry, exists is set to 0. +//----------------------------------------------------------------------------- +int dpiObject_getPrevIndex(dpiObject *obj, int32_t index, int32_t *prevIndex, + int *exists) +{ + dpiError error; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, prevIndex) + DPI_CHECK_PTR_NOT_NULL(obj, exists) + status = dpiOci__tablePrev(obj, index, prevIndex, exists, &error); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_getSize() [PUBLIC] +// Return the size of the collection. +//----------------------------------------------------------------------------- +int dpiObject_getSize(dpiObject *obj, int32_t *size) +{ + dpiError error; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, size) + status = dpiOci__collSize(obj->type->conn, obj->instance, size, &error); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_release() [PUBLIC] +// Release a reference to the object. +//----------------------------------------------------------------------------- +int dpiObject_release(dpiObject *obj) +{ + return dpiGen__release(obj, DPI_HTYPE_OBJECT, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiObject_setAttributeValue() [PUBLIC] +// Create a copy of the object and return it. Return NULL upon error. +//----------------------------------------------------------------------------- +int dpiObject_setAttributeValue(dpiObject *obj, dpiObjectAttr *attr, + dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + void *valueIndicator, *ociValue; + dpiOracleDataBuffer valueBuffer; + int16_t scalarValueIndicator; + dpiLob *lob = NULL; + dpiError error; + int status; + + // validate parameters + if (dpiObject__check(obj, __func__, &error) < 0) + return DPI_FAILURE; + DPI_CHECK_PTR_NOT_NULL(obj, data) + if (dpiGen__checkHandle(attr, DPI_HTYPE_OBJECT_ATTR, "set attribute value", + &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + if (attr->belongsToType->tdo != obj->type->tdo) { + dpiError__set(&error, "set attribute value", DPI_ERR_WRONG_ATTR, + attr->nameLength, attr->name, obj->type->schemaLength, + obj->type->schema, obj->type->nameLength, obj->type->name); + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + } + + // check to see if type is supported + if (!attr->typeInfo.oracleTypeNum) { + dpiError__set(&error, "get attribute value", + DPI_ERR_UNHANDLED_DATA_TYPE, attr->typeInfo.ociTypeCode); + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + } + + // convert to input data format + status = dpiObject__toOracleValue(obj, &error, &attr->typeInfo, + &valueBuffer, &lob, &ociValue, &scalarValueIndicator, + &valueIndicator, nativeTypeNum, data); + + // set attribute value + if (status == DPI_SUCCESS) + status = dpiOci__objectSetAttr(obj, attr, scalarValueIndicator, + valueIndicator, ociValue, &error); + dpiObject__clearOracleValue(obj, &error, &valueBuffer, lob, + attr->typeInfo.oracleTypeNum); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_setElementValueByIndex() [PUBLIC] +// Set the element at the specified index to the given value. +//----------------------------------------------------------------------------- +int dpiObject_setElementValueByIndex(dpiObject *obj, int32_t index, + dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + dpiOracleDataBuffer valueBuffer; + int16_t scalarValueIndicator; + dpiLob *lob = NULL; + void *indicator; + dpiError error; + void *ociValue; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(obj, data) + status = dpiObject__toOracleValue(obj, &error, &obj->type->elementTypeInfo, + &valueBuffer, &lob, &ociValue, &scalarValueIndicator, + (void**) &indicator, nativeTypeNum, data); + if (status == DPI_SUCCESS) { + if (!indicator) + indicator = &scalarValueIndicator; + status = dpiOci__collAssignElem(obj->type->conn, index, ociValue, + indicator, obj->instance, &error); + } + dpiObject__clearOracleValue(obj, &error, &valueBuffer, lob, + obj->type->elementTypeInfo.oracleTypeNum); + return dpiGen__endPublicFn(obj, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObject_trim() [PUBLIC] +// Trim a number of elements from the end of the collection. +//----------------------------------------------------------------------------- +int dpiObject_trim(dpiObject *obj, uint32_t numToTrim) +{ + dpiError error; + int status; + + if (dpiObject__checkIsCollection(obj, __func__, &error) < 0) + return dpiGen__endPublicFn(obj, DPI_FAILURE, &error); + status = dpiOci__collTrim(obj->type->conn, numToTrim, obj->instance, + &error); + return dpiGen__endPublicFn(obj, status, &error); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c b/vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c new file mode 100644 index 00000000000..45d623ef573 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiObjectAttr.c @@ -0,0 +1,114 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiObjectAttr.c +// Implementation of object attributes. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiObjectAttr__allocate() [INTERNAL] +// Allocate and initialize an object attribute structure. +//----------------------------------------------------------------------------- +int dpiObjectAttr__allocate(dpiObjectType *objType, void *param, + dpiObjectAttr **attr, dpiError *error) +{ + dpiObjectAttr *tempAttr; + + // allocate and assign main reference to the type this attribute belongs to + *attr = NULL; + if (dpiGen__allocate(DPI_HTYPE_OBJECT_ATTR, objType->env, + (void**) &tempAttr, error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(objType, error, 1); + tempAttr->belongsToType = objType; + + // determine the name of the attribute + if (dpiUtils__getAttrStringWithDup("get name", param, DPI_OCI_DTYPE_PARAM, + DPI_OCI_ATTR_NAME, &tempAttr->name, &tempAttr->nameLength, + error) < 0) { + dpiObjectAttr__free(tempAttr, error); + return DPI_FAILURE; + } + + // determine type information of the attribute + if (dpiOracleType__populateTypeInfo(objType->conn, param, + DPI_OCI_DTYPE_PARAM, &tempAttr->typeInfo, error) < 0) { + dpiObjectAttr__free(tempAttr, error); + return DPI_FAILURE; + } + + *attr = tempAttr; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObjectAttr__free() [INTERNAL] +// Free the memory for an object attribute. +//----------------------------------------------------------------------------- +void dpiObjectAttr__free(dpiObjectAttr *attr, dpiError *error) +{ + if (attr->belongsToType) { + dpiGen__setRefCount(attr->belongsToType, error, -1); + attr->belongsToType = NULL; + } + if (attr->typeInfo.objectType) { + dpiGen__setRefCount(attr->typeInfo.objectType, error, -1); + attr->typeInfo.objectType = NULL; + } + if (attr->name) { + dpiUtils__freeMemory((void*) attr->name); + attr->name = NULL; + } + dpiUtils__freeMemory(attr); +} + + +//----------------------------------------------------------------------------- +// dpiObjectAttr_addRef() [PUBLIC] +// Add a reference to the object attribute. +//----------------------------------------------------------------------------- +int dpiObjectAttr_addRef(dpiObjectAttr *attr) +{ + return dpiGen__addRef(attr, DPI_HTYPE_OBJECT_ATTR, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiObjectAttr_getInfo() [PUBLIC] +// Return information about the attribute to the caller. +//----------------------------------------------------------------------------- +int dpiObjectAttr_getInfo(dpiObjectAttr *attr, dpiObjectAttrInfo *info) +{ + dpiError error; + + if (dpiGen__startPublicFn(attr, DPI_HTYPE_OBJECT_ATTR, __func__, + &error) < 0) + return dpiGen__endPublicFn(attr, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(attr, info) + info->name = attr->name; + info->nameLength = attr->nameLength; + info->typeInfo = attr->typeInfo; + return dpiGen__endPublicFn(attr, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObjectAttr_release() [PUBLIC] +// Release a reference to the object attribute. +//----------------------------------------------------------------------------- +int dpiObjectAttr_release(dpiObjectAttr *attr) +{ + return dpiGen__release(attr, DPI_HTYPE_OBJECT_ATTR, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiObjectType.c b/vendor/github.com/godror/godror/odpi/src/dpiObjectType.c new file mode 100644 index 00000000000..fbb2cf240c8 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiObjectType.c @@ -0,0 +1,344 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiObjectType.c +// Implementation of object types. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// forward declarations of internal functions only used in this file +static int dpiObjectType__init(dpiObjectType *objType, void *param, + uint32_t nameAttribute, dpiError *error); + + +//----------------------------------------------------------------------------- +// dpiObjectType__allocate() [INTERNAL] +// Allocate and initialize an object type structure. +//----------------------------------------------------------------------------- +int dpiObjectType__allocate(dpiConn *conn, void *param, + uint32_t nameAttribute, dpiObjectType **objType, dpiError *error) +{ + dpiObjectType *tempObjType; + + // create structure and retain reference to connection + *objType = NULL; + if (dpiGen__allocate(DPI_HTYPE_OBJECT_TYPE, conn->env, + (void**) &tempObjType, error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(conn, error, 1); + tempObjType->conn = conn; + + // perform initialization + if (dpiObjectType__init(tempObjType, param, nameAttribute, error) < 0) { + dpiObjectType__free(tempObjType, error); + return DPI_FAILURE; + } + + *objType = tempObjType; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObjectType__check() [INTERNAL] +// Validate that the connection from which the object type was created is +// still connected and issue an error if it is not. +//----------------------------------------------------------------------------- +static int dpiObjectType__check(dpiObjectType *objType, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(objType, DPI_HTYPE_OBJECT_TYPE, fnName, + error) < 0) + return DPI_FAILURE; + return dpiConn__checkConnected(objType->conn, error); +} + + +//----------------------------------------------------------------------------- +// dpiObjectType__describe() [INTERNAL] +// Describe the object type and store information about it. Note that a +// separate call to OCIDescribeAny() is made in order to support nested types; +// an illegal attribute value is returned if this is not done. +//----------------------------------------------------------------------------- +static int dpiObjectType__describe(dpiObjectType *objType, + void *describeHandle, dpiError *error) +{ + void *collectionParam, *param; + uint16_t typeCode; + + // describe the type + if (dpiOci__describeAny(objType->conn, objType->tdo, 0, DPI_OCI_OTYPE_PTR, + describeHandle, error) < 0) + return DPI_FAILURE; + + // get top level parameter descriptor + if (dpiOci__attrGet(describeHandle, DPI_OCI_HTYPE_DESCRIBE, ¶m, 0, + DPI_OCI_ATTR_PARAM, "get top level parameter", error) < 0) + return DPI_FAILURE; + + // determine type code + if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, &typeCode, 0, + DPI_OCI_ATTR_TYPECODE, "get type code", error) < 0) + return DPI_FAILURE; + objType->typeCode = typeCode; + + // determine the number of attributes + if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, + (void*) &objType->numAttributes, 0, DPI_OCI_ATTR_NUM_TYPE_ATTRS, + "get number of attributes", error) < 0) + return DPI_FAILURE; + + // if a collection, need to determine the element type + if (typeCode == DPI_SQLT_NCO) { + objType->isCollection = 1; + + // acquire collection parameter descriptor + if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, &collectionParam, 0, + DPI_OCI_ATTR_COLLECTION_ELEMENT, "get collection descriptor", + error) < 0) + return DPI_FAILURE; + + // determine type of element + if (dpiOracleType__populateTypeInfo(objType->conn, collectionParam, + DPI_OCI_DTYPE_PARAM, &objType->elementTypeInfo, error) < 0) + return DPI_FAILURE; + + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObjectType__free() [INTERNAL] +// Free the memory for an object type. +//----------------------------------------------------------------------------- +void dpiObjectType__free(dpiObjectType *objType, dpiError *error) +{ + if (objType->conn) { + dpiGen__setRefCount(objType->conn, error, -1); + objType->conn = NULL; + } + if (objType->elementTypeInfo.objectType) { + dpiGen__setRefCount(objType->elementTypeInfo.objectType, error, -1); + objType->elementTypeInfo.objectType = NULL; + } + if (objType->schema) { + dpiUtils__freeMemory((void*) objType->schema); + objType->schema = NULL; + } + if (objType->name) { + dpiUtils__freeMemory((void*) objType->name); + objType->name = NULL; + } + dpiUtils__freeMemory(objType); +} + + +//----------------------------------------------------------------------------- +// dpiObjectType__init() [INTERNAL] +// Initialize the object type. +//----------------------------------------------------------------------------- +static int dpiObjectType__init(dpiObjectType *objType, void *param, + uint32_t nameAttribute, dpiError *error) +{ + void *describeHandle; + void *tdoReference; + + // determine the schema of the type + if (dpiUtils__getAttrStringWithDup("get schema", param, + DPI_OCI_DTYPE_PARAM, DPI_OCI_ATTR_SCHEMA_NAME, &objType->schema, + &objType->schemaLength, error) < 0) + return DPI_FAILURE; + + // determine the name of the type + if (dpiUtils__getAttrStringWithDup("get name", param, DPI_OCI_DTYPE_PARAM, + nameAttribute, &objType->name, &objType->nameLength, error) < 0) + return DPI_FAILURE; + + // retrieve TDO of the parameter and pin it in the cache + if (dpiOci__attrGet(param, DPI_OCI_DTYPE_PARAM, (void*) &tdoReference, 0, + DPI_OCI_ATTR_REF_TDO, "get TDO reference", error) < 0) + return DPI_FAILURE; + if (dpiOci__objectPin(objType->env->handle, tdoReference, &objType->tdo, + error) < 0) + return DPI_FAILURE; + + // acquire a describe handle + if (dpiOci__handleAlloc(objType->env->handle, &describeHandle, + DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", error) < 0) + return DPI_FAILURE; + + // describe the type + if (dpiObjectType__describe(objType, describeHandle, error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return DPI_FAILURE; + } + + // free the describe handle + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiObjectType__isXmlType() [INTERNAL] +// Returns a boolean indicating if the object type in question refers to the +// type SYS.XMLTYPE. +//----------------------------------------------------------------------------- +int dpiObjectType__isXmlType(dpiObjectType *objType) +{ + static const char *schema = "SYS", *name = "XMLTYPE"; + size_t schemaLength, nameLength; + + schemaLength = strlen(schema); + nameLength = strlen(name); + return (objType->schemaLength == schemaLength && + strncmp(objType->schema, schema, schemaLength) == 0 && + objType->nameLength == nameLength && + strncmp(objType->name, name, nameLength) == 0); +} + + +//----------------------------------------------------------------------------- +// dpiObjectType_addRef() [PUBLIC] +// Add a reference to the object type. +//----------------------------------------------------------------------------- +int dpiObjectType_addRef(dpiObjectType *objType) +{ + return dpiGen__addRef(objType, DPI_HTYPE_OBJECT_TYPE, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiObjectType_createObject() [PUBLIC] +// Create a new object of the specified type and return it. Return NULL on +// error. +//----------------------------------------------------------------------------- +int dpiObjectType_createObject(dpiObjectType *objType, dpiObject **obj) +{ + dpiError error; + int status; + + // validate parameters + if (dpiObjectType__check(objType, __func__, &error) < 0) + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(objType, obj) + status = dpiObject__allocate(objType, NULL, NULL, NULL, obj, &error); + return dpiGen__endPublicFn(objType, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObjectType_getAttributes() [PUBLIC] +// Get the attributes for the object type in the provided array. +//----------------------------------------------------------------------------- +int dpiObjectType_getAttributes(dpiObjectType *objType, uint16_t numAttributes, + dpiObjectAttr **attributes) +{ + void *topLevelParam, *attrListParam, *attrParam, *describeHandle; + dpiError error; + uint16_t i; + + // validate object type and the number of attributes + if (dpiObjectType__check(objType, __func__, &error) < 0) + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(objType, attributes) + if (numAttributes < objType->numAttributes) { + dpiError__set(&error, "get attributes", DPI_ERR_ARRAY_SIZE_TOO_SMALL, + numAttributes); + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + } + if (numAttributes == 0) + return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error); + + // acquire a describe handle + if (dpiOci__handleAlloc(objType->env->handle, &describeHandle, + DPI_OCI_HTYPE_DESCRIBE, "allocate describe handle", &error) < 0) + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + + // describe the type + if (dpiOci__describeAny(objType->conn, objType->tdo, 0, DPI_OCI_OTYPE_PTR, + describeHandle, &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + } + + // get the top level parameter descriptor + if (dpiOci__attrGet(describeHandle, DPI_OCI_HTYPE_DESCRIBE, &topLevelParam, + 0, DPI_OCI_ATTR_PARAM, "get top level param", &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + } + + // get the attribute list parameter descriptor + if (dpiOci__attrGet(topLevelParam, DPI_OCI_DTYPE_PARAM, + (void*) &attrListParam, 0, DPI_OCI_ATTR_LIST_TYPE_ATTRS, + "get attr list param", &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + } + + // create attribute structure for each attribute + for (i = 0; i < objType->numAttributes; i++) { + if (dpiOci__paramGet(attrListParam, DPI_OCI_DTYPE_PARAM, &attrParam, + (uint32_t) i + 1, "get attribute param", &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + } + if (dpiObjectAttr__allocate(objType, attrParam, &attributes[i], + &error) < 0) { + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + } + } + + // free the describe handle + dpiOci__handleFree(describeHandle, DPI_OCI_HTYPE_DESCRIBE); + + return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObjectType_getInfo() [PUBLIC] +// Return information about the object type. +//----------------------------------------------------------------------------- +int dpiObjectType_getInfo(dpiObjectType *objType, dpiObjectTypeInfo *info) +{ + dpiError error; + + if (dpiGen__startPublicFn(objType, DPI_HTYPE_OBJECT_TYPE, __func__, + &error) < 0) + return dpiGen__endPublicFn(objType, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(objType, info) + info->name = objType->name; + info->nameLength = objType->nameLength; + info->schema = objType->schema; + info->schemaLength = objType->schemaLength; + info->isCollection = objType->isCollection; + info->elementTypeInfo = objType->elementTypeInfo; + info->numAttributes = objType->numAttributes; + return dpiGen__endPublicFn(objType, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiObjectType_release() [PUBLIC] +// Release a reference to the object type. +//----------------------------------------------------------------------------- +int dpiObjectType_release(dpiObjectType *objType) +{ + return dpiGen__release(objType, DPI_HTYPE_OBJECT_TYPE, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiOci.c b/vendor/github.com/godror/godror/odpi/src/dpiOci.c new file mode 100644 index 00000000000..c731324cb48 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiOci.c @@ -0,0 +1,3823 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiOci.c +// Link to OCI using dynamic linking. The OCI library (11.2+) is loaded +// dynamically and a function table kept for the functions that are used by +// DPI. This function table is populated as functions are used and permits use +// of all versions of OCI from one driver. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// forward declarations of internal functions only used in this file +static void *dpiOci__allocateMem(void *unused, size_t size); +static void dpiOci__freeMem(void *unused, void *ptr); +static int dpiOci__loadLib(dpiError *error); +static int dpiOci__loadLibValidate(dpiError *error); +static int dpiOci__loadSymbol(const char *symbolName, void **symbol, + dpiError *error); +static void *dpiOci__reallocMem(void *unused, void *ptr, size_t newSize); + + +// macro to simplify code for loading each symbol +#define DPI_OCI_LOAD_SYMBOL(symbolName, symbol) \ + if (!symbol && dpiOci__loadSymbol(symbolName, (void**) &symbol, \ + error) < 0) \ + return DPI_FAILURE; + +// macro to ensure that an error handle is available +#define DPI_OCI_ENSURE_ERROR_HANDLE(error) \ + if (!error->handle && dpiError__initHandle(error) < 0) \ + return DPI_FAILURE; + +// macros to simplify code for checking results of OCI calls +#define DPI_OCI_ERROR_OCCURRED(status) \ + (status != DPI_OCI_SUCCESS && status != DPI_OCI_SUCCESS_WITH_INFO) +#define DPI_OCI_CHECK_AND_RETURN(error, status, conn, action) \ + if (DPI_OCI_ERROR_OCCURRED(status)) \ + return dpiError__setFromOCI(error, status, conn, action); \ + return DPI_SUCCESS; + + +// typedefs for all OCI functions used by ODPI-C +typedef int (*dpiOciFnType__aqDeq)(void *svchp, void *errhp, + const char *queue_name, void *deqopt, void *msgprop, void *payload_tdo, + void **payload, void **payload_ind, void **msgid, uint32_t flags); +typedef int (*dpiOciFnType__aqDeqArray)(void *svchp, void *errhp, + const char *queue_name, void *deqopt, uint32_t *iters, void **msgprop, + void *payload_tdo, void **payload, void **payload_ind, void **msgid, + void *ctxp, void *deqcbfp, uint32_t flags); +typedef int (*dpiOciFnType__aqEnq)(void *svchp, void *errhp, + const char *queue_name, void *enqopt, void *msgprop, void *payload_tdo, + void **payload, void **payload_ind, void **msgid, uint32_t flags); +typedef int (*dpiOciFnType__aqEnqArray)(void *svchp, void *errhp, + const char *queue_name, void *enqopt, uint32_t *iters, void **msgprop, + void *payload_tdo, void **payload, void **payload_ind, void **msgid, + void *ctxp, void *enqcbfp, uint32_t flags); +typedef int (*dpiOciFnType__arrayDescriptorAlloc)(const void *parenth, + void **descpp, const uint32_t type, uint32_t array_size, + const size_t xtramem_sz, void **usrmempp); +typedef int (*dpiOciFnType__arrayDescriptorFree)(void **descp, + const uint32_t type); +typedef int (*dpiOciFnType__attrGet)(const void *trgthndlp, + uint32_t trghndltyp, void *attributep, uint32_t *sizep, + uint32_t attrtype, void *errhp); +typedef int (*dpiOciFnType__attrSet)(void *trgthndlp, uint32_t trghndltyp, + void *attributep, uint32_t size, uint32_t attrtype, void *errhp); +typedef int (*dpiOciFnType__bindByName)(void *stmtp, void **bindp, void *errhp, + const char *placeholder, int32_t placeh_len, void *valuep, + int32_t value_sz, uint16_t dty, void *indp, uint16_t *alenp, + uint16_t *rcodep, uint32_t maxarr_len, uint32_t *curelep, + uint32_t mode); +typedef int (*dpiOciFnType__bindByName2)(void *stmtp, void **bindp, + void *errhp, const char *placeholder, int32_t placeh_len, void *valuep, + int64_t value_sz, uint16_t dty, void *indp, uint32_t *alenp, + uint16_t *rcodep, uint32_t maxarr_len, uint32_t *curelep, + uint32_t mode); +typedef int (*dpiOciFnType__bindByPos)(void *stmtp, void **bindp, void *errhp, + uint32_t position, void *valuep, int32_t value_sz, uint16_t dty, + void *indp, uint16_t *alenp, uint16_t *rcodep, uint32_t maxarr_len, + uint32_t *curelep, uint32_t mode); +typedef int (*dpiOciFnType__bindByPos2)(void *stmtp, void **bindp, void *errhp, + uint32_t position, void *valuep, int64_t value_sz, uint16_t dty, + void *indp, uint32_t *alenp, uint16_t *rcodep, uint32_t maxarr_len, + uint32_t *curelep, uint32_t mode); +typedef int (*dpiOciFnType__bindDynamic)(void *bindp, void *errhp, void *ictxp, + void *icbfp, void *octxp, void *ocbfp); +typedef int (*dpiOciFnType__bindObject)(void *bindp, void *errhp, + const void *type, void **pgvpp, uint32_t *pvszsp, void **indpp, + uint32_t *indszp); +typedef int (*dpiOciFnType__break)(void *hndlp, void *errhp); +typedef void (*dpiOciFnType__clientVersion)(int *major_version, + int *minor_version, int *update_num, int *patch_num, + int *port_update_num); +typedef int (*dpiOciFnType__collAppend)(void *env, void *err, const void *elem, + const void *elemind, void *coll); +typedef int (*dpiOciFnType__collAssignElem)(void *env, void *err, + int32_t index, const void *elem, const void *elemind, void *coll); +typedef int (*dpiOciFnType__collGetElem)(void *env, void *err, + const void *coll, int32_t index, int *exists, void **elem, + void **elemind); +typedef int (*dpiOciFnType__collSize)(void *env, void *err, const void *coll, + int32_t *size); +typedef int (*dpiOciFnType__collTrim)(void *env, void *err, int32_t trim_num, + void *coll); +typedef int (*dpiOciFnType__contextGetValue)(void *hdl, void *err, + const char *key, uint8_t keylen, void **ctx_value); +typedef int (*dpiOciFnType__contextSetValue)(void *hdl, void *err, + uint16_t duration, const char *key, uint8_t keylen, void *ctx_value); +typedef int (*dpiOciFnType__dateTimeConstruct)(void *hndl, void *err, + void *datetime, int16_t yr, uint8_t mnth, uint8_t dy, uint8_t hr, + uint8_t mm, uint8_t ss, uint32_t fsec, const char *tz, + size_t tzLength); +typedef int (*dpiOciFnType__dateTimeConvert)(void *hndl, void *err, + void *indate, void *outdate); +typedef int (*dpiOciFnType__dateTimeGetDate)(void *hndl, void *err, + const void *date, int16_t *yr, uint8_t *mnth, uint8_t *dy); +typedef int (*dpiOciFnType__dateTimeGetTime)(void *hndl, void *err, + void *datetime, uint8_t *hr, uint8_t *mm, uint8_t *ss, uint32_t *fsec); +typedef int (*dpiOciFnType__dateTimeGetTimeZoneOffset)(void *hndl, void *err, + const void *datetime, int8_t *hr, int8_t *mm); +typedef int (*dpiOciFnType__dateTimeIntervalAdd)(void *hndl, void *err, + void *datetime, void *inter, void *outdatetime); +typedef int (*dpiOciFnType__dateTimeSubtract)(void *hndl, void *err, + void *indate1, void *indate2, void *inter); +typedef int (*dpiOciFnType__dbShutdown)(void *svchp, void *errhp, void *admhp, + uint32_t mode); +typedef int (*dpiOciFnType__dbStartup)(void *svchp, void *errhp, void *admhp, + uint32_t mode, uint32_t flags); +typedef int (*dpiOciFnType__defineByPos)(void *stmtp, void **defnp, + void *errhp, uint32_t position, void *valuep, int32_t value_sz, + uint16_t dty, void *indp, uint16_t *rlenp, uint16_t *rcodep, + uint32_t mode); +typedef int (*dpiOciFnType__defineByPos2)(void *stmtp, void **defnp, + void *errhp, uint32_t position, void *valuep, uint64_t value_sz, + uint16_t dty, void *indp, uint32_t *rlenp, uint16_t *rcodep, + uint32_t mode); +typedef int (*dpiOciFnType__defineDynamic)(void *defnp, void *errhp, + void *octxp, void *ocbfp); +typedef int (*dpiOciFnType__defineObject)(void *defnp, void *errhp, + const void *type, void **pgvpp, uint32_t *pvszsp, void **indpp, + uint32_t *indszp); +typedef int (*dpiOciFnType__describeAny)(void *svchp, void *errhp, + void *objptr, uint32_t objnm_len, uint8_t objptr_typ, + uint8_t info_level, uint8_t objtyp, void *dschp); +typedef int (*dpiOciFnType__descriptorAlloc)(const void *parenth, + void **descpp, const uint32_t type, const size_t xtramem_sz, + void **usrmempp); +typedef int (*dpiOciFnType__descriptorFree)(void *descp, const uint32_t type); +typedef int (*dpiOciFnType__envNlsCreate)(void **envp, uint32_t mode, + void *ctxp, void *malocfp, void *ralocfp, void *mfreefp, + size_t xtramem_sz, void **usrmempp, uint16_t charset, + uint16_t ncharset); +typedef int (*dpiOciFnType__errorGet)(void *hndlp, uint32_t recordno, + char *sqlstate, int32_t *errcodep, char *bufp, uint32_t bufsiz, + uint32_t type); +typedef int (*dpiOciFnType__handleAlloc)(const void *parenth, void **hndlpp, + const uint32_t type, const size_t xtramem_sz, void **usrmempp); +typedef int (*dpiOciFnType__handleFree)(void *hndlp, const uint32_t type); +typedef int (*dpiOciFnType__intervalGetDaySecond)(void *hndl, void *err, + int32_t *dy, int32_t *hr, int32_t *mm, int32_t *ss, int32_t *fsec, + const void *result); +typedef int (*dpiOciFnType__intervalGetYearMonth)(void *hndl, void *err, + int32_t *yr, int32_t *mnth, const void *result); +typedef int (*dpiOciFnType__intervalSetDaySecond)(void *hndl, void *err, + int32_t dy, int32_t hr, int32_t mm, int32_t ss, int32_t fsec, + void *result); +typedef int (*dpiOciFnType__intervalSetYearMonth)(void *hndl, void *err, + int32_t yr, int32_t mnth, void *result); +typedef int (*dpiOciFnType__lobClose)(void *svchp, void *errhp, void *locp); +typedef int (*dpiOciFnType__lobCreateTemporary)(void *svchp, void *errhp, + void *locp, uint16_t csid, uint8_t csfrm, uint8_t lobtype, int cache, + uint16_t duration); +typedef int (*dpiOciFnType__lobFileExists)(void *svchp, void *errhp, + void *filep, int *flag); +typedef int (*dpiOciFnType__lobFileGetName)(void *envhp, void *errhp, + const void *filep, char *dir_alias, uint16_t *d_length, char *filename, + uint16_t *f_length); +typedef int (*dpiOciFnType__lobFileSetName)(void *envhp, void *errhp, + void **filepp, const char *dir_alias, uint16_t d_length, + const char *filename, uint16_t f_length); +typedef int (*dpiOciFnType__lobFreeTemporary)(void *svchp, void *errhp, + void *locp); +typedef int (*dpiOciFnType__lobGetChunkSize)(void *svchp, void *errhp, + void *locp, uint32_t *chunksizep); +typedef int (*dpiOciFnType__lobGetLength2)(void *svchp, void *errhp, + void *locp, uint64_t *lenp); +typedef int (*dpiOciFnType__lobIsOpen)(void *svchp, void *errhp, void *locp, + int *flag); +typedef int (*dpiOciFnType__lobIsTemporary)(void *envp, void *errhp, + void *locp, int *is_temporary); +typedef int (*dpiOciFnType__lobLocatorAssign)(void *svchp, void *errhp, + const void *src_locp, void **dst_locpp); +typedef int (*dpiOciFnType__lobOpen)(void *svchp, void *errhp, void *locp, + uint8_t mode); +typedef int (*dpiOciFnType__lobRead2)(void *svchp, void *errhp, void *locp, + uint64_t *byte_amtp, uint64_t *char_amtp, uint64_t offset, void *bufp, + uint64_t bufl, uint8_t piece, void *ctxp, void *cbfp, uint16_t csid, + uint8_t csfrm); +typedef int (*dpiOciFnType__lobTrim2)(void *svchp, void *errhp, void *locp, + uint64_t newlen); +typedef int (*dpiOciFnType__lobWrite2)(void *svchp, void *errhp, void *locp, + uint64_t *byte_amtp, uint64_t *char_amtp, uint64_t offset, void *bufp, + uint64_t buflen, uint8_t piece, void *ctxp, void *cbfp, uint16_t csid, + uint8_t csfrm); +typedef int (*dpiOciFnType__memoryAlloc)(void *hdl, void *err, void **mem, + uint16_t dur, uint32_t size, uint32_t flags); +typedef int (*dpiOciFnType__memoryFree)(void *hdl, void *err, void *mem); +typedef int (*dpiOciFnType__nlsCharSetConvert)(void *envhp, void *errhp, + uint16_t dstid, void *dstp, size_t dstlen, uint16_t srcid, + const void *srcp, size_t srclen, size_t *rsize); +typedef int (*dpiOciFnType__nlsCharSetIdToName)(void *envhp, char *buf, + size_t buflen, uint16_t id); +typedef uint16_t (*dpiOciFnType__nlsCharSetNameToId)(void *envhp, + const char *name); +typedef int (*dpiOciFnType__nlsEnvironmentVariableGet)(void *val, size_t size, + uint16_t item, uint16_t charset, size_t *rsize); +typedef int (*dpiOciFnType__nlsNameMap)(void *envhp, char *buf, size_t buflen, + const char *srcbuf, uint32_t flag); +typedef int (*dpiOciFnType__nlsNumericInfoGet)(void *envhp, void *errhp, + int32_t *val, uint16_t item); +typedef int (*dpiOciFnType__numberFromInt)(void *err, const void *inum, + unsigned int inum_length, unsigned int inum_s_flag, void *number); +typedef int (*dpiOciFnType__numberFromReal)(void *err, const void *number, + unsigned int rsl_length, void *rsl); +typedef int (*dpiOciFnType__numberToInt)(void *err, const void *number, + unsigned int rsl_length, unsigned int rsl_flag, void *rsl); +typedef int (*dpiOciFnType__numberToReal)(void *err, const void *number, + unsigned int rsl_length, void *rsl); +typedef int (*dpiOciFnType__objectCopy)(void *env, void *err, const void *svc, + void *source, void *null_source, void *target, void *null_target, + void *tdo, uint16_t duration, uint8_t option); +typedef int (*dpiOciFnType__objectFree)(void *env, void *err, void *instance, + uint16_t flags); +typedef int (*dpiOciFnType__objectGetAttr)(void *env, void *err, + void *instance, void *null_struct, void *tdo, const char **names, + const uint32_t *lengths, const uint32_t name_count, + const uint32_t *indexes, const uint32_t index_count, + int16_t *attr_null_status, void **attr_null_struct, void **attr_value, + void **attr_tdo); +typedef int (*dpiOciFnType__objectGetInd)(void *env, void *err, void *instance, + void **null_struct); +typedef int (*dpiOciFnType__objectNew)(void *env, void *err, const void *svc, + uint16_t typecode, void *tdo, void *table, uint16_t duration, + int value, void **instance); +typedef int (*dpiOciFnType__objectPin)(void *env, void *err, void *object_ref, + void *corhdl, int pin_option, uint16_t pin_duration, int lock_option, + void **object); +typedef int (*dpiOciFnType__objectSetAttr)(void *env, void *err, + void *instance, void *null_struct, void *tdo, const char **names, + const uint32_t *lengths, const uint32_t name_count, + const uint32_t *indexes, const uint32_t index_count, + const int16_t null_status, const void *attr_null_struct, + const void *attr_value); +typedef int (*dpiOciFnType__paramGet)(const void *hndlp, uint32_t htype, + void *errhp, void **parmdpp, uint32_t pos); +typedef int (*dpiOciFnType__passwordChange)(void *svchp, void *errhp, + const char *user_name, uint32_t usernm_len, const char *opasswd, + uint32_t opasswd_len, const char *npasswd, uint32_t npasswd_len, + uint32_t mode); +typedef int (*dpiOciFnType__ping)(void *svchp, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__rawAssignBytes)(void *env, void *err, + const char *rhs, uint32_t rhs_len, void **lhs); +typedef void *(*dpiOciFnType__rawPtr)(void *env, const void *raw); +typedef int (*dpiOciFnType__rawResize)(void *env, void *err, uint32_t new_size, + void **raw); +typedef uint32_t (*dpiOciFnType__rawSize)(void * env, const void *raw); +typedef int (*dpiOciFnType__rowidToChar)(void *rowidDesc, char *outbfp, + uint16_t *outbflp, void *errhp); +typedef int (*dpiOciFnType__serverAttach)(void *srvhp, void *errhp, + const char *dblink, int32_t dblink_len, uint32_t mode); +typedef int (*dpiOciFnType__serverDetach)(void *srvhp, void *errhp, + uint32_t mode); +typedef int (*dpiOciFnType__serverRelease)(void *hndlp, void *errhp, + char *bufp, uint32_t bufsz, uint8_t hndltype, uint32_t *version); +typedef int (*dpiOciFnType__serverRelease2)(void *hndlp, void *errhp, + char *bufp, uint32_t bufsz, uint8_t hndltype, uint32_t *version, + uint32_t mode); +typedef int (*dpiOciFnType__sessionBegin)(void *svchp, void *errhp, + void *usrhp, uint32_t credt, uint32_t mode); +typedef int (*dpiOciFnType__sessionEnd)(void *svchp, void *errhp, void *usrhp, + uint32_t mode); +typedef int (*dpiOciFnType__sessionGet)(void *envhp, void *errhp, void **svchp, + void *authhp, const char *poolName, uint32_t poolName_len, + const char *tagInfo, uint32_t tagInfo_len, const char **retTagInfo, + uint32_t *retTagInfo_len, int *found, uint32_t mode); +typedef int (*dpiOciFnType__sessionPoolCreate)(void *envhp, void *errhp, + void *spoolhp, char **poolName, uint32_t *poolNameLen, + const char *connStr, uint32_t connStrLen, uint32_t sessMin, + uint32_t sessMax, uint32_t sessIncr, const char *userid, + uint32_t useridLen, const char *password, uint32_t passwordLen, + uint32_t mode); +typedef int (*dpiOciFnType__sessionPoolDestroy)(void *spoolhp, void *errhp, + uint32_t mode); +typedef int (*dpiOciFnType__sessionRelease)(void *svchp, void *errhp, + const char *tag, uint32_t tag_len, uint32_t mode); +typedef int (*dpiOciFnType__shardingKeyColumnAdd)(void *shardingKey, + void *errhp, void *col, uint32_t colLen, uint16_t colType, + uint32_t mode); +typedef int (*dpiOciFnType__sodaBulkInsert)(void *svchp, + void *collection, void **documentarray, uint32_t arraylen, + void *opoptns, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaBulkInsertAndGet)(void *svchp, + void *collection, void **documentarray, uint32_t arraylen, + void *opoptns, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaCollCreateWithMetadata)(void *svchp, + const char *collname, uint32_t collnamelen, const char *metadata, + uint32_t metadatalen, void **collection, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaCollDrop)(void *svchp, void *coll, + int *isDropped, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaCollGetNext)(void *svchp, const void *cur, + void **coll, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaCollList)(void *svchp, const char *startname, + uint32_t stnamelen, void **cur, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaCollOpen)(void *svchp, const char *collname, + uint32_t collnamelen, void **coll, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaDataGuideGet)(void *svchp, + const void *collection, uint32_t docFlags, void **doc, void *errhp, + uint32_t mode); +typedef int (*dpiOciFnType__sodaDocCount)(void *svchp, const void *coll, + const void *optns, uint64_t *numdocs, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaDocGetNext)(void *svchp, const void *cur, + void **doc, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaFind)(void *svchp, const void *coll, + const void *findOptions, uint32_t docFlags, void **cursor, + void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaFindOne)(void *svchp, const void *coll, + const void *findOptions, uint32_t docFlags, void **doc, void *errhp, + uint32_t mode); +typedef int (*dpiOciFnType__sodaIndexCreate)(void *svchp, const void *coll, + const char *indexspec, uint32_t speclen, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaIndexDrop)(void *svchp, const char *indexname, + uint32_t indexnamelen, int *isDropped, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaInsert)(void *svchp, void *collection, + void *document, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaInsertAndGet)(void *svchp, void *collection, + void **document, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaOperKeysSet)(const void *operhp, + const char **keysArray, uint32_t *lengthsArray, uint32_t count, + void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaRemove)(void *svchp, const void *coll, + const void *optns, uint64_t *removeCount, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__sodaReplOne)(void *svchp, const void *coll, + const void *optns, void *document, int *isReplaced, void *errhp, + uint32_t mode); +typedef int (*dpiOciFnType__sodaReplOneAndGet)(void *svchp, const void *coll, + const void *optns, void **document, int *isReplaced, void *errhp, + uint32_t mode); +typedef int (*dpiOciFnType__stmtExecute)(void *svchp, void *stmtp, void *errhp, + uint32_t iters, uint32_t rowoff, const void *snap_in, void *snap_out, + uint32_t mode); +typedef int (*dpiOciFnType__stmtFetch2)(void *stmtp, void *errhp, + uint32_t nrows, uint16_t orientation, int32_t scrollOffset, + uint32_t mode); +typedef int (*dpiOciFnType__stmtGetBindInfo)(void *stmtp, void *errhp, + uint32_t size, uint32_t startloc, int32_t *found, char *bvnp[], + uint8_t bvnl[], char *invp[], uint8_t inpl[], uint8_t dupl[], + void **hndl); +typedef int (*dpiOciFnType__stmtGetNextResult)(void *stmthp, void *errhp, + void **result, uint32_t *rtype, uint32_t mode); +typedef int (*dpiOciFnType__stmtPrepare2)(void *svchp, void **stmtp, + void *errhp, const char *stmt, uint32_t stmt_len, const char *key, + uint32_t key_len, uint32_t language, uint32_t mode); +typedef int (*dpiOciFnType__stmtRelease)(void *stmtp, void *errhp, + const char *key, uint32_t key_len, uint32_t mode); +typedef int (*dpiOciFnType__stringAssignText)(void *env, void *err, + const char *rhs, uint32_t rhs_len, void **lhs); +typedef char *(*dpiOciFnType__stringPtr)(void *env, const void *vs); +typedef int (*dpiOciFnType__stringResize)(void *env, void *err, + uint32_t new_size, void **str); +typedef uint32_t (*dpiOciFnType__stringSize)(void *env, const void *vs); +typedef int (*dpiOciFnType__subscriptionRegister)(void *svchp, + void **subscrhpp, uint16_t count, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__subscriptionUnRegister)(void *svchp, + void *subscrhp, void *errhp, uint32_t mode); +typedef int (*dpiOciFnType__tableDelete)(void *env, void *err, int32_t index, + void *tbl); +typedef int (*dpiOciFnType__tableExists)(void *env, void *err, const void *tbl, + int32_t index, int *exists); +typedef int (*dpiOciFnType__tableFirst)(void *env, void *err, const void *tbl, + int32_t *index); +typedef int (*dpiOciFnType__tableLast)(void *env, void *err, const void *tbl, + int32_t *index); +typedef int (*dpiOciFnType__tableNext)(void *env, void *err, int32_t index, + const void *tbl, int32_t *next_index, int *exists); +typedef int (*dpiOciFnType__tablePrev)(void *env, void *err, int32_t index, + const void *tbl, int32_t *prev_index, int *exists); +typedef int (*dpiOciFnType__tableSize)(void *env, void *err, const void *tbl, + int32_t *size); +typedef int (*dpiOciFnType__threadKeyDestroy)(void *hndl, void *err, + void **key); +typedef int (*dpiOciFnType__threadKeyGet)(void *hndl, void *err, void *key, + void **pValue); +typedef int (*dpiOciFnType__threadKeyInit)(void *hndl, void *err, void **key, + void *destFn); +typedef int (*dpiOciFnType__threadKeySet)(void *hndl, void *err, void *key, + void *value); +typedef void (*dpiOciFnType__threadProcessInit)(void); +typedef int (*dpiOciFnType__transCommit)(void *svchp, void *errhp, + uint32_t flags); +typedef int (*dpiOciFnType__transPrepare)(void *svchp, void *errhp, + uint32_t flags); +typedef int (*dpiOciFnType__transRollback)(void *svchp, void *errhp, + uint32_t flags); +typedef int (*dpiOciFnType__transStart)(void *svchp, void *errhp, + unsigned int timeout, uint32_t flags); +typedef int (*dpiOciFnType__typeByFullName)(void *env, void *err, + const void *svc, const char *full_type_name, + uint32_t full_type_name_length, const char *version_name, + uint32_t version_name_length, uint16_t pin_duration, int get_option, + void **tdo); +typedef int (*dpiOciFnType__typeByName)(void *env, void *err, const void *svc, + const char *schema_name, uint32_t s_length, const char *type_name, + uint32_t t_length, const char *version_name, uint32_t v_length, + uint16_t pin_duration, int get_option, void **tdo); + + +// library handle for dynamically loaded OCI library +static void *dpiOciLibHandle = NULL; + +// library names to search +static const char *dpiOciLibNames[] = { +#if defined _WIN32 || defined __CYGWIN__ + "oci.dll", +#elif __APPLE__ + "libclntsh.dylib", + "libclntsh.dylib.19.1", + "libclntsh.dylib.18.1", + "libclntsh.dylib.12.1", + "libclntsh.dylib.11.1", + "libclntsh.dylib.20.1", +#else + "libclntsh.so", + "libclntsh.so.19.1", + "libclntsh.so.18.1", + "libclntsh.so.12.1", + "libclntsh.so.11.1", + "libclntsh.so.20.1", +#endif + NULL +}; + +// URL fragment to use in load library exception +#if defined _WIN32 || defined __CYGWIN__ + #define DPI_ERR_LOAD_URL_FRAGMENT "windows" +#elif __APPLE__ + #define DPI_ERR_LOAD_URL_FRAGMENT "macos" +#else + #define DPI_ERR_LOAD_URL_FRAGMENT "linux" +#endif + +// version information for loaded OCI library +static dpiVersionInfo dpiOciLibVersionInfo; + +// all OCI symbols used by ODPI-C +static struct { + dpiOciFnType__aqDeq fnAqDeq; + dpiOciFnType__aqDeqArray fnAqDeqArray; + dpiOciFnType__aqEnq fnAqEnq; + dpiOciFnType__aqEnqArray fnAqEnqArray; + dpiOciFnType__arrayDescriptorAlloc fnArrayDescriptorAlloc; + dpiOciFnType__arrayDescriptorFree fnArrayDescriptorFree; + dpiOciFnType__attrGet fnAttrGet; + dpiOciFnType__attrSet fnAttrSet; + dpiOciFnType__bindByName fnBindByName; + dpiOciFnType__bindByName2 fnBindByName2; + dpiOciFnType__bindByPos fnBindByPos; + dpiOciFnType__bindByPos2 fnBindByPos2; + dpiOciFnType__bindDynamic fnBindDynamic; + dpiOciFnType__bindObject fnBindObject; + dpiOciFnType__break fnBreak; + dpiOciFnType__clientVersion fnClientVersion; + dpiOciFnType__collAppend fnCollAppend; + dpiOciFnType__collAssignElem fnCollAssignElem; + dpiOciFnType__collGetElem fnCollGetElem; + dpiOciFnType__collSize fnCollSize; + dpiOciFnType__collTrim fnCollTrim; + dpiOciFnType__contextGetValue fnContextGetValue; + dpiOciFnType__contextSetValue fnContextSetValue; + dpiOciFnType__dateTimeConstruct fnDateTimeConstruct; + dpiOciFnType__dateTimeConvert fnDateTimeConvert; + dpiOciFnType__dateTimeGetDate fnDateTimeGetDate; + dpiOciFnType__dateTimeGetTime fnDateTimeGetTime; + dpiOciFnType__dateTimeGetTimeZoneOffset fnDateTimeGetTimeZoneOffset; + dpiOciFnType__dateTimeIntervalAdd fnDateTimeIntervalAdd; + dpiOciFnType__dateTimeSubtract fnDateTimeSubtract; + dpiOciFnType__dbShutdown fnDbShutdown; + dpiOciFnType__dbStartup fnDbStartup; + dpiOciFnType__defineByPos fnDefineByPos; + dpiOciFnType__defineByPos2 fnDefineByPos2; + dpiOciFnType__defineDynamic fnDefineDynamic; + dpiOciFnType__defineObject fnDefineObject; + dpiOciFnType__describeAny fnDescribeAny; + dpiOciFnType__descriptorAlloc fnDescriptorAlloc; + dpiOciFnType__descriptorFree fnDescriptorFree; + dpiOciFnType__envNlsCreate fnEnvNlsCreate; + dpiOciFnType__errorGet fnErrorGet; + dpiOciFnType__handleAlloc fnHandleAlloc; + dpiOciFnType__handleFree fnHandleFree; + dpiOciFnType__intervalGetDaySecond fnIntervalGetDaySecond; + dpiOciFnType__intervalGetYearMonth fnIntervalGetYearMonth; + dpiOciFnType__intervalSetDaySecond fnIntervalSetDaySecond; + dpiOciFnType__intervalSetYearMonth fnIntervalSetYearMonth; + dpiOciFnType__lobClose fnLobClose; + dpiOciFnType__lobCreateTemporary fnLobCreateTemporary; + dpiOciFnType__lobFileExists fnLobFileExists; + dpiOciFnType__lobFileGetName fnLobFileGetName; + dpiOciFnType__lobFileSetName fnLobFileSetName; + dpiOciFnType__lobFreeTemporary fnLobFreeTemporary; + dpiOciFnType__lobGetChunkSize fnLobGetChunkSize; + dpiOciFnType__lobGetLength2 fnLobGetLength2; + dpiOciFnType__lobIsOpen fnLobIsOpen; + dpiOciFnType__lobIsTemporary fnLobIsTemporary; + dpiOciFnType__lobLocatorAssign fnLobLocatorAssign; + dpiOciFnType__lobOpen fnLobOpen; + dpiOciFnType__lobRead2 fnLobRead2; + dpiOciFnType__lobTrim2 fnLobTrim2; + dpiOciFnType__lobWrite2 fnLobWrite2; + dpiOciFnType__memoryAlloc fnMemoryAlloc; + dpiOciFnType__memoryFree fnMemoryFree; + dpiOciFnType__nlsCharSetConvert fnNlsCharSetConvert; + dpiOciFnType__nlsCharSetIdToName fnNlsCharSetIdToName; + dpiOciFnType__nlsCharSetNameToId fnNlsCharSetNameToId; + dpiOciFnType__nlsEnvironmentVariableGet fnNlsEnvironmentVariableGet; + dpiOciFnType__nlsNameMap fnNlsNameMap; + dpiOciFnType__nlsNumericInfoGet fnNlsNumericInfoGet; + dpiOciFnType__numberFromInt fnNumberFromInt; + dpiOciFnType__numberFromReal fnNumberFromReal; + dpiOciFnType__numberToInt fnNumberToInt; + dpiOciFnType__numberToReal fnNumberToReal; + dpiOciFnType__objectCopy fnObjectCopy; + dpiOciFnType__objectFree fnObjectFree; + dpiOciFnType__objectGetAttr fnObjectGetAttr; + dpiOciFnType__objectGetInd fnObjectGetInd; + dpiOciFnType__objectNew fnObjectNew; + dpiOciFnType__objectPin fnObjectPin; + dpiOciFnType__objectSetAttr fnObjectSetAttr; + dpiOciFnType__paramGet fnParamGet; + dpiOciFnType__passwordChange fnPasswordChange; + dpiOciFnType__ping fnPing; + dpiOciFnType__rawAssignBytes fnRawAssignBytes; + dpiOciFnType__rawPtr fnRawPtr; + dpiOciFnType__rawResize fnRawResize; + dpiOciFnType__rawSize fnRawSize; + dpiOciFnType__rowidToChar fnRowidToChar; + dpiOciFnType__serverAttach fnServerAttach; + dpiOciFnType__serverDetach fnServerDetach; + dpiOciFnType__serverRelease fnServerRelease; + dpiOciFnType__serverRelease2 fnServerRelease2; + dpiOciFnType__sessionBegin fnSessionBegin; + dpiOciFnType__sessionEnd fnSessionEnd; + dpiOciFnType__sessionGet fnSessionGet; + dpiOciFnType__sessionPoolCreate fnSessionPoolCreate; + dpiOciFnType__sessionPoolDestroy fnSessionPoolDestroy; + dpiOciFnType__sessionRelease fnSessionRelease; + dpiOciFnType__shardingKeyColumnAdd fnShardingKeyColumnAdd; + dpiOciFnType__stmtExecute fnStmtExecute; + dpiOciFnType__sodaBulkInsert fnSodaBulkInsert; + dpiOciFnType__sodaBulkInsertAndGet fnSodaBulkInsertAndGet; + dpiOciFnType__sodaCollCreateWithMetadata fnSodaCollCreateWithMetadata; + dpiOciFnType__sodaCollDrop fnSodaCollDrop; + dpiOciFnType__sodaCollGetNext fnSodaCollGetNext; + dpiOciFnType__sodaCollList fnSodaCollList; + dpiOciFnType__sodaCollOpen fnSodaCollOpen; + dpiOciFnType__sodaDataGuideGet fnSodaDataGuideGet; + dpiOciFnType__sodaDocCount fnSodaDocCount; + dpiOciFnType__sodaDocGetNext fnSodaDocGetNext; + dpiOciFnType__sodaFind fnSodaFind; + dpiOciFnType__sodaFindOne fnSodaFindOne; + dpiOciFnType__sodaIndexCreate fnSodaIndexCreate; + dpiOciFnType__sodaIndexDrop fnSodaIndexDrop; + dpiOciFnType__sodaInsert fnSodaInsert; + dpiOciFnType__sodaInsertAndGet fnSodaInsertAndGet; + dpiOciFnType__sodaOperKeysSet fnSodaOperKeysSet; + dpiOciFnType__sodaRemove fnSodaRemove; + dpiOciFnType__sodaReplOne fnSodaReplOne; + dpiOciFnType__sodaReplOneAndGet fnSodaReplOneAndGet; + dpiOciFnType__stmtFetch2 fnStmtFetch2; + dpiOciFnType__stmtGetBindInfo fnStmtGetBindInfo; + dpiOciFnType__stmtGetNextResult fnStmtGetNextResult; + dpiOciFnType__stmtPrepare2 fnStmtPrepare2; + dpiOciFnType__stmtRelease fnStmtRelease; + dpiOciFnType__stringAssignText fnStringAssignText; + dpiOciFnType__stringPtr fnStringPtr; + dpiOciFnType__stringResize fnStringResize; + dpiOciFnType__stringSize fnStringSize; + dpiOciFnType__subscriptionRegister fnSubscriptionRegister; + dpiOciFnType__subscriptionUnRegister fnSubscriptionUnRegister; + dpiOciFnType__tableDelete fnTableDelete; + dpiOciFnType__tableExists fnTableExists; + dpiOciFnType__tableFirst fnTableFirst; + dpiOciFnType__tableLast fnTableLast; + dpiOciFnType__tableNext fnTableNext; + dpiOciFnType__tablePrev fnTablePrev; + dpiOciFnType__tableSize fnTableSize; + dpiOciFnType__threadKeyDestroy fnThreadKeyDestroy; + dpiOciFnType__threadKeyGet fnThreadKeyGet; + dpiOciFnType__threadKeyInit fnThreadKeyInit; + dpiOciFnType__threadKeySet fnThreadKeySet; + dpiOciFnType__threadProcessInit fnThreadProcessInit; + dpiOciFnType__transCommit fnTransCommit; + dpiOciFnType__transPrepare fnTransPrepare; + dpiOciFnType__transRollback fnTransRollback; + dpiOciFnType__transStart fnTransStart; + dpiOciFnType__typeByFullName fnTypeByFullName; + dpiOciFnType__typeByName fnTypeByName; +} dpiOciSymbols; + + +//----------------------------------------------------------------------------- +// dpiOci__allocateMem() [INTERNAL] +// Wrapper for OCI allocation of memory, only used when debugging memory +// allocation. +//----------------------------------------------------------------------------- +static void *dpiOci__allocateMem(UNUSED void *unused, size_t size) +{ + void *ptr; + + ptr = malloc(size); + dpiDebug__print("OCI allocated %u bytes at %p\n", size, ptr); + return ptr; +} + + +//----------------------------------------------------------------------------- +// dpiOci__aqDeq() [INTERNAL] +// Wrapper for OCIAQDeq(). +//----------------------------------------------------------------------------- +int dpiOci__aqDeq(dpiConn *conn, const char *queueName, void *options, + void *msgProps, void *payloadType, void **payload, void **payloadInd, + void **msgId, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIAQDeq", dpiOciSymbols.fnAqDeq) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnAqDeq)(conn->handle, error->handle, queueName, + options, msgProps, payloadType, payload, payloadInd, msgId, + DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "dequeue message"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__aqDeqArray() [INTERNAL] +// Wrapper for OCIAQDeqArray(). +//----------------------------------------------------------------------------- +int dpiOci__aqDeqArray(dpiConn *conn, const char *queueName, void *options, + uint32_t *numIters, void **msgProps, void *payloadType, void **payload, + void **payloadInd, void **msgId, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIAQDeqArray", dpiOciSymbols.fnAqDeqArray) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnAqDeqArray)(conn->handle, error->handle, + queueName, options, numIters, msgProps, payloadType, payload, + payloadInd, msgId, NULL, NULL, DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "dequeue messages"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__aqEnq() [INTERNAL] +// Wrapper for OCIAQEnq(). +//----------------------------------------------------------------------------- +int dpiOci__aqEnq(dpiConn *conn, const char *queueName, void *options, + void *msgProps, void *payloadType, void **payload, void **payloadInd, + void **msgId, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIAQEnq", dpiOciSymbols.fnAqEnq) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnAqEnq)(conn->handle, error->handle, queueName, + options, msgProps, payloadType, payload, payloadInd, msgId, + DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "enqueue message"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__aqEnqArray() [INTERNAL] +// Wrapper for OCIAQEnqArray(). +//----------------------------------------------------------------------------- +int dpiOci__aqEnqArray(dpiConn *conn, const char *queueName, void *options, + uint32_t *numIters, void **msgProps, void *payloadType, void **payload, + void **payloadInd, void **msgId, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIAQEnqArray", dpiOciSymbols.fnAqEnqArray) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnAqEnqArray)(conn->handle, error->handle, + queueName, options, numIters, msgProps, payloadType, payload, + payloadInd, msgId, NULL, NULL, DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "enqueue messages"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__arrayDescriptorAlloc() [INTERNAL] +// Wrapper for OCIArrayDescriptorAlloc(). +//----------------------------------------------------------------------------- +int dpiOci__arrayDescriptorAlloc(void *envHandle, void **handle, + uint32_t handleType, uint32_t arraySize, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIArrayDescriptorAlloc", + dpiOciSymbols.fnArrayDescriptorAlloc) + status = (*dpiOciSymbols.fnArrayDescriptorAlloc)(envHandle, handle, + handleType, arraySize, 0, NULL); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "allocate descriptors"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__arrayDescriptorFree() [INTERNAL] +// Wrapper for OCIArrayDescriptorFree(). +//----------------------------------------------------------------------------- +int dpiOci__arrayDescriptorFree(void **handle, uint32_t handleType) +{ + dpiError *error = NULL; + int status; + + DPI_OCI_LOAD_SYMBOL("OCIArrayDescriptorFree", + dpiOciSymbols.fnArrayDescriptorFree) + status = (*dpiOciSymbols.fnArrayDescriptorFree)(handle, handleType); + if (status != DPI_OCI_SUCCESS && dpiDebugLevel & DPI_DEBUG_LEVEL_FREES) + dpiDebug__print("free array descriptors %p, handleType %d failed\n", + handle, handleType); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__attrGet() [INTERNAL] +// Wrapper for OCIAttrGet(). +//----------------------------------------------------------------------------- +int dpiOci__attrGet(const void *handle, uint32_t handleType, void *ptr, + uint32_t *size, uint32_t attribute, const char *action, + dpiError *error) +{ + int status; + + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnAttrGet)(handle, handleType, ptr, size, + attribute, error->handle); + if (!action) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); +} + + +//----------------------------------------------------------------------------- +// dpiOci__attrSet() [INTERNAL] +// Wrapper for OCIAttrSet(). +//----------------------------------------------------------------------------- +int dpiOci__attrSet(void *handle, uint32_t handleType, void *ptr, + uint32_t size, uint32_t attribute, const char *action, dpiError *error) +{ + int status; + + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnAttrSet)(handle, handleType, ptr, size, + attribute, error->handle); + if (!action) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); +} + + +//----------------------------------------------------------------------------- +// dpiOci__bindByName() [INTERNAL] +// Wrapper for OCIBindByName(). +//----------------------------------------------------------------------------- +int dpiOci__bindByName(dpiStmt *stmt, void **bindHandle, const char *name, + int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIBindByName", dpiOciSymbols.fnBindByName) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnBindByName)(stmt->handle, bindHandle, + error->handle, name, nameLength, + (dynamicBind) ? NULL : var->buffer.data.asRaw, + (var->isDynamic) ? INT_MAX : (int32_t) var->sizeInBytes, + var->type->oracleType, (dynamicBind) ? NULL : + var->buffer.indicator, + (dynamicBind || var->type->sizeInBytes) ? NULL : + var->buffer.actualLength16, + (dynamicBind) ? NULL : var->buffer.returnCode, + (var->isArray) ? var->buffer.maxArraySize : 0, + (var->isArray) ? &var->buffer.actualArraySize : NULL, + (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by name"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__bindByName2() [INTERNAL] +// Wrapper for OCIBindByName2(). +//----------------------------------------------------------------------------- +int dpiOci__bindByName2(dpiStmt *stmt, void **bindHandle, const char *name, + int32_t nameLength, int dynamicBind, dpiVar *var, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIBindByName2", dpiOciSymbols.fnBindByName2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnBindByName2)(stmt->handle, bindHandle, + error->handle, name, nameLength, + (dynamicBind) ? NULL : var->buffer.data.asRaw, + (var->isDynamic) ? INT_MAX : var->sizeInBytes, + var->type->oracleType, (dynamicBind) ? NULL : + var->buffer.indicator, + (dynamicBind || var->type->sizeInBytes) ? NULL : + var->buffer.actualLength32, + (dynamicBind) ? NULL : var->buffer.returnCode, + (var->isArray) ? var->buffer.maxArraySize : 0, + (var->isArray) ? &var->buffer.actualArraySize : NULL, + (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by name"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__bindByPos() [INTERNAL] +// Wrapper for OCIBindByPos(). +//----------------------------------------------------------------------------- +int dpiOci__bindByPos(dpiStmt *stmt, void **bindHandle, uint32_t pos, + int dynamicBind, dpiVar *var, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIBindByPos", dpiOciSymbols.fnBindByPos) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnBindByPos)(stmt->handle, bindHandle, + error->handle, pos, (dynamicBind) ? NULL : var->buffer.data.asRaw, + (var->isDynamic) ? INT_MAX : (int32_t) var->sizeInBytes, + var->type->oracleType, (dynamicBind) ? NULL : + var->buffer.indicator, + (dynamicBind || var->type->sizeInBytes) ? NULL : + var->buffer.actualLength16, + (dynamicBind) ? NULL : var->buffer.returnCode, + (var->isArray) ? var->buffer.maxArraySize : 0, + (var->isArray) ? &var->buffer.actualArraySize : NULL, + (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by position"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__bindByPos2() [INTERNAL] +// Wrapper for OCIBindByPos2(). +//----------------------------------------------------------------------------- +int dpiOci__bindByPos2(dpiStmt *stmt, void **bindHandle, uint32_t pos, + int dynamicBind, dpiVar *var, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIBindByPos2", dpiOciSymbols.fnBindByPos2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnBindByPos2)(stmt->handle, bindHandle, + error->handle, pos, (dynamicBind) ? NULL : var->buffer.data.asRaw, + (var->isDynamic) ? INT_MAX : var->sizeInBytes, + var->type->oracleType, (dynamicBind) ? NULL : + var->buffer.indicator, + (dynamicBind || var->type->sizeInBytes) ? NULL : + var->buffer.actualLength32, + (dynamicBind) ? NULL : var->buffer.returnCode, + (var->isArray) ? var->buffer.maxArraySize : 0, + (var->isArray) ? &var->buffer.actualArraySize : NULL, + (dynamicBind) ? DPI_OCI_DATA_AT_EXEC : DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "bind by position"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__bindDynamic() [INTERNAL] +// Wrapper for OCIBindDynamic(). +//----------------------------------------------------------------------------- +int dpiOci__bindDynamic(dpiVar *var, void *bindHandle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIBindDynamic", dpiOciSymbols.fnBindDynamic) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnBindDynamic)(bindHandle, error->handle, var, + (void*) dpiVar__inBindCallback, var, + (void*) dpiVar__outBindCallback); + DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "bind dynamic"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__bindObject() [INTERNAL] +// Wrapper for OCIBindObject(). +//----------------------------------------------------------------------------- +int dpiOci__bindObject(dpiVar *var, void *bindHandle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIBindObject", dpiOciSymbols.fnBindObject) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnBindObject)(bindHandle, error->handle, + var->objectType->tdo, (void**) var->buffer.data.asRaw, 0, + var->buffer.objectIndicator, 0); + DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "bind object"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__break() [INTERNAL] +// Wrapper for OCIBreak(). +//----------------------------------------------------------------------------- +int dpiOci__break(dpiConn *conn, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIBreak", dpiOciSymbols.fnBreak) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnBreak)(conn->handle, error->handle); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "break execution"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__clientVersion() [INTERNAL] +// Set the version information in the context to the OCI client version +// information that was discovered when the OCI library was loaded. +//----------------------------------------------------------------------------- +void dpiOci__clientVersion(dpiContext *context) +{ + context->versionInfo = &dpiOciLibVersionInfo; +} + + +//----------------------------------------------------------------------------- +// dpiOci__collAppend() [INTERNAL] +// Wrapper for OCICollAppend(). +//----------------------------------------------------------------------------- +int dpiOci__collAppend(dpiConn *conn, const void *elem, const void *elemInd, + void *coll, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCICollAppend", dpiOciSymbols.fnCollAppend) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnCollAppend)(conn->env->handle, error->handle, + elem, elemInd, coll); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "append element"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__collAssignElem() [INTERNAL] +// Wrapper for OCICollAssignElem(). +//----------------------------------------------------------------------------- +int dpiOci__collAssignElem(dpiConn *conn, int32_t index, const void *elem, + const void *elemInd, void *coll, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCICollAssignElem", dpiOciSymbols.fnCollAssignElem) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnCollAssignElem)(conn->env->handle, + error->handle, index, elem, elemInd, coll); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "assign element"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__collGetElem() [INTERNAL] +// Wrapper for OCICollGetElem(). +//----------------------------------------------------------------------------- +int dpiOci__collGetElem(dpiConn *conn, void *coll, int32_t index, int *exists, + void **elem, void **elemInd, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCICollGetElem", dpiOciSymbols.fnCollGetElem) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnCollGetElem)(conn->env->handle, error->handle, + coll, index, exists, elem, elemInd); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get element"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__collSize() [INTERNAL] +// Wrapper for OCICollSize(). +//----------------------------------------------------------------------------- +int dpiOci__collSize(dpiConn *conn, void *coll, int32_t *size, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCICollSize", dpiOciSymbols.fnCollSize) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnCollSize)(conn->env->handle, error->handle, + coll, size); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get size"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__collTrim() [INTERNAL] +// Wrapper for OCICollTrim(). +//----------------------------------------------------------------------------- +int dpiOci__collTrim(dpiConn *conn, uint32_t numToTrim, void *coll, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCICollTrim", dpiOciSymbols.fnCollTrim) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnCollTrim)(conn->env->handle, error->handle, + (int32_t) numToTrim, coll); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "trim"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__contextGetValue() [INTERNAL] +// Wrapper for OCIContextGetValue(). +//----------------------------------------------------------------------------- +int dpiOci__contextGetValue(dpiConn *conn, const char *key, uint32_t keyLength, + void **value, int checkError, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIContextGetValue", dpiOciSymbols.fnContextGetValue) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnContextGetValue)(conn->sessionHandle, + error->handle, key, (uint8_t) keyLength, value); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get context value"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__contextSetValue() [INTERNAL] +// Wrapper for OCIContextSetValue(). +//----------------------------------------------------------------------------- +int dpiOci__contextSetValue(dpiConn *conn, const char *key, uint32_t keyLength, + void *value, int checkError, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIContextSetValue", dpiOciSymbols.fnContextSetValue) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnContextSetValue)(conn->sessionHandle, + error->handle, DPI_OCI_DURATION_SESSION, key, (uint8_t) keyLength, + value); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "set context value"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dateTimeConstruct() [INTERNAL] +// Wrapper for OCIDateTimeConstruct(). +//----------------------------------------------------------------------------- +int dpiOci__dateTimeConstruct(void *envHandle, void *handle, int16_t year, + uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, + uint8_t second, uint32_t fsecond, const char *tz, size_t tzLength, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDateTimeConstruct", + dpiOciSymbols.fnDateTimeConstruct) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDateTimeConstruct)(envHandle, error->handle, + handle, year, month, day, hour, minute, second, fsecond, tz, + tzLength); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "construct date"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dateTimeConvert() [INTERNAL] +// Wrapper for OCIDateTimeConvert(). +//----------------------------------------------------------------------------- +int dpiOci__dateTimeConvert(void *envHandle, void *inDate, void *outDate, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDateTimeConvert", dpiOciSymbols.fnDateTimeConvert) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDateTimeConvert)(envHandle, error->handle, + inDate, outDate); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "convert date"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dateTimeGetDate() [INTERNAL] +// Wrapper for OCIDateTimeGetDate(). +//----------------------------------------------------------------------------- +int dpiOci__dateTimeGetDate(void *envHandle, void *handle, int16_t *year, + uint8_t *month, uint8_t *day, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDateTimeGetDate", dpiOciSymbols.fnDateTimeGetDate) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDateTimeGetDate)(envHandle, error->handle, + handle, year, month, day); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get date portion"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dateTimeGetTime() [INTERNAL] +// Wrapper for OCIDateTimeGetTime(). +//----------------------------------------------------------------------------- +int dpiOci__dateTimeGetTime(void *envHandle, void *handle, uint8_t *hour, + uint8_t *minute, uint8_t *second, uint32_t *fsecond, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDateTimeGetTime", dpiOciSymbols.fnDateTimeGetTime) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDateTimeGetTime)(envHandle, error->handle, + handle, hour, minute, second, fsecond); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get time portion"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dateTimeGetTimeZoneOffset() [INTERNAL] +// Wrapper for OCIDateTimeGetTimeZoneOffset(). +//----------------------------------------------------------------------------- +int dpiOci__dateTimeGetTimeZoneOffset(void *envHandle, void *handle, + int8_t *tzHourOffset, int8_t *tzMinuteOffset, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDateTimeGetTimeZoneOffset", + dpiOciSymbols.fnDateTimeGetTimeZoneOffset) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDateTimeGetTimeZoneOffset)(envHandle, + error->handle, handle, tzHourOffset, tzMinuteOffset); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get time zone portion"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dateTimeIntervalAdd() [INTERNAL] +// Wrapper for OCIDateTimeIntervalAdd(). +//----------------------------------------------------------------------------- +int dpiOci__dateTimeIntervalAdd(void *envHandle, void *handle, void *interval, + void *outHandle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDateTimeIntervalAdd", + dpiOciSymbols.fnDateTimeIntervalAdd) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDateTimeIntervalAdd)(envHandle, error->handle, + handle, interval, outHandle); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "add interval to date"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dateTimeSubtract() [INTERNAL] +// Wrapper for OCIDateTimeSubtract(). +//----------------------------------------------------------------------------- +int dpiOci__dateTimeSubtract(void *envHandle, void *handle1, void *handle2, + void *interval, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDateTimeSubtract", + dpiOciSymbols.fnDateTimeSubtract) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDateTimeSubtract)(envHandle, error->handle, + handle1, handle2, interval); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "subtract date"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dbShutdown() [INTERNAL] +// Wrapper for OCIDBShutdown(). +//----------------------------------------------------------------------------- +int dpiOci__dbShutdown(dpiConn *conn, uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDBShutdown", dpiOciSymbols.fnDbShutdown) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDbShutdown)(conn->handle, error->handle, NULL, + mode); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "shutdown database"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__dbStartup() [INTERNAL] +// Wrapper for OCIDBStartup(). +//----------------------------------------------------------------------------- +int dpiOci__dbStartup(dpiConn *conn, uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDBStartup", dpiOciSymbols.fnDbStartup) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDbStartup)(conn->handle, error->handle, NULL, + DPI_OCI_DEFAULT, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "startup database"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__defineByPos() [INTERNAL] +// Wrapper for OCIDefineByPos(). +//----------------------------------------------------------------------------- +int dpiOci__defineByPos(dpiStmt *stmt, void **defineHandle, uint32_t pos, + dpiVar *var, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDefineByPos", dpiOciSymbols.fnDefineByPos) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDefineByPos)(stmt->handle, defineHandle, + error->handle, pos, (var->isDynamic) ? NULL : + var->buffer.data.asRaw, + (var->isDynamic) ? INT_MAX : (int32_t) var->sizeInBytes, + var->type->oracleType, (var->isDynamic) ? NULL : + var->buffer.indicator, + (var->isDynamic) ? NULL : var->buffer.actualLength16, + (var->isDynamic) ? NULL : var->buffer.returnCode, + (var->isDynamic) ? DPI_OCI_DYNAMIC_FETCH : DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "define"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__defineByPos2() [INTERNAL] +// Wrapper for OCIDefineByPos2(). +//----------------------------------------------------------------------------- +int dpiOci__defineByPos2(dpiStmt *stmt, void **defineHandle, uint32_t pos, + dpiVar *var, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDefineByPos2", dpiOciSymbols.fnDefineByPos2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDefineByPos2)(stmt->handle, defineHandle, + error->handle, pos, (var->isDynamic) ? NULL : + var->buffer.data.asRaw, + (var->isDynamic) ? INT_MAX : var->sizeInBytes, + var->type->oracleType, (var->isDynamic) ? NULL : + var->buffer.indicator, + (var->isDynamic) ? NULL : var->buffer.actualLength32, + (var->isDynamic) ? NULL : var->buffer.returnCode, + (var->isDynamic) ? DPI_OCI_DYNAMIC_FETCH : DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "define"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__defineDynamic() [INTERNAL] +// Wrapper for OCIDefineDynamic(). +//----------------------------------------------------------------------------- +int dpiOci__defineDynamic(dpiVar *var, void *defineHandle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDefineDynamic", dpiOciSymbols.fnDefineDynamic) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDefineDynamic)(defineHandle, error->handle, var, + (void*) dpiVar__defineCallback); + DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "define dynamic"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__defineObject() [INTERNAL] +// Wrapper for OCIDefineObject(). +//----------------------------------------------------------------------------- +int dpiOci__defineObject(dpiVar *var, void *defineHandle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDefineObject", dpiOciSymbols.fnDefineObject) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDefineObject)(defineHandle, error->handle, + var->objectType->tdo, (void**) var->buffer.data.asRaw, 0, + var->buffer.objectIndicator, 0); + DPI_OCI_CHECK_AND_RETURN(error, status, var->conn, "define object"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__describeAny() [INTERNAL] +// Wrapper for OCIDescribeAny(). +//----------------------------------------------------------------------------- +int dpiOci__describeAny(dpiConn *conn, void *obj, uint32_t objLength, + uint8_t objType, void *describeHandle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDescribeAny", dpiOciSymbols.fnDescribeAny) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnDescribeAny)(conn->handle, error->handle, obj, + objLength, objType, 0, DPI_OCI_PTYPE_TYPE, describeHandle); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "describe type"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__descriptorAlloc() [INTERNAL] +// Wrapper for OCIDescriptorAlloc(). +//----------------------------------------------------------------------------- +int dpiOci__descriptorAlloc(void *envHandle, void **handle, + const uint32_t handleType, const char *action, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDescriptorAlloc", dpiOciSymbols.fnDescriptorAlloc) + status = (*dpiOciSymbols.fnDescriptorAlloc)(envHandle, handle, handleType, + 0, NULL); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); +} + + +//----------------------------------------------------------------------------- +// dpiOci__descriptorFree() [INTERNAL] +// Wrapper for OCIDescriptorFree(). +//----------------------------------------------------------------------------- +int dpiOci__descriptorFree(void *handle, uint32_t handleType) +{ + dpiError *error = NULL; + int status; + + DPI_OCI_LOAD_SYMBOL("OCIDescriptorFree", dpiOciSymbols.fnDescriptorFree) + status = (*dpiOciSymbols.fnDescriptorFree)(handle, handleType); + if (status != DPI_OCI_SUCCESS && dpiDebugLevel & DPI_DEBUG_LEVEL_FREES) + dpiDebug__print("free descriptor %p, type %d failed\n", handle, + handleType); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__envNlsCreate() [INTERNAL] +// Wrapper for OCIEnvNlsCreate(). +//----------------------------------------------------------------------------- +int dpiOci__envNlsCreate(void **envHandle, uint32_t mode, uint16_t charsetId, + uint16_t ncharsetId, dpiError *error) +{ + void *mallocFn = NULL, *reallocFn = NULL, *freeFn = NULL; + int status; + + *envHandle = NULL; + DPI_OCI_LOAD_SYMBOL("OCIEnvNlsCreate", dpiOciSymbols.fnEnvNlsCreate) + if (dpiDebugLevel & DPI_DEBUG_LEVEL_MEM) { + mallocFn = (void*) dpiOci__allocateMem; + reallocFn = (void*) dpiOci__reallocMem; + freeFn = (void*) dpiOci__freeMem; + } + status = (*dpiOciSymbols.fnEnvNlsCreate)(envHandle, mode, NULL, mallocFn, + reallocFn, freeFn, 0, NULL, charsetId, ncharsetId); + if (*envHandle) { + if (status == DPI_OCI_SUCCESS || status == DPI_OCI_SUCCESS_WITH_INFO) + return DPI_SUCCESS; + if (dpiOci__errorGet(*envHandle, DPI_OCI_HTYPE_ENV, charsetId, + "create env", error) == 0) + return DPI_FAILURE; + } + return dpiError__set(error, "create env", DPI_ERR_CREATE_ENV); +} + + +//----------------------------------------------------------------------------- +// dpiOci__errorGet() [INTERNAL] +// Wrapper for OCIErrorGet(). +//----------------------------------------------------------------------------- +int dpiOci__errorGet(void *handle, uint32_t handleType, uint16_t charsetId, + const char *action, dpiError *error) +{ + uint32_t i, numChars, bufferChars; + uint16_t *utf16chars; + int status; + char *ptr; + + DPI_OCI_LOAD_SYMBOL("OCIErrorGet", dpiOciSymbols.fnErrorGet) + status = (*dpiOciSymbols.fnErrorGet)(handle, 1, NULL, &error->buffer->code, + error->buffer->message, sizeof(error->buffer->message), + handleType); + if (status != DPI_OCI_SUCCESS) + return dpiError__set(error, action, DPI_ERR_GET_FAILED); + error->buffer->action = action; + + // determine length of message since OCI does not provide this information; + // all encodings except UTF-16 can use normal string processing; cannot use + // type whar_t for processing UTF-16, though, as its size may be 4 on some + // platforms, not 2; also strip trailing whitespace from error messages + if (charsetId == DPI_CHARSET_ID_UTF16) { + numChars = 0; + utf16chars = (uint16_t*) error->buffer->message; + bufferChars = sizeof(error->buffer->message) / 2; + for (i = 0; i < bufferChars; i++) { + if (utf16chars[i] == 0) + break; + if (utf16chars[i] > 127 || !isspace(utf16chars[i])) + numChars = i + 1; + } + error->buffer->messageLength = numChars * 2; + } else { + error->buffer->messageLength = + (uint32_t) strlen(error->buffer->message); + ptr = error->buffer->message + error->buffer->messageLength - 1; + while (ptr > error->buffer->message && isspace((uint8_t) *ptr--)) + error->buffer->messageLength--; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__freeMem() [INTERNAL] +// Wrapper for OCI allocation of memory, only used when debugging memory +// allocation. +//----------------------------------------------------------------------------- +static void dpiOci__freeMem(UNUSED void *unused, void *ptr) +{ + char message[40]; + + (void) sprintf(message, "OCI freed ptr at %p", ptr); + free(ptr); + dpiDebug__print("%s\n", message); +} + + +//----------------------------------------------------------------------------- +// dpiOci__handleAlloc() [INTERNAL] +// Wrapper for OCIHandleAlloc(). +//----------------------------------------------------------------------------- +int dpiOci__handleAlloc(void *envHandle, void **handle, uint32_t handleType, + const char *action, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIHandleAlloc", dpiOciSymbols.fnHandleAlloc) + status = (*dpiOciSymbols.fnHandleAlloc)(envHandle, handle, handleType, 0, + NULL); + if (handleType == DPI_OCI_HTYPE_ERROR && status != DPI_OCI_SUCCESS) + return dpiError__set(error, action, DPI_ERR_NO_MEMORY); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); +} + + +//----------------------------------------------------------------------------- +// dpiOci__handleFree() [INTERNAL] +// Wrapper for OCIHandleFree(). +//----------------------------------------------------------------------------- +int dpiOci__handleFree(void *handle, uint32_t handleType) +{ + dpiError *error = NULL; + int status; + + DPI_OCI_LOAD_SYMBOL("OCIHandleFree", dpiOciSymbols.fnHandleFree) + status = (*dpiOciSymbols.fnHandleFree)(handle, handleType); + if (status != DPI_OCI_SUCCESS && dpiDebugLevel & DPI_DEBUG_LEVEL_FREES) + dpiDebug__print("free handle %p, handleType %d failed\n", handle, + handleType); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__intervalGetDaySecond() [INTERNAL] +// Wrapper for OCIIntervalGetDaySecond(). +//----------------------------------------------------------------------------- +int dpiOci__intervalGetDaySecond(void *envHandle, int32_t *day, int32_t *hour, + int32_t *minute, int32_t *second, int32_t *fsecond, + const void *interval, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIIntervalGetDaySecond", + dpiOciSymbols.fnIntervalGetDaySecond) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnIntervalGetDaySecond)(envHandle, + error->handle, day, hour, minute, second, fsecond, interval); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get interval components"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__intervalGetYearMonth() [INTERNAL] +// Wrapper for OCIIntervalGetYearMonth(). +//----------------------------------------------------------------------------- +int dpiOci__intervalGetYearMonth(void *envHandle, int32_t *year, + int32_t *month, const void *interval, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIIntervalGetYearMonth", + dpiOciSymbols.fnIntervalGetYearMonth) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnIntervalGetYearMonth)(envHandle, error->handle, + year, month, interval); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get interval components"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__intervalSetDaySecond() [INTERNAL] +// Wrapper for OCIIntervalSetDaySecond(). +//----------------------------------------------------------------------------- +int dpiOci__intervalSetDaySecond(void *envHandle, int32_t day, int32_t hour, + int32_t minute, int32_t second, int32_t fsecond, void *interval, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIIntervalSetDaySecond", + dpiOciSymbols.fnIntervalSetDaySecond) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnIntervalSetDaySecond)(envHandle, error->handle, + day, hour, minute, second, fsecond, interval); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "set interval components"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__intervalSetYearMonth() [INTERNAL] +// Wrapper for OCIIntervalSetYearMonth(). +//----------------------------------------------------------------------------- +int dpiOci__intervalSetYearMonth(void *envHandle, int32_t year, int32_t month, + void *interval, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIIntervalSetYearMonth", + dpiOciSymbols.fnIntervalSetYearMonth) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnIntervalSetYearMonth)(envHandle, error->handle, + year, month, interval); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "set interval components"); +} + + +#ifdef _WIN32 +//----------------------------------------------------------------------------- +// dpiOci__checkDllArchitecture() [INTERNAL] +// Check the architecture of the specified DLL name and check that it +// matches the expected architecture. Returns -1 if the DLL architecture could +// not be determined, 0 if it does not match and 1 if it matches. +//----------------------------------------------------------------------------- +static int dpiOci__checkDllArchitecture(const char *name) +{ + IMAGE_DOS_HEADER dosHeader; + IMAGE_NT_HEADERS ntHeaders; + FILE *fp; + + fp = fopen(name, "rb"); + if (!fp) + return -1; + fread(&dosHeader, sizeof(dosHeader), 1, fp); + if (dosHeader.e_magic != IMAGE_DOS_SIGNATURE) { + fclose(fp); + return -1; + } + fseek(fp, dosHeader.e_lfanew, SEEK_SET); + fread(&ntHeaders, sizeof(ntHeaders), 1, fp); + fclose(fp); + if (ntHeaders.Signature != IMAGE_NT_SIGNATURE) + return -1; +#if defined _M_AMD64 + if (ntHeaders.FileHeader.Machine == IMAGE_FILE_MACHINE_AMD64) + return 1; +#elif defined _M_IX86 + if (ntHeaders.FileHeader.Machine == IMAGE_FILE_MACHINE_I386) + return 1; +#endif + return 0; +} + + +//----------------------------------------------------------------------------- +// dpiOci__findAndCheckDllArchitecture() [INTERNAL] +// Attempt to find the specified DLL name using the standard search path and +// if the DLL can be found but is of the wrong architecture, include the full +// name of the DLL in the load error. Return -1 if such a DLL could not be +// found and 0 if the load error was changed. +//----------------------------------------------------------------------------- +static int dpiOci__findAndCheckDllArchitecture(const char *dllName, + char *loadError, size_t loadErrorLength) +{ + char fullName[_MAX_PATH + 1], *path, *temp; + size_t length; + int found = 0; + + // first search executable directory + if (GetModuleFileName(NULL, fullName, sizeof(fullName)) != 0) { + temp = strrchr(fullName, '\\'); + if (temp) { + *(temp + 1) = '\0'; + strncat(fullName, dllName, + sizeof(fullName) - strlen(fullName) - 1); + if (dpiOci__checkDllArchitecture(fullName) == 0) + found = 1; + } + } + + // check current directory + if (!found && GetCurrentDirectory(sizeof(fullName), fullName) != 0) { + temp = fullName + strlen(fullName); + snprintf(temp, sizeof(fullName) - strlen(fullName), "\\%s", dllName); + if (dpiOci__checkDllArchitecture(fullName) == 0) + found = 1; + } + + // search PATH + path = getenv("PATH"); + if (path) { + while (!found) { + temp = strchr(path, ';'); + if (!temp) + length = strlen(path); + else length = temp - path; + if (length <= _MAX_DIR) { + snprintf(fullName, sizeof(fullName), "%.*s\\%s", (int) length, + path, dllName); + if (dpiOci__checkDllArchitecture(fullName) == 0) { + found = 1; + break; + } + } + if (!temp) + break; + path = temp + 1; + } + } + + // if found, adjust the load error + if (found) { + snprintf(loadError, loadErrorLength, + "%s is not the correct architecture", fullName); + loadError[loadErrorLength - 1] = '\0'; + return 0; + } + + return -1; +} + + +//----------------------------------------------------------------------------- +// dpiOci__getLoadErrorOnWindows() [INTERNAL] +// Get the error message for a load failure on Windows. +//----------------------------------------------------------------------------- +static void dpiOci__getLoadErrorOnWindows(const char *dllName, + char *loadError, size_t loadErrorLength) +{ + DWORD length = 0, errorNum, status; + wchar_t *wLoadError = NULL; + + // if DLL is of the wrong architecture, attempt to locate the DLL that was + // loaded and use that information if it can be found + errorNum = GetLastError(); + if (errorNum == ERROR_BAD_EXE_FORMAT && + dpiOci__findAndCheckDllArchitecture(dllName, loadError, + loadErrorLength) == 0) + return; + + // get error message in Unicode first + // use English unless English error messages aren't available + status = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, errorNum, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), + (LPWSTR) &wLoadError, 0, NULL); + if (!status && GetLastError() == ERROR_MUI_FILE_NOT_FOUND) + FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, errorNum, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPWSTR) &wLoadError, 0, NULL); + + if (wLoadError) { + + // strip trailing period and carriage return from message, if needed + length = (DWORD) wcslen(wLoadError); + while (length > 0) { + if (wLoadError[length - 1] > 127 || + (wLoadError[length - 1] != L'.' && + !isspace(wLoadError[length - 1]))) + break; + length--; + } + wLoadError[length] = L'\0'; + + // convert to a multi-byte string in UTF-8 encoding + if (length > 0) + length = WideCharToMultiByte(CP_UTF8, 0, wLoadError, -1, loadError, + (int) loadErrorLength, NULL, NULL); + LocalFree(wLoadError); + + } + + // fallback in case message cannot be determined + if (length == 0) + sprintf(loadError, "DLL load failed: Windows Error %d", errorNum); +} + + +//----------------------------------------------------------------------------- +// dpiOci__loadLibOnWindows() [INTERNAL] +// Load the library on the Windows platform. First an attempt is made to +// determine the location of the module containing ODPI-C. If found, an attempt +// is made to load oci.dll from that location; otherwise a standard Windows +// search is made for oci.dll. +//----------------------------------------------------------------------------- +static void dpiOci__loadLibOnWindows(const char *dllName) +{ + char moduleName[MAX_PATH + 1], *temp; + HMODULE module = NULL; + + // attempt to determine the location of the module containing ODPI-C; + // errors in this code are ignored and the normal loading mechanism is + // used instead + if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, + (LPCSTR) dpiOci__loadLibOnWindows, &module)) { + if (GetModuleFileName(module, moduleName, sizeof(moduleName)) > 0) { + temp = strrchr(moduleName, '\\'); + if (temp) { + *(temp + 1) = '\0'; + strncat(moduleName, dllName, + sizeof(moduleName) - strlen(moduleName) - 1); + dpiOciLibHandle = LoadLibrary(moduleName); + } + } + FreeLibrary(module); + } + + // if library was not loaded in the same location as ODPI-C, use the + // standard Windows search to locate oci.dll instead + if (!dpiOciLibHandle) + dpiOciLibHandle = LoadLibrary(dllName); +} +#endif + + +//----------------------------------------------------------------------------- +// dpiOci__loadLib() [INTERNAL] +// Load the OCI library. +//----------------------------------------------------------------------------- +static int dpiOci__loadLib(dpiError *error) +{ + const char *libName; + char loadError[512]; + unsigned int i; +#ifndef _WIN32 + char *oracleHome, *oracleHomeLibName; + size_t oracleHomeLibNameLength; +#endif + + // dynamically load the OCI library + for (i = 0; !dpiOciLibHandle; i++) { + libName = dpiOciLibNames[i]; + if (!libName) + break; +#ifdef _WIN32 + dpiOci__loadLibOnWindows(libName); + if (!dpiOciLibHandle && i == 0) + dpiOci__getLoadErrorOnWindows(libName, loadError, + sizeof(loadError)); +#else + dpiOciLibHandle = dlopen(libName, RTLD_LAZY); + if (!dpiOciLibHandle && i == 0) { + strncpy(loadError, dlerror(), sizeof(loadError) - 1); + loadError[sizeof(loadError) - 1] = '\0'; + } +#endif + + } + +#ifndef _WIN32 + // on platforms other than Windows, attempt to use + // $ORACLE_HOME/lib/libclntsh.so + if (!dpiOciLibHandle) { + oracleHome = getenv("ORACLE_HOME"); + if (oracleHome) { + oracleHomeLibNameLength = strlen(oracleHome) + 6 + + strlen(dpiOciLibNames[0]); + oracleHomeLibName = (char*) malloc(oracleHomeLibNameLength); + if (oracleHomeLibName) { + (void) sprintf(oracleHomeLibName, "%s/lib/%s", oracleHome, + dpiOciLibNames[0]); + dpiOciLibHandle = dlopen(oracleHomeLibName, RTLD_LAZY); + free(oracleHomeLibName); + } + } + } +#endif + + if (!dpiOciLibHandle) { + const char *bits = (sizeof(void*) == 8) ? "64" : "32"; + return dpiError__set(error, "load library", DPI_ERR_LOAD_LIBRARY, + bits, loadError, DPI_ERR_LOAD_URL_FRAGMENT); + } + + // validate library + if (dpiOci__loadLibValidate(error) < 0) { +#ifdef _WIN32 + FreeLibrary(dpiOciLibHandle); +#else + dlclose(dpiOciLibHandle); +#endif + dpiOciLibHandle = NULL; + memset(&dpiOciSymbols, 0, sizeof(dpiOciSymbols)); + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__loadLibValidate() [INTERNAL] +// Validate the OCI library after loading. +//----------------------------------------------------------------------------- +static int dpiOci__loadLibValidate(dpiError *error) +{ + // determine the OCI client version information + if (dpiOci__loadSymbol("OCIClientVersion", + (void**) &dpiOciSymbols.fnClientVersion, NULL) < 0) + return dpiError__set(error, "load symbol OCIClientVersion", + DPI_ERR_ORACLE_CLIENT_UNSUPPORTED); + memset(&dpiOciLibVersionInfo, 0, sizeof(dpiOciLibVersionInfo)); + (*dpiOciSymbols.fnClientVersion)(&dpiOciLibVersionInfo.versionNum, + &dpiOciLibVersionInfo.releaseNum, + &dpiOciLibVersionInfo.updateNum, + &dpiOciLibVersionInfo.portReleaseNum, + &dpiOciLibVersionInfo.portUpdateNum); + if (dpiOciLibVersionInfo.versionNum == 0) + return dpiError__set(error, "get OCI client version", + DPI_ERR_ORACLE_CLIENT_UNSUPPORTED); + dpiOciLibVersionInfo.fullVersionNum = (uint32_t) + DPI_ORACLE_VERSION_TO_NUMBER(dpiOciLibVersionInfo.versionNum, + dpiOciLibVersionInfo.releaseNum, + dpiOciLibVersionInfo.updateNum, + dpiOciLibVersionInfo.portReleaseNum, + dpiOciLibVersionInfo.portUpdateNum); + + // OCI version must be a minimum of 11.2 + if (dpiUtils__checkClientVersion(&dpiOciLibVersionInfo, 11, 2, error) < 0) + return DPI_FAILURE; + + // initialize threading capability in the OCI library + // this must be run prior to any other OCI threading calls + DPI_OCI_LOAD_SYMBOL("OCIThreadProcessInit", + dpiOciSymbols.fnThreadProcessInit) + (*dpiOciSymbols.fnThreadProcessInit)(); + + // load symbols for key functions which are called many times + // this list should be kept as small as possible in order to avoid + // overhead in looking up symbols at startup + DPI_OCI_LOAD_SYMBOL("OCIAttrGet", dpiOciSymbols.fnAttrGet) + DPI_OCI_LOAD_SYMBOL("OCIAttrSet", dpiOciSymbols.fnAttrSet) + DPI_OCI_LOAD_SYMBOL("OCIThreadKeyGet", dpiOciSymbols.fnThreadKeyGet) + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__loadSymbol() [INTERNAL] +// Return the symbol for the function that is to be called. The symbol table +// is first consulted. If the symbol is not found there, it is looked up and +// then stored there so the next invocation does not have to perform the +// lookup. +//----------------------------------------------------------------------------- +static int dpiOci__loadSymbol(const char *symbolName, void **symbol, + dpiError *error) +{ + // if library not already opened, open it + if (!dpiOciLibHandle && dpiOci__loadLib(error) < 0) + return DPI_FAILURE; + + // load symbol +#ifdef _WIN32 + *symbol = GetProcAddress(dpiOciLibHandle, symbolName); +#else + *symbol = dlsym(dpiOciLibHandle, symbolName); +#endif + if (!*symbol) + return dpiError__set(error, "get symbol", DPI_ERR_LOAD_SYMBOL, + symbolName); + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobClose() [INTERNAL] +// Wrapper for OCILobClose(). +//----------------------------------------------------------------------------- +int dpiOci__lobClose(dpiLob *lob, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobClose", dpiOciSymbols.fnLobClose) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobClose)(lob->conn->handle, error->handle, + lob->locator); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "close LOB"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobCreateTemporary() [INTERNAL] +// Wrapper for OCILobCreateTemporary(). +//----------------------------------------------------------------------------- +int dpiOci__lobCreateTemporary(dpiLob *lob, dpiError *error) +{ + uint8_t lobType; + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobCreateTemporary", + dpiOciSymbols.fnLobCreateTemporary) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BLOB) + lobType = DPI_OCI_TEMP_BLOB; + else lobType = DPI_OCI_TEMP_CLOB; + status = (*dpiOciSymbols.fnLobCreateTemporary)(lob->conn->handle, + error->handle, lob->locator, DPI_OCI_DEFAULT, + lob->type->charsetForm, lobType, 1, DPI_OCI_DURATION_SESSION); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "create temporary LOB"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobFileExists() [INTERNAL] +// Wrapper for OCILobFileExists(). +//----------------------------------------------------------------------------- +int dpiOci__lobFileExists(dpiLob *lob, int *exists, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobFileExists", dpiOciSymbols.fnLobFileExists) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobFileExists)(lob->conn->handle, error->handle, + lob->locator, exists); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get file exists"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobFileGetName() [INTERNAL] +// Wrapper for OCILobFileGetName(). +//----------------------------------------------------------------------------- +int dpiOci__lobFileGetName(dpiLob *lob, char *dirAlias, + uint16_t *dirAliasLength, char *name, uint16_t *nameLength, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobFileGetName", dpiOciSymbols.fnLobFileGetName) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobFileGetName)(lob->env->handle, error->handle, + lob->locator, dirAlias, dirAliasLength, name, nameLength); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get LOB file name"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobFileSetName() [INTERNAL] +// Wrapper for OCILobFileSetName(). +//----------------------------------------------------------------------------- +int dpiOci__lobFileSetName(dpiLob *lob, const char *dirAlias, + uint16_t dirAliasLength, const char *name, uint16_t nameLength, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobFileSetName", dpiOciSymbols.fnLobFileSetName) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobFileSetName)(lob->env->handle, error->handle, + &lob->locator, dirAlias, dirAliasLength, name, nameLength); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "set LOB file name"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobFreeTemporary() [INTERNAL] +// Wrapper for OCILobFreeTemporary(). +//----------------------------------------------------------------------------- +int dpiOci__lobFreeTemporary(dpiConn *conn, void *lobLocator, int checkError, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobFreeTemporary", + dpiOciSymbols.fnLobFreeTemporary) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobFreeTemporary)(conn->handle, + error->handle, lobLocator); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "free temporary LOB"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobGetChunkSize() [INTERNAL] +// Wrapper for OCILobGetChunkSize(). +//----------------------------------------------------------------------------- +int dpiOci__lobGetChunkSize(dpiLob *lob, uint32_t *size, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobGetChunkSize", dpiOciSymbols.fnLobGetChunkSize) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobGetChunkSize)(lob->conn->handle, + error->handle, lob->locator, size); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get chunk size"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobGetLength2() [INTERNAL] +// Wrapper for OCILobGetLength2(). +//----------------------------------------------------------------------------- +int dpiOci__lobGetLength2(dpiLob *lob, uint64_t *size, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobGetLength2", dpiOciSymbols.fnLobGetLength2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobGetLength2)(lob->conn->handle, error->handle, + lob->locator, size); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "get length"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobIsOpen() [INTERNAL] +// Wrapper for OCILobIsOpen(). +//----------------------------------------------------------------------------- +int dpiOci__lobIsOpen(dpiLob *lob, int *isOpen, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobIsOpen", dpiOciSymbols.fnLobIsOpen) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobIsOpen)(lob->conn->handle, error->handle, + lob->locator, isOpen); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "check is open"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobIsTemporary() [INTERNAL] +// Wrapper for OCILobIsTemporary(). +//----------------------------------------------------------------------------- +int dpiOci__lobIsTemporary(dpiLob *lob, int *isTemporary, int checkError, + dpiError *error) +{ + int status; + + *isTemporary = 0; + DPI_OCI_LOAD_SYMBOL("OCILobIsTemporary", dpiOciSymbols.fnLobIsTemporary) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobIsTemporary)(lob->env->handle, error->handle, + lob->locator, isTemporary); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "check is temporary"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobLocatorAssign() [INTERNAL] +// Wrapper for OCILobLocatorAssign(). +//----------------------------------------------------------------------------- +int dpiOci__lobLocatorAssign(dpiLob *lob, void **copiedHandle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobLocatorAssign", + dpiOciSymbols.fnLobLocatorAssign) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobLocatorAssign)(lob->conn->handle, + error->handle, lob->locator, copiedHandle); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "assign locator"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobOpen() [INTERNAL] +// Wrapper for OCILobOpen(). +//----------------------------------------------------------------------------- +int dpiOci__lobOpen(dpiLob *lob, dpiError *error) +{ + uint8_t mode; + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobOpen", dpiOciSymbols.fnLobOpen) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + mode = (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_BFILE) ? + DPI_OCI_LOB_READONLY : DPI_OCI_LOB_READWRITE; + status = (*dpiOciSymbols.fnLobOpen)(lob->conn->handle, error->handle, + lob->locator, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "close LOB"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobRead2() [INTERNAL] +// Wrapper for OCILobRead2(). +//----------------------------------------------------------------------------- +int dpiOci__lobRead2(dpiLob *lob, uint64_t offset, uint64_t *amountInBytes, + uint64_t *amountInChars, char *buffer, uint64_t bufferLength, + dpiError *error) +{ + uint16_t charsetId; + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobRead2", dpiOciSymbols.fnLobRead2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + charsetId = (lob->type->charsetForm == DPI_SQLCS_NCHAR) ? + lob->env->ncharsetId : lob->env->charsetId; + status = (*dpiOciSymbols.fnLobRead2)(lob->conn->handle, error->handle, + lob->locator, amountInBytes, amountInChars, offset, buffer, + bufferLength, DPI_OCI_ONE_PIECE, NULL, NULL, charsetId, + lob->type->charsetForm); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "read from LOB"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobTrim2() [INTERNAL] +// Wrapper for OCILobTrim2(). +//----------------------------------------------------------------------------- +int dpiOci__lobTrim2(dpiLob *lob, uint64_t newLength, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobTrim2", dpiOciSymbols.fnLobTrim2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnLobTrim2)(lob->conn->handle, error->handle, + lob->locator, newLength); + if (status == DPI_OCI_INVALID_HANDLE) + return dpiOci__lobCreateTemporary(lob, error); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "trim LOB"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__lobWrite2() [INTERNAL] +// Wrapper for OCILobWrite2(). +//----------------------------------------------------------------------------- +int dpiOci__lobWrite2(dpiLob *lob, uint64_t offset, const char *value, + uint64_t valueLength, dpiError *error) +{ + uint64_t lengthInBytes = valueLength, lengthInChars = 0; + uint16_t charsetId; + int status; + + DPI_OCI_LOAD_SYMBOL("OCILobWrite2", dpiOciSymbols.fnLobWrite2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + charsetId = (lob->type->charsetForm == DPI_SQLCS_NCHAR) ? + lob->env->ncharsetId : lob->env->charsetId; + status = (*dpiOciSymbols.fnLobWrite2)(lob->conn->handle, error->handle, + lob->locator, &lengthInBytes, &lengthInChars, offset, (void*) value, + valueLength, DPI_OCI_ONE_PIECE, NULL, NULL, charsetId, + lob->type->charsetForm); + DPI_OCI_CHECK_AND_RETURN(error, status, lob->conn, "write to LOB"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__memoryAlloc() [INTERNAL] +// Wrapper for OCIMemoryAlloc(). +//----------------------------------------------------------------------------- +int dpiOci__memoryAlloc(dpiConn *conn, void **ptr, uint32_t size, + int checkError, dpiError *error) +{ + int status; + + *ptr = NULL; + DPI_OCI_LOAD_SYMBOL("OCIMemoryAlloc", dpiOciSymbols.fnMemoryAlloc) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnMemoryAlloc)(conn->sessionHandle, error->handle, + ptr, DPI_OCI_DURATION_SESSION, size, DPI_OCI_MEMORY_CLEARED); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "allocate memory"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__memoryFree() [INTERNAL] +// Wrapper for OCIMemoryFree(). +//----------------------------------------------------------------------------- +int dpiOci__memoryFree(dpiConn *conn, void *ptr, dpiError *error) +{ + DPI_OCI_LOAD_SYMBOL("OCIMemoryFree", dpiOciSymbols.fnMemoryFree) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + (*dpiOciSymbols.fnMemoryFree)(conn->sessionHandle, error->handle, ptr); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__nlsCharSetConvert() [INTERNAL] +// Wrapper for OCINlsCharSetConvert(). +//----------------------------------------------------------------------------- +int dpiOci__nlsCharSetConvert(void *envHandle, uint16_t destCharsetId, + char *dest, size_t destLength, uint16_t sourceCharsetId, + const char *source, size_t sourceLength, size_t *resultSize, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINlsCharSetConvert", + dpiOciSymbols.fnNlsCharSetConvert) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnNlsCharSetConvert)(envHandle, error->handle, + destCharsetId, dest, destLength, sourceCharsetId, source, + sourceLength, resultSize); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "convert text"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__nlsCharSetIdToName() [INTERNAL] +// Wrapper for OCINlsCharSetIdToName(). +//----------------------------------------------------------------------------- +int dpiOci__nlsCharSetIdToName(void *envHandle, char *buf, size_t bufLength, + uint16_t charsetId, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINlsCharSetIdToName", + dpiOciSymbols.fnNlsCharSetIdToName) + status = (*dpiOciSymbols.fnNlsCharSetIdToName)(envHandle, buf, bufLength, + charsetId); + return (status == DPI_OCI_SUCCESS) ? DPI_SUCCESS : DPI_FAILURE; +} + + +//----------------------------------------------------------------------------- +// dpiOci__nlsCharSetNameToId() [INTERNAL] +// Wrapper for OCINlsCharSetNameToId(). +//----------------------------------------------------------------------------- +int dpiOci__nlsCharSetNameToId(void *envHandle, const char *name, + uint16_t *charsetId, dpiError *error) +{ + DPI_OCI_LOAD_SYMBOL("OCINlsCharSetNameToId", + dpiOciSymbols.fnNlsCharSetNameToId) + *charsetId = (*dpiOciSymbols.fnNlsCharSetNameToId)(envHandle, name); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__nlsEnvironmentVariableGet() [INTERNAL] +// Wrapper for OCIEnvironmentVariableGet(). +//----------------------------------------------------------------------------- +int dpiOci__nlsEnvironmentVariableGet(uint16_t item, void *value, + dpiError *error) +{ + size_t ignored; + int status; + + DPI_OCI_LOAD_SYMBOL("OCINlsEnvironmentVariableGet", + dpiOciSymbols.fnNlsEnvironmentVariableGet) + status = (*dpiOciSymbols.fnNlsEnvironmentVariableGet)(value, 0, item, 0, + &ignored); + if (status != DPI_OCI_SUCCESS) + return dpiError__set(error, "get NLS environment variable", + DPI_ERR_NLS_ENV_VAR_GET); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__nlsNameMap() [INTERNAL] +// Wrapper for OCINlsNameMap(). +//----------------------------------------------------------------------------- +int dpiOci__nlsNameMap(void *envHandle, char *buf, size_t bufLength, + const char *source, uint32_t flag, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINlsNameMap", dpiOciSymbols.fnNlsNameMap) + status = (*dpiOciSymbols.fnNlsNameMap)(envHandle, buf, bufLength, source, + flag); + return (status == DPI_OCI_SUCCESS) ? DPI_SUCCESS : DPI_FAILURE; +} + + +//----------------------------------------------------------------------------- +// dpiOci__nlsNumericInfoGet() [INTERNAL] +// Wrapper for OCINlsNumericInfoGet(). +//----------------------------------------------------------------------------- +int dpiOci__nlsNumericInfoGet(void *envHandle, int32_t *value, uint16_t item, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINlsNumericInfoGet", + dpiOciSymbols.fnNlsNumericInfoGet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnNlsNumericInfoGet)(envHandle, error->handle, + value, item); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get NLS info"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__numberFromInt() [INTERNAL] +// Wrapper for OCINumberFromInt(). +//----------------------------------------------------------------------------- +int dpiOci__numberFromInt(const void *value, unsigned int valueLength, + unsigned int flags, void *number, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINumberFromInt", dpiOciSymbols.fnNumberFromInt) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnNumberFromInt)(error->handle, value, + valueLength, flags, number); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number from integer"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__numberFromReal() [INTERNAL] +// Wrapper for OCINumberFromReal(). +//----------------------------------------------------------------------------- +int dpiOci__numberFromReal(const double value, void *number, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINumberFromReal", dpiOciSymbols.fnNumberFromReal) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnNumberFromReal)(error->handle, &value, + sizeof(double), number); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number from real"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__numberToInt() [INTERNAL] +// Wrapper for OCINumberToInt(). +//----------------------------------------------------------------------------- +int dpiOci__numberToInt(void *number, void *value, unsigned int valueLength, + unsigned int flags, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINumberToInt", dpiOciSymbols.fnNumberToInt) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnNumberToInt)(error->handle, number, valueLength, + flags, value); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number to integer"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__numberToReal() [INTERNAL] +// Wrapper for OCINumberToReal(). +//----------------------------------------------------------------------------- +int dpiOci__numberToReal(double *value, void *number, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCINumberToReal", dpiOciSymbols.fnNumberToReal) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnNumberToReal)(error->handle, number, + sizeof(double), value); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "number to real"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__objectCopy() [INTERNAL] +// Wrapper for OCIObjectCopy(). +//----------------------------------------------------------------------------- +int dpiOci__objectCopy(dpiObject *obj, void *sourceInstance, + void *sourceIndicator, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIObjectCopy", dpiOciSymbols.fnObjectCopy) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnObjectCopy)(obj->env->handle, error->handle, + obj->type->conn->handle, sourceInstance, sourceIndicator, + obj->instance, obj->indicator, obj->type->tdo, + DPI_OCI_DURATION_SESSION, DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "copy object"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__objectFree() [INTERNAL] +// Wrapper for OCIObjectFree(). +//----------------------------------------------------------------------------- +int dpiOci__objectFree(void *envHandle, void *data, int checkError, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIObjectFree", dpiOciSymbols.fnObjectFree) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnObjectFree)(envHandle, error->handle, data, + DPI_OCI_DEFAULT); + if (checkError && DPI_OCI_ERROR_OCCURRED(status)) { + dpiError__setFromOCI(error, status, NULL, "free instance"); + + // during the attempt to free, PL/SQL records fail with error + // "ORA-21602: operation does not support the specified typecode", but + // a subsequent attempt will yield error "OCI-21500: internal error + // code" and crash the process, so pretend like the free was + // successful! + if (error->buffer->code == 21602) + return DPI_SUCCESS; + return DPI_FAILURE; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__objectGetAttr() [INTERNAL] +// Wrapper for OCIObjectGetAttr(). +//----------------------------------------------------------------------------- +int dpiOci__objectGetAttr(dpiObject *obj, dpiObjectAttr *attr, + int16_t *scalarValueIndicator, void **valueIndicator, void **value, + void **tdo, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIObjectGetAttr", dpiOciSymbols.fnObjectGetAttr) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnObjectGetAttr)(obj->env->handle, error->handle, + obj->instance, obj->indicator, obj->type->tdo, &attr->name, + &attr->nameLength, 1, 0, 0, scalarValueIndicator, valueIndicator, + value, tdo); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get attribute"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__objectGetInd() [INTERNAL] +// Wrapper for OCIObjectGetInd(). +//----------------------------------------------------------------------------- +int dpiOci__objectGetInd(dpiObject *obj, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIObjectGetInd", dpiOciSymbols.fnObjectGetInd) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnObjectGetInd)(obj->env->handle, error->handle, + obj->instance, &obj->indicator); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get indicator"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__objectNew() [INTERNAL] +// Wrapper for OCIObjectNew(). +//----------------------------------------------------------------------------- +int dpiOci__objectNew(dpiObject *obj, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIObjectNew", dpiOciSymbols.fnObjectNew) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnObjectNew)(obj->env->handle, error->handle, + obj->type->conn->handle, obj->type->typeCode, obj->type->tdo, NULL, + DPI_OCI_DURATION_SESSION, 1, &obj->instance); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "create object"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__objectPin() [INTERNAL] +// Wrapper for OCIObjectPin(). +//----------------------------------------------------------------------------- +int dpiOci__objectPin(void *envHandle, void *objRef, void **obj, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIObjectPin", dpiOciSymbols.fnObjectPin) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnObjectPin)(envHandle, error->handle, objRef, + NULL, DPI_OCI_PIN_ANY, DPI_OCI_DURATION_SESSION, DPI_OCI_LOCK_NONE, + obj); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "pin reference"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__objectSetAttr() [INTERNAL] +// Wrapper for OCIObjectSetAttr(). +//----------------------------------------------------------------------------- +int dpiOci__objectSetAttr(dpiObject *obj, dpiObjectAttr *attr, + int16_t scalarValueIndicator, void *valueIndicator, const void *value, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIObjectSetAttr", dpiOciSymbols.fnObjectSetAttr) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnObjectSetAttr)(obj->env->handle, error->handle, + obj->instance, obj->indicator, obj->type->tdo, &attr->name, + &attr->nameLength, 1, NULL, 0, scalarValueIndicator, + valueIndicator, value); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "set attribute"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__passwordChange() [INTERNAL] +// Wrapper for OCIPasswordChange(). +//----------------------------------------------------------------------------- +int dpiOci__passwordChange(dpiConn *conn, const char *userName, + uint32_t userNameLength, const char *oldPassword, + uint32_t oldPasswordLength, const char *newPassword, + uint32_t newPasswordLength, uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIPasswordChange", dpiOciSymbols.fnPasswordChange) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnPasswordChange)(conn->handle, error->handle, + userName, userNameLength, oldPassword, oldPasswordLength, + newPassword, newPasswordLength, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "change password"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__paramGet() [INTERNAL] +// Wrapper for OCIParamGet(). +//----------------------------------------------------------------------------- +int dpiOci__paramGet(const void *handle, uint32_t handleType, void **parameter, + uint32_t pos, const char *action, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIParamGet", dpiOciSymbols.fnParamGet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnParamGet)(handle, handleType, error->handle, + parameter, pos); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, action); +} + + +//----------------------------------------------------------------------------- +// dpiOci__ping() [INTERNAL] +// Wrapper for OCIPing(). +//----------------------------------------------------------------------------- +int dpiOci__ping(dpiConn *conn, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIPing", dpiOciSymbols.fnPing) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnPing)(conn->handle, error->handle, + DPI_OCI_DEFAULT); + if (DPI_OCI_ERROR_OCCURRED(status)) { + dpiError__setFromOCI(error, status, conn, "ping"); + + // attempting to ping a database earlier than 10g will result in error + // ORA-1010: invalid OCI operation, but that implies a successful ping + // so ignore that error and treat it as a successful operation + if (error->buffer->code == 1010) + return DPI_SUCCESS; + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__rawAssignBytes() [INTERNAL] +// Wrapper for OCIRawAssignBytes(). +//----------------------------------------------------------------------------- +int dpiOci__rawAssignBytes(void *envHandle, const char *value, + uint32_t valueLength, void **handle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIRawAssignBytes", dpiOciSymbols.fnRawAssignBytes) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnRawAssignBytes)(envHandle, error->handle, value, + valueLength, handle); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "assign bytes to raw"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__rawPtr() [INTERNAL] +// Wrapper for OCIRawPtr(). +//----------------------------------------------------------------------------- +int dpiOci__rawPtr(void *envHandle, void *handle, void **ptr) +{ + dpiError *error = NULL; + + DPI_OCI_LOAD_SYMBOL("OCIRawPtr", dpiOciSymbols.fnRawPtr) + *ptr = (*dpiOciSymbols.fnRawPtr)(envHandle, handle); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__rawResize() [INTERNAL] +// Wrapper for OCIRawResize(). +//----------------------------------------------------------------------------- +int dpiOci__rawResize(void *envHandle, void **handle, uint32_t newSize, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIRawResize", dpiOciSymbols.fnRawResize) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnRawResize)(envHandle, error->handle, newSize, + handle); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "resize raw"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__rawSize() [INTERNAL] +// Wrapper for OCIRawSize(). +//----------------------------------------------------------------------------- +int dpiOci__rawSize(void *envHandle, void *handle, uint32_t *size) +{ + dpiError *error = NULL; + + DPI_OCI_LOAD_SYMBOL("OCIRawSize", dpiOciSymbols.fnRawSize) + *size = (*dpiOciSymbols.fnRawSize)(envHandle, handle); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__reallocMem() [INTERNAL] +// Wrapper for OCI allocation of memory, only used when debugging memory +// allocation. +//----------------------------------------------------------------------------- +static void *dpiOci__reallocMem(UNUSED void *unused, void *ptr, size_t newSize) +{ + char message[80]; + void *newPtr; + + (void) sprintf(message, "OCI reallocated ptr at %p", ptr); + newPtr = realloc(ptr, newSize); + dpiDebug__print("%s to %u bytes at %p\n", message, newSize, newPtr); + return newPtr; +} + + +//----------------------------------------------------------------------------- +// dpiOci__rowidToChar() [INTERNAL] +// Wrapper for OCIRowidToChar(). +//----------------------------------------------------------------------------- +int dpiOci__rowidToChar(dpiRowid *rowid, char *buffer, uint16_t *bufferSize, + dpiError *error) +{ + uint16_t origSize; + int status; + + DPI_OCI_LOAD_SYMBOL("OCIRowidToChar", dpiOciSymbols.fnRowidToChar) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + origSize = *bufferSize; + status = (*dpiOciSymbols.fnRowidToChar)(rowid->handle, buffer, bufferSize, + error->handle); + if (origSize == 0) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get rowid as string"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__serverAttach() [INTERNAL] +// Wrapper for OCIServerAttach(). +//----------------------------------------------------------------------------- +int dpiOci__serverAttach(dpiConn *conn, const char *connectString, + uint32_t connectStringLength, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIServerAttach", dpiOciSymbols.fnServerAttach) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnServerAttach)(conn->serverHandle, error->handle, + connectString, (int32_t) connectStringLength, DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "server attach"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__serverDetach() [INTERNAL] +// Wrapper for OCIServerDetach(). +//----------------------------------------------------------------------------- +int dpiOci__serverDetach(dpiConn *conn, int checkError, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIServerDetach", dpiOciSymbols.fnServerDetach) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnServerDetach)(conn->serverHandle, error->handle, + DPI_OCI_DEFAULT); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "detatch from server"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__serverRelease() [INTERNAL] +// Wrapper for OCIServerRelease(). +//----------------------------------------------------------------------------- +int dpiOci__serverRelease(dpiConn *conn, char *buffer, uint32_t bufferSize, + uint32_t *version, dpiError *error) +{ + int status; + + DPI_OCI_ENSURE_ERROR_HANDLE(error) + if (conn->env->versionInfo->versionNum < 18) { + DPI_OCI_LOAD_SYMBOL("OCIServerRelease", dpiOciSymbols.fnServerRelease) + status = (*dpiOciSymbols.fnServerRelease)(conn->handle, error->handle, + buffer, bufferSize, DPI_OCI_HTYPE_SVCCTX, version); + } else { + DPI_OCI_LOAD_SYMBOL("OCIServerRelease2", + dpiOciSymbols.fnServerRelease2) + status = (*dpiOciSymbols.fnServerRelease2)(conn->handle, error->handle, + buffer, bufferSize, DPI_OCI_HTYPE_SVCCTX, version, + DPI_OCI_DEFAULT); + } + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get server version"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sessionBegin() [INTERNAL] +// Wrapper for OCISessionBegin(). +//----------------------------------------------------------------------------- +int dpiOci__sessionBegin(dpiConn *conn, uint32_t credentialType, + uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISessionBegin", dpiOciSymbols.fnSessionBegin) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSessionBegin)(conn->handle, error->handle, + conn->sessionHandle, credentialType, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "begin session"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sessionEnd() [INTERNAL] +// Wrapper for OCISessionEnd(). +//----------------------------------------------------------------------------- +int dpiOci__sessionEnd(dpiConn *conn, int checkError, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISessionEnd", dpiOciSymbols.fnSessionEnd) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSessionEnd)(conn->handle, error->handle, + conn->sessionHandle, DPI_OCI_DEFAULT); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "end session"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sessionGet() [INTERNAL] +// Wrapper for OCISessionGet(). +//----------------------------------------------------------------------------- +int dpiOci__sessionGet(void *envHandle, void **handle, void *authInfo, + const char *connectString, uint32_t connectStringLength, + const char *tag, uint32_t tagLength, const char **outTag, + uint32_t *outTagLength, int *found, uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISessionGet", dpiOciSymbols.fnSessionGet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSessionGet)(envHandle, error->handle, handle, + authInfo, connectString, connectStringLength, tag, tagLength, + outTag, outTagLength, found, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "get session"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sessionPoolCreate() [INTERNAL] +// Wrapper for OCISessionPoolCreate(). +//----------------------------------------------------------------------------- +int dpiOci__sessionPoolCreate(dpiPool *pool, const char *connectString, + uint32_t connectStringLength, uint32_t minSessions, + uint32_t maxSessions, uint32_t sessionIncrement, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISessionPoolCreate", + dpiOciSymbols.fnSessionPoolCreate) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSessionPoolCreate)(pool->env->handle, + error->handle, pool->handle, (char**) &pool->name, + &pool->nameLength, connectString, connectStringLength, minSessions, + maxSessions, sessionIncrement, userName, userNameLength, password, + passwordLength, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "create pool"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sessionPoolDestroy() [INTERNAL] +// Wrapper for OCISessionPoolDestroy(). +//----------------------------------------------------------------------------- +int dpiOci__sessionPoolDestroy(dpiPool *pool, uint32_t mode, int checkError, + dpiError *error) +{ + void *handle; + int status; + + DPI_OCI_LOAD_SYMBOL("OCISessionPoolDestroy", + dpiOciSymbols.fnSessionPoolDestroy) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + + // clear the pool handle immediately so that no further attempts are made + // to use the pool while the pool is being closed; if the pool close fails, + // restore the pool handle afterwards + handle = pool->handle; + pool->handle = NULL; + status = (*dpiOciSymbols.fnSessionPoolDestroy)(handle, error->handle, + mode); + if (checkError && DPI_OCI_ERROR_OCCURRED(status)) { + pool->handle = handle; + return dpiError__setFromOCI(error, status, NULL, "destroy pool"); + } + dpiOci__handleFree(handle, DPI_OCI_HTYPE_SPOOL); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__sessionRelease() [INTERNAL] +// Wrapper for OCISessionRelease(). +//----------------------------------------------------------------------------- +int dpiOci__sessionRelease(dpiConn *conn, const char *tag, uint32_t tagLength, + uint32_t mode, int checkError, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISessionRelease", dpiOciSymbols.fnSessionRelease) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSessionRelease)(conn->handle, error->handle, + tag, tagLength, mode); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "release session"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__shardingKeyColumnAdd() [INTERNAL] +// Wrapper for OCIshardingKeyColumnAdd(). +//----------------------------------------------------------------------------- +int dpiOci__shardingKeyColumnAdd(void *shardingKey, void *col, uint32_t colLen, + uint16_t colType, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIShardingKeyColumnAdd", + dpiOciSymbols.fnShardingKeyColumnAdd) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnShardingKeyColumnAdd)(shardingKey, + error->handle, col, colLen, colType, DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "add sharding column"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaBulkInsert() [INTERNAL] +// Wrapper for OCISodaBulkInsert(). +//----------------------------------------------------------------------------- +int dpiOci__sodaBulkInsert(dpiSodaColl *coll, void **documents, + uint32_t numDocuments, void *outputOptions, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaBulkInsert", dpiOciSymbols.fnSodaBulkInsert) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaBulkInsert)(coll->db->conn->handle, + coll->handle, documents, numDocuments, outputOptions, + error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "insert multiple documents"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaBulkInsertAndGet() [INTERNAL] +// Wrapper for OCISodaBulkInsert(). +//----------------------------------------------------------------------------- +int dpiOci__sodaBulkInsertAndGet(dpiSodaColl *coll, void **documents, + uint32_t numDocuments, void *outputOptions, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaBulkInsertAndGet", + dpiOciSymbols.fnSodaBulkInsertAndGet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaBulkInsertAndGet)(coll->db->conn->handle, + coll->handle, documents, numDocuments, outputOptions, + error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "insert (and get) multiple documents"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaCollCreateWithMetadata() [INTERNAL] +// Wrapper for OCISodaCollCreateWithMetadata(). +//----------------------------------------------------------------------------- +int dpiOci__sodaCollCreateWithMetadata(dpiSodaDb *db, const char *name, + uint32_t nameLength, const char *metadata, uint32_t metadataLength, + uint32_t mode, void **handle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaCollCreateWithMetadata", + dpiOciSymbols.fnSodaCollCreateWithMetadata) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaCollCreateWithMetadata)(db->conn->handle, + name, nameLength, metadata, metadataLength, handle, error->handle, + mode); + DPI_OCI_CHECK_AND_RETURN(error, status, db->conn, + "create SODA collection"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaCollDrop() [INTERNAL] +// Wrapper for OCISodaCollDrop(). +//----------------------------------------------------------------------------- +int dpiOci__sodaCollDrop(dpiSodaColl *coll, int *isDropped, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaCollDrop", dpiOciSymbols.fnSodaCollDrop) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaCollDrop)(coll->db->conn->handle, + coll->handle, isDropped, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "drop SODA collection"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaCollGetNext() [INTERNAL] +// Wrapper for OCISodaCollGetNext(). +//----------------------------------------------------------------------------- +int dpiOci__sodaCollGetNext(dpiConn *conn, void *cursorHandle, + void **collectionHandle, uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaCollGetNext", dpiOciSymbols.fnSodaCollGetNext) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaCollGetNext)(conn->handle, cursorHandle, + collectionHandle, error->handle, mode); + if (status == DPI_OCI_NO_DATA) { + *collectionHandle = NULL; + return DPI_SUCCESS; + } + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get next collection"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaCollList() [INTERNAL] +// Wrapper for OCISodaCollList(). +//----------------------------------------------------------------------------- +int dpiOci__sodaCollList(dpiSodaDb *db, const char *startingName, + uint32_t startingNameLength, void **handle, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaCollList", dpiOciSymbols.fnSodaCollList) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaCollList)(db->conn->handle, startingName, + startingNameLength, handle, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, db->conn, + "get SODA collection cursor"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaCollOpen() [INTERNAL] +// Wrapper for OCISodaCollOpen(). +//----------------------------------------------------------------------------- +int dpiOci__sodaCollOpen(dpiSodaDb *db, const char *name, uint32_t nameLength, + uint32_t mode, void **handle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaCollOpen", dpiOciSymbols.fnSodaCollOpen) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaCollOpen)(db->conn->handle, name, + nameLength, handle, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, db->conn, "open SODA collection"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaDataGuideGet() [INTERNAL] +// Wrapper for OCISodaDataGuideGet(). +//----------------------------------------------------------------------------- +int dpiOci__sodaDataGuideGet(dpiSodaColl *coll, void **handle, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaDataGuideGet", + dpiOciSymbols.fnSodaDataGuideGet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaDataGuideGet)(coll->db->conn->handle, + coll->handle, DPI_OCI_DEFAULT, handle, error->handle, mode); + if (DPI_OCI_ERROR_OCCURRED(status)) { + dpiError__setFromOCI(error, status, coll->db->conn, "get data guide"); + if (error->buffer->code != 24801) + return DPI_FAILURE; + *handle = NULL; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaDocCount() [INTERNAL] +// Wrapper for OCISodaDocCount(). +//----------------------------------------------------------------------------- +int dpiOci__sodaDocCount(dpiSodaColl *coll, void *options, uint32_t mode, + uint64_t *count, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaDocCount", dpiOciSymbols.fnSodaDocCount) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaDocCount)(coll->db->conn->handle, + coll->handle, options, count, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "get document count"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaDocGetNext() [INTERNAL] +// Wrapper for OCISodaDocGetNext(). +//----------------------------------------------------------------------------- +int dpiOci__sodaDocGetNext(dpiSodaDocCursor *cursor, void **handle, + uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaDocGetNext", dpiOciSymbols.fnSodaDocGetNext) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaDocGetNext)(cursor->coll->db->conn->handle, + cursor->handle, handle, error->handle, mode); + if (status == DPI_OCI_NO_DATA) { + *handle = NULL; + return DPI_SUCCESS; + } + DPI_OCI_CHECK_AND_RETURN(error, status, cursor->coll->db->conn, + "get next document"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaFind() [INTERNAL] +// Wrapper for OCISodaFind(). +//----------------------------------------------------------------------------- +int dpiOci__sodaFind(dpiSodaColl *coll, const void *options, uint32_t flags, + uint32_t mode, void **handle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaFind", dpiOciSymbols.fnSodaFind) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaFind)(coll->db->conn->handle, + coll->handle, options, flags, handle, error->handle, mode); + if (status == DPI_OCI_NO_DATA) { + *handle = NULL; + return DPI_SUCCESS; + } + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "find SODA documents"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaFindOne() [INTERNAL] +// Wrapper for OCISodaFindOne(). +//----------------------------------------------------------------------------- +int dpiOci__sodaFindOne(dpiSodaColl *coll, const void *options, uint32_t flags, + uint32_t mode, void **handle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaFindOne", dpiOciSymbols.fnSodaFindOne) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaFindOne)(coll->db->conn->handle, + coll->handle, options, flags, handle, error->handle, mode); + if (status == DPI_OCI_NO_DATA) { + *handle = NULL; + return DPI_SUCCESS; + } + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "get SODA document"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaIndexCreate() [INTERNAL] +// Wrapper for OCISodaIndexCreate(). +//----------------------------------------------------------------------------- +int dpiOci__sodaIndexCreate(dpiSodaColl *coll, const char *indexSpec, + uint32_t indexSpecLength, uint32_t mode, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaIndexCreate", dpiOciSymbols.fnSodaIndexCreate) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaIndexCreate)(coll->db->conn->handle, + coll->handle, indexSpec, indexSpecLength, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, "create index"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaIndexDrop() [INTERNAL] +// Wrapper for OCISodaIndexDrop(). +//----------------------------------------------------------------------------- +int dpiOci__sodaIndexDrop(dpiSodaColl *coll, const char *name, + uint32_t nameLength, uint32_t mode, int *isDropped, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaIndexDrop", dpiOciSymbols.fnSodaIndexDrop) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaIndexDrop)(coll->db->conn->handle, name, + nameLength, isDropped, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, "drop index"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaInsert() [INTERNAL] +// Wrapper for OCISodaInsert(). +//----------------------------------------------------------------------------- +int dpiOci__sodaInsert(dpiSodaColl *coll, void *handle, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaInsert", dpiOciSymbols.fnSodaInsert) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaInsert)(coll->db->conn->handle, + coll->handle, handle, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "insert SODA document"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaInsertAndGet() [INTERNAL] +// Wrapper for OCISodaInsertAndGet(). +//----------------------------------------------------------------------------- +int dpiOci__sodaInsertAndGet(dpiSodaColl *coll, void **handle, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaInsertAndGet", + dpiOciSymbols.fnSodaInsertAndGet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaInsertAndGet)(coll->db->conn->handle, + coll->handle, handle, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "insert and get SODA document"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaOperKeysSet() [INTERNAL] +// Wrapper for OCISodaOperKeysSet(). +//----------------------------------------------------------------------------- +int dpiOci__sodaOperKeysSet(const dpiSodaOperOptions *options, void *handle, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaOperKeysSet", dpiOciSymbols.fnSodaOperKeysSet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaOperKeysSet)(handle, options->keys, + options->keyLengths, options->numKeys, error->handle, + DPI_OCI_DEFAULT); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, + "set operation options keys"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaRemove() [INTERNAL] +// Wrapper for OCISodaRemove(). +//----------------------------------------------------------------------------- +int dpiOci__sodaRemove(dpiSodaColl *coll, void *options, uint32_t mode, + uint64_t *count, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaRemove", dpiOciSymbols.fnSodaRemove) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaRemove)(coll->db->conn->handle, + coll->handle, options, count, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "remove documents from SODA collection"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaReplOne() [INTERNAL] +// Wrapper for OCISodaReplOne(). +//----------------------------------------------------------------------------- +int dpiOci__sodaReplOne(dpiSodaColl *coll, const void *options, void *handle, + uint32_t mode, int *isReplaced, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaReplOne", dpiOciSymbols.fnSodaReplOne) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaReplOne)(coll->db->conn->handle, + coll->handle, options, handle, isReplaced, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "replace SODA document"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__sodaReplOneAndGet() [INTERNAL] +// Wrapper for OCISodaReplOneAndGet(). +//----------------------------------------------------------------------------- +int dpiOci__sodaReplOneAndGet(dpiSodaColl *coll, const void *options, + void **handle, uint32_t mode, int *isReplaced, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISodaReplOneAndGet", + dpiOciSymbols.fnSodaReplOneAndGet) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSodaReplOneAndGet)(coll->db->conn->handle, + coll->handle, options, handle, isReplaced, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, coll->db->conn, + "replace and get SODA document"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__stmtExecute() [INTERNAL] +// Wrapper for OCIStmtExecute(). +//----------------------------------------------------------------------------- +int dpiOci__stmtExecute(dpiStmt *stmt, uint32_t numIters, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIStmtExecute", dpiOciSymbols.fnStmtExecute) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStmtExecute)(stmt->conn->handle, stmt->handle, + error->handle, numIters, 0, 0, 0, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "execute"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__stmtFetch2() [INTERNAL] +// Wrapper for OCIStmtFetch2(). +//----------------------------------------------------------------------------- +int dpiOci__stmtFetch2(dpiStmt *stmt, uint32_t numRows, uint16_t fetchMode, + int32_t offset, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIStmtFetch2", dpiOciSymbols.fnStmtFetch2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStmtFetch2)(stmt->handle, error->handle, + numRows, fetchMode, offset, DPI_OCI_DEFAULT); + if (status == DPI_OCI_NO_DATA || fetchMode == DPI_MODE_FETCH_LAST) { + stmt->hasRowsToFetch = 0; + } else if (DPI_OCI_ERROR_OCCURRED(status)) { + return dpiError__setFromOCI(error, status, stmt->conn, "fetch"); + } else { + stmt->hasRowsToFetch = 1; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__stmtGetBindInfo() [INTERNAL] +// Wrapper for OCIStmtGetBindInfo(). +//----------------------------------------------------------------------------- +int dpiOci__stmtGetBindInfo(dpiStmt *stmt, uint32_t size, uint32_t startLoc, + int32_t *numFound, char *names[], uint8_t nameLengths[], + char *indNames[], uint8_t indNameLengths[], uint8_t isDuplicate[], + void *bindHandles[], dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIStmtGetBindInfo", dpiOciSymbols.fnStmtGetBindInfo) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStmtGetBindInfo)(stmt->handle, error->handle, + size, startLoc, numFound, names, nameLengths, indNames, + indNameLengths, isDuplicate, bindHandles); + if (status == DPI_OCI_NO_DATA) { + *numFound = 0; + return DPI_SUCCESS; + } + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "get bind info"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__stmtGetNextResult() [INTERNAL] +// Wrapper for OCIStmtGetNextResult(). +//----------------------------------------------------------------------------- +int dpiOci__stmtGetNextResult(dpiStmt *stmt, void **handle, dpiError *error) +{ + uint32_t returnType; + int status; + + DPI_OCI_LOAD_SYMBOL("OCIStmtGetNextResult", + dpiOciSymbols.fnStmtGetNextResult) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStmtGetNextResult)(stmt->handle, error->handle, + handle, &returnType, DPI_OCI_DEFAULT); + if (status == DPI_OCI_NO_DATA) { + *handle = NULL; + return DPI_SUCCESS; + } + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "get next result"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__stmtPrepare2() [INTERNAL] +// Wrapper for OCIStmtPrepare2(). +//----------------------------------------------------------------------------- +int dpiOci__stmtPrepare2(dpiStmt *stmt, const char *sql, uint32_t sqlLength, + const char *tag, uint32_t tagLength, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIStmtPrepare2", dpiOciSymbols.fnStmtPrepare2) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStmtPrepare2)(stmt->conn->handle, &stmt->handle, + error->handle, sql, sqlLength, tag, tagLength, DPI_OCI_NTV_SYNTAX, + DPI_OCI_DEFAULT); + if (DPI_OCI_ERROR_OCCURRED(status)) { + stmt->handle = NULL; + return dpiError__setFromOCI(error, status, stmt->conn, "prepare SQL"); + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__stmtRelease() [INTERNAL] +// Wrapper for OCIStmtRelease(). +//----------------------------------------------------------------------------- +int dpiOci__stmtRelease(dpiStmt *stmt, const char *tag, uint32_t tagLength, + int checkError, dpiError *error) +{ + uint32_t mode = DPI_OCI_DEFAULT; + uint32_t cacheSize = 0; + int status; + + // if the statement should be deleted from the cache, first check to see + // that there actually is a cache currently being used; otherwise, the + // error "ORA-24300: bad value for mode" will be raised + if (stmt->deleteFromCache) { + dpiOci__attrGet(stmt->conn->handle, DPI_OCI_HTYPE_SVCCTX, + &cacheSize, NULL, DPI_OCI_ATTR_STMTCACHESIZE, NULL, error); + if (cacheSize > 0) + mode = DPI_OCI_STRLS_CACHE_DELETE; + } + + DPI_OCI_LOAD_SYMBOL("OCIStmtRelease", dpiOciSymbols.fnStmtRelease) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStmtRelease)(stmt->handle, error->handle, tag, + tagLength, mode); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, stmt->conn, "release statement"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__stringAssignText() [INTERNAL] +// Wrapper for OCIStringAssignText(). +//----------------------------------------------------------------------------- +int dpiOci__stringAssignText(void *envHandle, const char *value, + uint32_t valueLength, void **handle, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIStringAssignText", + dpiOciSymbols.fnStringAssignText) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStringAssignText)(envHandle, error->handle, + value, valueLength, handle); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "assign to string"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__stringPtr() [INTERNAL] +// Wrapper for OCIStringPtr(). +//----------------------------------------------------------------------------- +int dpiOci__stringPtr(void *envHandle, void *handle, char **ptr) +{ + dpiError *error = NULL; + + DPI_OCI_LOAD_SYMBOL("OCIStringPtr", dpiOciSymbols.fnStringPtr) + *ptr = (*dpiOciSymbols.fnStringPtr)(envHandle, handle); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__stringResize() [INTERNAL] +// Wrapper for OCIStringResize(). +//----------------------------------------------------------------------------- +int dpiOci__stringResize(void *envHandle, void **handle, uint32_t newSize, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIStringResize", dpiOciSymbols.fnStringResize) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnStringResize)(envHandle, error->handle, newSize, + handle); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "resize string"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__stringSize() [INTERNAL] +// Wrapper for OCIStringSize(). +//----------------------------------------------------------------------------- +int dpiOci__stringSize(void *envHandle, void *handle, uint32_t *size) +{ + dpiError *error = NULL; + + DPI_OCI_LOAD_SYMBOL("OCIStringSize", dpiOciSymbols.fnStringSize) + *size = (*dpiOciSymbols.fnStringSize)(envHandle, handle); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__subscriptionRegister() [INTERNAL] +// Wrapper for OCISubscriptionRegister(). +//----------------------------------------------------------------------------- +int dpiOci__subscriptionRegister(dpiConn *conn, void **handle, uint32_t mode, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCISubscriptionRegister", + dpiOciSymbols.fnSubscriptionRegister) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnSubscriptionRegister)(conn->handle, handle, 1, + error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "register"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__subscriptionUnRegister() [INTERNAL] +// Wrapper for OCISubscriptionUnRegister(). +//----------------------------------------------------------------------------- +int dpiOci__subscriptionUnRegister(dpiConn *conn, dpiSubscr *subscr, + dpiError *error) +{ + uint32_t mode; + int status; + + DPI_OCI_LOAD_SYMBOL("OCISubscriptionUnRegister", + dpiOciSymbols.fnSubscriptionUnRegister) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + mode = (subscr->clientInitiated) ? DPI_OCI_SECURE_NOTIFICATION : + DPI_OCI_DEFAULT; + status = (*dpiOciSymbols.fnSubscriptionUnRegister)(conn->handle, + subscr->handle, error->handle, mode); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "unregister"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__tableDelete() [INTERNAL] +// Wrapper for OCITableDelete(). +//----------------------------------------------------------------------------- +int dpiOci__tableDelete(dpiObject *obj, int32_t index, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITableDelete", dpiOciSymbols.fnTableDelete) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTableDelete)(obj->env->handle, error->handle, + index, obj->instance); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "delete element"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__tableExists() [INTERNAL] +// Wrapper for OCITableExists(). +//----------------------------------------------------------------------------- +int dpiOci__tableExists(dpiObject *obj, int32_t index, int *exists, + dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITableExists", dpiOciSymbols.fnTableExists) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTableExists)(obj->env->handle, error->handle, + obj->instance, index, exists); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, + "get index exists"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__tableFirst() [INTERNAL] +// Wrapper for OCITableFirst(). +//----------------------------------------------------------------------------- +int dpiOci__tableFirst(dpiObject *obj, int32_t *index, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITableFirst", dpiOciSymbols.fnTableFirst) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTableFirst)(obj->env->handle, error->handle, + obj->instance, index); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, + "get first index"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__tableLast() [INTERNAL] +// Wrapper for OCITableLast(). +//----------------------------------------------------------------------------- +int dpiOci__tableLast(dpiObject *obj, int32_t *index, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITableLast", dpiOciSymbols.fnTableLast) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTableLast)(obj->env->handle, error->handle, + obj->instance, index); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get last index"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__tableNext() [INTERNAL] +// Wrapper for OCITableNext(). +//----------------------------------------------------------------------------- +int dpiOci__tableNext(dpiObject *obj, int32_t index, int32_t *nextIndex, + int *exists, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITableNext", dpiOciSymbols.fnTableNext) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTableNext)(obj->env->handle, error->handle, + index, obj->instance, nextIndex, exists); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get next index"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__tablePrev() [INTERNAL] +// Wrapper for OCITablePrev(). +//----------------------------------------------------------------------------- +int dpiOci__tablePrev(dpiObject *obj, int32_t index, int32_t *prevIndex, + int *exists, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITablePrev", dpiOciSymbols.fnTablePrev) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTablePrev)(obj->env->handle, error->handle, + index, obj->instance, prevIndex, exists); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get prev index"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__tableSize() [INTERNAL] +// Wrapper for OCITableSize(). +//----------------------------------------------------------------------------- +int dpiOci__tableSize(dpiObject *obj, int32_t *size, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITableSize", dpiOciSymbols.fnTableSize) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTableSize)(obj->env->handle, error->handle, + obj->instance, size); + DPI_OCI_CHECK_AND_RETURN(error, status, obj->type->conn, "get size"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__threadKeyDestroy() [INTERNAL] +// Wrapper for OCIThreadKeyDestroy(). +//----------------------------------------------------------------------------- +int dpiOci__threadKeyDestroy(void *envHandle, void *errorHandle, void **key, + dpiError *error) +{ + DPI_OCI_LOAD_SYMBOL("OCIThreadKeyDestroy", + dpiOciSymbols.fnThreadKeyDestroy) + (*dpiOciSymbols.fnThreadKeyDestroy)(envHandle, errorHandle, key); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__threadKeyGet() [INTERNAL] +// Wrapper for OCIThreadKeyGet(). +//----------------------------------------------------------------------------- +int dpiOci__threadKeyGet(void *envHandle, void *errorHandle, void *key, + void **value, dpiError *error) +{ + int status; + + status = (*dpiOciSymbols.fnThreadKeyGet)(envHandle, errorHandle, key, + value); + if (status != DPI_OCI_SUCCESS) + return dpiError__set(error, "get TLS error", DPI_ERR_TLS_ERROR); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__threadKeyInit() [INTERNAL] +// Wrapper for OCIThreadKeyInit(). +//----------------------------------------------------------------------------- +int dpiOci__threadKeyInit(void *envHandle, void *errorHandle, void **key, + void *destroyFunc, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIThreadKeyInit", dpiOciSymbols.fnThreadKeyInit) + status = (*dpiOciSymbols.fnThreadKeyInit)(envHandle, errorHandle, key, + destroyFunc); + DPI_OCI_CHECK_AND_RETURN(error, status, NULL, "initialize thread key"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__threadKeySet() [INTERNAL] +// Wrapper for OCIThreadKeySet(). +//----------------------------------------------------------------------------- +int dpiOci__threadKeySet(void *envHandle, void *errorHandle, void *key, + void *value, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCIThreadKeySet", dpiOciSymbols.fnThreadKeySet) + status = (*dpiOciSymbols.fnThreadKeySet)(envHandle, errorHandle, key, + value); + if (status != DPI_OCI_SUCCESS) + return dpiError__set(error, "set TLS error", DPI_ERR_TLS_ERROR); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiOci__transCommit() [INTERNAL] +// Wrapper for OCITransCommit(). +//----------------------------------------------------------------------------- +int dpiOci__transCommit(dpiConn *conn, uint32_t flags, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITransCommit", dpiOciSymbols.fnTransCommit) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTransCommit)(conn->handle, error->handle, + flags); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "commit"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__transPrepare() [INTERNAL] +// Wrapper for OCITransPrepare(). +//----------------------------------------------------------------------------- +int dpiOci__transPrepare(dpiConn *conn, int *commitNeeded, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITransPrepare", dpiOciSymbols.fnTransPrepare) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTransPrepare)(conn->handle, error->handle, + DPI_OCI_DEFAULT); + *commitNeeded = (status == DPI_OCI_SUCCESS); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "prepare transaction"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__transRollback() [INTERNAL] +// Wrapper for OCITransRollback(). +//----------------------------------------------------------------------------- +int dpiOci__transRollback(dpiConn *conn, int checkError, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITransRollback", dpiOciSymbols.fnTransRollback) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTransRollback)(conn->handle, error->handle, + DPI_OCI_DEFAULT); + if (!checkError) + return DPI_SUCCESS; + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "rollback"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__transStart() [INTERNAL] +// Wrapper for OCITransStart(). +//----------------------------------------------------------------------------- +int dpiOci__transStart(dpiConn *conn, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITransStart", dpiOciSymbols.fnTransStart) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTransStart)(conn->handle, error->handle, 0, + DPI_OCI_TRANS_NEW); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "start transaction"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__typeByName() [INTERNAL] +// Wrapper for OCITypeByName(). +//----------------------------------------------------------------------------- +int dpiOci__typeByName(dpiConn *conn, const char *schema, + uint32_t schemaLength, const char *name, uint32_t nameLength, + void **tdo, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITypeByName", dpiOciSymbols.fnTypeByName) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTypeByName)(conn->env->handle, error->handle, + conn->handle, schema, schemaLength, name, nameLength, NULL, 0, + DPI_OCI_DURATION_SESSION, DPI_OCI_TYPEGET_ALL, tdo); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get type by name"); +} + + +//----------------------------------------------------------------------------- +// dpiOci__typeByFullName() [INTERNAL] +// Wrapper for OCITypeByFullName(). +//----------------------------------------------------------------------------- +int dpiOci__typeByFullName(dpiConn *conn, const char *name, + uint32_t nameLength, void **tdo, dpiError *error) +{ + int status; + + DPI_OCI_LOAD_SYMBOL("OCITypeByFullName", dpiOciSymbols.fnTypeByFullName) + DPI_OCI_ENSURE_ERROR_HANDLE(error) + status = (*dpiOciSymbols.fnTypeByFullName)(conn->env->handle, + error->handle, conn->handle, name, nameLength, NULL, 0, + DPI_OCI_DURATION_SESSION, DPI_OCI_TYPEGET_ALL, tdo); + DPI_OCI_CHECK_AND_RETURN(error, status, conn, "get type by full name"); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiOracleType.c b/vendor/github.com/godror/godror/odpi/src/dpiOracleType.c new file mode 100644 index 00000000000..ee307a7d995 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiOracleType.c @@ -0,0 +1,504 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiOracleType.c +// Implementation of variable types. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// definition of Oracle types (MUST be in same order as enumeration) +//----------------------------------------------------------------------------- +static const dpiOracleType + dpiAllOracleTypes[DPI_ORACLE_TYPE_MAX - DPI_ORACLE_TYPE_NONE - 1] = { + { + DPI_ORACLE_TYPE_VARCHAR, // public Oracle type + DPI_NATIVE_TYPE_BYTES, // default native type + DPI_SQLT_CHR, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + 0, // buffer size + 1, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NVARCHAR, // public Oracle type + DPI_NATIVE_TYPE_BYTES, // default native type + DPI_SQLT_CHR, // internal Oracle type + DPI_SQLCS_NCHAR, // charset form + 0, // buffer size + 1, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_CHAR, // public Oracle type + DPI_NATIVE_TYPE_BYTES, // default native type + DPI_SQLT_AFC, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + 0, // buffer size + 1, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NCHAR, // public Oracle type + DPI_NATIVE_TYPE_BYTES, // default native type + DPI_SQLT_AFC, // internal Oracle type + DPI_SQLCS_NCHAR, // charset form + 0, // buffer size + 1, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_ROWID, // public Oracle type + DPI_NATIVE_TYPE_ROWID, // default native type + DPI_SQLT_RDD, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 1, // is character data + 1, // can be in array + 1 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_RAW, // public Oracle type + DPI_NATIVE_TYPE_BYTES, // default native type + DPI_SQLT_BIN, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + 0, // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NATIVE_FLOAT, // public Oracle type + DPI_NATIVE_TYPE_FLOAT, // default native type + DPI_SQLT_BFLOAT, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(float), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NATIVE_DOUBLE, // public Oracle type + DPI_NATIVE_TYPE_DOUBLE, // default native type + DPI_SQLT_BDOUBLE, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(double), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NATIVE_INT, // public Oracle type + DPI_NATIVE_TYPE_INT64, // default native type + DPI_SQLT_INT, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(int64_t), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NUMBER, // public Oracle type + DPI_NATIVE_TYPE_DOUBLE, // default native type + DPI_SQLT_VNU, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + DPI_OCI_NUMBER_SIZE, // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_DATE, // public Oracle type + DPI_NATIVE_TYPE_TIMESTAMP, // default native type + DPI_SQLT_ODT, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(dpiOciDate), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_TIMESTAMP, // public Oracle type + DPI_NATIVE_TYPE_TIMESTAMP, // default native type + DPI_SQLT_TIMESTAMP, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_TIMESTAMP_TZ, // public Oracle type + DPI_NATIVE_TYPE_TIMESTAMP, // default native type + DPI_SQLT_TIMESTAMP_TZ, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_TIMESTAMP_LTZ, // public Oracle type + DPI_NATIVE_TYPE_TIMESTAMP, // default native type + DPI_SQLT_TIMESTAMP_LTZ, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_INTERVAL_DS, // public Oracle type + DPI_NATIVE_TYPE_INTERVAL_DS, // default native type + DPI_SQLT_INTERVAL_DS, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_INTERVAL_YM, // public Oracle type + DPI_NATIVE_TYPE_INTERVAL_YM, // default native type + DPI_SQLT_INTERVAL_YM, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_CLOB, // public Oracle type + DPI_NATIVE_TYPE_LOB, // default native type + DPI_SQLT_CLOB, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 1, // is character data + 0, // can be in array + 1 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NCLOB, // public Oracle type + DPI_NATIVE_TYPE_LOB, // default native type + DPI_SQLT_CLOB, // internal Oracle type + DPI_SQLCS_NCHAR, // charset form + sizeof(void*), // buffer size + 1, // is character data + 0, // can be in array + 1 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_BLOB, // public Oracle type + DPI_NATIVE_TYPE_LOB, // default native type + DPI_SQLT_BLOB, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 0, // can be in array + 1 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_BFILE, // public Oracle type + DPI_NATIVE_TYPE_LOB, // default native type + DPI_SQLT_BFILE, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 0, // can be in array + 1 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_STMT, // public Oracle type + DPI_NATIVE_TYPE_STMT, // default native type + DPI_SQLT_RSET, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 0, // can be in array + 1 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_BOOLEAN, // public Oracle type + DPI_NATIVE_TYPE_BOOLEAN, // default native type + DPI_SQLT_BOL, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(int), // buffer size + 0, // is character data + 0, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_OBJECT, // public Oracle type + DPI_NATIVE_TYPE_OBJECT, // default native type + DPI_SQLT_NTY, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(void*), // buffer size + 0, // is character data + 0, // can be in array + 1 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_LONG_VARCHAR, // public Oracle type + DPI_NATIVE_TYPE_BYTES, // default native type + DPI_SQLT_CHR, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + DPI_MAX_BASIC_BUFFER_SIZE + 1, // buffer size + 1, // is character data + 0, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_LONG_RAW, // public Oracle type + DPI_NATIVE_TYPE_BYTES, // default native type + DPI_SQLT_BIN, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + DPI_MAX_BASIC_BUFFER_SIZE + 1, // buffer size + 0, // is character data + 0, // can be in array + 0 // requires pre-fetch + }, + { + DPI_ORACLE_TYPE_NATIVE_UINT, // public Oracle type + DPI_NATIVE_TYPE_UINT64, // default native type + DPI_SQLT_UIN, // internal Oracle type + DPI_SQLCS_IMPLICIT, // charset form + sizeof(uint64_t), // buffer size + 0, // is character data + 1, // can be in array + 0 // requires pre-fetch + } +}; + + +//----------------------------------------------------------------------------- +// dpiOracleType__convertFromOracle() [INTERNAL] +// Return a value from the dpiOracleTypeNum enumeration for the OCI data type +// and charset form. If the OCI data type is not supported, 0 is returned. +//----------------------------------------------------------------------------- +static dpiOracleTypeNum dpiOracleType__convertFromOracle(uint16_t typeCode, + uint8_t charsetForm) +{ + switch(typeCode) { + case DPI_SQLT_CHR: + case DPI_SQLT_VCS: + if (charsetForm == DPI_SQLCS_NCHAR) + return DPI_ORACLE_TYPE_NVARCHAR; + return DPI_ORACLE_TYPE_VARCHAR; + case DPI_SQLT_INT: + case DPI_SQLT_FLT: + case DPI_SQLT_NUM: + case DPI_SQLT_PDN: + case DPI_SQLT_VNU: + case DPI_SQLT_BFLOAT: + case DPI_SQLT_BDOUBLE: + case DPI_OCI_TYPECODE_SMALLINT: + return DPI_ORACLE_TYPE_NUMBER; + case DPI_SQLT_DAT: + case DPI_SQLT_ODT: + return DPI_ORACLE_TYPE_DATE; + case DPI_SQLT_BIN: + case DPI_SQLT_LVB: + return DPI_ORACLE_TYPE_RAW; + case DPI_SQLT_AFC: + if (charsetForm == DPI_SQLCS_NCHAR) + return DPI_ORACLE_TYPE_NCHAR; + return DPI_ORACLE_TYPE_CHAR; + case DPI_OCI_TYPECODE_BINARY_INTEGER: + case DPI_OCI_TYPECODE_PLS_INTEGER: + return DPI_ORACLE_TYPE_NATIVE_INT; + case DPI_SQLT_IBFLOAT: + return DPI_ORACLE_TYPE_NATIVE_FLOAT; + case DPI_SQLT_IBDOUBLE: + return DPI_ORACLE_TYPE_NATIVE_DOUBLE; + case DPI_SQLT_DATE: + case DPI_SQLT_TIMESTAMP: + return DPI_ORACLE_TYPE_TIMESTAMP; + case DPI_SQLT_TIMESTAMP_TZ: + return DPI_ORACLE_TYPE_TIMESTAMP_TZ; + case DPI_SQLT_TIMESTAMP_LTZ: + return DPI_ORACLE_TYPE_TIMESTAMP_LTZ; + case DPI_SQLT_NTY: + case DPI_SQLT_REC: + case DPI_SQLT_NCO: + return DPI_ORACLE_TYPE_OBJECT; + case DPI_SQLT_BOL: + return DPI_ORACLE_TYPE_BOOLEAN; + case DPI_SQLT_CLOB: + if (charsetForm == DPI_SQLCS_NCHAR) + return DPI_ORACLE_TYPE_NCLOB; + return DPI_ORACLE_TYPE_CLOB; + case DPI_SQLT_BLOB: + return DPI_ORACLE_TYPE_BLOB; + case DPI_SQLT_BFILE: + return DPI_ORACLE_TYPE_BFILE; + case DPI_SQLT_RDD: + case DPI_OCI_TYPECODE_ROWID: + return DPI_ORACLE_TYPE_ROWID; + case DPI_SQLT_RSET: + return DPI_ORACLE_TYPE_STMT; + case DPI_SQLT_INTERVAL_DS: + return DPI_ORACLE_TYPE_INTERVAL_DS; + case DPI_SQLT_INTERVAL_YM: + return DPI_ORACLE_TYPE_INTERVAL_YM; + case DPI_SQLT_LNG: + case DPI_OCI_TYPECODE_LONG: + return DPI_ORACLE_TYPE_LONG_VARCHAR; + case DPI_SQLT_LBI: + case DPI_OCI_TYPECODE_LONG_RAW: + return DPI_ORACLE_TYPE_LONG_RAW; + } + return (dpiOracleTypeNum) 0; +} + + +//----------------------------------------------------------------------------- +// dpiOracleType__getFromNum() [INTERNAL] +// Return the type associated with the type number. +//----------------------------------------------------------------------------- +const dpiOracleType *dpiOracleType__getFromNum(dpiOracleTypeNum typeNum, + dpiError *error) +{ + if (typeNum > DPI_ORACLE_TYPE_NONE && typeNum < DPI_ORACLE_TYPE_MAX) + return &dpiAllOracleTypes[typeNum - DPI_ORACLE_TYPE_NONE - 1]; + dpiError__set(error, "check type", DPI_ERR_INVALID_ORACLE_TYPE, typeNum); + return NULL; +} + + +//----------------------------------------------------------------------------- +// dpiOracleType__populateTypeInfo() [INTERNAL] +// Populate dpiDataTypeInfo structure given an Oracle descriptor. Note that +// no error is raised by this function if the data type is not supported. This +// method is called for both implicit and explicit describes (which behave +// slightly differently). +//----------------------------------------------------------------------------- +int dpiOracleType__populateTypeInfo(dpiConn *conn, void *handle, + uint32_t handleType, dpiDataTypeInfo *info, dpiError *error) +{ + const dpiOracleType *oracleType = NULL; + dpiNativeTypeNum nativeTypeNum; + uint32_t dataTypeAttribute; + uint8_t charsetForm; + uint16_t ociSize; + + // acquire data type + if (handleType == DPI_OCI_DTYPE_PARAM) + dataTypeAttribute = DPI_OCI_ATTR_TYPECODE; + else dataTypeAttribute = DPI_OCI_ATTR_DATA_TYPE; + if (dpiOci__attrGet(handle, handleType, (void*) &info->ociTypeCode, 0, + dataTypeAttribute, "get data type", error) < 0) + return DPI_FAILURE; + + // acquire character set form + if (info->ociTypeCode != DPI_SQLT_CHR && + info->ociTypeCode != DPI_SQLT_AFC && + info->ociTypeCode != DPI_SQLT_VCS && + info->ociTypeCode != DPI_SQLT_CLOB) + charsetForm = DPI_SQLCS_IMPLICIT; + else if (dpiOci__attrGet(handle, handleType, (void*) &charsetForm, 0, + DPI_OCI_ATTR_CHARSET_FORM, "get charset form", error) < 0) + return DPI_FAILURE; + + // convert Oracle type to ODPI-C enumerations, if possible + info->oracleTypeNum = dpiOracleType__convertFromOracle(info->ociTypeCode, + charsetForm); + if (!info->oracleTypeNum) + info->defaultNativeTypeNum = (dpiNativeTypeNum) 0; + else { + oracleType = dpiOracleType__getFromNum(info->oracleTypeNum, error); + if (!oracleType) + return DPI_FAILURE; + info->defaultNativeTypeNum = oracleType->defaultNativeTypeNum; + } + + // determine precision/scale + nativeTypeNum = info->defaultNativeTypeNum; + switch (nativeTypeNum) { + case DPI_NATIVE_TYPE_DOUBLE: + case DPI_NATIVE_TYPE_FLOAT: + case DPI_NATIVE_TYPE_INT64: + case DPI_NATIVE_TYPE_TIMESTAMP: + case DPI_NATIVE_TYPE_INTERVAL_YM: + case DPI_NATIVE_TYPE_INTERVAL_DS: + if (dpiOci__attrGet(handle, handleType, (void*) &info->scale, 0, + DPI_OCI_ATTR_SCALE, "get scale", error) < 0) + return DPI_FAILURE; + if (dpiOci__attrGet(handle, handleType, (void*) &info->precision, + 0, DPI_OCI_ATTR_PRECISION, "get precision", error) < 0) + return DPI_FAILURE; + if (nativeTypeNum == DPI_NATIVE_TYPE_TIMESTAMP || + nativeTypeNum == DPI_NATIVE_TYPE_INTERVAL_DS) { + info->fsPrecision = (uint8_t) info->scale; + info->scale = 0; + } + break; + default: + info->precision = 0; + info->fsPrecision = 0; + info->scale = 0; + break; + } + + // change default type to integer if precision/scale supports it + if (info->oracleTypeNum == DPI_ORACLE_TYPE_NUMBER && info->scale == 0 && + info->precision > 0 && info->precision <= DPI_MAX_INT64_PRECISION) + info->defaultNativeTypeNum = DPI_NATIVE_TYPE_INT64; + + // acquire size (in bytes) of item + info->sizeInChars = 0; + if (oracleType && oracleType->sizeInBytes == 0) { + if (dpiOci__attrGet(handle, handleType, (void*) &ociSize, 0, + DPI_OCI_ATTR_DATA_SIZE, "get size (bytes)", error) < 0) + return DPI_FAILURE; + info->dbSizeInBytes = ociSize; + info->clientSizeInBytes = ociSize; + } else { + info->dbSizeInBytes = 0; + info->clientSizeInBytes = 0; + } + + // acquire size (in characters) of item, if applicable + if (oracleType && oracleType->isCharacterData && + oracleType->sizeInBytes == 0) { + if (dpiOci__attrGet(handle, handleType, (void*) &ociSize, 0, + DPI_OCI_ATTR_CHAR_SIZE, "get size (chars)", error) < 0) + return DPI_FAILURE; + info->sizeInChars = ociSize; + if (charsetForm == DPI_SQLCS_NCHAR) + info->clientSizeInBytes = info->sizeInChars * + conn->env->nmaxBytesPerCharacter; + else if (conn->charsetId != conn->env->charsetId) + info->clientSizeInBytes = info->sizeInChars * + conn->env->maxBytesPerCharacter; + } + + // acquire object type, if applicable + if (info->oracleTypeNum == DPI_ORACLE_TYPE_OBJECT) { + if (dpiObjectType__allocate(conn, handle, DPI_OCI_ATTR_TYPE_NAME, + &info->objectType, error) < 0) + return DPI_FAILURE; + if (dpiObjectType__isXmlType(info->objectType)) { + dpiObjectType__free(info->objectType, error); + info->objectType = NULL; + info->ociTypeCode = DPI_SQLT_CHR; + info->oracleTypeNum = DPI_ORACLE_TYPE_LONG_VARCHAR; + info->defaultNativeTypeNum = DPI_NATIVE_TYPE_BYTES; + } + } + + return DPI_SUCCESS; +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiPool.c b/vendor/github.com/godror/godror/odpi/src/dpiPool.c new file mode 100644 index 00000000000..58f21e5efc9 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiPool.c @@ -0,0 +1,586 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiPool.c +// Implementation of session pools. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiPool__acquireConnection() [INTERNAL] +// Internal method used for acquiring a connection from a pool. +//----------------------------------------------------------------------------- +int dpiPool__acquireConnection(dpiPool *pool, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + dpiConnCreateParams *params, dpiConn **conn, dpiError *error) +{ + dpiConn *tempConn; + + // allocate new connection + if (dpiGen__allocate(DPI_HTYPE_CONN, pool->env, (void**) &tempConn, + error) < 0) + return DPI_FAILURE; + error->env = pool->env; + + // create the connection + if (dpiConn__create(tempConn, pool->env->context, userName, userNameLength, + password, passwordLength, pool->name, pool->nameLength, pool, + NULL, params, error) < 0) { + dpiConn__free(tempConn, error); + return DPI_FAILURE; + } + + *conn = tempConn; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiPool__checkConnected() [INTERNAL] +// Determine if the session pool is connected to the database. If not, an +// error is raised. +//----------------------------------------------------------------------------- +static int dpiPool__checkConnected(dpiPool *pool, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(pool, DPI_HTYPE_POOL, fnName, error) < 0) + return DPI_FAILURE; + if (!pool->handle) + return dpiError__set(error, "check pool", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiPool__create() [INTERNAL] +// Internal method for creating a session pool. +//----------------------------------------------------------------------------- +static int dpiPool__create(dpiPool *pool, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + const dpiCommonCreateParams *commonParams, + dpiPoolCreateParams *createParams, dpiError *error) +{ + uint32_t poolMode; + uint8_t getMode; + void *authInfo; + + // validate parameters + if (createParams->externalAuth && + ((userName && userNameLength > 0) || + (password && passwordLength > 0))) + return dpiError__set(error, "check mixed credentials", + DPI_ERR_EXT_AUTH_WITH_CREDENTIALS); + + // create the session pool handle + if (dpiOci__handleAlloc(pool->env->handle, &pool->handle, + DPI_OCI_HTYPE_SPOOL, "allocate pool handle", error) < 0) + return DPI_FAILURE; + + // prepare pool mode + poolMode = DPI_OCI_SPC_STMTCACHE; + if (createParams->homogeneous) + poolMode |= DPI_OCI_SPC_HOMOGENEOUS; + + // create authorization handle + if (dpiOci__handleAlloc(pool->env->handle, &authInfo, + DPI_OCI_HTYPE_AUTHINFO, "allocate authinfo handle", error) < 0) + return DPI_FAILURE; + + // set context attributes + if (dpiUtils__setAttributesFromCommonCreateParams(authInfo, + DPI_OCI_HTYPE_AUTHINFO, commonParams, error) < 0) + return DPI_FAILURE; + + // set PL/SQL session state fixup callback, if applicable + if (createParams->plsqlFixupCallback && + createParams->plsqlFixupCallbackLength > 0) { + if (dpiUtils__checkClientVersion(pool->env->versionInfo, 12, 2, + error) < 0) + return DPI_FAILURE; + if (dpiOci__attrSet(authInfo, DPI_OCI_HTYPE_AUTHINFO, + (void*) createParams->plsqlFixupCallback, + createParams->plsqlFixupCallbackLength, + DPI_OCI_ATTR_FIXUP_CALLBACK, + "set PL/SQL session state fixup callback", error) < 0) + return DPI_FAILURE; + } + + // set authorization info on session pool + if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) authInfo, 0, + DPI_OCI_ATTR_SPOOL_AUTH, "set auth info", error) < 0) + return DPI_FAILURE; + + // create pool + if (dpiOci__sessionPoolCreate(pool, connectString, connectStringLength, + createParams->minSessions, createParams->maxSessions, + createParams->sessionIncrement, userName, userNameLength, password, + passwordLength, poolMode, error) < 0) + return DPI_FAILURE; + + // set the get mode on the pool + getMode = (uint8_t) createParams->getMode; + if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) &getMode, 0, + DPI_OCI_ATTR_SPOOL_GETMODE, "set get mode", error) < 0) + return DPI_FAILURE; + + // set the session timeout on the pool + if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) + &createParams->timeout, 0, DPI_OCI_ATTR_SPOOL_TIMEOUT, + "set timeout", error) < 0) + return DPI_FAILURE; + + // set the wait timeout on the pool (valid in 12.2 and higher) + if (pool->env->versionInfo->versionNum > 12 || + (pool->env->versionInfo->versionNum == 12 && + pool->env->versionInfo->releaseNum >= 2)) { + if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) + &createParams->waitTimeout, 0, DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT, + "set wait timeout", error) < 0) + return DPI_FAILURE; + } + + // set the maximum lifetime session on the pool (valid in 12.1 and higher) + if (pool->env->versionInfo->versionNum >= 12) { + if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) + &createParams->maxLifetimeSession, 0, + DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION, + "set max lifetime session", error) < 0) + return DPI_FAILURE; + } + + // set the maximum number of sessions per shard (valid in 18.3 and higher) + if (pool->env->versionInfo->versionNum > 18 || + (pool->env->versionInfo->versionNum == 18 && + pool->env->versionInfo->releaseNum >= 3)) { + if (dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, (void*) + &createParams->maxSessionsPerShard, 0, + DPI_OCI_ATTR_SPOOL_MAX_PER_SHARD, + "set max sessions per shard", error) < 0) + return DPI_FAILURE; + } + + // set reamining attributes directly + pool->homogeneous = createParams->homogeneous; + pool->externalAuth = createParams->externalAuth; + pool->pingInterval = createParams->pingInterval; + pool->pingTimeout = createParams->pingTimeout; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiPool__free() [INTERNAL] +// Free any memory associated with the pool. +//----------------------------------------------------------------------------- +void dpiPool__free(dpiPool *pool, dpiError *error) +{ + if (pool->handle) { + dpiOci__sessionPoolDestroy(pool, DPI_OCI_SPD_FORCE, 0, error); + pool->handle = NULL; + } + if (pool->env) { + dpiEnv__free(pool->env, error); + pool->env = NULL; + } + dpiUtils__freeMemory(pool); +} + + +//----------------------------------------------------------------------------- +// dpiPool__getAttributeUint() [INTERNAL] +// Return the value of the attribute as an unsigned integer. +//----------------------------------------------------------------------------- +static int dpiPool__getAttributeUint(dpiPool *pool, uint32_t attribute, + uint32_t *value, const char *fnName) +{ + int status, supported = 1; + dpiError error; + + if (dpiPool__checkConnected(pool, fnName, &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(pool, value) + switch (attribute) { + case DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION: + if (pool->env->versionInfo->versionNum < 12) + supported = 0; + break; + case DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT: + if (pool->env->versionInfo->versionNum < 12 || + (pool->env->versionInfo->versionNum == 12 && + pool->env->versionInfo->releaseNum < 2)) + supported = 0; + break; + case DPI_OCI_ATTR_SPOOL_BUSY_COUNT: + case DPI_OCI_ATTR_SPOOL_OPEN_COUNT: + case DPI_OCI_ATTR_SPOOL_STMTCACHESIZE: + case DPI_OCI_ATTR_SPOOL_TIMEOUT: + break; + default: + supported = 0; + break; + } + if (supported) + status = dpiOci__attrGet(pool->handle, DPI_OCI_HTYPE_SPOOL, value, + NULL, attribute, "get attribute value", &error); + else status = dpiError__set(&error, "get attribute value", + DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(pool, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiPool__setAttributeUint() [INTERNAL] +// Set the value of the OCI attribute as an unsigned integer. +//----------------------------------------------------------------------------- +static int dpiPool__setAttributeUint(dpiPool *pool, uint32_t attribute, + uint32_t value, const char *fnName) +{ + int status, supported = 1; + void *ociValue = &value; + uint8_t shortValue; + dpiError error; + + // make sure session pool is connected + if (dpiPool__checkConnected(pool, fnName, &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + + // determine pointer to pass (OCI uses different sizes) + switch (attribute) { + case DPI_OCI_ATTR_SPOOL_GETMODE: + shortValue = (uint8_t) value; + ociValue = &shortValue; + break; + case DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION: + if (pool->env->versionInfo->versionNum < 12) + supported = 0; + break; + case DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT: + if (pool->env->versionInfo->versionNum < 12 || + (pool->env->versionInfo->versionNum == 12 && + pool->env->versionInfo->releaseNum < 2)) + supported = 0; + break; + case DPI_OCI_ATTR_SPOOL_STMTCACHESIZE: + case DPI_OCI_ATTR_SPOOL_TIMEOUT: + break; + default: + supported = 0; + break; + } + + // set value in the OCI + if (supported) + status = dpiOci__attrSet(pool->handle, DPI_OCI_HTYPE_SPOOL, ociValue, + 0, attribute, "set attribute value", &error); + else status = dpiError__set(&error, "set attribute value", + DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(pool, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiPool_acquireConnection() [PUBLIC] +// Acquire a connection from the pool. +//----------------------------------------------------------------------------- +int dpiPool_acquireConnection(dpiPool *pool, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + dpiConnCreateParams *params, dpiConn **conn) +{ + dpiConnCreateParams localParams; + dpiError error; + int status; + + // validate parameters + if (dpiPool__checkConnected(pool, __func__, &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(pool, userName) + DPI_CHECK_PTR_AND_LENGTH(pool, password) + DPI_CHECK_PTR_NOT_NULL(pool, conn) + + // use default parameters if none provided + if (!params) { + dpiContext__initConnCreateParams(&localParams); + params = &localParams; + } + + // the username must be enclosed within [] if external authentication + // with proxy is desired + if (pool->externalAuth && userName && userNameLength > 0 && + (userName[0] != '[' || userName[userNameLength - 1] != ']')) { + dpiError__set(&error, "verify proxy user name with external auth", + DPI_ERR_EXT_AUTH_INVALID_PROXY); + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error ); + } + + status = dpiPool__acquireConnection(pool, userName, userNameLength, + password, passwordLength, params, conn, &error); + return dpiGen__endPublicFn(pool, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiPool_addRef() [PUBLIC] +// Add a reference to the pool. +//----------------------------------------------------------------------------- +int dpiPool_addRef(dpiPool *pool) +{ + return dpiGen__addRef(pool, DPI_HTYPE_POOL, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_close() [PUBLIC] +// Destroy the pool now, not when the reference count reaches zero. +//----------------------------------------------------------------------------- +int dpiPool_close(dpiPool *pool, dpiPoolCloseMode mode) +{ + dpiError error; + + if (dpiPool__checkConnected(pool, __func__, &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + if (dpiOci__sessionPoolDestroy(pool, mode, 1, &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + return dpiGen__endPublicFn(pool, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiPool_create() [PUBLIC] +// Create a new session pool and return it. +//----------------------------------------------------------------------------- +int dpiPool_create(const dpiContext *context, const char *userName, + uint32_t userNameLength, const char *password, uint32_t passwordLength, + const char *connectString, uint32_t connectStringLength, + const dpiCommonCreateParams *commonParams, + dpiPoolCreateParams *createParams, dpiPool **pool) +{ + dpiCommonCreateParams localCommonParams; + dpiPoolCreateParams localCreateParams; + dpiPool *tempPool; + dpiError error; + + // validate parameters + if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, + &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(context, userName) + DPI_CHECK_PTR_AND_LENGTH(context, password) + DPI_CHECK_PTR_AND_LENGTH(context, connectString) + DPI_CHECK_PTR_NOT_NULL(context, pool) + + // use default parameters if none provided + if (!commonParams) { + dpiContext__initCommonCreateParams(&localCommonParams); + commonParams = &localCommonParams; + } + + // size changed in 3.1; must use local variable until version 4 released + if (!createParams || context->dpiMinorVersion < 1) { + dpiContext__initPoolCreateParams(&localCreateParams); + if (createParams) + memcpy(&localCreateParams, createParams, + sizeof(dpiPoolCreateParams__v30)); + createParams = &localCreateParams; + } + + // allocate memory for pool + if (dpiGen__allocate(DPI_HTYPE_POOL, NULL, (void**) &tempPool, &error) < 0) + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + + // initialize environment + if (dpiEnv__init(tempPool->env, context, commonParams, NULL, &error) < 0) { + dpiPool__free(tempPool, &error); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + } + + // perform remaining steps required to create pool + if (dpiPool__create(tempPool, userName, userNameLength, password, + passwordLength, connectString, connectStringLength, commonParams, + createParams, &error) < 0) { + dpiPool__free(tempPool, &error); + return dpiGen__endPublicFn(context, DPI_FAILURE, &error); + } + + createParams->outPoolName = tempPool->name; + createParams->outPoolNameLength = tempPool->nameLength; + *pool = tempPool; + dpiHandlePool__release(tempPool->env->errorHandles, &error.handle); + return dpiGen__endPublicFn(context, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getBusyCount() [PUBLIC] +// Return the pool's busy count. +//----------------------------------------------------------------------------- +int dpiPool_getBusyCount(dpiPool *pool, uint32_t *value) +{ + return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_BUSY_COUNT, + value, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getEncodingInfo() [PUBLIC] +// Get the encoding information from the pool. +//----------------------------------------------------------------------------- +int dpiPool_getEncodingInfo(dpiPool *pool, dpiEncodingInfo *info) +{ + dpiError error; + int status; + + if (dpiPool__checkConnected(pool, __func__, &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(pool, info) + status = dpiEnv__getEncodingInfo(pool->env, info); + return dpiGen__endPublicFn(pool, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getGetMode() [PUBLIC] +// Return the pool's "get" mode. +//----------------------------------------------------------------------------- +int dpiPool_getGetMode(dpiPool *pool, dpiPoolGetMode *value) +{ + dpiError error; + + if (dpiPool__checkConnected(pool, __func__, &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(pool, value) + if (dpiOci__attrGet(pool->handle, DPI_OCI_HTYPE_SPOOL, value, NULL, + DPI_OCI_ATTR_SPOOL_GETMODE, "get attribute value", &error) < 0) + return dpiGen__endPublicFn(pool, DPI_FAILURE, &error); + return dpiGen__endPublicFn(pool, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getMaxLifetimeSession() [PUBLIC] +// Return the pool's maximum lifetime session. +//----------------------------------------------------------------------------- +int dpiPool_getMaxLifetimeSession(dpiPool *pool, uint32_t *value) +{ + return dpiPool__getAttributeUint(pool, + DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION, value, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getOpenCount() [PUBLIC] +// Return the pool's open count. +//----------------------------------------------------------------------------- +int dpiPool_getOpenCount(dpiPool *pool, uint32_t *value) +{ + return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_OPEN_COUNT, + value, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getStmtCacheSize() [PUBLIC] +// Return the pool's default statement cache size. +//----------------------------------------------------------------------------- +int dpiPool_getStmtCacheSize(dpiPool *pool, uint32_t *value) +{ + return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_STMTCACHESIZE, + value, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getTimeout() [PUBLIC] +// Return the pool's timeout value. +//----------------------------------------------------------------------------- +int dpiPool_getTimeout(dpiPool *pool, uint32_t *value) +{ + return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_TIMEOUT, value, + __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_getWaitTimeout() [PUBLIC] +// Return the pool's wait timeout value. +//----------------------------------------------------------------------------- +int dpiPool_getWaitTimeout(dpiPool *pool, uint32_t *value) +{ + return dpiPool__getAttributeUint(pool, DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT, + value, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_release() [PUBLIC] +// Release a reference to the pool. +//----------------------------------------------------------------------------- +int dpiPool_release(dpiPool *pool) +{ + return dpiGen__release(pool, DPI_HTYPE_POOL, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_setGetMode() [PUBLIC] +// Set the pool's "get" mode. +//----------------------------------------------------------------------------- +int dpiPool_setGetMode(dpiPool *pool, dpiPoolGetMode value) +{ + return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_GETMODE, value, + __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_setMaxLifetimeSession() [PUBLIC] +// Set the pool's maximum lifetime session. +//----------------------------------------------------------------------------- +int dpiPool_setMaxLifetimeSession(dpiPool *pool, uint32_t value) +{ + return dpiPool__setAttributeUint(pool, + DPI_OCI_ATTR_SPOOL_MAX_LIFETIME_SESSION, value, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_setStmtCacheSize() [PUBLIC] +// Set the pool's default statement cache size. +//----------------------------------------------------------------------------- +int dpiPool_setStmtCacheSize(dpiPool *pool, uint32_t value) +{ + return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_STMTCACHESIZE, + value, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_setTimeout() [PUBLIC] +// Set the pool's timeout value. +//----------------------------------------------------------------------------- +int dpiPool_setTimeout(dpiPool *pool, uint32_t value) +{ + return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_TIMEOUT, value, + __func__); +} + + +//----------------------------------------------------------------------------- +// dpiPool_setWaitTimeout() [PUBLIC] +// Set the pool's wait timeout value. +//----------------------------------------------------------------------------- +int dpiPool_setWaitTimeout(dpiPool *pool, uint32_t value) +{ + return dpiPool__setAttributeUint(pool, DPI_OCI_ATTR_SPOOL_WAIT_TIMEOUT, + value, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiQueue.c b/vendor/github.com/godror/godror/odpi/src/dpiQueue.c new file mode 100644 index 00000000000..9c2f39a9a82 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiQueue.c @@ -0,0 +1,560 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiQueue.c +// Implementation of AQ queues. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// forward declarations of internal functions only used in this file +static int dpiQueue__allocateBuffer(dpiQueue *queue, uint32_t numElements, + dpiError *error); +static int dpiQueue__deq(dpiQueue *queue, uint32_t *numProps, + dpiMsgProps **props, dpiError *error); +static void dpiQueue__freeBuffer(dpiQueue *queue, dpiError *error); +static int dpiQueue__getPayloadTDO(dpiQueue *queue, void **tdo, + dpiError *error); + + +//----------------------------------------------------------------------------- +// dpiQueue__allocate() [INTERNAL] +// Allocate and initialize a queue. +//----------------------------------------------------------------------------- +int dpiQueue__allocate(dpiConn *conn, const char *name, uint32_t nameLength, + dpiObjectType *payloadType, dpiQueue **queue, dpiError *error) +{ + dpiQueue *tempQueue; + char *buffer; + + // allocate handle; store reference to the connection that created it + if (dpiGen__allocate(DPI_HTYPE_QUEUE, conn->env, (void**) &tempQueue, + error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(conn, error, 1); + tempQueue->conn = conn; + + // store payload type, which is either an object type or NULL (meaning that + // RAW payloads are being enqueued and dequeued) + if (payloadType) { + dpiGen__setRefCount(payloadType, error, 1); + tempQueue->payloadType = payloadType; + } + + // allocate space for the name of the queue; OCI requires a NULL-terminated + // string so allocate enough space to store the NULL terminator; UTF-16 + // encoded strings are not currently supported + if (dpiUtils__allocateMemory(1, nameLength + 1, 0, "queue name", + (void**) &buffer, error) < 0) { + dpiQueue__free(tempQueue, error); + return DPI_FAILURE; + } + memcpy(buffer, name, nameLength); + buffer[nameLength] = '\0'; + tempQueue->name = buffer; + + *queue = tempQueue; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue__allocateBuffer() [INTERNAL] +// Ensure there is enough space in the buffer for the specified number of +// elements. +//----------------------------------------------------------------------------- +static int dpiQueue__allocateBuffer(dpiQueue *queue, uint32_t numElements, + dpiError *error) +{ + dpiQueue__freeBuffer(queue, error); + queue->buffer.numElements = numElements; + if (dpiUtils__allocateMemory(numElements, sizeof(dpiMsgProps*), 1, + "allocate msg props array", (void**) &queue->buffer.props, + error) < 0) + return DPI_FAILURE; + if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, + "allocate OCI handles array", (void**) &queue->buffer.handles, + error) < 0) + return DPI_FAILURE; + if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, + "allocate OCI instances array", (void**) &queue->buffer.instances, + error) < 0) + return DPI_FAILURE; + if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, + "allocate OCI indicators array", + (void**) &queue->buffer.indicators, error) < 0) + return DPI_FAILURE; + if (!queue->payloadType) { + if (dpiUtils__allocateMemory(numElements, sizeof(int16_t), 1, + "allocate OCI raw indicators array", + (void**) &queue->buffer.rawIndicators, error) < 0) + return DPI_FAILURE; + } + if (dpiUtils__allocateMemory(numElements, sizeof(void*), 1, + "allocate message ids array", (void**) &queue->buffer.msgIds, + error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue__check() [INTERNAL] +// Determine if the queue is available to use. +//----------------------------------------------------------------------------- +static int dpiQueue__check(dpiQueue *queue, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(queue, DPI_HTYPE_QUEUE, fnName, error) < 0) + return DPI_FAILURE; + if (!queue->conn->handle || queue->conn->closing) + return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue__createDeqOptions() [INTERNAL] +// Create the dequeue options object that will be used for performing +// dequeues against the queue. +//----------------------------------------------------------------------------- +static int dpiQueue__createDeqOptions(dpiQueue *queue, dpiError *error) +{ + dpiDeqOptions *tempOptions; + + if (dpiGen__allocate(DPI_HTYPE_DEQ_OPTIONS, queue->env, + (void**) &tempOptions, error) < 0) + return DPI_FAILURE; + if (dpiDeqOptions__create(tempOptions, queue->conn, error) < 0) { + dpiDeqOptions__free(tempOptions, error); + return DPI_FAILURE; + } + + queue->deqOptions = tempOptions; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue__createEnqOptions() [INTERNAL] +// Create the dequeue options object that will be used for performing +// dequeues against the queue. +//----------------------------------------------------------------------------- +static int dpiQueue__createEnqOptions(dpiQueue *queue, dpiError *error) +{ + dpiEnqOptions *tempOptions; + + if (dpiGen__allocate(DPI_HTYPE_ENQ_OPTIONS, queue->env, + (void**) &tempOptions, error) < 0) + return DPI_FAILURE; + if (dpiEnqOptions__create(tempOptions, queue->conn, error) < 0) { + dpiEnqOptions__free(tempOptions, error); + return DPI_FAILURE; + } + + queue->enqOptions = tempOptions; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue__deq() [INTERNAL] +// Perform a dequeue of up to the specified number of properties. +//----------------------------------------------------------------------------- +static int dpiQueue__deq(dpiQueue *queue, uint32_t *numProps, + dpiMsgProps **props, dpiError *error) +{ + dpiMsgProps *prop; + void *payloadTDO; + uint32_t i; + + // create dequeue options, if necessary + if (!queue->deqOptions && dpiQueue__createDeqOptions(queue, error) < 0) + return DPI_FAILURE; + + // allocate buffer, if necessary + if (queue->buffer.numElements < *numProps && + dpiQueue__allocateBuffer(queue, *numProps, error) < 0) + return DPI_FAILURE; + + // populate buffer + for (i = 0; i < *numProps; i++) { + prop = queue->buffer.props[i]; + + // create new message properties, if applicable + if (!prop) { + if (dpiMsgProps__allocate(queue->conn, &prop, error) < 0) + return DPI_FAILURE; + queue->buffer.props[i] = prop; + } + + // create payload object, if applicable + if (queue->payloadType && !prop->payloadObj && + dpiObject__allocate(queue->payloadType, NULL, NULL, NULL, + &prop->payloadObj, error) < 0) + return DPI_FAILURE; + + // set OCI arrays + queue->buffer.handles[i] = prop->handle; + if (queue->payloadType) { + queue->buffer.instances[i] = prop->payloadObj->instance; + queue->buffer.indicators[i] = prop->payloadObj->indicator; + } else { + queue->buffer.instances[i] = prop->payloadRaw; + queue->buffer.indicators[i] = &queue->buffer.rawIndicators[i]; + } + queue->buffer.msgIds[i] = prop->msgIdRaw; + + } + + // perform dequeue + if (dpiQueue__getPayloadTDO(queue, &payloadTDO, error) < 0) + return DPI_FAILURE; + if (dpiOci__aqDeqArray(queue->conn, queue->name, queue->deqOptions->handle, + numProps, queue->buffer.handles, payloadTDO, + queue->buffer.instances, queue->buffer.indicators, + queue->buffer.msgIds, error) < 0) { + if (error->buffer->code != 25228) + return DPI_FAILURE; + error->buffer->offset = (uint16_t) *numProps; + } + + // transfer message properties to destination array + for (i = 0; i < *numProps; i++) { + props[i] = queue->buffer.props[i]; + queue->buffer.props[i] = NULL; + if (!queue->payloadType) + props[i]->payloadRaw = queue->buffer.instances[i]; + props[i]->msgIdRaw = queue->buffer.msgIds[i]; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue__enq() [INTERNAL] +// Perform an enqueue of the specified properties. +//----------------------------------------------------------------------------- +static int dpiQueue__enq(dpiQueue *queue, uint32_t numProps, + dpiMsgProps **props, dpiError *error) +{ + void *payloadTDO; + uint32_t i; + + // if no messages are being enqueued, nothing to do! + if (numProps == 0) + return DPI_SUCCESS; + + // create enqueue options, if necessary + if (!queue->enqOptions && dpiQueue__createEnqOptions(queue, error) < 0) + return DPI_FAILURE; + + // allocate buffer, if necessary + if (queue->buffer.numElements < numProps && + dpiQueue__allocateBuffer(queue, numProps, error) < 0) + return DPI_FAILURE; + + // populate buffer + for (i = 0; i < numProps; i++) { + + // perform checks + if (!props[i]->payloadObj && !props[i]->payloadRaw) + return dpiError__set(error, "check payload", + DPI_ERR_QUEUE_NO_PAYLOAD); + if ((queue->payloadType && !props[i]->payloadObj) || + (!queue->payloadType && props[i]->payloadObj)) + return dpiError__set(error, "check payload", + DPI_ERR_QUEUE_WRONG_PAYLOAD_TYPE); + if (queue->payloadType && props[i]->payloadObj && + queue->payloadType->tdo != props[i]->payloadObj->type->tdo) + return dpiError__set(error, "check payload", + DPI_ERR_WRONG_TYPE, + props[i]->payloadObj->type->schemaLength, + props[i]->payloadObj->type->schema, + props[i]->payloadObj->type->nameLength, + props[i]->payloadObj->type->name, + queue->payloadType->schemaLength, + queue->payloadType->schema, + queue->payloadType->nameLength, + queue->payloadType->name); + + // set OCI arrays + queue->buffer.handles[i] = props[i]->handle; + if (queue->payloadType) { + queue->buffer.instances[i] = props[i]->payloadObj->instance; + queue->buffer.indicators[i] = props[i]->payloadObj->indicator; + } else { + queue->buffer.instances[i] = props[i]->payloadRaw; + queue->buffer.indicators[i] = &queue->buffer.rawIndicators[i]; + } + queue->buffer.msgIds[i] = props[i]->msgIdRaw; + + } + + // perform enqueue + if (dpiQueue__getPayloadTDO(queue, &payloadTDO, error) < 0) + return DPI_FAILURE; + if (numProps == 1) { + if (dpiOci__aqEnq(queue->conn, queue->name, queue->enqOptions->handle, + queue->buffer.handles[0], payloadTDO, queue->buffer.instances, + queue->buffer.indicators, queue->buffer.msgIds, error) < 0) + return DPI_FAILURE; + } else { + if (dpiOci__aqEnqArray(queue->conn, queue->name, + queue->enqOptions->handle, &numProps, queue->buffer.handles, + payloadTDO, queue->buffer.instances, queue->buffer.indicators, + queue->buffer.msgIds, error) < 0) { + error->buffer->offset = (uint16_t) numProps; + return DPI_FAILURE; + } + } + + // transfer message ids back to message properties + for (i = 0; i < numProps; i++) + props[i]->msgIdRaw = queue->buffer.msgIds[i]; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue__free() [INTERNAL] +// Free the memory for a queue. +//----------------------------------------------------------------------------- +void dpiQueue__free(dpiQueue *queue, dpiError *error) +{ + if (queue->conn) { + dpiGen__setRefCount(queue->conn, error, -1); + queue->conn = NULL; + } + if (queue->payloadType) { + dpiGen__setRefCount(queue->payloadType, error, -1); + queue->payloadType = NULL; + } + if (queue->name) { + dpiUtils__freeMemory((void*) queue->name); + queue->name = NULL; + } + if (queue->deqOptions) { + dpiGen__setRefCount(queue->deqOptions, error, -1); + queue->deqOptions = NULL; + } + if (queue->enqOptions) { + dpiGen__setRefCount(queue->enqOptions, error, -1); + queue->enqOptions = NULL; + } + dpiQueue__freeBuffer(queue, error); + dpiUtils__freeMemory(queue); +} + + +//----------------------------------------------------------------------------- +// dpiQueue__freeBuffer() [INTERNAL] +// Free the memory areas in the queue buffer. +//----------------------------------------------------------------------------- +static void dpiQueue__freeBuffer(dpiQueue *queue, dpiError *error) +{ + dpiQueueBuffer *buffer = &queue->buffer; + uint32_t i; + + if (buffer->props) { + for (i = 0; i < buffer->numElements; i++) { + if (buffer->props[i]) { + dpiGen__setRefCount(buffer->props[i], error, -1); + buffer->props[i] = NULL; + } + } + dpiUtils__freeMemory(buffer->props); + buffer->props = NULL; + } + if (buffer->handles) { + dpiUtils__freeMemory(buffer->handles); + buffer->handles = NULL; + } + if (buffer->instances) { + dpiUtils__freeMemory(buffer->instances); + buffer->instances = NULL; + } + if (buffer->indicators) { + dpiUtils__freeMemory(buffer->indicators); + buffer->indicators = NULL; + } + if (buffer->rawIndicators) { + dpiUtils__freeMemory(buffer->rawIndicators); + buffer->rawIndicators = NULL; + } + if (buffer->msgIds) { + dpiUtils__freeMemory(buffer->msgIds); + buffer->msgIds = NULL; + } +} + + +//----------------------------------------------------------------------------- +// dpiQueue__getPayloadTDO() [INTERNAL] +// Acquire the TDO to use for the payload. This will either be the TDO of the +// object type (if one was specified when the queue was created) or it will be +// the RAW TDO cached on the connection. +//----------------------------------------------------------------------------- +static int dpiQueue__getPayloadTDO(dpiQueue *queue, void **tdo, + dpiError *error) +{ + if (queue->payloadType) { + *tdo = queue->payloadType->tdo; + } else { + if (dpiConn__getRawTDO(queue->conn, error) < 0) + return DPI_FAILURE; + *tdo = queue->conn->rawTDO; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiQueue_addRef() [PUBLIC] +// Add a reference to the queue. +//----------------------------------------------------------------------------- +int dpiQueue_addRef(dpiQueue *queue) +{ + return dpiGen__addRef(queue, DPI_HTYPE_QUEUE, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiQueue_deqMany() [PUBLIC] +// Dequeue multiple messages from the queue. +//----------------------------------------------------------------------------- +int dpiQueue_deqMany(dpiQueue *queue, uint32_t *numProps, dpiMsgProps **props) +{ + dpiError error; + int status; + + if (dpiQueue__check(queue, __func__, &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(queue, numProps) + DPI_CHECK_PTR_NOT_NULL(queue, props) + status = dpiQueue__deq(queue, numProps, props, &error); + return dpiGen__endPublicFn(queue, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiQueue_deqOne() [PUBLIC] +// Dequeue a single message from the queue. +//----------------------------------------------------------------------------- +int dpiQueue_deqOne(dpiQueue *queue, dpiMsgProps **props) +{ + uint32_t numProps = 1; + dpiError error; + + if (dpiQueue__check(queue, __func__, &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(queue, props) + if (dpiQueue__deq(queue, &numProps, props, &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + if (numProps == 0) + *props = NULL; + return dpiGen__endPublicFn(queue, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiQueue_enqMany() [PUBLIC] +// Enqueue multiple message to the queue. +//----------------------------------------------------------------------------- +int dpiQueue_enqMany(dpiQueue *queue, uint32_t numProps, dpiMsgProps **props) +{ + dpiError error; + uint32_t i; + int status; + + // validate parameters + if (dpiQueue__check(queue, __func__, &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(queue, props) + for (i = 0; i < numProps; i++) { + if (dpiGen__checkHandle(props[i], DPI_HTYPE_MSG_PROPS, + "check message properties", &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + } + status = dpiQueue__enq(queue, numProps, props, &error); + return dpiGen__endPublicFn(queue, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiQueue_enqOne() [PUBLIC] +// Enqueue a single message to the queue. +//----------------------------------------------------------------------------- +int dpiQueue_enqOne(dpiQueue *queue, dpiMsgProps *props) +{ + dpiError error; + int status; + + if (dpiQueue__check(queue, __func__, &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + if (dpiGen__checkHandle(props, DPI_HTYPE_MSG_PROPS, + "check message properties", &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + status = dpiQueue__enq(queue, 1, &props, &error); + return dpiGen__endPublicFn(queue, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiQueue_getDeqOptions() [PUBLIC] +// Return the dequeue options associated with the queue. If no dequeue +// options are currently associated with the queue, create them first. +//----------------------------------------------------------------------------- +int dpiQueue_getDeqOptions(dpiQueue *queue, dpiDeqOptions **options) +{ + dpiError error; + + if (dpiGen__startPublicFn(queue, DPI_HTYPE_QUEUE, __func__, &error) < 0) + return DPI_FAILURE; + DPI_CHECK_PTR_NOT_NULL(queue, options) + if (!queue->deqOptions && dpiQueue__createDeqOptions(queue, &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + *options = queue->deqOptions; + return dpiGen__endPublicFn(queue, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiQueue_getEnqOptions() [PUBLIC] +// Return the enqueue options associated with the queue. If no enqueue +// options are currently associated with the queue, create them first. +//----------------------------------------------------------------------------- +int dpiQueue_getEnqOptions(dpiQueue *queue, dpiEnqOptions **options) +{ + dpiError error; + + if (dpiGen__startPublicFn(queue, DPI_HTYPE_QUEUE, __func__, &error) < 0) + return DPI_FAILURE; + DPI_CHECK_PTR_NOT_NULL(queue, options) + if (!queue->enqOptions && dpiQueue__createEnqOptions(queue, &error) < 0) + return dpiGen__endPublicFn(queue, DPI_FAILURE, &error); + *options = queue->enqOptions; + return dpiGen__endPublicFn(queue, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiQueue_release() [PUBLIC] +// Release a reference to the queue. +//----------------------------------------------------------------------------- +int dpiQueue_release(dpiQueue *queue) +{ + return dpiGen__release(queue, DPI_HTYPE_QUEUE, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiRowid.c b/vendor/github.com/godror/godror/odpi/src/dpiRowid.c new file mode 100644 index 00000000000..9bda49e7cd1 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiRowid.c @@ -0,0 +1,134 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiRowid.c +// Implementation of rowids. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiRowid__allocate() [INTERNAL] +// Allocate and initialize a rowid object. +//----------------------------------------------------------------------------- +int dpiRowid__allocate(dpiConn *conn, dpiRowid **rowid, dpiError *error) +{ + dpiRowid *tempRowid; + + if (dpiGen__allocate(DPI_HTYPE_ROWID, conn->env, (void**) &tempRowid, + error) < 0) + return DPI_FAILURE; + if (dpiOci__descriptorAlloc(conn->env->handle, &tempRowid->handle, + DPI_OCI_DTYPE_ROWID, "allocate descriptor", error) < 0) { + dpiRowid__free(tempRowid, error); + return DPI_FAILURE; + } + + *rowid = tempRowid; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiRowid__free() [INTERNAL] +// Free the memory for a rowid. +//----------------------------------------------------------------------------- +void dpiRowid__free(dpiRowid *rowid, UNUSED dpiError *error) +{ + if (rowid->handle) { + dpiOci__descriptorFree(rowid->handle, DPI_OCI_DTYPE_ROWID); + rowid->handle = NULL; + } + if (rowid->buffer) { + dpiUtils__freeMemory(rowid->buffer); + rowid->buffer = NULL; + } + dpiUtils__freeMemory(rowid); +} + + +//----------------------------------------------------------------------------- +// dpiRowid_addRef() [PUBLIC] +// Add a reference to the rowid. +//----------------------------------------------------------------------------- +int dpiRowid_addRef(dpiRowid *rowid) +{ + return dpiGen__addRef(rowid, DPI_HTYPE_ROWID, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiRowid_getStringValue() [PUBLIC] +// Get the string representation of the rowid. +//----------------------------------------------------------------------------- +int dpiRowid_getStringValue(dpiRowid *rowid, const char **value, + uint32_t *valueLength) +{ + char temp, *adjustedBuffer, *sourcePtr; + uint16_t *targetPtr; + dpiError error; + uint16_t i; + + if (dpiGen__startPublicFn(rowid, DPI_HTYPE_ROWID, __func__, &error) < 0) + return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(rowid, value) + DPI_CHECK_PTR_NOT_NULL(rowid, valueLength) + if (!rowid->buffer) { + + // determine length of rowid + rowid->bufferLength = 0; + dpiOci__rowidToChar(rowid, &temp, &rowid->bufferLength, &error); + + // allocate and populate buffer containing string representation + if (dpiUtils__allocateMemory(1, rowid->bufferLength, 0, + "allocate rowid buffer", (void**) &rowid->buffer, &error) < 0) + return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); + if (dpiOci__rowidToChar(rowid, rowid->buffer, &rowid->bufferLength, + &error) < 0) + return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); + + // UTF-16 is not handled properly (data is returned as ASCII instead) + // adjust the buffer to use the correct encoding + if (rowid->env->charsetId == DPI_CHARSET_ID_UTF16) { + if (dpiUtils__allocateMemory(2, rowid->bufferLength, 0, + "allocate rowid buffer", (void**) &adjustedBuffer, + &error) < 0) { + dpiUtils__freeMemory(rowid->buffer); + rowid->bufferLength = 0; + rowid->buffer = NULL; + return dpiGen__endPublicFn(rowid, DPI_FAILURE, &error); + } + sourcePtr = rowid->buffer; + targetPtr = (uint16_t*) adjustedBuffer; + for (i = 0; i < rowid->bufferLength; i++) + *targetPtr++ = (uint16_t) *sourcePtr++; + dpiUtils__freeMemory(rowid->buffer); + rowid->buffer = adjustedBuffer; + rowid->bufferLength *= 2; + } + + } + + *value = rowid->buffer; + *valueLength = rowid->bufferLength; + return dpiGen__endPublicFn(rowid, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiRowid_release() [PUBLIC] +// Release a reference to the rowid. +//----------------------------------------------------------------------------- +int dpiRowid_release(dpiRowid *rowid) +{ + return dpiGen__release(rowid, DPI_HTYPE_ROWID, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c new file mode 100644 index 00000000000..b0a0ded7c34 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiSodaColl.c @@ -0,0 +1,812 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiSodaColl.c +// Implementation of SODA collections. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiSodaColl__allocate() [INTERNAL] +// Allocate and initialize a SODA collection structure. +//----------------------------------------------------------------------------- +int dpiSodaColl__allocate(dpiSodaDb *db, void *handle, dpiSodaColl **coll, + dpiError *error) +{ + uint8_t sqlType, contentType; + dpiSodaColl *tempColl; + + if (dpiOci__attrGet(handle, DPI_OCI_HTYPE_SODA_COLLECTION, + (void*) &sqlType, 0, DPI_OCI_ATTR_SODA_CTNT_SQL_TYPE, + "get content sql type", error) < 0) + return DPI_FAILURE; + if (dpiGen__allocate(DPI_HTYPE_SODA_COLL, db->env, (void**) &tempColl, + error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(db, error, 1); + tempColl->db = db; + tempColl->handle = handle; + if (sqlType == DPI_SQLT_BLOB) { + tempColl->binaryContent = 1; + contentType = 0; + dpiOci__attrGet(handle, DPI_OCI_HTYPE_SODA_COLLECTION, + (void*) &contentType, 0, DPI_OCI_ATTR_SODA_CTNT_FORMAT, + NULL, error); + if (contentType == DPI_OCI_JSON_FORMAT_OSON) + tempColl->binaryContent = 0; + } + *coll = tempColl; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__check() [INTERNAL] +// Determine if the SODA collection is available to use. +//----------------------------------------------------------------------------- +static int dpiSodaColl__check(dpiSodaColl *coll, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(coll, DPI_HTYPE_SODA_COLL, fnName, error) < 0) + return DPI_FAILURE; + if (!coll->db->conn->handle || coll->db->conn->closing) + return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__createOperOptions() [INTERNAL] +// Create a SODA operation options handle with the specified information. +//----------------------------------------------------------------------------- +static int dpiSodaColl__createOperOptions(dpiSodaColl *coll, + const dpiSodaOperOptions *options, void **handle, dpiError *error) +{ + dpiSodaOperOptions localOptions; + + // if no options specified, use default values + if (!options) { + dpiContext__initSodaOperOptions(&localOptions); + options = &localOptions; + } + + // allocate new handle + if (dpiOci__handleAlloc(coll->env->handle, handle, + DPI_OCI_HTYPE_SODA_OPER_OPTIONS, + "allocate SODA operation options handle", error) < 0) + return DPI_FAILURE; + + // set multiple keys, if applicable + if (options->numKeys > 0) { + if (dpiOci__sodaOperKeysSet(options, *handle, error) < 0) { + dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return DPI_FAILURE; + } + } + + // set single key, if applicable + if (options->keyLength > 0) { + if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, + (void*) options->key, options->keyLength, + DPI_OCI_ATTR_SODA_KEY, "set key", error) < 0) { + dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return DPI_FAILURE; + } + } + + // set single version, if applicable + if (options->versionLength > 0) { + if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, + (void*) options->version, options->versionLength, + DPI_OCI_ATTR_SODA_VERSION, "set version", error) < 0) { + dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return DPI_FAILURE; + } + } + + // set filter, if applicable + if (options->filterLength > 0) { + if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, + (void*) options->filter, options->filterLength, + DPI_OCI_ATTR_SODA_FILTER, "set filter", error) < 0) { + dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return DPI_FAILURE; + } + } + + // set skip count, if applicable + if (options->skip > 0) { + if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, + (void*) &options->skip, 0, DPI_OCI_ATTR_SODA_SKIP, + "set skip count", error) < 0) { + dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return DPI_FAILURE; + } + } + + // set limit, if applicable + if (options->limit > 0) { + if (dpiOci__attrSet(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS, + (void*) &options->limit, 0, DPI_OCI_ATTR_SODA_LIMIT, + "set limit", error) < 0) { + dpiOci__handleFree(*handle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return DPI_FAILURE; + } + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__find() [INTERNAL] +// Perform a find of SODA documents by creating an operation options handle +// and populating it with the requested options. Once the find is complete, +// return either a cursor or a document. +//----------------------------------------------------------------------------- +static int dpiSodaColl__find(dpiSodaColl *coll, + const dpiSodaOperOptions *options, uint32_t flags, + dpiSodaDocCursor **cursor, dpiSodaDoc **doc, dpiError *error) +{ + uint32_t ociMode, returnHandleType, ociFlags; + void *optionsHandle, *ociReturnHandle; + int status; + + // determine OCI mode to pass + ociMode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + ociMode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // create new OCI operation options handle + if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, + error) < 0) + return DPI_FAILURE; + + // determine OCI flags to use + ociFlags = (coll->binaryContent) ? DPI_OCI_SODA_AS_STORED : + DPI_OCI_SODA_AS_AL32UTF8; + + // perform actual find + if (cursor) { + *cursor = NULL; + status = dpiOci__sodaFind(coll, optionsHandle, ociFlags, ociMode, + &ociReturnHandle, error); + } else { + *doc = NULL; + status = dpiOci__sodaFindOne(coll, optionsHandle, ociFlags, ociMode, + &ociReturnHandle, error); + } + dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + if (status < 0) + return DPI_FAILURE; + + // return cursor or document, as appropriate + if (cursor) { + status = dpiSodaDocCursor__allocate(coll, ociReturnHandle, cursor, + error); + returnHandleType = DPI_OCI_HTYPE_SODA_DOC_CURSOR; + } else if (ociReturnHandle) { + status = dpiSodaDoc__allocate(coll->db, ociReturnHandle, doc, error); + returnHandleType = DPI_OCI_HTYPE_SODA_DOCUMENT; + } + if (status < 0) + dpiOci__handleFree(ociReturnHandle, returnHandleType); + + return status; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__free() [INTERNAL] +// Free the memory for a SODA collection. Note that the reference to the +// database must remain until after the handle is freed; otherwise, a segfault +// can take place. +//----------------------------------------------------------------------------- +void dpiSodaColl__free(dpiSodaColl *coll, dpiError *error) +{ + if (coll->handle) { + dpiOci__handleFree(coll->handle, DPI_OCI_HTYPE_SODA_COLLECTION); + coll->handle = NULL; + } + if (coll->db) { + dpiGen__setRefCount(coll->db, error, -1); + coll->db = NULL; + } + dpiUtils__freeMemory(coll); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__getDocCount() [INTERNAL] +// Internal method for getting document count. +//----------------------------------------------------------------------------- +static int dpiSodaColl__getDocCount(dpiSodaColl *coll, + const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count, + dpiError *error) +{ + void *optionsHandle; + uint32_t ociMode; + int status; + + // determine OCI mode to pass + ociMode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + ociMode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // create new OCI operation options handle + if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, + error) < 0) + return DPI_FAILURE; + + // perform actual document count + status = dpiOci__sodaDocCount(coll, optionsHandle, ociMode, count, error); + dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__insertMany() [INTERNAL] +// Insert multiple documents into the collection and return handles to the +// newly created documents, if desired. +//----------------------------------------------------------------------------- +static int dpiSodaColl__insertMany(dpiSodaColl *coll, uint32_t numDocs, + void **docHandles, uint32_t flags, dpiSodaDoc **insertedDocs, + dpiError *error) +{ + void *optionsHandle; + uint32_t i, j, mode; + uint64_t docCount; + int status; + + // create OCI output options handle + if (dpiOci__handleAlloc(coll->env->handle, &optionsHandle, + DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS, + "allocate SODA output options handle", error) < 0) + return DPI_FAILURE; + + // determine mode to pass + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // perform actual bulk insert + if (insertedDocs) { + status = dpiOci__sodaBulkInsertAndGet(coll, docHandles, numDocs, + optionsHandle, mode, error); + } else { + status = dpiOci__sodaBulkInsert(coll, docHandles, numDocs, + optionsHandle, mode, error); + } + + // on failure, determine the number of documents that were successfully + // inserted and store that information in the error buffer + if (status < 0) { + dpiOci__attrGet(optionsHandle, DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS, + (void*) &docCount, 0, DPI_OCI_ATTR_SODA_DOC_COUNT, + NULL, error); + error->buffer->offset = (uint16_t) docCount; + } + dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OUTPUT_OPTIONS); + + // on failure, if using the "AndGet" variant, any document handles that + // were created need to be freed + if (insertedDocs && status < 0) { + for (i = 0; i < numDocs; i++) { + if (docHandles[i]) { + dpiOci__handleFree(docHandles[i], DPI_OCI_HTYPE_SODA_DOCUMENT); + docHandles[i] = NULL; + } + } + } + if (status < 0) + return DPI_FAILURE; + + // return document handles, if desired + if (insertedDocs) { + for (i = 0; i < numDocs; i++) { + if (dpiSodaDoc__allocate(coll->db, docHandles[i], &insertedDocs[i], + error) < 0) { + for (j = 0; j < i; j++) { + dpiSodaDoc__free(insertedDocs[j], error); + insertedDocs[j] = NULL; + } + for (j = i; j < numDocs; j++) { + dpiOci__handleFree(docHandles[i], + DPI_OCI_HTYPE_SODA_DOCUMENT); + } + return DPI_FAILURE; + } + } + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__remove() [INTERNAL] +// Internal method for removing documents from a collection. +//----------------------------------------------------------------------------- +static int dpiSodaColl__remove(dpiSodaColl *coll, + const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count, + dpiError *error) +{ + void *optionsHandle; + uint32_t mode; + int status; + + // determine OCI mode to pass + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // create new OCI operation options handle + if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, + error) < 0) + return DPI_FAILURE; + + // remove documents from collection + status = dpiOci__sodaRemove(coll, optionsHandle, mode, count, error); + dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl__replace() [INTERNAL] +// Internal method for replacing a document in the collection. +//----------------------------------------------------------------------------- +static int dpiSodaColl__replace(dpiSodaColl *coll, + const dpiSodaOperOptions *options, dpiSodaDoc *doc, uint32_t flags, + int *replaced, dpiSodaDoc **replacedDoc, dpiError *error) +{ + void *docHandle, *optionsHandle; + int status, dummyIsReplaced; + uint32_t mode; + + // use dummy value if the replaced flag is not desired + if (!replaced) + replaced = &dummyIsReplaced; + + // determine OCI mode to pass + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // create new OCI operation options handle + if (dpiSodaColl__createOperOptions(coll, options, &optionsHandle, + error) < 0) + return DPI_FAILURE; + + // replace document in collection + // use "AndGet" variant if the replaced document is requested + docHandle = doc->handle; + if (!replacedDoc) { + status = dpiOci__sodaReplOne(coll, optionsHandle, docHandle, mode, + replaced, error); + } else { + *replacedDoc = NULL; + status = dpiOci__sodaReplOneAndGet(coll, optionsHandle, &docHandle, + mode, replaced, error); + if (status == 0 && docHandle) { + status = dpiSodaDoc__allocate(coll->db, docHandle, replacedDoc, + error); + if (status < 0) + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + } + } + + dpiOci__handleFree(optionsHandle, DPI_OCI_HTYPE_SODA_OPER_OPTIONS); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_addRef() [PUBLIC] +// Add a reference to the SODA collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_addRef(dpiSodaColl *coll) +{ + return dpiGen__addRef(coll, DPI_HTYPE_SODA_COLL, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_createIndex() [PUBLIC] +// Create an index on the collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_createIndex(dpiSodaColl *coll, const char *indexSpec, + uint32_t indexSpecLength, uint32_t flags) +{ + dpiError error; + uint32_t mode; + int status; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(coll, indexSpec) + + // determine mode to pass to OCI + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // create index + status = dpiOci__sodaIndexCreate(coll, indexSpec, indexSpecLength, mode, + &error); + return dpiGen__endPublicFn(coll, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_drop() [PUBLIC] +// Drop the collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_drop(dpiSodaColl *coll, uint32_t flags, int *isDropped) +{ + int status, dummyIsDropped; + dpiError error; + uint32_t mode; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + // isDropped is not a mandatory parameter, but it is for OCI + if (!isDropped) + isDropped = &dummyIsDropped; + + // determine mode to pass to OCI + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // drop collection + status = dpiOci__sodaCollDrop(coll, isDropped, mode, &error); + return dpiGen__endPublicFn(coll, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_dropIndex() [PUBLIC] +// Drop the index on the collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_dropIndex(dpiSodaColl *coll, const char *name, + uint32_t nameLength, uint32_t flags, int *isDropped) +{ + int status, dummyIsDropped; + dpiError error; + uint32_t mode; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(coll, name) + + // isDropped is not a mandatory parameter, but it is for OCI + if (!isDropped) + isDropped = &dummyIsDropped; + + // determine mode to pass to OCI + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + if (flags & DPI_SODA_FLAGS_INDEX_DROP_FORCE) + mode |= DPI_OCI_SODA_INDEX_DROP_FORCE; + + // drop index + status = dpiOci__sodaIndexDrop(coll, name, nameLength, mode, isDropped, + &error); + return dpiGen__endPublicFn(coll, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_find() [PUBLIC] +// Find documents in a collection and return a cursor. +//----------------------------------------------------------------------------- +int dpiSodaColl_find(dpiSodaColl *coll, const dpiSodaOperOptions *options, + uint32_t flags, dpiSodaDocCursor **cursor) +{ + dpiError error; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, cursor) + + // perform find and return a cursor + if (dpiSodaColl__find(coll, options, flags, cursor, NULL, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_findOne() [PUBLIC] +// Find a single document in a collection and return it. +//----------------------------------------------------------------------------- +int dpiSodaColl_findOne(dpiSodaColl *coll, const dpiSodaOperOptions *options, + uint32_t flags, dpiSodaDoc **doc) +{ + dpiError error; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, doc) + + // perform find and return a document + if (dpiSodaColl__find(coll, options, flags, NULL, doc, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_getDataGuide() [PUBLIC] +// Return the data guide document for the collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_getDataGuide(dpiSodaColl *coll, uint32_t flags, + dpiSodaDoc **doc) +{ + void *docHandle; + dpiError error; + uint32_t mode; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, doc) + + // determine mode to pass + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // get data guide + if (dpiOci__sodaDataGuideGet(coll, &docHandle, mode, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + if (!docHandle) { + *doc = NULL; + } else if (dpiSodaDoc__allocate(coll->db, docHandle, doc, &error) < 0) { + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + } + + return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_getDocCount() [PUBLIC] +// Return the number of documents in the collection that match the specified +// criteria. +//----------------------------------------------------------------------------- +int dpiSodaColl_getDocCount(dpiSodaColl *coll, + const dpiSodaOperOptions *options, uint32_t flags, uint64_t *count) +{ + dpiError error; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, count) + + // get document count + if (dpiSodaColl__getDocCount(coll, options, flags, count, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_getMetadata() [PUBLIC] +// Return the metadata for the collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_getMetadata(dpiSodaColl *coll, const char **value, + uint32_t *valueLength) +{ + dpiError error; + int status; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, value) + DPI_CHECK_PTR_NOT_NULL(coll, valueLength) + + // get attribute value + status = dpiOci__attrGet(coll->handle, DPI_OCI_HTYPE_SODA_COLLECTION, + (void*) value, valueLength, DPI_OCI_ATTR_SODA_COLL_DESCRIPTOR, + "get value", &error); + return dpiGen__endPublicFn(coll, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_getName() [PUBLIC] +// Return the name of the collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_getName(dpiSodaColl *coll, const char **value, + uint32_t *valueLength) +{ + dpiError error; + int status; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, value) + DPI_CHECK_PTR_NOT_NULL(coll, valueLength) + + // get attribute value + status = dpiOci__attrGet(coll->handle, DPI_OCI_HTYPE_SODA_COLLECTION, + (void*) value, valueLength, DPI_OCI_ATTR_SODA_COLL_NAME, + "get value", &error); + return dpiGen__endPublicFn(coll, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_insertMany() [PUBLIC] +// Insert multiple documents into the collection and return handles to the +// newly created documents, if desired. +//----------------------------------------------------------------------------- +int dpiSodaColl_insertMany(dpiSodaColl *coll, uint32_t numDocs, + dpiSodaDoc **docs, uint32_t flags, dpiSodaDoc **insertedDocs) +{ + void **docHandles; + dpiError error; + uint32_t i; + int status; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, docs) + if (numDocs == 0) { + dpiError__set(&error, "check num documents", DPI_ERR_ARRAY_SIZE_ZERO); + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + } + for (i = 0; i < numDocs; i++) { + if (dpiGen__checkHandle(docs[i], DPI_HTYPE_SODA_DOC, "check document", + &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + } + + // bulk insert is only supported with Oracle Client 18.5+ + if (dpiUtils__checkClientVersion(coll->env->versionInfo, 18, 5, + &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + // create and populate array to hold document handles + if (dpiUtils__allocateMemory(numDocs, sizeof(void*), 1, + "allocate document handles", (void**) &docHandles, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + for (i = 0; i < numDocs; i++) + docHandles[i] = docs[i]->handle; + + // perform bulk insert + status = dpiSodaColl__insertMany(coll, numDocs, docHandles, flags, + insertedDocs, &error); + dpiUtils__freeMemory(docHandles); + return dpiGen__endPublicFn(coll, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_insertOne() [PUBLIC] +// Insert a document into the collection and return a handle to the newly +// created document, if desired. +//----------------------------------------------------------------------------- +int dpiSodaColl_insertOne(dpiSodaColl *coll, dpiSodaDoc *doc, uint32_t flags, + dpiSodaDoc **insertedDoc) +{ + void *docHandle; + dpiError error; + uint32_t mode; + int status; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + if (dpiGen__checkHandle(doc, DPI_HTYPE_SODA_DOC, "check document", + &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + // determine OCI mode to use + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // insert document into collection + // use "AndGet" variant if the inserted document is requested + docHandle = doc->handle; + if (!insertedDoc) + status = dpiOci__sodaInsert(coll, docHandle, mode, &error); + else { + status = dpiOci__sodaInsertAndGet(coll, &docHandle, mode, &error); + if (status == 0) { + status = dpiSodaDoc__allocate(coll->db, docHandle, insertedDoc, + &error); + if (status < 0) + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + } + } + + return dpiGen__endPublicFn(coll, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_release() [PUBLIC] +// Release a reference to the SODA collection. +//----------------------------------------------------------------------------- +int dpiSodaColl_release(dpiSodaColl *coll) +{ + return dpiGen__release(coll, DPI_HTYPE_SODA_COLL, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_remove() [PUBLIC] +// Remove the documents from the collection that match the given criteria. +//----------------------------------------------------------------------------- +int dpiSodaColl_remove(dpiSodaColl *coll, const dpiSodaOperOptions *options, + uint32_t flags, uint64_t *count) +{ + dpiError error; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(coll, count) + + // perform removal + if (dpiSodaColl__remove(coll, options, flags, count, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + return dpiGen__endPublicFn(coll, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaColl_replaceOne() [PUBLIC] +// Replace the first document in the collection that matches the given +// criteria. Returns a handle to the newly replaced document, if desired. +//----------------------------------------------------------------------------- +int dpiSodaColl_replaceOne(dpiSodaColl *coll, + const dpiSodaOperOptions *options, dpiSodaDoc *doc, uint32_t flags, + int *replaced, dpiSodaDoc **replacedDoc) +{ + dpiError error; + int status; + + // validate parameters + if (dpiSodaColl__check(coll, __func__, &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + if (dpiGen__checkHandle(doc, DPI_HTYPE_SODA_DOC, "check document", + &error) < 0) + return dpiGen__endPublicFn(coll, DPI_FAILURE, &error); + + // perform replace + status = dpiSodaColl__replace(coll, options, doc, flags, replaced, + replacedDoc, &error); + return dpiGen__endPublicFn(coll, status, &error); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c new file mode 100644 index 00000000000..f4e91a427cb --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiSodaCollCursor.c @@ -0,0 +1,144 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor.c +// Implementation of SODA collection cursors. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor__allocate() [INTERNAL] +// Allocate and initialize a SODA collection cursor structure. +//----------------------------------------------------------------------------- +int dpiSodaCollCursor__allocate(dpiSodaDb *db, void *handle, + dpiSodaCollCursor **cursor, dpiError *error) +{ + dpiSodaCollCursor *tempCursor; + + if (dpiGen__allocate(DPI_HTYPE_SODA_COLL_CURSOR, db->env, + (void**) &tempCursor, error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(db, error, 1); + tempCursor->db = db; + tempCursor->handle = handle; + *cursor = tempCursor; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor__check() [INTERNAL] +// Determine if the SODA collection cursor is available to use. +//----------------------------------------------------------------------------- +static int dpiSodaCollCursor__check(dpiSodaCollCursor *cursor, + const char *fnName, dpiError *error) +{ + if (dpiGen__startPublicFn(cursor, DPI_HTYPE_SODA_COLL_CURSOR, fnName, + error) < 0) + return DPI_FAILURE; + if (!cursor->handle) + return dpiError__set(error, "check closed", + DPI_ERR_SODA_CURSOR_CLOSED); + if (!cursor->db->conn->handle || cursor->db->conn->closing) + return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor__free() [INTERNAL] +// Free the memory for a SODA collection cursor. Note that the reference to +// the database must remain until after the handle is freed; otherwise, a +// segfault can take place. +//----------------------------------------------------------------------------- +void dpiSodaCollCursor__free(dpiSodaCollCursor *cursor, dpiError *error) +{ + if (cursor->handle) { + dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); + cursor->handle = NULL; + } + if (cursor->db) { + dpiGen__setRefCount(cursor->db, error, -1); + cursor->db = NULL; + } + dpiUtils__freeMemory(cursor); +} + + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor_addRef() [PUBLIC] +// Add a reference to the SODA collection cursor. +//----------------------------------------------------------------------------- +int dpiSodaCollCursor_addRef(dpiSodaCollCursor *cursor) +{ + return dpiGen__addRef(cursor, DPI_HTYPE_SODA_COLL_CURSOR, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor_close() [PUBLIC] +// Close the cursor. +//----------------------------------------------------------------------------- +int dpiSodaCollCursor_close(dpiSodaCollCursor *cursor) +{ + dpiError error; + + if (dpiSodaCollCursor__check(cursor, __func__, &error) < 0) + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + if (cursor->handle) { + dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); + cursor->handle = NULL; + } + return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor_getNext() [PUBLIC] +// Return the next collection available from the cursor. +//----------------------------------------------------------------------------- +int dpiSodaCollCursor_getNext(dpiSodaCollCursor *cursor, uint32_t flags, + dpiSodaColl **coll) +{ + dpiError error; + uint32_t mode; + void *handle; + + if (dpiSodaCollCursor__check(cursor, __func__, &error) < 0) + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(cursor, coll) + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + if (dpiOci__sodaCollGetNext(cursor->db->conn, cursor->handle, &handle, + mode, &error) < 0) + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + *coll = NULL; + if (handle) { + if (dpiSodaColl__allocate(cursor->db, handle, coll, &error) < 0) { + dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLLECTION); + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + } + } + return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaCollCursor_release() [PUBLIC] +// Release a reference to the SODA collection cursor. +//----------------------------------------------------------------------------- +int dpiSodaCollCursor_release(dpiSodaCollCursor *cursor) +{ + return dpiGen__release(cursor, DPI_HTYPE_SODA_COLL_CURSOR, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c new file mode 100644 index 00000000000..0e1605a3507 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiSodaDb.c @@ -0,0 +1,431 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiSodaDb.c +// Implementation of SODA database methods. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiSodaDb__checkConnected() [INTERNAL] +// Check to see that the connection to the database is available for use. +//----------------------------------------------------------------------------- +static int dpiSodaDb__checkConnected(dpiSodaDb *db, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(db, DPI_HTYPE_SODA_DB, fnName, error) < 0) + return DPI_FAILURE; + if (!db->conn->handle || db->conn->closing) + return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb__getCollectionNames() [PUBLIC] +// Internal method used for getting all collection names from the database. +// The provided cursor handle is iterated until either the limit is reached +// or there are no more collections to find. +//----------------------------------------------------------------------------- +static int dpiSodaDb__getCollectionNames(dpiSodaDb *db, void *cursorHandle, + uint32_t limit, dpiSodaCollNames *names, char **namesBuffer, + dpiError *error) +{ + uint32_t numAllocatedNames, namesBufferUsed, namesBufferAllocated; + uint32_t i, nameLength, *tempNameLengths; + char *name, *tempNamesBuffer, *ptr; + void *collectionHandle; + + ptr = *namesBuffer; + namesBufferUsed = namesBufferAllocated = numAllocatedNames = 0; + while (names->numNames < limit || limit == 0) { + + // get next collection from cursor + if (dpiOci__sodaCollGetNext(db->conn, cursorHandle, &collectionHandle, + DPI_OCI_DEFAULT, error) < 0) + return DPI_FAILURE; + if (!collectionHandle) + break; + + // get name from collection + if (dpiOci__attrGet(collectionHandle, DPI_OCI_HTYPE_SODA_COLLECTION, + (void*) &name, &nameLength, DPI_OCI_ATTR_SODA_COLL_NAME, + "get collection name", error) < 0) { + dpiOci__handleFree(collectionHandle, + DPI_OCI_HTYPE_SODA_COLLECTION); + return DPI_FAILURE; + } + + // allocate additional space for the lengths array, if needed + if (numAllocatedNames <= names->numNames) { + numAllocatedNames += 256; + if (dpiUtils__allocateMemory(numAllocatedNames, sizeof(uint32_t), + 0, "allocate lengths array", (void**) &tempNameLengths, + error) < 0) { + dpiOci__handleFree(collectionHandle, + DPI_OCI_HTYPE_SODA_COLLECTION); + return DPI_FAILURE; + } + if (names->nameLengths) { + memcpy(tempNameLengths, names->nameLengths, + names->numNames * sizeof(uint32_t)); + dpiUtils__freeMemory(names->nameLengths); + } + names->nameLengths = tempNameLengths; + } + + // allocate additional space for the names buffer, if needed + if (namesBufferUsed + nameLength > namesBufferAllocated) { + namesBufferAllocated += 32768; + if (dpiUtils__allocateMemory(namesBufferAllocated, 1, 0, + "allocate names buffer", (void**) &tempNamesBuffer, + error) < 0) { + dpiOci__handleFree(collectionHandle, + DPI_OCI_HTYPE_SODA_COLLECTION); + return DPI_FAILURE; + } + if (*namesBuffer) { + memcpy(tempNamesBuffer, *namesBuffer, namesBufferUsed); + dpiUtils__freeMemory(*namesBuffer); + } + *namesBuffer = tempNamesBuffer; + ptr = *namesBuffer + namesBufferUsed; + } + + // store name in buffer and length in array + // the names array itself is created and populated afterwards in order + // to avoid unnecessary copying + memcpy(ptr, name, nameLength); + namesBufferUsed += nameLength; + names->nameLengths[names->numNames] = nameLength; + names->numNames++; + ptr += nameLength; + + // free collection now that we have processed it successfully + dpiOci__handleFree(collectionHandle, DPI_OCI_HTYPE_SODA_COLLECTION); + + } + + // now that all of the names have been determined, populate names array + if (names->numNames > 0) { + if (dpiUtils__allocateMemory(names->numNames, sizeof(char*), 0, + "allocate names array", (void**) &names->names, error) < 0) + return DPI_FAILURE; + ptr = *namesBuffer; + for (i = 0; i < names->numNames; i++) { + names->names[i] = ptr; + ptr += names->nameLengths[i]; + } + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb__free() [INTERNAL] +// Free the memory for a SODA database. +//----------------------------------------------------------------------------- +void dpiSodaDb__free(dpiSodaDb *db, dpiError *error) +{ + if (db->conn) { + dpiGen__setRefCount(db->conn, error, -1); + db->conn = NULL; + } + dpiUtils__freeMemory(db); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_addRef() [PUBLIC] +// Add a reference to the SODA database. +//----------------------------------------------------------------------------- +int dpiSodaDb_addRef(dpiSodaDb *db) +{ + return dpiGen__addRef(db, DPI_HTYPE_SODA_DB, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_createCollection() [PUBLIC] +// Create a new SODA collection with the given name and metadata. +//----------------------------------------------------------------------------- +int dpiSodaDb_createCollection(dpiSodaDb *db, const char *name, + uint32_t nameLength, const char *metadata, uint32_t metadataLength, + uint32_t flags, dpiSodaColl **coll) +{ + dpiError error; + uint32_t mode; + void *handle; + + // validate parameters + if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(db, name) + DPI_CHECK_PTR_AND_LENGTH(db, metadata) + DPI_CHECK_PTR_NOT_NULL(db, coll) + + // determine OCI mode to use + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + if (flags & DPI_SODA_FLAGS_CREATE_COLL_MAP) + mode |= DPI_OCI_SODA_COLL_CREATE_MAP; + + // create collection + if (dpiOci__sodaCollCreateWithMetadata(db, name, nameLength, metadata, + metadataLength, mode, &handle, &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + if (dpiSodaColl__allocate(db, handle, coll, &error) < 0) { + dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLLECTION); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_createDocument() [PUBLIC] +// Create a SODA document that can be inserted in the collection or can be +// used to replace and existing document in the collection. +//----------------------------------------------------------------------------- +int dpiSodaDb_createDocument(dpiSodaDb *db, const char *key, + uint32_t keyLength, const char *content, uint32_t contentLength, + const char *mediaType, uint32_t mediaTypeLength, UNUSED uint32_t flags, + dpiSodaDoc **doc) +{ + int detectEncoding; + void *docHandle; + dpiError error; + + // validate parameters + if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(db, key) + DPI_CHECK_PTR_AND_LENGTH(db, content) + DPI_CHECK_PTR_AND_LENGTH(db, mediaType) + DPI_CHECK_PTR_NOT_NULL(db, doc) + + // allocate SODA document handle + if (dpiOci__handleAlloc(db->env->handle, &docHandle, + DPI_OCI_HTYPE_SODA_DOCUMENT, "allocate SODA document handle", + &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + + // set key, if applicable + if (key && keyLength > 0) { + if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, + (void*) key, keyLength, DPI_OCI_ATTR_SODA_KEY, "set key", + &error) < 0) { + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + } + + // set content, if applicable + if (content && contentLength > 0) { + detectEncoding = 1; + if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, + (void*) &detectEncoding, 0, DPI_OCI_ATTR_SODA_DETECT_JSON_ENC, + "set detect encoding", &error) < 0) { + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, + (void*) content, contentLength, DPI_OCI_ATTR_SODA_CONTENT, + "set content", &error) < 0) { + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + } + + // set media type, if applicable + if (mediaType && mediaTypeLength > 0) { + if (dpiOci__attrSet(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT, + (void*) mediaType, mediaTypeLength, + DPI_OCI_ATTR_SODA_MEDIA_TYPE, "set media type", &error) < 0) { + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + } + + // allocate the ODPI-C document that will be returned + if (dpiSodaDoc__allocate(db, docHandle, doc, &error) < 0) { + dpiOci__handleFree(docHandle, DPI_OCI_HTYPE_SODA_DOCUMENT); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + (*doc)->binaryContent = 1; + + return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_freeCollectionNames() [PUBLIC] +// Free the names of the collections allocated earlier with a call to +// dpiSodaDb_getCollectionNames(). +//----------------------------------------------------------------------------- +int dpiSodaDb_freeCollectionNames(dpiSodaDb *db, dpiSodaCollNames *names) +{ + dpiError error; + + // validate parameters + if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(db, names) + + // perform frees; note that the memory for the names themselves is stored + // in one contiguous block pointed to by the first name + if (names->names) { + dpiUtils__freeMemory((void*) names->names[0]); + dpiUtils__freeMemory((void*) names->names); + names->names = NULL; + } + if (names->nameLengths) { + dpiUtils__freeMemory(names->nameLengths); + names->nameLengths = NULL; + } + names->numNames = 0; + + return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_getCollections() [PUBLIC] +// Return a cursor to iterate over the SODA collections in the database. +//----------------------------------------------------------------------------- +int dpiSodaDb_getCollections(dpiSodaDb *db, const char *startName, + uint32_t startNameLength, uint32_t flags, dpiSodaCollCursor **cursor) +{ + dpiError error; + uint32_t mode; + void *handle; + + if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(db, startName) + DPI_CHECK_PTR_NOT_NULL(db, cursor) + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + if (dpiOci__sodaCollList(db, startName, startNameLength, &handle, mode, + &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + if (dpiSodaCollCursor__allocate(db, handle, cursor, &error) < 0) { + dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_getCollectionNames() [PUBLIC] +// Return the names of all collections in the provided array. +//----------------------------------------------------------------------------- +int dpiSodaDb_getCollectionNames(dpiSodaDb *db, const char *startName, + uint32_t startNameLength, uint32_t limit, uint32_t flags, + dpiSodaCollNames *names) +{ + char *namesBuffer; + dpiError error; + uint32_t mode; + void *handle; + int status; + + // validate parameters + if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(db, startName) + DPI_CHECK_PTR_NOT_NULL(db, names) + + // initialize output structure + names->numNames = 0; + names->names = NULL; + names->nameLengths = NULL; + + // determine OCI mode to use + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + + // acquire collection cursor + if (dpiOci__sodaCollList(db, startName, startNameLength, &handle, mode, + &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + + // iterate over cursor to acquire collection names + namesBuffer = NULL; + status = dpiSodaDb__getCollectionNames(db, handle, limit, names, + &namesBuffer, &error); + dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLL_CURSOR); + if (status < 0) { + names->numNames = 0; + if (namesBuffer) { + dpiUtils__freeMemory(namesBuffer); + namesBuffer = NULL; + } + if (names->names) { + dpiUtils__freeMemory((void*) names->names); + names->names = NULL; + } + if (names->nameLengths) { + dpiUtils__freeMemory(names->nameLengths); + names->nameLengths = NULL; + } + } + return dpiGen__endPublicFn(db, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_openCollection() [PUBLIC] +// Open an existing SODA collection and return a handle to it. +//----------------------------------------------------------------------------- +int dpiSodaDb_openCollection(dpiSodaDb *db, const char *name, + uint32_t nameLength, uint32_t flags, dpiSodaColl **coll) +{ + dpiError error; + uint32_t mode; + void *handle; + + if (dpiSodaDb__checkConnected(db, __func__, &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(db, name) + DPI_CHECK_PTR_NOT_NULL(db, coll) + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + if (dpiOci__sodaCollOpen(db, name, nameLength, mode, &handle, + &error) < 0) + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + *coll = NULL; + if (handle) { + if (dpiSodaColl__allocate(db, handle, coll, &error) < 0) { + dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_COLLECTION); + return dpiGen__endPublicFn(db, DPI_FAILURE, &error); + } + } + return dpiGen__endPublicFn(db, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDb_release() [PUBLIC] +// Release a reference to the SODA database. +//----------------------------------------------------------------------------- +int dpiSodaDb_release(dpiSodaDb *db) +{ + return dpiGen__release(db, DPI_HTYPE_SODA_DB, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c new file mode 100644 index 00000000000..b009e33a44a --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiSodaDoc.c @@ -0,0 +1,231 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiSodaDoc.c +// Implementation of SODA documents. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiSodaDoc__allocate() [INTERNAL] +// Allocate and initialize a SODA document structure. +//----------------------------------------------------------------------------- +int dpiSodaDoc__allocate(dpiSodaDb *db, void *handle, dpiSodaDoc **doc, + dpiError *error) +{ + dpiSodaDoc *tempDoc; + + if (dpiGen__allocate(DPI_HTYPE_SODA_DOC, db->env, (void**) &tempDoc, + error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(db, error, 1); + tempDoc->db = db; + tempDoc->handle = handle; + *doc = tempDoc; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc__check() [INTERNAL] +// Determine if the SODA document is available to use. +//----------------------------------------------------------------------------- +static int dpiSodaDoc__check(dpiSodaDoc *doc, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(doc, DPI_HTYPE_SODA_DOC, fnName, error) < 0) + return DPI_FAILURE; + if (!doc->db->conn->handle || doc->db->conn->closing) + return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc__free() [INTERNAL] +// Free the memory for a SODA document. Note that the reference to the +// database must remain until after the handle is freed; otherwise, a segfault +// can take place. +//----------------------------------------------------------------------------- +void dpiSodaDoc__free(dpiSodaDoc *doc, dpiError *error) +{ + if (doc->handle) { + dpiOci__handleFree(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT); + doc->handle = NULL; + } + if (doc->db) { + dpiGen__setRefCount(doc->db, error, -1); + doc->db = NULL; + } + dpiUtils__freeMemory(doc); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc__getAttributeText() [INTERNAL] +// Get the value of the OCI attribute as a text string. +//----------------------------------------------------------------------------- +static int dpiSodaDoc__getAttributeText(dpiSodaDoc *doc, uint32_t attribute, + const char **value, uint32_t *valueLength, const char *fnName) +{ + dpiError error; + int status; + + // validate parameters + if (dpiSodaDoc__check(doc, fnName, &error) < 0) + return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(doc, value) + DPI_CHECK_PTR_NOT_NULL(doc, valueLength) + + // get attribute value + status = dpiOci__attrGet(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT, + (void*) value, valueLength, attribute, "get value", &error); + return dpiGen__endPublicFn(doc, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_addRef() [PUBLIC] +// Add a reference to the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_addRef(dpiSodaDoc *doc) +{ + return dpiGen__addRef(doc, DPI_HTYPE_SODA_DOC, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_getContent() [PUBLIC] +// Return the content of the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_getContent(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength, const char **encoding) +{ + uint16_t charsetId; + dpiError error; + + // validate parameters + if (dpiSodaDoc__check(doc, __func__, &error) < 0) + return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(doc, value) + DPI_CHECK_PTR_NOT_NULL(doc, valueLength) + DPI_CHECK_PTR_NOT_NULL(doc, encoding) + + // get content + if (dpiOci__attrGet(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT, + (void*) value, valueLength, DPI_OCI_ATTR_SODA_CONTENT, + "get content", &error) < 0) + return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); + + // if content is not in binary form, always use UTF-8 + if (!doc->binaryContent) + *encoding = DPI_CHARSET_NAME_UTF8; + + // otherwise, determine the encoding from OCI + else { + if (dpiOci__attrGet(doc->handle, DPI_OCI_HTYPE_SODA_DOCUMENT, + (void*) &charsetId, 0, DPI_OCI_ATTR_SODA_JSON_CHARSET_ID, + "get charset", &error) < 0) + return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); + switch (charsetId) { + case 0: + *encoding = NULL; + break; + case DPI_CHARSET_ID_UTF8: + *encoding = DPI_CHARSET_NAME_UTF8; + break; + case DPI_CHARSET_ID_UTF16BE: + *encoding = DPI_CHARSET_NAME_UTF16BE; + break; + case DPI_CHARSET_ID_UTF16LE: + *encoding = DPI_CHARSET_NAME_UTF16LE; + break; + default: + dpiError__set(&error, "check charset", + DPI_ERR_INVALID_CHARSET_ID, charsetId); + return dpiGen__endPublicFn(doc, DPI_FAILURE, &error); + } + } + + return dpiGen__endPublicFn(doc, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_getCreatedOn() [PUBLIC] +// Return the created timestamp of the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_getCreatedOn(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength) +{ + return dpiSodaDoc__getAttributeText(doc, + DPI_OCI_ATTR_SODA_CREATE_TIMESTAMP, value, valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_getKey() [PUBLIC] +// Return the key of the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_getKey(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength) +{ + return dpiSodaDoc__getAttributeText(doc, DPI_OCI_ATTR_SODA_KEY, value, + valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_getLastModified() [PUBLIC] +// Return the last modified timestamp of the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_getLastModified(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength) +{ + return dpiSodaDoc__getAttributeText(doc, + DPI_OCI_ATTR_SODA_LASTMOD_TIMESTAMP, value, valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_getMediaType() [PUBLIC] +// Return the media type of the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_getMediaType(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength) +{ + return dpiSodaDoc__getAttributeText(doc, DPI_OCI_ATTR_SODA_MEDIA_TYPE, + value, valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_getVersion() [PUBLIC] +// Return the version of the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_getVersion(dpiSodaDoc *doc, const char **value, + uint32_t *valueLength) +{ + return dpiSodaDoc__getAttributeText(doc, DPI_OCI_ATTR_SODA_VERSION, + value, valueLength, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDoc_release() [PUBLIC] +// Release a reference to the SODA document. +//----------------------------------------------------------------------------- +int dpiSodaDoc_release(dpiSodaDoc *doc) +{ + return dpiGen__release(doc, DPI_HTYPE_SODA_DOC, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c b/vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c new file mode 100644 index 00000000000..9bfd2bdbeea --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiSodaDocCursor.c @@ -0,0 +1,144 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor.c +// Implementation of SODA document cursors. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor__allocate() [INTERNAL] +// Allocate and initialize a SODA document cursor structure. +//----------------------------------------------------------------------------- +int dpiSodaDocCursor__allocate(dpiSodaColl *coll, void *handle, + dpiSodaDocCursor **cursor, dpiError *error) +{ + dpiSodaDocCursor *tempCursor; + + if (dpiGen__allocate(DPI_HTYPE_SODA_DOC_CURSOR, coll->env, + (void**) &tempCursor, error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(coll, error, 1); + tempCursor->coll = coll; + tempCursor->handle = handle; + *cursor = tempCursor; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor__check() [INTERNAL] +// Determine if the SODA document cursor is available to use. +//----------------------------------------------------------------------------- +static int dpiSodaDocCursor__check(dpiSodaDocCursor *cursor, + const char *fnName, dpiError *error) +{ + if (dpiGen__startPublicFn(cursor, DPI_HTYPE_SODA_DOC_CURSOR, fnName, + error) < 0) + return DPI_FAILURE; + if (!cursor->handle) + return dpiError__set(error, "check closed", + DPI_ERR_SODA_CURSOR_CLOSED); + if (!cursor->coll->db->conn->handle || cursor->coll->db->conn->closing) + return dpiError__set(error, "check connection", DPI_ERR_NOT_CONNECTED); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor__free() [INTERNAL] +// Free the memory for a SODA document cursor. Note that the reference to the +// collection must remain until after the handle is freed; otherwise, a +// segfault can take place. +//----------------------------------------------------------------------------- +void dpiSodaDocCursor__free(dpiSodaDocCursor *cursor, dpiError *error) +{ + if (cursor->handle) { + dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_DOC_CURSOR); + cursor->handle = NULL; + } + if (cursor->coll) { + dpiGen__setRefCount(cursor->coll, error, -1); + cursor->coll = NULL; + } + dpiUtils__freeMemory(cursor); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor_addRef() [PUBLIC] +// Add a reference to the SODA document cursor. +//----------------------------------------------------------------------------- +int dpiSodaDocCursor_addRef(dpiSodaDocCursor *cursor) +{ + return dpiGen__addRef(cursor, DPI_HTYPE_SODA_DOC_CURSOR, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor_close() [PUBLIC] +// Close the cursor. +//----------------------------------------------------------------------------- +int dpiSodaDocCursor_close(dpiSodaDocCursor *cursor) +{ + dpiError error; + + if (dpiSodaDocCursor__check(cursor, __func__, &error) < 0) + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + if (cursor->handle) { + dpiOci__handleFree(cursor->handle, DPI_OCI_HTYPE_SODA_DOC_CURSOR); + cursor->handle = NULL; + } + return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor_getNext() [PUBLIC] +// Return the next document available from the cursor. +//----------------------------------------------------------------------------- +int dpiSodaDocCursor_getNext(dpiSodaDocCursor *cursor, uint32_t flags, + dpiSodaDoc **doc) +{ + dpiError error; + uint32_t mode; + void *handle; + + if (dpiSodaDocCursor__check(cursor, __func__, &error) < 0) + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(cursor, doc) + mode = DPI_OCI_DEFAULT; + if (flags & DPI_SODA_FLAGS_ATOMIC_COMMIT) + mode |= DPI_OCI_SODA_ATOMIC_COMMIT; + if (dpiOci__sodaDocGetNext(cursor, &handle, mode, &error) < 0) + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + *doc = NULL; + if (handle) { + if (dpiSodaDoc__allocate(cursor->coll->db, handle, doc, &error) < 0) { + dpiOci__handleFree(handle, DPI_OCI_HTYPE_SODA_DOCUMENT); + return dpiGen__endPublicFn(cursor, DPI_FAILURE, &error); + } + (*doc)->binaryContent = cursor->coll->binaryContent; + } + return dpiGen__endPublicFn(cursor, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSodaDocCursor_release() [PUBLIC] +// Release a reference to the SODA document cursor. +//----------------------------------------------------------------------------- +int dpiSodaDocCursor_release(dpiSodaDocCursor *cursor) +{ + return dpiGen__release(cursor, DPI_HTYPE_SODA_DOC_CURSOR, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiStmt.c b/vendor/github.com/godror/godror/odpi/src/dpiStmt.c new file mode 100644 index 00000000000..cd3520b93b0 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiStmt.c @@ -0,0 +1,1898 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiStmt.c +// Implementation of statements (cursors). +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// forward declarations of internal functions only used in this file +static int dpiStmt__getQueryInfo(dpiStmt *stmt, uint32_t pos, + dpiQueryInfo *info, dpiError *error); +static int dpiStmt__getQueryInfoFromParam(dpiStmt *stmt, void *param, + dpiQueryInfo *info, dpiError *error); +static int dpiStmt__postFetch(dpiStmt *stmt, dpiError *error); +static int dpiStmt__beforeFetch(dpiStmt *stmt, dpiError *error); +static int dpiStmt__reExecute(dpiStmt *stmt, uint32_t numIters, + uint32_t mode, dpiError *error); + + +//----------------------------------------------------------------------------- +// dpiStmt__allocate() [INTERNAL] +// Create a new statement object and return it. In case of error NULL is +// returned. +//----------------------------------------------------------------------------- +int dpiStmt__allocate(dpiConn *conn, int scrollable, dpiStmt **stmt, + dpiError *error) +{ + dpiStmt *tempStmt; + + *stmt = NULL; + if (dpiGen__allocate(DPI_HTYPE_STMT, conn->env, (void**) &tempStmt, + error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(conn, error, 1); + tempStmt->conn = conn; + tempStmt->fetchArraySize = DPI_DEFAULT_FETCH_ARRAY_SIZE; + tempStmt->scrollable = scrollable; + *stmt = tempStmt; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__bind() [INTERNAL] +// Bind the variable to the statement using either a position or a name. A +// reference to the variable will be retained. +//----------------------------------------------------------------------------- +static int dpiStmt__bind(dpiStmt *stmt, dpiVar *var, int addReference, + uint32_t pos, const char *name, uint32_t nameLength, dpiError *error) +{ + dpiBindVar *bindVars, *entry = NULL; + int found, dynamicBind, status; + void *bindHandle = NULL; + uint32_t i; + + // a zero length name is not supported + if (pos == 0 && nameLength == 0) + return dpiError__set(error, "bind zero length name", + DPI_ERR_NOT_SUPPORTED); + + // prevent attempts to bind a statement to itself + if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_STMT) { + for (i = 0; i < var->buffer.maxArraySize; i++) { + if (var->buffer.externalData[i].value.asStmt == stmt) { + return dpiError__set(error, "bind to self", + DPI_ERR_NOT_SUPPORTED); + } + } + } + + // check to see if the bind position or name has already been bound + found = 0; + for (i = 0; i < stmt->numBindVars; i++) { + entry = &stmt->bindVars[i]; + if (entry->pos == pos && entry->nameLength == nameLength) { + if (nameLength > 0 && strncmp(entry->name, name, nameLength) != 0) + continue; + found = 1; + break; + } + } + + // if already found, use that entry + if (found) { + + // if already bound, no need to bind a second time + if (entry->var == var) + return DPI_SUCCESS; + + // otherwise, release previously bound variable, if applicable + else if (entry->var) { + dpiGen__setRefCount(entry->var, error, -1); + entry->var = NULL; + } + + // if not found, add to the list of bind variables + } else { + + // allocate memory for additional bind variables, if needed + if (stmt->numBindVars == stmt->allocatedBindVars) { + if (dpiUtils__allocateMemory(stmt->allocatedBindVars + 8, + sizeof(dpiBindVar), 1, "allocate bind vars", + (void**) &bindVars, error) < 0) + return DPI_FAILURE; + if (stmt->bindVars) { + for (i = 0; i < stmt->numBindVars; i++) + bindVars[i] = stmt->bindVars[i]; + dpiUtils__freeMemory(stmt->bindVars); + } + stmt->bindVars = bindVars; + stmt->allocatedBindVars += 8; + } + + // add to the list of bind variables + entry = &stmt->bindVars[stmt->numBindVars]; + entry->var = NULL; + entry->pos = pos; + if (name) { + if (dpiUtils__allocateMemory(1, nameLength, 0, + "allocate memory for name", (void**) &entry->name, + error) < 0) + return DPI_FAILURE; + entry->nameLength = nameLength; + memcpy( (void*) entry->name, name, nameLength); + } + stmt->numBindVars++; + + } + + // for PL/SQL where the maxSize is greater than 32K, adjust the variable + // so that LOBs are used internally + if (var->isDynamic && (stmt->statementType == DPI_STMT_TYPE_BEGIN || + stmt->statementType == DPI_STMT_TYPE_DECLARE || + stmt->statementType == DPI_STMT_TYPE_CALL)) { + if (dpiVar__convertToLob(var, error) < 0) + return DPI_FAILURE; + } + + // perform actual bind + if (addReference) + dpiGen__setRefCount(var, error, 1); + entry->var = var; + dynamicBind = stmt->isReturning || var->isDynamic; + if (pos > 0) { + if (stmt->env->versionInfo->versionNum < 12) + status = dpiOci__bindByPos(stmt, &bindHandle, pos, dynamicBind, + var, error); + else status = dpiOci__bindByPos2(stmt, &bindHandle, pos, dynamicBind, + var, error); + } else { + if (stmt->env->versionInfo->versionNum < 12) + status = dpiOci__bindByName(stmt, &bindHandle, name, + (int32_t) nameLength, dynamicBind, var, error); + else status = dpiOci__bindByName2(stmt, &bindHandle, name, + (int32_t) nameLength, dynamicBind, var, error); + } + + // attempt to improve message "ORA-01036: illegal variable name/number" + if (status < 0) { + if (error->buffer->code == 1036) { + if (stmt->statementType == DPI_STMT_TYPE_CREATE || + stmt->statementType == DPI_STMT_TYPE_DROP || + stmt->statementType == DPI_STMT_TYPE_ALTER) + dpiError__set(error, error->buffer->action, + DPI_ERR_NO_BIND_VARS_IN_DDL); + } + return DPI_FAILURE; + } + + // set the charset form if applicable + if (var->type->charsetForm != DPI_SQLCS_IMPLICIT) { + if (dpiOci__attrSet(bindHandle, DPI_OCI_HTYPE_BIND, + (void*) &var->type->charsetForm, 0, DPI_OCI_ATTR_CHARSET_FORM, + "set charset form", error) < 0) + return DPI_FAILURE; + } + + // set the max data size, if applicable + if (var->type->sizeInBytes == 0 && !var->isDynamic) { + if (dpiOci__attrSet(bindHandle, DPI_OCI_HTYPE_BIND, + (void*) &var->sizeInBytes, 0, DPI_OCI_ATTR_MAXDATA_SIZE, + "set max data size", error) < 0) + return DPI_FAILURE; + } + + // bind object, if applicable + if (var->buffer.objectIndicator && + dpiOci__bindObject(var, bindHandle, error) < 0) + return DPI_FAILURE; + + // setup dynamic bind, if applicable + if (dynamicBind && dpiOci__bindDynamic(var, bindHandle, error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__check() [INTERNAL] +// Determine if the statement is open and available for use. +//----------------------------------------------------------------------------- +static int dpiStmt__check(dpiStmt *stmt, const char *fnName, dpiError *error) +{ + if (dpiGen__startPublicFn(stmt, DPI_HTYPE_STMT, fnName, error) < 0) + return DPI_FAILURE; + if (!stmt->handle || (stmt->parentStmt && !stmt->parentStmt->handle)) + return dpiError__set(error, "check closed", DPI_ERR_STMT_CLOSED); + if (dpiConn__checkConnected(stmt->conn, error) < 0) + return DPI_FAILURE; + if (stmt->statementType == 0 && dpiStmt__init(stmt, error) < 0) + return DPI_FAILURE; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__clearBatchErrors() [INTERNAL] +// Clear the batch errors associated with the statement. +//----------------------------------------------------------------------------- +static void dpiStmt__clearBatchErrors(dpiStmt *stmt) +{ + if (stmt->batchErrors) { + dpiUtils__freeMemory(stmt->batchErrors); + stmt->batchErrors = NULL; + } + stmt->numBatchErrors = 0; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__clearBindVars() [INTERNAL] +// Clear the bind variables associated with the statement. +//----------------------------------------------------------------------------- +static void dpiStmt__clearBindVars(dpiStmt *stmt, dpiError *error) +{ + uint32_t i; + + if (stmt->bindVars) { + for (i = 0; i < stmt->numBindVars; i++) { + dpiGen__setRefCount(stmt->bindVars[i].var, error, -1); + if (stmt->bindVars[i].name) + dpiUtils__freeMemory( (void*) stmt->bindVars[i].name); + } + dpiUtils__freeMemory(stmt->bindVars); + stmt->bindVars = NULL; + } + stmt->numBindVars = 0; + stmt->allocatedBindVars = 0; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__clearQueryVars() [INTERNAL] +// Clear the query variables associated with the statement. +//----------------------------------------------------------------------------- +static void dpiStmt__clearQueryVars(dpiStmt *stmt, dpiError *error) +{ + uint32_t i; + + if (stmt->queryVars) { + for (i = 0; i < stmt->numQueryVars; i++) { + if (stmt->queryVars[i]) { + dpiGen__setRefCount(stmt->queryVars[i], error, -1); + stmt->queryVars[i] = NULL; + } + if (stmt->queryInfo[i].typeInfo.objectType) { + dpiGen__setRefCount(stmt->queryInfo[i].typeInfo.objectType, + error, -1); + stmt->queryInfo[i].typeInfo.objectType = NULL; + } + } + dpiUtils__freeMemory(stmt->queryVars); + stmt->queryVars = NULL; + } + if (stmt->queryInfo) { + dpiUtils__freeMemory(stmt->queryInfo); + stmt->queryInfo = NULL; + } + stmt->numQueryVars = 0; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__close() [INTERNAL] +// Internal method used for closing the statement. If the statement is marked +// as needing to be dropped from the statement cache that is done as well. This +// is called from dpiStmt_close() where errors are expected to be propagated +// and from dpiStmt__free() where errors are ignored. +//----------------------------------------------------------------------------- +int dpiStmt__close(dpiStmt *stmt, const char *tag, uint32_t tagLength, + int propagateErrors, dpiError *error) +{ + int closing, status = DPI_SUCCESS; + + // determine whether statement is already being closed and if not, mark + // statement as being closed; this MUST be done while holding the lock (if + // in threaded mode) to avoid race conditions! + if (stmt->env->threaded) + dpiMutex__acquire(stmt->env->mutex); + closing = stmt->closing; + stmt->closing = 1; + if (stmt->env->threaded) + dpiMutex__release(stmt->env->mutex); + + // if statement is already being closed, nothing needs to be done + if (closing) + return DPI_SUCCESS; + + // perform actual work of closing statement + dpiStmt__clearBatchErrors(stmt); + dpiStmt__clearBindVars(stmt, error); + dpiStmt__clearQueryVars(stmt, error); + if (stmt->lastRowid) + dpiGen__setRefCount(stmt->lastRowid, error, -1); + if (stmt->handle) { + if (stmt->parentStmt) { + dpiGen__setRefCount(stmt->parentStmt, error, -1); + stmt->parentStmt = NULL; + } else if (!stmt->conn->deadSession && stmt->conn->handle) { + if (stmt->isOwned) + dpiOci__handleFree(stmt->handle, DPI_OCI_HTYPE_STMT); + else status = dpiOci__stmtRelease(stmt, tag, tagLength, + propagateErrors, error); + } + if (!stmt->conn->closing && !stmt->parentStmt) + dpiHandleList__removeHandle(stmt->conn->openStmts, + stmt->openSlotNum); + stmt->handle = NULL; + } + + // if actual close fails, reset closing flag; again, this must be done + // while holding the lock (if in threaded mode) in order to avoid race + // conditions! + if (status < 0) { + if (stmt->env->threaded) + dpiMutex__acquire(stmt->env->mutex); + stmt->closing = 0; + if (stmt->env->threaded) + dpiMutex__release(stmt->env->mutex); + } + + return status; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__createBindVar() [INTERNAL] +// Create a bind variable given a value to bind. +//----------------------------------------------------------------------------- +static int dpiStmt__createBindVar(dpiStmt *stmt, + dpiNativeTypeNum nativeTypeNum, dpiData *data, dpiVar **var, + uint32_t pos, const char *name, uint32_t nameLength, dpiError *error) +{ + dpiOracleTypeNum oracleTypeNum; + dpiObjectType *objType; + dpiData *varData; + dpiVar *tempVar; + uint32_t size; + + // determine the type (and size) of bind variable to create + size = 0; + objType = NULL; + switch (nativeTypeNum) { + case DPI_NATIVE_TYPE_INT64: + case DPI_NATIVE_TYPE_UINT64: + case DPI_NATIVE_TYPE_FLOAT: + case DPI_NATIVE_TYPE_DOUBLE: + oracleTypeNum = DPI_ORACLE_TYPE_NUMBER; + break; + case DPI_NATIVE_TYPE_BYTES: + oracleTypeNum = DPI_ORACLE_TYPE_VARCHAR; + size = data->value.asBytes.length; + break; + case DPI_NATIVE_TYPE_TIMESTAMP: + oracleTypeNum = DPI_ORACLE_TYPE_TIMESTAMP; + break; + case DPI_NATIVE_TYPE_INTERVAL_DS: + oracleTypeNum = DPI_ORACLE_TYPE_INTERVAL_DS; + break; + case DPI_NATIVE_TYPE_INTERVAL_YM: + oracleTypeNum = DPI_ORACLE_TYPE_INTERVAL_YM; + break; + case DPI_NATIVE_TYPE_OBJECT: + oracleTypeNum = DPI_ORACLE_TYPE_OBJECT; + if (data->value.asObject) + objType = data->value.asObject->type; + break; + case DPI_NATIVE_TYPE_ROWID: + oracleTypeNum = DPI_ORACLE_TYPE_ROWID; + break; + case DPI_NATIVE_TYPE_BOOLEAN: + oracleTypeNum = DPI_ORACLE_TYPE_BOOLEAN; + break; + default: + return dpiError__set(error, "create bind var", + DPI_ERR_UNHANDLED_CONVERSION, 0, nativeTypeNum); + } + + // create the variable and set its value + if (dpiVar__allocate(stmt->conn, oracleTypeNum, nativeTypeNum, 1, size, 1, + 0, objType, &tempVar, &varData, error) < 0) + return DPI_FAILURE; + + // copy value from source to target data + if (dpiVar__copyData(tempVar, 0, data, error) < 0) + return DPI_FAILURE; + + // bind variable to statement + if (dpiStmt__bind(stmt, tempVar, 0, pos, name, nameLength, error) < 0) { + dpiVar__free(tempVar, error); + return DPI_FAILURE; + } + + *var = tempVar; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__createQueryVars() [INTERNAL] +// Create space for the number of query variables required to support the +// query. +//----------------------------------------------------------------------------- +static int dpiStmt__createQueryVars(dpiStmt *stmt, dpiError *error) +{ + uint32_t numQueryVars, i; + + // determine number of query variables + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + (void*) &numQueryVars, 0, DPI_OCI_ATTR_PARAM_COUNT, + "get parameter count", error) < 0) + return DPI_FAILURE; + + // clear the previous query vars if the number has changed + if (stmt->numQueryVars > 0 && stmt->numQueryVars != numQueryVars) + dpiStmt__clearQueryVars(stmt, error); + + // allocate space for the query vars, if needed + if (numQueryVars != stmt->numQueryVars) { + if (dpiUtils__allocateMemory(numQueryVars, sizeof(dpiVar*), 1, + "allocate query vars", (void**) &stmt->queryVars, error) < 0) + return DPI_FAILURE; + if (dpiUtils__allocateMemory(numQueryVars, sizeof(dpiQueryInfo), 1, + "allocate query info", (void**) &stmt->queryInfo, error) < 0) { + dpiStmt__clearQueryVars(stmt, error); + return DPI_FAILURE; + } + stmt->numQueryVars = numQueryVars; + for (i = 0; i < numQueryVars; i++) { + if (dpiStmt__getQueryInfo(stmt, i + 1, &stmt->queryInfo[i], + error) < 0) { + dpiStmt__clearQueryVars(stmt, error); + return DPI_FAILURE; + } + } + } + + // indicate start of fetch + stmt->bufferRowIndex = stmt->fetchArraySize; + stmt->hasRowsToFetch = 1; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__define() [INTERNAL] +// Define the variable that will accept output from the statement in the +// specified column. At this point the statement, position and variable are all +// assumed to be valid. +//----------------------------------------------------------------------------- +static int dpiStmt__define(dpiStmt *stmt, uint32_t pos, dpiVar *var, + dpiError *error) +{ + void *defineHandle = NULL; + dpiQueryInfo *queryInfo; + int tempBool; + + // no need to perform define if variable is unchanged + if (stmt->queryVars[pos - 1] == var) + return DPI_SUCCESS; + + // for objects, the type specified must match the type in the database + queryInfo = &stmt->queryInfo[pos - 1]; + if (var->objectType && queryInfo->typeInfo.objectType && + var->objectType->tdo != queryInfo->typeInfo.objectType->tdo) + return dpiError__set(error, "check type", DPI_ERR_WRONG_TYPE, + var->objectType->schemaLength, var->objectType->schema, + var->objectType->nameLength, var->objectType->name, + queryInfo->typeInfo.objectType->schemaLength, + queryInfo->typeInfo.objectType->schema, + queryInfo->typeInfo.objectType->nameLength, + queryInfo->typeInfo.objectType->name); + + // perform the define + if (stmt->env->versionInfo->versionNum < 12) { + if (dpiOci__defineByPos(stmt, &defineHandle, pos, var, error) < 0) + return DPI_FAILURE; + } else { + if (dpiOci__defineByPos2(stmt, &defineHandle, pos, var, error) < 0) + return DPI_FAILURE; + } + + // set the charset form if applicable + if (var->type->charsetForm != DPI_SQLCS_IMPLICIT) { + if (dpiOci__attrSet(defineHandle, DPI_OCI_HTYPE_DEFINE, + (void*) &var->type->charsetForm, 0, DPI_OCI_ATTR_CHARSET_FORM, + "set charset form", error) < 0) + return DPI_FAILURE; + } + + // specify that the LOB length should be prefetched + if (var->nativeTypeNum == DPI_NATIVE_TYPE_LOB) { + tempBool = 1; + if (dpiOci__attrSet(defineHandle, DPI_OCI_HTYPE_DEFINE, + (void*) &tempBool, 0, DPI_OCI_ATTR_LOBPREFETCH_LENGTH, + "set lob prefetch length", error) < 0) + return DPI_FAILURE; + } + + // define objects, if applicable + if (var->buffer.objectIndicator && dpiOci__defineObject(var, defineHandle, + error) < 0) + return DPI_FAILURE; + + // register callback for dynamic defines + if (var->isDynamic && dpiOci__defineDynamic(var, defineHandle, error) < 0) + return DPI_FAILURE; + + // remove previous variable and retain new one + if (stmt->queryVars[pos - 1]) + dpiGen__setRefCount(stmt->queryVars[pos - 1], error, -1); + dpiGen__setRefCount(var, error, 1); + stmt->queryVars[pos - 1] = var; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__execute() [INTERNAL] +// Internal execution of statement. +//----------------------------------------------------------------------------- +static int dpiStmt__execute(dpiStmt *stmt, uint32_t numIters, + uint32_t mode, int reExecute, dpiError *error) +{ + uint32_t prefetchSize, i, j; + dpiData *data; + dpiVar *var; + + // for all bound variables, transfer data from dpiData structure to Oracle + // buffer structures + for (i = 0; i < stmt->numBindVars; i++) { + var = stmt->bindVars[i].var; + if (var->isArray && numIters > 1) + return dpiError__set(error, "bind array var", + DPI_ERR_ARRAY_VAR_NOT_SUPPORTED); + for (j = 0; j < var->buffer.maxArraySize; j++) { + data = &var->buffer.externalData[j]; + if (dpiVar__setValue(var, &var->buffer, j, data, error) < 0) + return DPI_FAILURE; + if (var->dynBindBuffers) + var->dynBindBuffers[j].actualArraySize = 0; + } + if (stmt->isReturning || var->isDynamic) + var->error = error; + } + + // for queries, set the OCI prefetch to a fixed value; this prevents an + // additional round trip for single row fetches while avoiding the overhead + // of copying from the OCI prefetch buffer to our own buffers for larger + // fetches + if (stmt->statementType == DPI_STMT_TYPE_SELECT) { + prefetchSize = DPI_PREFETCH_ROWS_DEFAULT; + if (dpiOci__attrSet(stmt->handle, DPI_OCI_HTYPE_STMT, &prefetchSize, + sizeof(prefetchSize), DPI_OCI_ATTR_PREFETCH_ROWS, + "set prefetch rows", error) < 0) + return DPI_FAILURE; + } + + // clear batch errors from any previous execution + dpiStmt__clearBatchErrors(stmt); + + // adjust mode for scrollable cursors + if (stmt->scrollable) + mode |= DPI_OCI_STMT_SCROLLABLE_READONLY; + + // perform execution + // re-execute statement for ORA-01007: variable not in select list + // drop statement from cache for all errors (except those which are due to + // invalid data which may be fixed in subsequent execution) + if (dpiOci__stmtExecute(stmt, numIters, mode, error) < 0) { + dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + &error->buffer->offset, 0, DPI_OCI_ATTR_PARSE_ERROR_OFFSET, + "set parse offset", error); + switch (error->buffer->code) { + case 1007: + if (reExecute) + return dpiStmt__reExecute(stmt, numIters, mode, error); + stmt->deleteFromCache = 1; + break; + case 1: + case 1400: + case 1438: + case 1461: + case 2290: + case 2291: + case 2292: + case 21525: + break; + default: + stmt->deleteFromCache = 1; + } + return DPI_FAILURE; + } + + // for all bound variables, transfer data from Oracle buffer structures to + // dpiData structures; OCI doesn't provide a way of knowing if a variable + // is an out variable so do this for all of them when this is a possibility + if (stmt->isReturning || stmt->statementType == DPI_STMT_TYPE_BEGIN || + stmt->statementType == DPI_STMT_TYPE_DECLARE || + stmt->statementType == DPI_STMT_TYPE_CALL) { + for (i = 0; i < stmt->numBindVars; i++) { + var = stmt->bindVars[i].var; + for (j = 0; j < var->buffer.maxArraySize; j++) { + if (dpiVar__getValue(var, &var->buffer, j, 0, error) < 0) + return DPI_FAILURE; + } + var->error = NULL; + } + } + + // create query variables (if applicable) and reset row count to zero + if (stmt->statementType == DPI_STMT_TYPE_SELECT) { + stmt->rowCount = 0; + if (!(mode & DPI_MODE_EXEC_PARSE_ONLY) && + dpiStmt__createQueryVars(stmt, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__fetch() [INTERNAL] +// Performs the actual fetch from Oracle. +//----------------------------------------------------------------------------- +static int dpiStmt__fetch(dpiStmt *stmt, dpiError *error) +{ + // perform any pre-fetch activities required + if (dpiStmt__beforeFetch(stmt, error) < 0) + return DPI_FAILURE; + + // perform fetch + if (dpiOci__stmtFetch2(stmt, stmt->fetchArraySize, DPI_MODE_FETCH_NEXT, 0, + error) < 0) + return DPI_FAILURE; + + // determine the number of rows fetched into buffers + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + &stmt->bufferRowCount, 0, DPI_OCI_ATTR_ROWS_FETCHED, + "get rows fetched", error) < 0) + return DPI_FAILURE; + + // set buffer row info + stmt->bufferMinRow = stmt->rowCount + 1; + stmt->bufferRowIndex = 0; + + // perform post-fetch activities required + if (dpiStmt__postFetch(stmt, error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__free() [INTERNAL] +// Free the memory associated with the statement. +//----------------------------------------------------------------------------- +void dpiStmt__free(dpiStmt *stmt, dpiError *error) +{ + dpiStmt__close(stmt, NULL, 0, 0, error); + if (stmt->parentStmt) { + dpiGen__setRefCount(stmt->parentStmt, error, -1); + stmt->parentStmt = NULL; + } + if (stmt->conn) { + dpiGen__setRefCount(stmt->conn, error, -1); + stmt->conn = NULL; + } + dpiUtils__freeMemory(stmt); +} + + +//----------------------------------------------------------------------------- +// dpiStmt__getBatchErrors() [INTERNAL] +// Get batch errors after statement executed with batch errors enabled. +//----------------------------------------------------------------------------- +static int dpiStmt__getBatchErrors(dpiStmt *stmt, dpiError *error) +{ + void *batchErrorHandle, *localErrorHandle; + dpiError localError; + int overallStatus; + int32_t rowOffset; + uint32_t i; + + // determine the number of batch errors that were found + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + &stmt->numBatchErrors, 0, DPI_OCI_ATTR_NUM_DML_ERRORS, + "get batch error count", error) < 0) + return DPI_FAILURE; + + // allocate memory for the batch errors + if (dpiUtils__allocateMemory(stmt->numBatchErrors, sizeof(dpiErrorBuffer), + 1, "allocate errors", (void**) &stmt->batchErrors, error) < 0) { + stmt->numBatchErrors = 0; + return DPI_FAILURE; + } + + // allocate error handle used for OCIParamGet() + if (dpiOci__handleAlloc(stmt->env->handle, &localErrorHandle, + DPI_OCI_HTYPE_ERROR, "allocate parameter error handle", + error) < 0) { + dpiStmt__clearBatchErrors(stmt); + return DPI_FAILURE; + } + + // allocate error handle used for batch errors + if (dpiOci__handleAlloc(stmt->env->handle, &batchErrorHandle, + DPI_OCI_HTYPE_ERROR, "allocate batch error handle", error) < 0) { + dpiStmt__clearBatchErrors(stmt); + dpiOci__handleFree(localErrorHandle, DPI_OCI_HTYPE_ERROR); + return DPI_FAILURE; + } + + // process each error + overallStatus = DPI_SUCCESS; + localError.buffer = error->buffer; + localError.env = error->env; + for (i = 0; i < stmt->numBatchErrors; i++) { + + // get error handle for iteration + if (dpiOci__paramGet(error->handle, DPI_OCI_HTYPE_ERROR, + &batchErrorHandle, i, "get batch error", error) < 0) { + overallStatus = dpiError__set(error, "get batch error", + DPI_ERR_INVALID_INDEX, i); + break; + } + + // determine row offset + localError.handle = localErrorHandle; + if (dpiOci__attrGet(batchErrorHandle, DPI_OCI_HTYPE_ERROR, &rowOffset, + 0, DPI_OCI_ATTR_DML_ROW_OFFSET, "get row offset", + &localError) < 0) { + overallStatus = dpiError__set(error, "get row offset", + DPI_ERR_CANNOT_GET_ROW_OFFSET); + break; + } + + // get error message + localError.buffer = &stmt->batchErrors[i]; + localError.handle = batchErrorHandle; + dpiError__setFromOCI(&localError, DPI_OCI_ERROR, stmt->conn, + "get batch error"); + if (error->buffer->errorNum) { + overallStatus = DPI_FAILURE; + break; + } + localError.buffer->fnName = error->buffer->fnName; + localError.buffer->offset = (uint16_t) rowOffset; + + } + + // cleanup + dpiOci__handleFree(localErrorHandle, DPI_OCI_HTYPE_ERROR); + dpiOci__handleFree(batchErrorHandle, DPI_OCI_HTYPE_ERROR); + if (overallStatus < 0) + dpiStmt__clearBatchErrors(stmt); + return overallStatus; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__getRowCount() [INTERNAL] +// Return the number of rows affected by the last DML executed (for insert, +// update, delete and merge) or the number of rows fetched (for queries). In +// all other cases, 0 is returned. +//----------------------------------------------------------------------------- +static int dpiStmt__getRowCount(dpiStmt *stmt, uint64_t *count, + dpiError *error) +{ + uint32_t rowCount32; + + if (stmt->statementType == DPI_STMT_TYPE_SELECT) + *count = stmt->rowCount; + else if (stmt->statementType != DPI_STMT_TYPE_INSERT && + stmt->statementType != DPI_STMT_TYPE_UPDATE && + stmt->statementType != DPI_STMT_TYPE_DELETE && + stmt->statementType != DPI_STMT_TYPE_MERGE && + stmt->statementType != DPI_STMT_TYPE_CALL && + stmt->statementType != DPI_STMT_TYPE_BEGIN && + stmt->statementType != DPI_STMT_TYPE_DECLARE) { + *count = 0; + } else if (stmt->env->versionInfo->versionNum < 12) { + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, &rowCount32, 0, + DPI_OCI_ATTR_ROW_COUNT, "get row count", error) < 0) + return DPI_FAILURE; + *count = rowCount32; + } else { + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, count, 0, + DPI_OCI_ATTR_UB8_ROW_COUNT, "get row count", error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__getQueryInfo() [INTERNAL] +// Get query information for the position in question. +//----------------------------------------------------------------------------- +static int dpiStmt__getQueryInfo(dpiStmt *stmt, uint32_t pos, + dpiQueryInfo *info, dpiError *error) +{ + void *param; + int status; + + // acquire parameter descriptor + if (dpiOci__paramGet(stmt->handle, DPI_OCI_HTYPE_STMT, ¶m, pos, + "get parameter", error) < 0) + return DPI_FAILURE; + + // acquire information from the parameter descriptor + status = dpiStmt__getQueryInfoFromParam(stmt, param, info, error); + dpiOci__descriptorFree(param, DPI_OCI_DTYPE_PARAM); + return status; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__getQueryInfoFromParam() [INTERNAL] +// Get query information from the parameter. +//----------------------------------------------------------------------------- +static int dpiStmt__getQueryInfoFromParam(dpiStmt *stmt, void *param, + dpiQueryInfo *info, dpiError *error) +{ + uint8_t ociNullOk; + + // aquire name of item + if (dpiOci__attrGet(param, DPI_OCI_HTYPE_DESCRIBE, (void*) &info->name, + &info->nameLength, DPI_OCI_ATTR_NAME, "get name", error) < 0) + return DPI_FAILURE; + + // acquire type information + if (dpiOracleType__populateTypeInfo(stmt->conn, param, + DPI_OCI_HTYPE_DESCRIBE, &info->typeInfo, error) < 0) + return DPI_FAILURE; + + // acquire if column is permitted to be null + if (dpiOci__attrGet(param, DPI_OCI_HTYPE_DESCRIBE, (void*) &ociNullOk, 0, + DPI_OCI_ATTR_IS_NULL, "get null ok", error) < 0) + return DPI_FAILURE; + info->nullOk = ociNullOk; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__init() [INTERNAL] +// Initialize the statement for use. This is needed when preparing a +// statement for use and when returning a REF cursor. +//----------------------------------------------------------------------------- +int dpiStmt__init(dpiStmt *stmt, dpiError *error) +{ + // get statement type + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + (void*) &stmt->statementType, 0, DPI_OCI_ATTR_STMT_TYPE, + "get statement type", error) < 0) + return DPI_FAILURE; + + // for queries, mark statement as having rows to fetch + if (stmt->statementType == DPI_STMT_TYPE_SELECT) + stmt->hasRowsToFetch = 1; + + // otherwise, check if this is a RETURNING statement + else if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + (void*) &stmt->isReturning, 0, DPI_OCI_ATTR_STMT_IS_RETURNING, + "get is returning", error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__postFetch() [INTERNAL] +// Performs the transformations required to convert Oracle data values into +// C data values. +//----------------------------------------------------------------------------- +static int dpiStmt__postFetch(dpiStmt *stmt, dpiError *error) +{ + uint32_t i, j; + dpiVar *var; + + for (i = 0; i < stmt->numQueryVars; i++) { + var = stmt->queryVars[i]; + for (j = 0; j < stmt->bufferRowCount; j++) { + if (dpiVar__getValue(var, &var->buffer, j, 1, error) < 0) + return DPI_FAILURE; + if (var->type->requiresPreFetch) + var->requiresPreFetch = 1; + } + var->error = NULL; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__beforeFetch() [INTERNAL] +// Performs work that needs to be done prior to fetch for each variable. In +// addition, variables are created if they do not already exist. A check is +// also made to ensure that the variable has enough space to support a fetch +// of the requested size. +//----------------------------------------------------------------------------- +static int dpiStmt__beforeFetch(dpiStmt *stmt, dpiError *error) +{ + dpiQueryInfo *queryInfo; + dpiData *data; + dpiVar *var; + uint32_t i; + + if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, error) < 0) + return DPI_FAILURE; + for (i = 0; i < stmt->numQueryVars; i++) { + var = stmt->queryVars[i]; + if (!var) { + queryInfo = &stmt->queryInfo[i]; + if (dpiVar__allocate(stmt->conn, queryInfo->typeInfo.oracleTypeNum, + queryInfo->typeInfo.defaultNativeTypeNum, + stmt->fetchArraySize, + queryInfo->typeInfo.clientSizeInBytes, 1, 0, + queryInfo->typeInfo.objectType, &var, &data, error) < 0) + return DPI_FAILURE; + if (dpiStmt__define(stmt, i + 1, var, error) < 0) + return DPI_FAILURE; + dpiGen__setRefCount(var, error, -1); + } + var->error = error; + if (stmt->fetchArraySize > var->buffer.maxArraySize) + return dpiError__set(error, "check array size", + DPI_ERR_ARRAY_SIZE_TOO_SMALL, var->buffer.maxArraySize); + if (var->requiresPreFetch && dpiVar__extendedPreFetch(var, + &var->buffer, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiStmt__prepare() [INTERNAL] +// Prepare a statement for execution. +//----------------------------------------------------------------------------- +int dpiStmt__prepare(dpiStmt *stmt, const char *sql, uint32_t sqlLength, + const char *tag, uint32_t tagLength, dpiError *error) +{ + if (sql && dpiDebugLevel & DPI_DEBUG_LEVEL_SQL) + dpiDebug__print("SQL %.*s\n", sqlLength, sql); + if (dpiOci__stmtPrepare2(stmt, sql, sqlLength, tag, tagLength, error) < 0) + return DPI_FAILURE; + if (dpiHandleList__addHandle(stmt->conn->openStmts, stmt, + &stmt->openSlotNum, error) < 0) { + dpiOci__stmtRelease(stmt, NULL, 0, 0, error); + stmt->handle = NULL; + return DPI_FAILURE; + } + + return dpiStmt__init(stmt, error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt__reExecute() [INTERNAL] +// Re-execute the statement after receiving the error ORA-01007: variable not +// in select list. This takes place when one of the columns in a query is +// dropped, but the original metadata is still being used because the query +// statement was found in the statement cache. +//----------------------------------------------------------------------------- +static int dpiStmt__reExecute(dpiStmt *stmt, uint32_t numIters, + uint32_t mode, dpiError *error) +{ + void *origHandle, *newHandle; + uint32_t sqlLength, i; + dpiError localError; + dpiBindVar *bindVar; + dpiVar *var; + int status; + char *sql; + + // acquire the statement that was previously prepared; if this cannot be + // determined, let the original error propagate + localError.buffer = error->buffer; + localError.env = error->env; + localError.handle = error->handle; + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, (void*) &sql, + &sqlLength, DPI_OCI_ATTR_STATEMENT, "get statement", + &localError) < 0) + return DPI_FAILURE; + + // prepare statement a second time before releasing the original statement; + // release the original statement and delete it from the statement cache + // so that it does not return with the invalid metadata; again, if this + // cannot be done, let the original error propagate + origHandle = stmt->handle; + status = dpiOci__stmtPrepare2(stmt, sql, sqlLength, NULL, 0, &localError); + newHandle = stmt->handle; + stmt->handle = origHandle; + stmt->deleteFromCache = 1; + if (dpiOci__stmtRelease(stmt, NULL, 0, 1, &localError) < 0 || status < 0) + return DPI_FAILURE; + stmt->handle = newHandle; + dpiStmt__clearBatchErrors(stmt); + dpiStmt__clearQueryVars(stmt, error); + + // perform binds + for (i = 0; i < stmt->numBindVars; i++) { + bindVar = &stmt->bindVars[i]; + if (!bindVar->var) + continue; + var = bindVar->var; + bindVar->var = NULL; + if (dpiStmt__bind(stmt, var, 0, bindVar->pos, bindVar->name, + bindVar->nameLength, error) < 0) { + dpiGen__setRefCount(var, error, -1); + return DPI_FAILURE; + } + } + + // now re-execute the statement + return dpiStmt__execute(stmt, numIters, mode, 0, error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_addRef() [PUBLIC] +// Add a reference to the statement. +//----------------------------------------------------------------------------- +int dpiStmt_addRef(dpiStmt *stmt) +{ + return dpiGen__addRef(stmt, DPI_HTYPE_STMT, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_bindByName() [PUBLIC] +// Bind the variable by name. +//----------------------------------------------------------------------------- +int dpiStmt_bindByName(dpiStmt *stmt, const char *name, uint32_t nameLength, + dpiVar *var) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, name) + if (dpiGen__checkHandle(var, DPI_HTYPE_VAR, "bind by name", &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + status = dpiStmt__bind(stmt, var, 1, 0, name, nameLength, &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_bindByPos() [PUBLIC] +// Bind the variable by position. +//----------------------------------------------------------------------------- +int dpiStmt_bindByPos(dpiStmt *stmt, uint32_t pos, dpiVar *var) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (dpiGen__checkHandle(var, DPI_HTYPE_VAR, "bind by pos", &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + status = dpiStmt__bind(stmt, var, 1, pos, NULL, 0, &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_bindValueByName() [PUBLIC] +// Create a variable and bind it by name. +//----------------------------------------------------------------------------- +int dpiStmt_bindValueByName(dpiStmt *stmt, const char *name, + uint32_t nameLength, dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + dpiVar *var = NULL; + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, name) + DPI_CHECK_PTR_NOT_NULL(stmt, data) + if (dpiStmt__createBindVar(stmt, nativeTypeNum, data, &var, 0, name, + nameLength, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + status = dpiStmt__bind(stmt, var, 1, 0, name, nameLength, &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_bindValueByPos() [PUBLIC] +// Create a variable and bind it by position. +//----------------------------------------------------------------------------- +int dpiStmt_bindValueByPos(dpiStmt *stmt, uint32_t pos, + dpiNativeTypeNum nativeTypeNum, dpiData *data) +{ + dpiVar *var = NULL; + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, data) + if (dpiStmt__createBindVar(stmt, nativeTypeNum, data, &var, pos, NULL, 0, + &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + status = dpiStmt__bind(stmt, var, 1, pos, NULL, 0, &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_close() [PUBLIC] +// Close the statement so that it is no longer usable and all resources have +// been released. +//----------------------------------------------------------------------------- +int dpiStmt_close(dpiStmt *stmt, const char *tag, uint32_t tagLength) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(stmt, tag) + status = dpiStmt__close(stmt, tag, tagLength, 1, &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_define() [PUBLIC] +// Define the variable that will accept output from the cursor in the +// specified column. +//----------------------------------------------------------------------------- +int dpiStmt_define(dpiStmt *stmt, uint32_t pos, dpiVar *var) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (pos == 0 || pos > stmt->numQueryVars) { + dpiError__set(&error, "check query position", + DPI_ERR_QUERY_POSITION_INVALID, pos); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + if (dpiGen__checkHandle(var, DPI_HTYPE_VAR, "check variable", &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + status = dpiStmt__define(stmt, pos, var, &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_defineValue() [PUBLIC] +// Define the type of data to use for output from the cursor in the specified +// column. This implicitly creates a variable of the specified type and is +// intended for subsequent use by dpiStmt_getQueryValue(), which makes use of +// implicitly created variables. +//----------------------------------------------------------------------------- +int dpiStmt_defineValue(dpiStmt *stmt, uint32_t pos, + dpiOracleTypeNum oracleTypeNum, dpiNativeTypeNum nativeTypeNum, + uint32_t size, int sizeIsBytes, dpiObjectType *objType) +{ + dpiError error; + dpiData *data; + dpiVar *var; + + // verify parameters + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (pos == 0 || pos > stmt->numQueryVars) { + dpiError__set(&error, "check query position", + DPI_ERR_QUERY_POSITION_INVALID, pos); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + + // create a new variable of the specified type + if (dpiVar__allocate(stmt->conn, oracleTypeNum, nativeTypeNum, + stmt->fetchArraySize, size, sizeIsBytes, 0, objType, &var, &data, + &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (dpiStmt__define(stmt, pos, var, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + dpiGen__setRefCount(var, &error, -1); + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_execute() [PUBLIC] +// Execute a statement. If the statement has been executed before, however, +// and this is a query, the describe information is already available so defer +// execution until the first fetch. +//----------------------------------------------------------------------------- +int dpiStmt_execute(dpiStmt *stmt, dpiExecMode mode, uint32_t *numQueryColumns) +{ + uint32_t numIters; + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + numIters = (stmt->statementType == DPI_STMT_TYPE_SELECT) ? 0 : 1; + if (dpiStmt__execute(stmt, numIters, mode, 1, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (numQueryColumns) + *numQueryColumns = stmt->numQueryVars; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_executeMany() [PUBLIC] +// Execute a statement multiple times. Queries are not supported. The bind +// variables are checked to ensure that their maxArraySize is sufficient to +// support this. +//----------------------------------------------------------------------------- +int dpiStmt_executeMany(dpiStmt *stmt, dpiExecMode mode, uint32_t numIters) +{ + dpiError error; + uint32_t i; + + // verify statement is open + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + // queries are not supported + if (stmt->statementType == DPI_STMT_TYPE_SELECT) { + dpiError__set(&error, "check statement type", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + + // batch errors and array DML row counts are only supported with DML + // statements (insert, update, delete and merge) + if ((mode & DPI_MODE_EXEC_BATCH_ERRORS || + mode & DPI_MODE_EXEC_ARRAY_DML_ROWCOUNTS) && + stmt->statementType != DPI_STMT_TYPE_INSERT && + stmt->statementType != DPI_STMT_TYPE_UPDATE && + stmt->statementType != DPI_STMT_TYPE_DELETE && + stmt->statementType != DPI_STMT_TYPE_MERGE) { + dpiError__set(&error, "check mode", DPI_ERR_EXEC_MODE_ONLY_FOR_DML); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + + // ensure that all bind variables have a big enough maxArraySize to + // support this operation + for (i = 0; i < stmt->numBindVars; i++) { + if (stmt->bindVars[i].var->buffer.maxArraySize < numIters) { + dpiError__set(&error, "check array size", + DPI_ERR_ARRAY_SIZE_TOO_SMALL, + stmt->bindVars[i].var->buffer.maxArraySize); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + } + + // perform execution + dpiStmt__clearBatchErrors(stmt); + if (dpiStmt__execute(stmt, numIters, mode, 0, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + // handle batch errors if mode was specified + if (mode & DPI_MODE_EXEC_BATCH_ERRORS) { + if (dpiStmt__getBatchErrors(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_fetch() [PUBLIC] +// Fetch a row from the database. +//----------------------------------------------------------------------------- +int dpiStmt_fetch(dpiStmt *stmt, int *found, uint32_t *bufferRowIndex) +{ + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, found) + DPI_CHECK_PTR_NOT_NULL(stmt, bufferRowIndex) + if (stmt->bufferRowIndex >= stmt->bufferRowCount) { + if (stmt->hasRowsToFetch && dpiStmt__fetch(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (stmt->bufferRowIndex >= stmt->bufferRowCount) { + *found = 0; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); + } + } + *found = 1; + *bufferRowIndex = stmt->bufferRowIndex; + stmt->bufferRowIndex++; + stmt->rowCount++; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_fetchRows() [PUBLIC] +// Fetch rows into buffers and return the number of rows that were so +// fetched. If there are still rows available in the buffer, no additional +// fetch will take place. +//----------------------------------------------------------------------------- +int dpiStmt_fetchRows(dpiStmt *stmt, uint32_t maxRows, + uint32_t *bufferRowIndex, uint32_t *numRowsFetched, int *moreRows) +{ + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, bufferRowIndex) + DPI_CHECK_PTR_NOT_NULL(stmt, numRowsFetched) + DPI_CHECK_PTR_NOT_NULL(stmt, moreRows) + if (stmt->bufferRowIndex >= stmt->bufferRowCount) { + if (stmt->hasRowsToFetch && dpiStmt__fetch(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (stmt->bufferRowIndex >= stmt->bufferRowCount) { + *moreRows = 0; + *bufferRowIndex = 0; + *numRowsFetched = 0; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); + } + } + *bufferRowIndex = stmt->bufferRowIndex; + *numRowsFetched = stmt->bufferRowCount - stmt->bufferRowIndex; + *moreRows = stmt->hasRowsToFetch; + if (*numRowsFetched > maxRows) { + *numRowsFetched = maxRows; + *moreRows = 1; + } + stmt->bufferRowIndex += *numRowsFetched; + stmt->rowCount += *numRowsFetched; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getBatchErrorCount() [PUBLIC] +// Return the number of batch errors that took place during the last +// execution of the statement. +//----------------------------------------------------------------------------- +int dpiStmt_getBatchErrorCount(dpiStmt *stmt, uint32_t *count) +{ + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, count) + *count = stmt->numBatchErrors; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getBatchErrors() [PUBLIC] +// Return the batch errors that took place during the last execution of the +// statement. +//----------------------------------------------------------------------------- +int dpiStmt_getBatchErrors(dpiStmt *stmt, uint32_t numErrors, + dpiErrorInfo *errors) +{ + dpiError error, tempError; + uint32_t i; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, errors) + if (numErrors < stmt->numBatchErrors) { + dpiError__set(&error, "check num errors", DPI_ERR_ARRAY_SIZE_TOO_SMALL, + numErrors); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + for (i = 0; i < stmt->numBatchErrors; i++) { + tempError.buffer = &stmt->batchErrors[i]; + dpiError__getInfo(&tempError, &errors[i]); + } + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getBindCount() [PUBLIC] +// Return the number of bind variables referenced in the prepared SQL. In +// SQL statements this counts all bind variables but in PL/SQL statements +// this counts only uniquely named bind variables. +//----------------------------------------------------------------------------- +int dpiStmt_getBindCount(dpiStmt *stmt, uint32_t *count) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, count) + status = dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, (void*) count, + 0, DPI_OCI_ATTR_BIND_COUNT, "get bind count", &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getBindNames() [PUBLIC] +// Return the unique names of the bind variables referenced in the prepared +// SQL. +//----------------------------------------------------------------------------- +int dpiStmt_getBindNames(dpiStmt *stmt, uint32_t *numBindNames, + const char **bindNames, uint32_t *bindNameLengths) +{ + uint8_t bindNameLengthsBuffer[8], indNameLengthsBuffer[8], isDuplicate[8]; + uint32_t startLoc, i, numThisPass, numActualBindNames; + char *bindNamesBuffer[8], *indNamesBuffer[8]; + void *bindHandles[8]; + int32_t numFound; + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, numBindNames) + DPI_CHECK_PTR_NOT_NULL(stmt, bindNames) + DPI_CHECK_PTR_NOT_NULL(stmt, bindNameLengths) + startLoc = 1; + numActualBindNames = 0; + while (1) { + if (dpiOci__stmtGetBindInfo(stmt, 8, startLoc, &numFound, + bindNamesBuffer, bindNameLengthsBuffer, indNamesBuffer, + indNameLengthsBuffer, isDuplicate, bindHandles, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (numFound == 0) + break; + numThisPass = abs(numFound) - startLoc + 1; + if (numThisPass > 8) + numThisPass = 8; + for (i = 0; i < numThisPass; i++) { + startLoc++; + if (isDuplicate[i]) + continue; + if (numActualBindNames == *numBindNames) { + dpiError__set(&error, "check num bind names", + DPI_ERR_ARRAY_SIZE_TOO_SMALL, *numBindNames); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + bindNames[numActualBindNames] = bindNamesBuffer[i]; + bindNameLengths[numActualBindNames] = bindNameLengthsBuffer[i]; + numActualBindNames++; + } + if (numFound > 0) + break; + } + *numBindNames = numActualBindNames; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getFetchArraySize() [PUBLIC] +// Get the array size used for fetches. +//----------------------------------------------------------------------------- +int dpiStmt_getFetchArraySize(dpiStmt *stmt, uint32_t *arraySize) +{ + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, arraySize) + *arraySize = stmt->fetchArraySize; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getImplicitResult() [PUBLIC] +// Return the next implicit result from the previously executed statement. If +// no more implicit results exist, NULL is returned. +//----------------------------------------------------------------------------- +int dpiStmt_getImplicitResult(dpiStmt *stmt, dpiStmt **implicitResult) +{ + dpiStmt *tempStmt; + dpiError error; + void *handle; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, implicitResult) + if (dpiUtils__checkClientVersion(stmt->env->versionInfo, 12, 1, + &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (dpiOci__stmtGetNextResult(stmt, &handle, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + *implicitResult = NULL; + if (handle) { + if (dpiStmt__allocate(stmt->conn, 0, &tempStmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + tempStmt->handle = handle; + dpiGen__setRefCount(stmt, &error, 1); + tempStmt->parentStmt = stmt; + if (dpiStmt__createQueryVars(tempStmt, &error) < 0) { + dpiStmt__free(tempStmt, &error); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + *implicitResult = tempStmt; + } + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getInfo() [PUBLIC] +// Return information about the statement in the provided structure. +//----------------------------------------------------------------------------- +int dpiStmt_getInfo(dpiStmt *stmt, dpiStmtInfo *info) +{ + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, info) + info->isQuery = (stmt->statementType == DPI_STMT_TYPE_SELECT); + info->isPLSQL = (stmt->statementType == DPI_STMT_TYPE_BEGIN || + stmt->statementType == DPI_STMT_TYPE_DECLARE || + stmt->statementType == DPI_STMT_TYPE_CALL); + info->isDDL = (stmt->statementType == DPI_STMT_TYPE_CREATE || + stmt->statementType == DPI_STMT_TYPE_DROP || + stmt->statementType == DPI_STMT_TYPE_ALTER); + info->isDML = (stmt->statementType == DPI_STMT_TYPE_INSERT || + stmt->statementType == DPI_STMT_TYPE_UPDATE || + stmt->statementType == DPI_STMT_TYPE_DELETE || + stmt->statementType == DPI_STMT_TYPE_MERGE); + info->statementType = stmt->statementType; + info->isReturning = stmt->isReturning; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getLastRowid() [PUBLIC] +// Returns the rowid of the last row that was affected by a DML statement. If +// no rows were affected by the last statement executed or the last statement +// executed was not a DML statement, NULL is returned. +//----------------------------------------------------------------------------- +int dpiStmt_getLastRowid(dpiStmt *stmt, dpiRowid **rowid) +{ + uint64_t rowCount; + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, rowid) + *rowid = NULL; + if (stmt->statementType == DPI_STMT_TYPE_INSERT || + stmt->statementType == DPI_STMT_TYPE_UPDATE || + stmt->statementType == DPI_STMT_TYPE_DELETE || + stmt->statementType == DPI_STMT_TYPE_MERGE) { + if (dpiStmt__getRowCount(stmt, &rowCount, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (rowCount > 0) { + if (stmt->lastRowid) { + dpiGen__setRefCount(stmt->lastRowid, &error, -1); + stmt->lastRowid = NULL; + } + if (dpiRowid__allocate(stmt->conn, &stmt->lastRowid, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + stmt->lastRowid->handle, 0, DPI_OCI_ATTR_ROWID, + "get last rowid", &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + *rowid = stmt->lastRowid; + } + } + + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getNumQueryColumns() [PUBLIC] +// Returns the number of query columns associated with a statement. If the +// statement does not refer to a query, 0 is returned. +//----------------------------------------------------------------------------- +int dpiStmt_getNumQueryColumns(dpiStmt *stmt, uint32_t *numQueryColumns) +{ + dpiError error; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, numQueryColumns) + if (stmt->statementType == DPI_STMT_TYPE_SELECT && + stmt->numQueryVars == 0 && + dpiStmt__createQueryVars(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + *numQueryColumns = stmt->numQueryVars; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getQueryInfo() [PUBLIC] +// Get query information for the position in question. +//----------------------------------------------------------------------------- +int dpiStmt_getQueryInfo(dpiStmt *stmt, uint32_t pos, dpiQueryInfo *info) +{ + dpiError error; + + // validate parameters + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, info) + if (!stmt->queryInfo && dpiStmt__createQueryVars(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (pos == 0 || pos > stmt->numQueryVars) { + dpiError__set(&error, "check query position", + DPI_ERR_QUERY_POSITION_INVALID, pos); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + + // copy query information from internal cache + memcpy(info, &stmt->queryInfo[pos - 1], sizeof(dpiQueryInfo)); + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getQueryValue() [PUBLIC] +// Get value from query at specified position. +//----------------------------------------------------------------------------- +int dpiStmt_getQueryValue(dpiStmt *stmt, uint32_t pos, + dpiNativeTypeNum *nativeTypeNum, dpiData **data) +{ + dpiError error; + dpiVar *var; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, nativeTypeNum) + DPI_CHECK_PTR_NOT_NULL(stmt, data) + if (!stmt->queryVars) { + dpiError__set(&error, "check query vars", DPI_ERR_QUERY_NOT_EXECUTED); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + if (pos == 0 || pos > stmt->numQueryVars) { + dpiError__set(&error, "check query position", + DPI_ERR_QUERY_POSITION_INVALID, pos); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + var = stmt->queryVars[pos - 1]; + if (!var || stmt->bufferRowIndex == 0 || + stmt->bufferRowIndex > stmt->bufferRowCount) { + dpiError__set(&error, "check fetched row", DPI_ERR_NO_ROW_FETCHED); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + *nativeTypeNum = var->nativeTypeNum; + *data = &var->buffer.externalData[stmt->bufferRowIndex - 1]; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getRowCount() [PUBLIC] +// Return the number of rows affected by the last DML executed (for insert, +// update, delete and merge) or the number of rows fetched (for queries). In +// all other cases, 0 is returned. +//----------------------------------------------------------------------------- +int dpiStmt_getRowCount(dpiStmt *stmt, uint64_t *count) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, count) + status = dpiStmt__getRowCount(stmt, count, &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getRowCounts() [PUBLIC] +// Return the number of rows affected by each of the iterations executed +// using dpiStmt_executeMany(). +//----------------------------------------------------------------------------- +int dpiStmt_getRowCounts(dpiStmt *stmt, uint32_t *numRowCounts, + uint64_t **rowCounts) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, numRowCounts) + DPI_CHECK_PTR_NOT_NULL(stmt, rowCounts) + if (dpiUtils__checkClientVersion(stmt->env->versionInfo, 12, 1, + &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + status = dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, rowCounts, + numRowCounts, DPI_OCI_ATTR_DML_ROW_COUNT_ARRAY, "get row counts", + &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_getSubscrQueryId() [PUBLIC] +// Return the query id for a query registered using this statement. +//----------------------------------------------------------------------------- +int dpiStmt_getSubscrQueryId(dpiStmt *stmt, uint64_t *queryId) +{ + dpiError error; + int status; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(stmt, queryId) + status = dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, queryId, 0, + DPI_OCI_ATTR_CQ_QUERYID, "get query id", &error); + return dpiGen__endPublicFn(stmt, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_release() [PUBLIC] +// Release a reference to the statement. +//----------------------------------------------------------------------------- +int dpiStmt_release(dpiStmt *stmt) +{ + return dpiGen__release(stmt, DPI_HTYPE_STMT, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_scroll() [PUBLIC] +// Scroll to the specified location in the cursor. +//----------------------------------------------------------------------------- +int dpiStmt_scroll(dpiStmt *stmt, dpiFetchMode mode, int32_t offset, + int32_t rowCountOffset) +{ + uint32_t numRows, currentPosition; + uint64_t desiredRow = 0; + dpiError error; + + // make sure the cursor is open + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + // validate mode; determine desired row to fetch + switch (mode) { + case DPI_MODE_FETCH_NEXT: + desiredRow = stmt->rowCount + rowCountOffset + 1; + break; + case DPI_MODE_FETCH_PRIOR: + desiredRow = stmt->rowCount + rowCountOffset - 1; + break; + case DPI_MODE_FETCH_FIRST: + desiredRow = 1; + break; + case DPI_MODE_FETCH_LAST: + break; + case DPI_MODE_FETCH_ABSOLUTE: + desiredRow = (uint64_t) offset; + break; + case DPI_MODE_FETCH_RELATIVE: + desiredRow = stmt->rowCount + rowCountOffset + offset; + offset = (int32_t) (desiredRow - + (stmt->bufferMinRow + stmt->bufferRowCount - 1)); + break; + default: + dpiError__set(&error, "scroll mode", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + + // determine if a fetch is actually required; "last" is always fetched + if (mode != DPI_MODE_FETCH_LAST && desiredRow >= stmt->bufferMinRow && + desiredRow < stmt->bufferMinRow + stmt->bufferRowCount) { + stmt->bufferRowIndex = (uint32_t) (desiredRow - stmt->bufferMinRow); + stmt->rowCount = desiredRow - 1; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); + } + + // perform any pre-fetch activities required + if (dpiStmt__beforeFetch(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + // perform fetch; when fetching the last row, only fetch a single row + numRows = (mode == DPI_MODE_FETCH_LAST) ? 1 : stmt->fetchArraySize; + if (dpiOci__stmtFetch2(stmt, numRows, mode, offset, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + // determine the number of rows actually fetched + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, + &stmt->bufferRowCount, 0, DPI_OCI_ATTR_ROWS_FETCHED, + "get rows fetched", &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + // check that we haven't gone outside of the result set + if (stmt->bufferRowCount == 0) { + if (mode != DPI_MODE_FETCH_FIRST && mode != DPI_MODE_FETCH_LAST) { + dpiError__set(&error, "check result set bounds", + DPI_ERR_SCROLL_OUT_OF_RS); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + stmt->hasRowsToFetch = 0; + stmt->rowCount = 0; + stmt->bufferRowIndex = 0; + stmt->bufferMinRow = 0; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); + } + + // determine the current position of the cursor + if (dpiOci__attrGet(stmt->handle, DPI_OCI_HTYPE_STMT, ¤tPosition, 0, + DPI_OCI_ATTR_CURRENT_POSITION, "get current pos", &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + // reset buffer row index and row count + stmt->rowCount = currentPosition - stmt->bufferRowCount; + stmt->bufferMinRow = stmt->rowCount + 1; + stmt->bufferRowIndex = 0; + + // perform post-fetch activities required + if (dpiStmt__postFetch(stmt, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiStmt_setFetchArraySize() [PUBLIC] +// Set the array size used for fetches. Using a value of zero will select the +// default value. A check is made to ensure that all defined variables have +// sufficient space to support the array size. +//----------------------------------------------------------------------------- +int dpiStmt_setFetchArraySize(dpiStmt *stmt, uint32_t arraySize) +{ + dpiError error; + dpiVar *var; + uint32_t i; + + if (dpiStmt__check(stmt, __func__, &error) < 0) + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + if (arraySize == 0) + arraySize = DPI_DEFAULT_FETCH_ARRAY_SIZE; + for (i = 0; i < stmt->numQueryVars; i++) { + var = stmt->queryVars[i]; + if (var && var->buffer.maxArraySize < arraySize) { + dpiError__set(&error, "check array size", + DPI_ERR_ARRAY_SIZE_TOO_BIG, arraySize); + return dpiGen__endPublicFn(stmt, DPI_FAILURE, &error); + } + } + stmt->fetchArraySize = arraySize; + return dpiGen__endPublicFn(stmt, DPI_SUCCESS, &error); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiSubscr.c b/vendor/github.com/godror/godror/odpi/src/dpiSubscr.c new file mode 100644 index 00000000000..cf1ed60b2d8 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiSubscr.c @@ -0,0 +1,713 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiSubscr.c +// Implementation of subscriptions (CQN). +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// forward declarations of internal functions only used in this file +static void dpiSubscr__freeMessage(dpiSubscrMessage *message); +static int dpiSubscr__populateMessage(dpiSubscr *subscr, + dpiSubscrMessage *message, void *descriptor, dpiError *error); +static int dpiSubscr__populateMessageTable(dpiSubscr *subscr, + dpiSubscrMessageTable *table, void *descriptor, dpiError *error); +static int dpiSubscr__populateQueryChangeMessage(dpiSubscr *subscr, + dpiSubscrMessage *message, void *descriptor, dpiError *error); + + +//----------------------------------------------------------------------------- +// dpiSubscr__callback() [INTERNAL] +// Callback that is used to execute the callback registered when the +// subscription was created. +//----------------------------------------------------------------------------- +static void dpiSubscr__callback(dpiSubscr *subscr, UNUSED void *handle, + UNUSED void *payload, UNUSED uint32_t payloadLength, void *descriptor, + UNUSED uint32_t mode) +{ + dpiSubscrMessage message; + dpiErrorInfo errorInfo; + dpiError error; + + // ensure that the subscription handle is still valid + if (dpiGen__startPublicFn(subscr, DPI_HTYPE_SUBSCR, __func__, + &error) < 0) { + dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); + return; + } + + // if the subscription is no longer registered, nothing further to do + dpiMutex__acquire(subscr->mutex); + if (!subscr->registered) { + dpiMutex__release(subscr->mutex); + dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); + return; + } + + // populate message + memset(&message, 0, sizeof(message)); + if (dpiSubscr__populateMessage(subscr, &message, descriptor, &error) < 0) { + dpiError__getInfo(&error, &errorInfo); + message.errorInfo = &errorInfo; + } + message.registered = subscr->registered; + + // invoke user callback; temporarily increase reference count to ensure + // that the subscription is not freed during the callback + dpiGen__setRefCount(subscr, &error, 1); + (*subscr->callback)(subscr->callbackContext, &message); + dpiSubscr__freeMessage(&message); + dpiMutex__release(subscr->mutex); + dpiGen__setRefCount(subscr, &error, -1); + dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__check() [INTERNAL] +// Determine if the subscription is open and available for use. +//----------------------------------------------------------------------------- +static int dpiSubscr__check(dpiSubscr *subscr, const char *fnName, + dpiError *error) +{ + if (dpiGen__startPublicFn(subscr, DPI_HTYPE_SUBSCR, fnName, error) < 0) + return DPI_FAILURE; + if (!subscr->handle) + return dpiError__set(error, "check closed", DPI_ERR_SUBSCR_CLOSED); + return dpiConn__checkConnected(subscr->conn, error); +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__create() [INTERNAL] +// Create a new subscription structure and return it. In case of error NULL +// is returned. +//----------------------------------------------------------------------------- +int dpiSubscr__create(dpiSubscr *subscr, dpiConn *conn, + dpiSubscrCreateParams *params, dpiError *error) +{ + uint32_t qosFlags, mode; + int32_t int32Val; + int rowids; + + // retain a reference to the connection + dpiGen__setRefCount(conn, error, 1); + subscr->conn = conn; + subscr->callback = params->callback; + subscr->callbackContext = params->callbackContext; + subscr->subscrNamespace = params->subscrNamespace; + subscr->qos = params->qos; + subscr->clientInitiated = params->clientInitiated; + dpiMutex__initialize(subscr->mutex); + + // create the subscription handle + if (dpiOci__handleAlloc(conn->env->handle, &subscr->handle, + DPI_OCI_HTYPE_SUBSCRIPTION, "create subscr handle", error) < 0) + return DPI_FAILURE; + + // set the namespace + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) ¶ms->subscrNamespace, sizeof(uint32_t), + DPI_OCI_ATTR_SUBSCR_NAMESPACE, "set namespace", error) < 0) + return DPI_FAILURE; + + // set the protocol + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) ¶ms->protocol, sizeof(uint32_t), + DPI_OCI_ATTR_SUBSCR_RECPTPROTO, "set protocol", error) < 0) + return DPI_FAILURE; + + // set the timeout + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) ¶ms->timeout, sizeof(uint32_t), + DPI_OCI_ATTR_SUBSCR_TIMEOUT, "set timeout", error) < 0) + return DPI_FAILURE; + + // set the IP address used on the client to listen for events + if (params->ipAddress && params->ipAddressLength > 0 && + dpiOci__attrSet(subscr->env->handle, DPI_OCI_HTYPE_ENV, + (void*) params->ipAddress, params->ipAddressLength, + DPI_OCI_ATTR_SUBSCR_IPADDR, "set IP address", error) < 0) + return DPI_FAILURE; + + // set the port number used on the client to listen for events + if (params->portNumber > 0 && dpiOci__attrSet(subscr->env->handle, + DPI_OCI_HTYPE_ENV, (void*) ¶ms->portNumber, 0, + DPI_OCI_ATTR_SUBSCR_PORTNO, "set port number", error) < 0) + return DPI_FAILURE; + + // set the context for the callback + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) subscr, 0, DPI_OCI_ATTR_SUBSCR_CTX, "set callback context", + error) < 0) + return DPI_FAILURE; + + // set the callback, if applicable + if (params->callback && dpiOci__attrSet(subscr->handle, + DPI_OCI_HTYPE_SUBSCRIPTION, (void*) dpiSubscr__callback, 0, + DPI_OCI_ATTR_SUBSCR_CALLBACK, "set callback", error) < 0) + return DPI_FAILURE; + + // set the subscription name, if applicable + if (params->name && params->nameLength > 0 && + dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) params->name, params->nameLength, + DPI_OCI_ATTR_SUBSCR_NAME, "set name", error) < 0) + return DPI_FAILURE; + + // set QOS flags + qosFlags = 0; + if (params->qos & DPI_SUBSCR_QOS_RELIABLE) + qosFlags |= DPI_OCI_SUBSCR_QOS_RELIABLE; + if (params->qos & DPI_SUBSCR_QOS_DEREG_NFY) + qosFlags |= DPI_OCI_SUBSCR_QOS_PURGE_ON_NTFN; + if (qosFlags && dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) &qosFlags, sizeof(uint32_t), DPI_OCI_ATTR_SUBSCR_QOSFLAGS, + "set QOS", error) < 0) + return DPI_FAILURE; + + // set CQ specific QOS flags + qosFlags = 0; + if (params->qos & DPI_SUBSCR_QOS_QUERY) + qosFlags |= DPI_OCI_SUBSCR_CQ_QOS_QUERY; + if (params->qos & DPI_SUBSCR_QOS_BEST_EFFORT) + qosFlags |= DPI_OCI_SUBSCR_CQ_QOS_BEST_EFFORT; + if (qosFlags && dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) &qosFlags, sizeof(uint32_t), + DPI_OCI_ATTR_SUBSCR_CQ_QOSFLAGS, "set CQ QOS", error) < 0) + return DPI_FAILURE; + + // set rowids flag, if applicable + if (params->qos & DPI_SUBSCR_QOS_ROWIDS) { + rowids = 1; + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) &rowids, 0, DPI_OCI_ATTR_CHNF_ROWIDS, + "set rowids flag", error) < 0) + return DPI_FAILURE; + } + + // set which operations are desired, if applicable + if (params->operations && dpiOci__attrSet(subscr->handle, + DPI_OCI_HTYPE_SUBSCRIPTION, (void*) ¶ms->operations, 0, + DPI_OCI_ATTR_CHNF_OPERATIONS, "set operations", error) < 0) + return DPI_FAILURE; + + // set grouping information, if applicable + if (params->groupingClass) { + + // set grouping class + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) ¶ms->groupingClass, 0, + DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_CLASS, "set grouping class", + error) < 0) + return DPI_FAILURE; + + // set grouping value + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) ¶ms->groupingValue, 0, + DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_VALUE, "set grouping value", + error) < 0) + return DPI_FAILURE; + + // set grouping type + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) ¶ms->groupingType, 0, + DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_TYPE, "set grouping type", + error) < 0) + return DPI_FAILURE; + + // set grouping repeat count + int32Val = DPI_SUBSCR_GROUPING_FOREVER; + if (dpiOci__attrSet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + (void*) &int32Val, 0, + DPI_OCI_ATTR_SUBSCR_NTFN_GROUPING_REPEAT_COUNT, + "set grouping repeat count", error) < 0) + return DPI_FAILURE; + + } + + // register the subscription; client initiated subscriptions are only valid + // with 19.4 client and database + mode = DPI_OCI_DEFAULT; + if (params->clientInitiated) { + if (dpiUtils__checkClientVersion(conn->env->versionInfo, 19, 4, + error) < 0) + return DPI_FAILURE; + if (dpiUtils__checkDatabaseVersion(conn, 19, 4, error) < 0) + return DPI_FAILURE; + mode = DPI_OCI_SECURE_NOTIFICATION; + } + if (dpiOci__subscriptionRegister(conn, &subscr->handle, mode, error) < 0) + return DPI_FAILURE; + subscr->registered = 1; + + // acquire the registration id + if (dpiOci__attrGet(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION, + ¶ms->outRegId, NULL, DPI_OCI_ATTR_SUBSCR_CQ_REGID, + "get registration id", error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__free() [INTERNAL] +// Free the memory and any resources associated with the subscription. +//----------------------------------------------------------------------------- +void dpiSubscr__free(dpiSubscr *subscr, dpiError *error) +{ + dpiMutex__acquire(subscr->mutex); + if (subscr->handle) { + if (subscr->registered) + dpiOci__subscriptionUnRegister(subscr->conn, subscr, error); + dpiOci__handleFree(subscr->handle, DPI_OCI_HTYPE_SUBSCRIPTION); + subscr->handle = NULL; + } + if (subscr->conn) { + dpiGen__setRefCount(subscr->conn, error, -1); + subscr->conn = NULL; + } + dpiMutex__release(subscr->mutex); + dpiMutex__destroy(subscr->mutex); + dpiUtils__freeMemory(subscr); +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__freeMessage() [INTERNAL] +// Free memory associated with the message. +//----------------------------------------------------------------------------- +static void dpiSubscr__freeMessage(dpiSubscrMessage *message) +{ + dpiSubscrMessageQuery *query; + uint32_t i, j; + + // free the tables for the message + if (message->numTables > 0) { + for (i = 0; i < message->numTables; i++) { + if (message->tables[i].numRows > 0) + dpiUtils__freeMemory(message->tables[i].rows); + } + dpiUtils__freeMemory(message->tables); + } + + // free the queries for the message + if (message->numQueries > 0) { + for (i = 0; i < message->numQueries; i++) { + query = &message->queries[i]; + if (query->numTables > 0) { + for (j = 0; j < query->numTables; j++) { + if (query->tables[j].numRows > 0) + dpiUtils__freeMemory(query->tables[j].rows); + } + dpiUtils__freeMemory(query->tables); + } + } + dpiUtils__freeMemory(message->queries); + } +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__populateAQMessage() [INTERNAL] +// Populate message with details. +//----------------------------------------------------------------------------- +static int dpiSubscr__populateAQMessage(dpiSubscr *subscr, + dpiSubscrMessage *message, void *descriptor, dpiError *error) +{ + uint32_t flags = 0; + + // determine if message is a deregistration message + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_AQNFY_DESCRIPTOR, &flags, + NULL, DPI_OCI_ATTR_NFY_FLAGS, "get flags", error) < 0) + return DPI_FAILURE; + message->eventType = (flags == 1) ? DPI_EVENT_DEREG : DPI_EVENT_AQ; + if (message->eventType == DPI_EVENT_DEREG) { + subscr->registered = 0; + return DPI_SUCCESS; + } + + // determine the name of the queue which spawned the event + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_AQNFY_DESCRIPTOR, + (void*) &message->queueName, &message->queueNameLength, + DPI_OCI_ATTR_QUEUE_NAME, "get queue name", error) < 0) + return DPI_FAILURE; + + // determine the consumer name for the queue that spawned the event + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_AQNFY_DESCRIPTOR, + (void*) &message->consumerName, &message->consumerNameLength, + DPI_OCI_ATTR_CONSUMER_NAME, "get consumer name", error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__populateObjectChangeMessage() [INTERNAL] +// Populate object change message with details. +//----------------------------------------------------------------------------- +static int dpiSubscr__populateObjectChangeMessage(dpiSubscr *subscr, + dpiSubscrMessage *message, void *descriptor, dpiError *error) +{ + void **tableDescriptor, *indicator; + int32_t numTables; + void *tables; + uint32_t i; + int exists; + + // determine table collection + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &tables, 0, + DPI_OCI_ATTR_CHDES_TABLE_CHANGES, "get tables", error) < 0) + return DPI_FAILURE; + if (!tables) + return DPI_SUCCESS; + + // determine number of tables + if (dpiOci__collSize(subscr->conn, tables, &numTables, error) < 0) + return DPI_FAILURE; + + // allocate memory for table entries + if (dpiUtils__allocateMemory((size_t) numTables, + sizeof(dpiSubscrMessageTable), 1, "allocate msg tables", + (void**) &message->tables, error) < 0) + return DPI_FAILURE; + message->numTables = (uint32_t) numTables; + + // populate message table entries + for (i = 0; i < message->numTables; i++) { + if (dpiOci__collGetElem(subscr->conn, tables, (int32_t) i, &exists, + (void**) &tableDescriptor, &indicator, error) < 0) + return DPI_FAILURE; + if (dpiSubscr__populateMessageTable(subscr, &message->tables[i], + *tableDescriptor, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__populateMessage() [INTERNAL] +// Populate message with details. +//----------------------------------------------------------------------------- +static int dpiSubscr__populateMessage(dpiSubscr *subscr, + dpiSubscrMessage *message, void *descriptor, dpiError *error) +{ + void *rawValue; + + // if quality of service flag indicates that deregistration should take + // place when the first notification is received, mark the subscription + // as no longer registered + if (subscr->qos & DPI_SUBSCR_QOS_DEREG_NFY) + subscr->registered = 0; + + // handle AQ messages, if applicable + if (subscr->subscrNamespace == DPI_SUBSCR_NAMESPACE_AQ) + return dpiSubscr__populateAQMessage(subscr, message, descriptor, + error); + + // determine the type of event that was spawned + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &message->eventType, + NULL, DPI_OCI_ATTR_CHDES_NFYTYPE, "get event type", error) < 0) + return DPI_FAILURE; + + // determine the name of the database which spawned the event + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, + (void*) &message->dbName, &message->dbNameLength, + DPI_OCI_ATTR_CHDES_DBNAME, "get DB name", error) < 0) + return DPI_FAILURE; + + // determine the id of the transaction which spawned the event + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &rawValue, NULL, + DPI_OCI_ATTR_CHDES_XID, "get transaction id", error) < 0) + return DPI_FAILURE; + dpiOci__rawPtr(subscr->env->handle, rawValue, (void**) &message->txId); + dpiOci__rawSize(subscr->env->handle, rawValue, &message->txIdLength); + + // populate event specific attributes + switch (message->eventType) { + case DPI_EVENT_OBJCHANGE: + return dpiSubscr__populateObjectChangeMessage(subscr, message, + descriptor, error); + case DPI_EVENT_QUERYCHANGE: + return dpiSubscr__populateQueryChangeMessage(subscr, message, + descriptor, error); + case DPI_EVENT_DEREG: + subscr->registered = 0; + break; + case DPI_EVENT_STARTUP: + case DPI_EVENT_SHUTDOWN: + case DPI_EVENT_SHUTDOWN_ANY: + break; + default: + return dpiError__set(error, "event type", DPI_ERR_NOT_SUPPORTED); + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__populateMessageQuery() [INTERNAL] +// Populate a message query structure from the OCI descriptor. +//----------------------------------------------------------------------------- +static int dpiSubscr__populateMessageQuery(dpiSubscr *subscr, + dpiSubscrMessageQuery *query, void *descriptor, dpiError *error) +{ + void **tableDescriptor, *indicator, *tables; + int32_t numTables; + uint32_t i; + int exists; + + // determine query id + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CQDES, &query->id, 0, + DPI_OCI_ATTR_CQDES_QUERYID, "get id", error) < 0) + return DPI_FAILURE; + + // determine operation + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CQDES, &query->operation, 0, + DPI_OCI_ATTR_CQDES_OPERATION, "get operation", error) < 0) + return DPI_FAILURE; + + // determine table collection + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CQDES, &tables, 0, + DPI_OCI_ATTR_CQDES_TABLE_CHANGES, "get table descriptor", + error) < 0) + return DPI_FAILURE; + if (!tables) + return DPI_SUCCESS; + + // determine number of tables + if (dpiOci__collSize(subscr->conn, tables, &numTables, error) < 0) + return DPI_FAILURE; + + // allocate memory for table entries + if (dpiUtils__allocateMemory((size_t) numTables, + sizeof(dpiSubscrMessageTable), 1, "allocate query tables", + (void**) &query->tables, error) < 0) + return DPI_FAILURE; + query->numTables = (uint32_t) numTables; + + // populate message table entries + for (i = 0; i < query->numTables; i++) { + if (dpiOci__collGetElem(subscr->conn, tables, (int32_t) i, &exists, + (void**) &tableDescriptor, &indicator, error) < 0) + return DPI_FAILURE; + if (dpiSubscr__populateMessageTable(subscr, &query->tables[i], + *tableDescriptor, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__populateMessageRow() [INTERNAL] +// Populate a message row structure from the OCI descriptor. +//----------------------------------------------------------------------------- +static int dpiSubscr__populateMessageRow(dpiSubscrMessageRow *row, + void *descriptor, dpiError *error) +{ + // determine operation + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_ROW_CHDES, &row->operation, + 0, DPI_OCI_ATTR_CHDES_ROW_OPFLAGS, "get operation", error) < 0) + return DPI_FAILURE; + + // determine rowid + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_ROW_CHDES, + (void*) &row->rowid, &row->rowidLength, + DPI_OCI_ATTR_CHDES_ROW_ROWID, "get rowid", error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__populateMessageTable() [INTERNAL] +// Populate a message table structure from the OCI descriptor. +//----------------------------------------------------------------------------- +static int dpiSubscr__populateMessageTable(dpiSubscr *subscr, + dpiSubscrMessageTable *table, void *descriptor, dpiError *error) +{ + void **rowDescriptor, *indicator, *rows; + int32_t numRows; + int exists; + uint32_t i; + + // determine operation + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_TABLE_CHDES, + &table->operation, 0, DPI_OCI_ATTR_CHDES_TABLE_OPFLAGS, + "get operation", error) < 0) + return DPI_FAILURE; + + // determine table name + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_TABLE_CHDES, + (void*) &table->name, &table->nameLength, + DPI_OCI_ATTR_CHDES_TABLE_NAME, "get table name", error) < 0) + return DPI_FAILURE; + + // if change invalidated all rows, nothing to do + if (table->operation & DPI_OPCODE_ALL_ROWS) + return DPI_SUCCESS; + + // determine rows collection + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_TABLE_CHDES, &rows, 0, + DPI_OCI_ATTR_CHDES_TABLE_ROW_CHANGES, "get rows descriptor", + error) < 0) + return DPI_FAILURE; + + // determine number of rows in collection + if (dpiOci__collSize(subscr->conn, rows, &numRows, error) < 0) + return DPI_FAILURE; + + // allocate memory for row entries + if (dpiUtils__allocateMemory((size_t) numRows, sizeof(dpiSubscrMessageRow), + 1, "allocate rows", (void**) &table->rows, error) < 0) + return DPI_FAILURE; + table->numRows = (uint32_t) numRows; + + // populate the rows attribute + for (i = 0; i < table->numRows; i++) { + if (dpiOci__collGetElem(subscr->conn, rows, (int32_t) i, &exists, + (void**) &rowDescriptor, &indicator, error) < 0) + return DPI_FAILURE; + if (dpiSubscr__populateMessageRow(&table->rows[i], *rowDescriptor, + error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__populateQueryChangeMessage() [INTERNAL] +// Populate query change message with details. +//----------------------------------------------------------------------------- +static int dpiSubscr__populateQueryChangeMessage(dpiSubscr *subscr, + dpiSubscrMessage *message, void *descriptor, dpiError *error) +{ + void **queryDescriptor, *indicator, *queries; + int32_t numQueries; + int exists; + uint32_t i; + + // determine query collection + if (dpiOci__attrGet(descriptor, DPI_OCI_DTYPE_CHDES, &queries, 0, + DPI_OCI_ATTR_CHDES_QUERIES, "get queries", error) < 0) + return DPI_FAILURE; + if (!queries) + return DPI_SUCCESS; + + // determine number of queries + if (dpiOci__collSize(subscr->conn, queries, &numQueries, error) < 0) + return DPI_FAILURE; + + // allocate memory for query entries + if (dpiUtils__allocateMemory((size_t) numQueries, + sizeof(dpiSubscrMessageQuery), 1, "allocate queries", + (void**) &message->queries, error) < 0) + return DPI_FAILURE; + message->numQueries = (uint32_t) numQueries; + + // populate each entry with a message query instance + for (i = 0; i < message->numQueries; i++) { + if (dpiOci__collGetElem(subscr->conn, queries, (int32_t) i, &exists, + (void**) &queryDescriptor, &indicator, error) < 0) + return DPI_FAILURE; + if (dpiSubscr__populateMessageQuery(subscr, &message->queries[i], + *queryDescriptor, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiSubscr__prepareStmt() [INTERNAL] +// Internal method for preparing statement against a subscription. This +// allows for normal error processing without having to worry about freeing the +// statement for every error that might take place. +//----------------------------------------------------------------------------- +static int dpiSubscr__prepareStmt(dpiSubscr *subscr, dpiStmt *stmt, + const char *sql, uint32_t sqlLength, dpiError *error) +{ + // prepare statement for execution; only SELECT statements are supported + if (dpiStmt__prepare(stmt, sql, sqlLength, NULL, 0, error) < 0) + return DPI_FAILURE; + if (stmt->statementType != DPI_STMT_TYPE_SELECT) + return dpiError__set(error, "subscr prepare statement", + DPI_ERR_NOT_SUPPORTED); + + // fetch array size is set to 1 in order to avoid over allocation since + // the query is not really going to be used for fetching rows, just for + // registration + stmt->fetchArraySize = 1; + + // set subscription handle + return dpiOci__attrSet(stmt->handle, DPI_OCI_HTYPE_STMT, subscr->handle, 0, + DPI_OCI_ATTR_CHNF_REGHANDLE, "set subscription handle", error); +} + + +//----------------------------------------------------------------------------- +// dpiSubscr_addRef() [PUBLIC] +// Add a reference to the subscription. +//----------------------------------------------------------------------------- +int dpiSubscr_addRef(dpiSubscr *subscr) +{ + return dpiGen__addRef(subscr, DPI_HTYPE_SUBSCR, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiSubscr_prepareStmt() [PUBLIC] +// Prepare statement for registration with subscription. +//----------------------------------------------------------------------------- +int dpiSubscr_prepareStmt(dpiSubscr *subscr, const char *sql, + uint32_t sqlLength, dpiStmt **stmt) +{ + dpiStmt *tempStmt; + dpiError error; + + if (dpiSubscr__check(subscr, __func__, &error) < 0) + return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(subscr, sql) + DPI_CHECK_PTR_NOT_NULL(subscr, stmt) + if (dpiStmt__allocate(subscr->conn, 0, &tempStmt, &error) < 0) + return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); + if (dpiSubscr__prepareStmt(subscr, tempStmt, sql, sqlLength, + &error) < 0) { + dpiStmt__free(tempStmt, &error); + return dpiGen__endPublicFn(subscr, DPI_FAILURE, &error); + } + + *stmt = tempStmt; + return dpiGen__endPublicFn(subscr, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiSubscr_release() [PUBLIC] +// Release a reference to the subscription. +//----------------------------------------------------------------------------- +int dpiSubscr_release(dpiSubscr *subscr) +{ + return dpiGen__release(subscr, DPI_HTYPE_SUBSCR, __func__); +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiUtils.c b/vendor/github.com/godror/godror/odpi/src/dpiUtils.c new file mode 100644 index 00000000000..0ab09e54487 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiUtils.c @@ -0,0 +1,401 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiUtils.c +// Utility methods that aren't specific to a particular type. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +//----------------------------------------------------------------------------- +// dpiUtils__allocateMemory() [INTERNAL] +// Method for allocating memory which permits tracing and populates the error +// structure in the event of a memory allocation failure. +//----------------------------------------------------------------------------- +int dpiUtils__allocateMemory(size_t numMembers, size_t memberSize, + int clearMemory, const char *action, void **ptr, dpiError *error) +{ + if (clearMemory) + *ptr = calloc(numMembers, memberSize); + else *ptr = malloc(numMembers * memberSize); + if (!*ptr) + return dpiError__set(error, action, DPI_ERR_NO_MEMORY); + if (dpiDebugLevel & DPI_DEBUG_LEVEL_MEM) + dpiDebug__print("allocated %u bytes at %p (%s)\n", + numMembers * memberSize, *ptr, action); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiUtils__checkClientVersion() [INTERNAL] +// Check the Oracle Client version and verify that it is at least at the +// minimum version that is required. +//----------------------------------------------------------------------------- +int dpiUtils__checkClientVersion(dpiVersionInfo *versionInfo, + int minVersionNum, int minReleaseNum, dpiError *error) +{ + if (versionInfo->versionNum < minVersionNum || + (versionInfo->versionNum == minVersionNum && + versionInfo->releaseNum < minReleaseNum)) + return dpiError__set(error, "check Oracle Client version", + DPI_ERR_ORACLE_CLIENT_TOO_OLD, versionInfo->versionNum, + versionInfo->releaseNum, minVersionNum, minReleaseNum); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiUtils__checkDatabaseVersion() [INTERNAL] +// Check the Oracle Database version and verify that it is at least at the +// minimum version that is required. +//----------------------------------------------------------------------------- +int dpiUtils__checkDatabaseVersion(dpiConn *conn, int minVersionNum, + int minReleaseNum, dpiError *error) +{ + if (dpiConn__getServerVersion(conn, error) < 0) + return DPI_FAILURE; + if (conn->versionInfo.versionNum < minVersionNum || + (conn->versionInfo.versionNum == minVersionNum && + conn->versionInfo.releaseNum < minReleaseNum)) + return dpiError__set(error, "check Oracle Database version", + DPI_ERR_ORACLE_DB_TOO_OLD, conn->versionInfo.versionNum, + conn->versionInfo.releaseNum, minVersionNum, minReleaseNum); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiUtils__clearMemory() [INTERNAL] +// Method for clearing memory that will not be optimised away by the +// compiler. Simple use of memset() can be optimised away. This routine makes +// use of a volatile pointer which most compilers will avoid optimising away, +// even if the pointer appears to be unused after the call. +//----------------------------------------------------------------------------- +void dpiUtils__clearMemory(void *ptr, size_t length) +{ + volatile unsigned char *temp = (unsigned char *) ptr; + + while (length--) + *temp++ = '\0'; +} + + +//----------------------------------------------------------------------------- +// dpiUtils__freeMemory() [INTERNAL] +// Method for allocating memory which permits tracing and populates the error +// structure in the event of a memory allocation failure. +//----------------------------------------------------------------------------- +void dpiUtils__freeMemory(void *ptr) +{ + if (dpiDebugLevel & DPI_DEBUG_LEVEL_MEM) + dpiDebug__print("freed ptr at %p\n", ptr); + free(ptr); +} + + +//----------------------------------------------------------------------------- +// dpiUtils__getAttrStringWithDup() [INTERNAL] +// Get the string attribute from the OCI and duplicate its contents. +//----------------------------------------------------------------------------- +int dpiUtils__getAttrStringWithDup(const char *action, const void *ociHandle, + uint32_t ociHandleType, uint32_t ociAttribute, const char **value, + uint32_t *valueLength, dpiError *error) +{ + char *source, *temp; + + if (dpiOci__attrGet(ociHandle, ociHandleType, (void*) &source, + valueLength, ociAttribute, action, error) < 0) + return DPI_FAILURE; + if (dpiUtils__allocateMemory(1, *valueLength, 0, action, (void**) &temp, + error) < 0) + return DPI_FAILURE; + *value = (const char*) memcpy(temp, source, *valueLength); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiUtils__parseNumberString() [INTERNAL] +// Parse the contents of a string that is supposed to contain a number. The +// number is expected to be in the format (www.json.org): +// - optional negative sign (-) +// - any number of digits but at least one (0-9) +// - an optional decimal point (.) +// - any number of digits but at least one if decimal point specified (0-9) +// - an optional exponent indicator (e or E) +// - an optional exponent sign (+ or -) +// - any number of digits, but at least one if exponent specified (0-9) +// What is returned is an indication of whether the number is negative, what +// the index of the decimal point in the string is and the list of digits +// without the decimal point. Note that OCI doesn't support more than 40 digits +// so if there are more than this amount an error is raised. OCI doesn't +// support larger than 1e126 so check for this value and raise a numeric +// overflow error if found. OCI also doesn't support smaller than 1E-130 so +// check for this value as well and if smaller than that value simply return +// zero. +//----------------------------------------------------------------------------- +int dpiUtils__parseNumberString(const char *value, uint32_t valueLength, + uint16_t charsetId, int *isNegative, int16_t *decimalPointIndex, + uint8_t *numDigits, uint8_t *digits, dpiError *error) +{ + char convertedValue[DPI_NUMBER_AS_TEXT_CHARS], exponentDigits[4]; + uint8_t numExponentDigits, digit; + uint32_t convertedValueLength; + uint16_t *utf16chars, i; + int exponentIsNegative; + const char *endValue; + int16_t exponent; + + // empty strings are not valid numbers + if (valueLength == 0) + return dpiError__set(error, "zero length", DPI_ERR_INVALID_NUMBER); + + // strings longer than the maximum length of a valid number are also + // excluded + if ((charsetId == DPI_CHARSET_ID_UTF16 && + valueLength > DPI_NUMBER_AS_TEXT_CHARS * 2) || + (charsetId != DPI_CHARSET_ID_UTF16 && + valueLength > DPI_NUMBER_AS_TEXT_CHARS)) + return dpiError__set(error, "check length", + DPI_ERR_NUMBER_STRING_TOO_LONG); + + // if value is encoded in UTF-16, convert to single byte encoding first + // check for values that cannot be encoded in a single byte and are + // obviously not part of a valid numeric string + // also verify maximum length of number + if (charsetId == DPI_CHARSET_ID_UTF16) { + utf16chars = (uint16_t*) value; + convertedValue[0] = '\0'; + convertedValueLength = valueLength / 2; + for (i = 0; i < convertedValueLength; i++) { + if (*utf16chars > 127) + return dpiError__set(error, "convert from UTF-16", + DPI_ERR_INVALID_NUMBER); + convertedValue[i] = (char) *utf16chars++; + } + value = convertedValue; + valueLength = convertedValueLength; + } + + // see if first character is a minus sign (number is negative) + endValue = value + valueLength; + *isNegative = (*value == '-'); + if (*isNegative) + value++; + + // scan for digits until the decimal point or exponent indicator is found + *numDigits = 0; + while (value < endValue) { + if (*value == '.' || *value == 'e' || *value == 'E') + break; + if (*value < '0' || *value > '9') + return dpiError__set(error, "check digits before decimal point", + DPI_ERR_INVALID_NUMBER); + digit = (uint8_t) (*value++ - '0'); + if (digit == 0 && *numDigits == 0) + continue; + *digits++ = digit; + (*numDigits)++; + } + *decimalPointIndex = *numDigits; + + // scan for digits following the decimal point, if applicable + if (value < endValue && *value == '.') { + value++; + while (value < endValue) { + if (*value == 'e' || *value == 'E') + break; + if (*value < '0' || *value > '9') + return dpiError__set(error, "check digits after decimal point", + DPI_ERR_INVALID_NUMBER); + digit = (uint8_t) (*value++ - '0'); + if (digit == 0 && *numDigits == 0) { + (*decimalPointIndex)--; + continue; + } + *digits++ = digit; + (*numDigits)++; + } + } + + // handle exponent, if applicable + if (value < endValue && (*value == 'e' || *value == 'E')) { + value++; + exponentIsNegative = 0; + numExponentDigits = 0; + if (value < endValue && (*value == '+' || *value == '-')) { + exponentIsNegative = (*value == '-'); + value++; + } + while (value < endValue) { + if (*value < '0' || *value > '9') + return dpiError__set(error, "check digits in exponent", + DPI_ERR_INVALID_NUMBER); + if (numExponentDigits == 3) + return dpiError__set(error, "check exponent digits > 3", + DPI_ERR_NOT_SUPPORTED); + exponentDigits[numExponentDigits] = *value++; + numExponentDigits++; + } + if (numExponentDigits == 0) + return dpiError__set(error, "no digits in exponent", + DPI_ERR_INVALID_NUMBER); + exponentDigits[numExponentDigits] = '\0'; + exponent = (int16_t) strtol(exponentDigits, NULL, 10); + if (exponentIsNegative) + exponent = -exponent; + *decimalPointIndex += exponent; + } + + // if there is anything left in the string, that indicates an invalid + // number as well + if (value < endValue) + return dpiError__set(error, "check string used", + DPI_ERR_INVALID_NUMBER); + + // strip trailing zeroes + digits--; + while (*numDigits > 0 && *digits-- == 0) + (*numDigits)--; + + // values must be less than 1e126 and greater than 1e-129; the number of + // digits also cannot exceed the maximum precision of Oracle numbers + if (*numDigits > DPI_NUMBER_MAX_DIGITS || *decimalPointIndex > 126 || + *decimalPointIndex < -129) { + return dpiError__set(error, "check value can be represented", + DPI_ERR_NUMBER_NO_REPR); + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiUtils__parseOracleNumber() [INTERNAL] +// Parse the contents of an Oracle number and return its constituent parts +// so that a string can be generated from it easily. +//----------------------------------------------------------------------------- +int dpiUtils__parseOracleNumber(void *oracleValue, int *isNegative, + int16_t *decimalPointIndex, uint8_t *numDigits, uint8_t *digits, + dpiError *error) +{ + uint8_t *source, length, i, byte, digit; + int8_t ociExponent; + + // the first byte of the structure is a length byte which includes the + // exponent and the mantissa bytes + source = (uint8_t*) oracleValue; + length = *source++ - 1; + + // a mantissa length longer than 20 signals corruption of some kind + if (length > 20) + return dpiError__set(error, "check mantissa length", + DPI_ERR_INVALID_OCI_NUMBER); + + // the second byte of the structure is the exponent + // positive numbers have the highest order bit set whereas negative numbers + // have the highest order bit cleared and the bits inverted + ociExponent = (int8_t) *source++; + *isNegative = (ociExponent & 0x80) ? 0 : 1; + if (*isNegative) + ociExponent = ~ociExponent; + ociExponent -= 193; + *decimalPointIndex = ociExponent * 2 + 2; + + // a mantissa length of 0 implies a value of 0 (if positive) + // or -1e126 (if negative) + if (length == 0) { + if (*isNegative) { + *digits = 1; + *decimalPointIndex = 127; + } + else { + *decimalPointIndex = 1; + *digits = 0; + } + *numDigits = 1; + return DPI_SUCCESS; + } + + // check for the trailing 102 byte for negative numbers and if present, + // reduce the number of mantissa digits + if (*isNegative && source[length - 1] == 102) + length--; + + // process the mantissa which are the remaining bytes + // each mantissa byte is a base-100 digit + *numDigits = length * 2; + for (i = 0; i < length; i++) { + byte = *source++; + + // positive numbers have 1 added to them; negative numbers are + // subtracted from the value 101 + if (*isNegative) + byte = 101 - byte; + else byte--; + + // process the first digit; leading zeroes are ignored + digit = (uint8_t) (byte / 10); + if (digit == 0 && i == 0) { + (*numDigits)--; + (*decimalPointIndex)--; + } else if (digit == 10) { + (*numDigits)++; + (*decimalPointIndex)++; + *digits++ = 1; + *digits++ = 0; + } else *digits++ = digit; + + // process the second digit; trailing zeroes are ignored + digit = byte % 10; + if (digit == 0 && i == length - 1) + (*numDigits)--; + else *digits++ = digit; + + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiUtils__setAttributesFromCommonCreateParams() [INTERNAL] +// Set the attributes on the authorization info structure or session handle +// using the specified parameters. +//----------------------------------------------------------------------------- +int dpiUtils__setAttributesFromCommonCreateParams(void *handle, + uint32_t handleType, const dpiCommonCreateParams *params, + dpiError *error) +{ + uint32_t driverNameLength; + const char *driverName; + + if (params->driverName && params->driverNameLength > 0) { + driverName = params->driverName; + driverNameLength = params->driverNameLength; + } else { + driverName = DPI_DEFAULT_DRIVER_NAME; + driverNameLength = (uint32_t) strlen(driverName); + } + if (driverName && driverNameLength > 0 && dpiOci__attrSet(handle, + handleType, (void*) driverName, driverNameLength, + DPI_OCI_ATTR_DRIVER_NAME, "set driver name", error) < 0) + return DPI_FAILURE; + if (params->edition && params->editionLength > 0 && + dpiOci__attrSet(handle, handleType, + (void*) params->edition, params->editionLength, + DPI_OCI_ATTR_EDITION, "set edition", error) < 0) + return DPI_FAILURE; + + return DPI_SUCCESS; +} diff --git a/vendor/github.com/godror/godror/odpi/src/dpiVar.c b/vendor/github.com/godror/godror/odpi/src/dpiVar.c new file mode 100644 index 00000000000..d8cde787c64 --- /dev/null +++ b/vendor/github.com/godror/godror/odpi/src/dpiVar.c @@ -0,0 +1,1813 @@ +//----------------------------------------------------------------------------- +// Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. +// This program is free software: you can modify it and/or redistribute it +// under the terms of: +// +// (i) the Universal Permissive License v 1.0 or at your option, any +// later version (http://oss.oracle.com/licenses/upl); and/or +// +// (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0) +//----------------------------------------------------------------------------- + +//----------------------------------------------------------------------------- +// dpiVar.c +// Implementation of variables. +//----------------------------------------------------------------------------- + +#include "dpiImpl.h" + +// forward declarations of internal functions only used in this file +static int dpiVar__initBuffer(dpiVar *var, dpiVarBuffer *buffer, + dpiError *error); +static int dpiVar__setBytesFromDynamicBytes(dpiBytes *bytes, + dpiDynamicBytes *dynBytes, dpiError *error); +static int dpiVar__setBytesFromLob(dpiBytes *bytes, dpiDynamicBytes *dynBytes, + dpiLob *lob, dpiError *error); +static int dpiVar__setFromBytes(dpiVar *var, uint32_t pos, const char *value, + uint32_t valueLength, dpiError *error); +static int dpiVar__setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob, + dpiError *error); +static int dpiVar__setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj, + dpiError *error); +static int dpiVar__setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid, + dpiError *error); +static int dpiVar__setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt, + dpiError *error); +static int dpiVar__validateTypes(const dpiOracleType *oracleType, + dpiNativeTypeNum nativeTypeNum, dpiError *error); + + +//----------------------------------------------------------------------------- +// dpiVar__allocate() [INTERNAL] +// Create a new variable object and return it. In case of error NULL is +// returned. +//----------------------------------------------------------------------------- +int dpiVar__allocate(dpiConn *conn, dpiOracleTypeNum oracleTypeNum, + dpiNativeTypeNum nativeTypeNum, uint32_t maxArraySize, uint32_t size, + int sizeIsBytes, int isArray, dpiObjectType *objType, dpiVar **var, + dpiData **data, dpiError *error) +{ + const dpiOracleType *type; + uint32_t sizeInBytes; + dpiVar *tempVar; + + // validate arguments + *var = NULL; + type = dpiOracleType__getFromNum(oracleTypeNum, error); + if (!type) + return DPI_FAILURE; + if (maxArraySize == 0) + return dpiError__set(error, "check max array size", + DPI_ERR_ARRAY_SIZE_ZERO); + if (isArray && !type->canBeInArray) + return dpiError__set(error, "check can be in array", + DPI_ERR_NOT_SUPPORTED); + if (oracleTypeNum == DPI_ORACLE_TYPE_BOOLEAN && + dpiUtils__checkClientVersion(conn->env->versionInfo, 12, 1, + error) < 0) + return DPI_FAILURE; + if (nativeTypeNum != type->defaultNativeTypeNum) { + if (dpiVar__validateTypes(type, nativeTypeNum, error) < 0) + return DPI_FAILURE; + } + + // calculate size in bytes + if (size == 0) + size = 1; + if (type->sizeInBytes) + sizeInBytes = type->sizeInBytes; + else if (sizeIsBytes || !type->isCharacterData) + sizeInBytes = size; + else if (type->charsetForm == DPI_SQLCS_IMPLICIT) + sizeInBytes = size * conn->env->maxBytesPerCharacter; + else sizeInBytes = size * conn->env->nmaxBytesPerCharacter; + + // allocate memory for variable type + if (dpiGen__allocate(DPI_HTYPE_VAR, conn->env, (void**) &tempVar, + error) < 0) + return DPI_FAILURE; + + // basic initialization + tempVar->buffer.maxArraySize = maxArraySize; + if (!isArray) + tempVar->buffer.actualArraySize = maxArraySize; + tempVar->sizeInBytes = sizeInBytes; + if (sizeInBytes > DPI_MAX_BASIC_BUFFER_SIZE) { + tempVar->sizeInBytes = 0; + tempVar->isDynamic = 1; + tempVar->requiresPreFetch = 1; + } + tempVar->type = type; + tempVar->nativeTypeNum = nativeTypeNum; + tempVar->isArray = isArray; + dpiGen__setRefCount(conn, error, 1); + tempVar->conn = conn; + if (objType) { + if (dpiGen__checkHandle(objType, DPI_HTYPE_OBJECT_TYPE, + "check object type", error) < 0) { + dpiVar__free(tempVar, error); + return DPI_FAILURE; + } + dpiGen__setRefCount(objType, error, 1); + tempVar->objectType = objType; + } + + // allocate the data for the variable + if (dpiVar__initBuffer(tempVar, &tempVar->buffer, error) < 0) { + dpiVar__free(tempVar, error); + return DPI_FAILURE; + } + + *var = tempVar; + *data = tempVar->buffer.externalData; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__allocateChunks() [INTERNAL] +// Allocate more chunks for handling dynamic bytes. +//----------------------------------------------------------------------------- +static int dpiVar__allocateChunks(dpiDynamicBytes *dynBytes, dpiError *error) +{ + dpiDynamicBytesChunk *chunks; + uint32_t allocatedChunks; + + allocatedChunks = dynBytes->allocatedChunks + 8; + if (dpiUtils__allocateMemory(allocatedChunks, sizeof(dpiDynamicBytesChunk), + 1, "allocate chunks", (void**) &chunks, error) < 0) + return DPI_FAILURE; + if (dynBytes->chunks) { + memcpy(chunks, dynBytes->chunks, + dynBytes->numChunks * sizeof(dpiDynamicBytesChunk)); + dpiUtils__freeMemory(dynBytes->chunks); + } + dynBytes->chunks = chunks; + dynBytes->allocatedChunks = allocatedChunks; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__allocateDynamicBytes() [INTERNAL] +// Allocate space in the dynamic bytes structure for the specified number of +// bytes. When complete, there will be exactly one allocated chunk of the +// specified size or greater in the dynamic bytes structure. +//----------------------------------------------------------------------------- +static int dpiVar__allocateDynamicBytes(dpiDynamicBytes *dynBytes, + uint32_t size, dpiError *error) +{ + // if an error occurs, none of the original space is valid + dynBytes->numChunks = 0; + + // if there are no chunks at all, make sure some exist + if (dynBytes->allocatedChunks == 0 && + dpiVar__allocateChunks(dynBytes, error) < 0) + return DPI_FAILURE; + + // at this point there should be 0 or 1 chunks as any retrieval that + // resulted in multiple chunks would have been consolidated already + // make sure that chunk has enough space in it + if (size > dynBytes->chunks->allocatedLength) { + if (dynBytes->chunks->ptr) + dpiUtils__freeMemory(dynBytes->chunks->ptr); + dynBytes->chunks->allocatedLength = + (size + DPI_DYNAMIC_BYTES_CHUNK_SIZE - 1) & + ~(DPI_DYNAMIC_BYTES_CHUNK_SIZE - 1); + if (dpiUtils__allocateMemory(1, dynBytes->chunks->allocatedLength, 0, + "allocate chunk", (void**) &dynBytes->chunks->ptr, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__assignCallbackBuffer() [INTERNAL] +// Assign callback pointers during OCI statement execution. This is used with +// the callack functions used for dynamic binding during DML returning +// statement execution. +//----------------------------------------------------------------------------- +static void dpiVar__assignCallbackBuffer(dpiVar *var, dpiVarBuffer *buffer, + uint32_t index, void **bufpp) +{ + switch (var->type->oracleTypeNum) { + case DPI_ORACLE_TYPE_TIMESTAMP: + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + *bufpp = buffer->data.asTimestamp[index]; + break; + case DPI_ORACLE_TYPE_INTERVAL_DS: + case DPI_ORACLE_TYPE_INTERVAL_YM: + *bufpp = buffer->data.asInterval[index]; + break; + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_NCLOB: + case DPI_ORACLE_TYPE_BFILE: + *bufpp = buffer->data.asLobLocator[index]; + break; + case DPI_ORACLE_TYPE_ROWID: + *bufpp = buffer->data.asRowid[index]; + break; + case DPI_ORACLE_TYPE_STMT: + *bufpp = buffer->data.asStmt[index]; + break; + default: + *bufpp = buffer->data.asBytes + index * var->sizeInBytes; + break; + } +} + + +//----------------------------------------------------------------------------- +// dpiVar__checkArraySize() [INTERNAL] +// Verifies that the array size has not been exceeded. +//----------------------------------------------------------------------------- +static int dpiVar__checkArraySize(dpiVar *var, uint32_t pos, + const char *fnName, dpiError *error) +{ + if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, fnName, error) < 0) + return DPI_FAILURE; + if (pos >= var->buffer.maxArraySize) + return dpiError__set(error, "check array size", + DPI_ERR_INVALID_ARRAY_POSITION, pos, + var->buffer.maxArraySize); + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__convertToLob() [INTERNAL] +// Convert the variable from using dynamic bytes for a long string to using a +// LOB instead. This is needed for PL/SQL which cannot handle more than 32K +// without the use of a LOB. +//----------------------------------------------------------------------------- +int dpiVar__convertToLob(dpiVar *var, dpiError *error) +{ + dpiDynamicBytes *dynBytes; + dpiLob *lob; + uint32_t i; + + // change type based on the original Oracle type + if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_RAW || + var->type->oracleTypeNum == DPI_ORACLE_TYPE_LONG_RAW) + var->type = dpiOracleType__getFromNum(DPI_ORACLE_TYPE_BLOB, error); + else if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_NCHAR) + var->type = dpiOracleType__getFromNum(DPI_ORACLE_TYPE_NCLOB, + error); + else var->type = dpiOracleType__getFromNum(DPI_ORACLE_TYPE_CLOB, + error); + + // adjust attributes and re-initialize buffers + // the dynamic bytes structures will not be removed + var->sizeInBytes = var->type->sizeInBytes; + var->isDynamic = 0; + if (dpiVar__initBuffer(var, &var->buffer, error) < 0) + return DPI_FAILURE; + + // copy any values already set + for (i = 0; i < var->buffer.maxArraySize; i++) { + dynBytes = &var->buffer.dynamicBytes[i]; + lob = var->buffer.references[i].asLOB; + if (dynBytes->numChunks == 0) + continue; + if (dpiLob__setFromBytes(lob, dynBytes->chunks->ptr, + dynBytes->chunks->length, error) < 0) + return DPI_FAILURE; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__copyData() [INTERNAL] +// Copy the data from the source to the target variable at the given array +// position. +//----------------------------------------------------------------------------- +int dpiVar__copyData(dpiVar *var, uint32_t pos, dpiData *sourceData, + dpiError *error) +{ + dpiData *targetData = &var->buffer.externalData[pos]; + + // handle null case + targetData->isNull = sourceData->isNull; + if (sourceData->isNull) + return DPI_SUCCESS; + + // handle copying of value from source to target + switch (var->nativeTypeNum) { + case DPI_NATIVE_TYPE_BYTES: + return dpiVar__setFromBytes(var, pos, + sourceData->value.asBytes.ptr, + sourceData->value.asBytes.length, error); + case DPI_NATIVE_TYPE_LOB: + return dpiVar__setFromLob(var, pos, sourceData->value.asLOB, + error); + case DPI_NATIVE_TYPE_OBJECT: + return dpiVar__setFromObject(var, pos, sourceData->value.asObject, + error); + case DPI_NATIVE_TYPE_STMT: + return dpiVar__setFromStmt(var, pos, sourceData->value.asStmt, + error); + case DPI_NATIVE_TYPE_ROWID: + return dpiVar__setFromRowid(var, pos, sourceData->value.asRowid, + error); + default: + memcpy(targetData, sourceData, sizeof(dpiData)); + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__defineCallback() [INTERNAL] +// Callback which runs during OCI statement execution and allocates the +// buffers required as well as provides that information to the OCI. This is +// intended for handling string and raw columns for which the size is unknown. +// These include LONG, LONG RAW and retrieving CLOB and BLOB as bytes, rather +// than use the LOB API. +//----------------------------------------------------------------------------- +int32_t dpiVar__defineCallback(dpiVar *var, UNUSED void *defnp, uint32_t iter, + void **bufpp, uint32_t **alenpp, UNUSED uint8_t *piecep, void **indpp, + uint16_t **rcodepp) +{ + dpiDynamicBytesChunk *chunk; + dpiDynamicBytes *bytes; + + // allocate more chunks, if necessary + bytes = &var->buffer.dynamicBytes[iter]; + if (bytes->numChunks == bytes->allocatedChunks && + dpiVar__allocateChunks(bytes, var->error) < 0) + return DPI_OCI_ERROR; + + // allocate memory for the chunk, if needed + chunk = &bytes->chunks[bytes->numChunks]; + if (!chunk->ptr) { + chunk->allocatedLength = DPI_DYNAMIC_BYTES_CHUNK_SIZE; + if (dpiUtils__allocateMemory(1, chunk->allocatedLength, 0, + "allocate chunk", (void**) &chunk->ptr, var->error) < 0) + return DPI_OCI_ERROR; + } + + // return chunk to OCI + bytes->numChunks++; + chunk->length = chunk->allocatedLength; + *bufpp = chunk->ptr; + *alenpp = &chunk->length; + *indpp = &(var->buffer.indicator[iter]); + *rcodepp = NULL; + return DPI_OCI_CONTINUE; +} + + +//----------------------------------------------------------------------------- +// dpiVar__extendedPreFetch() [INTERNAL] +// Perform any necessary actions prior to fetching data. +//----------------------------------------------------------------------------- +int dpiVar__extendedPreFetch(dpiVar *var, dpiVarBuffer *buffer, + dpiError *error) +{ + dpiRowid *rowid; + dpiData *data; + dpiStmt *stmt; + dpiLob *lob; + uint32_t i; + + if (var->isDynamic) { + for (i = 0; i < buffer->maxArraySize; i++) + buffer->dynamicBytes[i].numChunks = 0; + return DPI_SUCCESS; + } + + switch (var->type->oracleTypeNum) { + case DPI_ORACLE_TYPE_STMT: + for (i = 0; i < buffer->maxArraySize; i++) { + data = &buffer->externalData[i]; + if (buffer->references[i].asStmt) { + dpiGen__setRefCount(buffer->references[i].asStmt, + error, -1); + buffer->references[i].asStmt = NULL; + } + buffer->data.asStmt[i] = NULL; + data->value.asStmt = NULL; + if (dpiStmt__allocate(var->conn, 0, &stmt, error) < 0) + return DPI_FAILURE; + if (dpiOci__handleAlloc(var->env->handle, &stmt->handle, + DPI_OCI_HTYPE_STMT, "allocate statement", error) < 0) { + dpiStmt__free(stmt, error); + return DPI_FAILURE; + } + if (dpiHandleList__addHandle(var->conn->openStmts, stmt, + &stmt->openSlotNum, error) < 0) { + dpiOci__handleFree(stmt->handle, DPI_OCI_HTYPE_STMT); + stmt->handle = NULL; + dpiStmt__free(stmt, error); + return DPI_FAILURE; + } + buffer->references[i].asStmt = stmt; + stmt->isOwned = 1; + buffer->data.asStmt[i] = stmt->handle; + data->value.asStmt = stmt; + } + break; + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_NCLOB: + case DPI_ORACLE_TYPE_BFILE: + for (i = 0; i < buffer->maxArraySize; i++) { + data = &buffer->externalData[i]; + if (buffer->references[i].asLOB) { + dpiGen__setRefCount(buffer->references[i].asLOB, + error, -1); + buffer->references[i].asLOB = NULL; + } + buffer->data.asLobLocator[i] = NULL; + data->value.asLOB = NULL; + if (dpiLob__allocate(var->conn, var->type, &lob, error) < 0) + return DPI_FAILURE; + buffer->references[i].asLOB = lob; + buffer->data.asLobLocator[i] = lob->locator; + data->value.asLOB = lob; + if (buffer->dynamicBytes && + dpiOci__lobCreateTemporary(lob, error) < 0) + return DPI_FAILURE; + } + break; + case DPI_ORACLE_TYPE_ROWID: + for (i = 0; i < buffer->maxArraySize; i++) { + data = &buffer->externalData[i]; + if (buffer->references[i].asRowid) { + dpiGen__setRefCount(buffer->references[i].asRowid, + error, -1); + buffer->references[i].asRowid = NULL; + } + buffer->data.asRowid[i] = NULL; + data->value.asRowid = NULL; + if (dpiRowid__allocate(var->conn, &rowid, error) < 0) + return DPI_FAILURE; + buffer->references[i].asRowid = rowid; + buffer->data.asRowid[i] = rowid->handle; + data->value.asRowid = rowid; + } + break; + case DPI_ORACLE_TYPE_OBJECT: + for (i = 0; i < buffer->maxArraySize; i++) { + data = &buffer->externalData[i]; + if (buffer->references[i].asObject) { + dpiGen__setRefCount(buffer->references[i].asObject, + error, -1); + buffer->references[i].asObject = NULL; + } + buffer->data.asObject[i] = NULL; + buffer->objectIndicator[i] = NULL; + data->value.asObject = NULL; + } + break; + default: + break; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__finalizeBuffer() [INTERNAL] +// Finalize buffer used for passing data to/from Oracle. +//----------------------------------------------------------------------------- +static void dpiVar__finalizeBuffer(dpiVar *var, dpiVarBuffer *buffer, + dpiError *error) +{ + dpiDynamicBytes *dynBytes; + uint32_t i, j; + + // free any descriptors that were created + switch (var->type->oracleTypeNum) { + case DPI_ORACLE_TYPE_TIMESTAMP: + dpiOci__arrayDescriptorFree(&buffer->data.asTimestamp[0], + DPI_OCI_DTYPE_TIMESTAMP); + break; + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + dpiOci__arrayDescriptorFree(&buffer->data.asTimestamp[0], + DPI_OCI_DTYPE_TIMESTAMP_TZ); + break; + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + dpiOci__arrayDescriptorFree(&buffer->data.asTimestamp[0], + DPI_OCI_DTYPE_TIMESTAMP_LTZ); + break; + case DPI_ORACLE_TYPE_INTERVAL_DS: + dpiOci__arrayDescriptorFree(&buffer->data.asInterval[0], + DPI_OCI_DTYPE_INTERVAL_DS); + break; + case DPI_ORACLE_TYPE_INTERVAL_YM: + dpiOci__arrayDescriptorFree(&buffer->data.asInterval[0], + DPI_OCI_DTYPE_INTERVAL_YM); + break; + default: + break; + } + + // release any references that were created + if (buffer->references) { + for (i = 0; i < buffer->maxArraySize; i++) { + if (buffer->references[i].asHandle) { + dpiGen__setRefCount(buffer->references[i].asHandle, error, -1); + buffer->references[i].asHandle = NULL; + } + } + dpiUtils__freeMemory(buffer->references); + buffer->references = NULL; + } + + // free any dynamic buffers + if (buffer->dynamicBytes) { + for (i = 0; i < buffer->maxArraySize; i++) { + dynBytes = &buffer->dynamicBytes[i]; + if (dynBytes->allocatedChunks > 0) { + for (j = 0; j < dynBytes->allocatedChunks; j++) { + if (dynBytes->chunks[j].ptr) { + dpiUtils__freeMemory(dynBytes->chunks[j].ptr); + dynBytes->chunks[j].ptr = NULL; + } + } + dpiUtils__freeMemory(dynBytes->chunks); + dynBytes->allocatedChunks = 0; + dynBytes->chunks = NULL; + } + } + dpiUtils__freeMemory(buffer->dynamicBytes); + buffer->dynamicBytes = NULL; + } + + // free other memory allocated + if (buffer->indicator) { + dpiUtils__freeMemory(buffer->indicator); + buffer->indicator = NULL; + } + if (buffer->returnCode) { + dpiUtils__freeMemory(buffer->returnCode); + buffer->returnCode = NULL; + } + if (buffer->actualLength16) { + dpiUtils__freeMemory(buffer->actualLength16); + buffer->actualLength16 = NULL; + } + if (buffer->actualLength32) { + dpiUtils__freeMemory(buffer->actualLength32); + buffer->actualLength32 = NULL; + } + if (buffer->externalData) { + dpiUtils__freeMemory(buffer->externalData); + buffer->externalData = NULL; + } + if (buffer->data.asRaw) { + dpiUtils__freeMemory(buffer->data.asRaw); + buffer->data.asRaw = NULL; + } + if (buffer->objectIndicator) { + dpiUtils__freeMemory(buffer->objectIndicator); + buffer->objectIndicator = NULL; + } + if (buffer->tempBuffer) { + dpiUtils__freeMemory(buffer->tempBuffer); + buffer->tempBuffer = NULL; + } +} + + +//----------------------------------------------------------------------------- +// dpiVar__free() [INTERNAL] +// Free the memory associated with the variable. +//----------------------------------------------------------------------------- +void dpiVar__free(dpiVar *var, dpiError *error) +{ + uint32_t i; + + dpiVar__finalizeBuffer(var, &var->buffer, error); + if (var->dynBindBuffers) { + for (i = 0; i < var->buffer.maxArraySize; i++) + dpiVar__finalizeBuffer(var, &var->dynBindBuffers[i], error); + dpiUtils__freeMemory(var->dynBindBuffers); + var->dynBindBuffers = NULL; + } + if (var->objectType) { + dpiGen__setRefCount(var->objectType, error, -1); + var->objectType = NULL; + } + if (var->conn) { + dpiGen__setRefCount(var->conn, error, -1); + var->conn = NULL; + } + dpiUtils__freeMemory(var); +} + + +//----------------------------------------------------------------------------- +// dpiVar__getValue() [PRIVATE] +// Returns the contents of the variable in the type specified, if possible. +//----------------------------------------------------------------------------- +int dpiVar__getValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, + int inFetch, dpiError *error) +{ + dpiOracleTypeNum oracleTypeNum; + dpiBytes *bytes; + dpiData *data; + uint32_t i; + + // check for dynamic binds first; if they exist, process them instead + if (var->dynBindBuffers && buffer == &var->buffer) { + buffer = &var->dynBindBuffers[pos]; + for (i = 0; i < buffer->maxArraySize; i++) { + if (dpiVar__getValue(var, buffer, i, inFetch, error) < 0) + return DPI_FAILURE; + } + return DPI_SUCCESS; + } + + // check for a NULL value; for objects the indicator is elsewhere + data = &buffer->externalData[pos]; + if (!buffer->objectIndicator) + data->isNull = (buffer->indicator[pos] == DPI_OCI_IND_NULL); + else if (buffer->objectIndicator[pos]) + data->isNull = (*((int16_t*) buffer->objectIndicator[pos]) == + DPI_OCI_IND_NULL); + else data->isNull = 1; + if (data->isNull) { + if (inFetch && var->objectType && var->objectType->isCollection) { + if (dpiOci__objectFree(var->env->handle, + buffer->data.asObject[pos], 1, error) < 0) + return DPI_FAILURE; + if (dpiOci__objectFree(var->env->handle, + buffer->objectIndicator[pos], 1, error) < 0) + return DPI_FAILURE; + } + return DPI_SUCCESS; + } + + // check return code for variable length data + if (buffer->returnCode) { + if (buffer->returnCode[pos] != 0) { + dpiError__set(error, "check return code", DPI_ERR_COLUMN_FETCH, + pos, buffer->returnCode[pos]); + error->buffer->code = buffer->returnCode[pos]; + return DPI_FAILURE; + } + } + + // for 11g, dynamic lengths are 32-bit whereas static lengths are 16-bit + if (buffer->actualLength16 && buffer->actualLength32) + buffer->actualLength16[pos] = (uint16_t) buffer->actualLength32[pos]; + + // transform the various types + oracleTypeNum = var->type->oracleTypeNum; + switch (var->nativeTypeNum) { + case DPI_NATIVE_TYPE_INT64: + case DPI_NATIVE_TYPE_UINT64: + switch (oracleTypeNum) { + case DPI_ORACLE_TYPE_NATIVE_INT: + data->value.asInt64 = buffer->data.asInt64[pos]; + return DPI_SUCCESS; + case DPI_ORACLE_TYPE_NATIVE_UINT: + data->value.asUint64 = buffer->data.asUint64[pos]; + return DPI_SUCCESS; + case DPI_ORACLE_TYPE_NUMBER: + if (var->nativeTypeNum == DPI_NATIVE_TYPE_INT64) + return dpiDataBuffer__fromOracleNumberAsInteger( + &data->value, error, + &buffer->data.asNumber[pos]); + return dpiDataBuffer__fromOracleNumberAsUnsignedInteger( + &data->value, error, &buffer->data.asNumber[pos]); + default: + break; + } + break; + case DPI_NATIVE_TYPE_DOUBLE: + switch (oracleTypeNum) { + case DPI_ORACLE_TYPE_NUMBER: + return dpiDataBuffer__fromOracleNumberAsDouble( + &data->value, error, &buffer->data.asNumber[pos]); + case DPI_ORACLE_TYPE_NATIVE_DOUBLE: + data->value.asDouble = buffer->data.asDouble[pos]; + return DPI_SUCCESS; + case DPI_ORACLE_TYPE_TIMESTAMP: + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + return dpiDataBuffer__fromOracleTimestampAsDouble( + &data->value, var->env, error, + buffer->data.asTimestamp[pos]); + default: + break; + } + break; + case DPI_NATIVE_TYPE_BYTES: + bytes = &data->value.asBytes; + switch (oracleTypeNum) { + case DPI_ORACLE_TYPE_VARCHAR: + case DPI_ORACLE_TYPE_NVARCHAR: + case DPI_ORACLE_TYPE_CHAR: + case DPI_ORACLE_TYPE_NCHAR: + case DPI_ORACLE_TYPE_ROWID: + case DPI_ORACLE_TYPE_RAW: + case DPI_ORACLE_TYPE_LONG_VARCHAR: + case DPI_ORACLE_TYPE_LONG_RAW: + if (buffer->dynamicBytes) + return dpiVar__setBytesFromDynamicBytes(bytes, + &buffer->dynamicBytes[pos], error); + if (buffer->actualLength16) + bytes->length = buffer->actualLength16[pos]; + else bytes->length = buffer->actualLength32[pos]; + return DPI_SUCCESS; + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_NCLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_BFILE: + return dpiVar__setBytesFromLob(bytes, + &buffer->dynamicBytes[pos], + buffer->references[pos].asLOB, error); + case DPI_ORACLE_TYPE_NUMBER: + bytes->length = DPI_NUMBER_AS_TEXT_CHARS; + if (var->env->charsetId == DPI_CHARSET_ID_UTF16) + bytes->length *= 2; + return dpiDataBuffer__fromOracleNumberAsText(&data->value, + var->env, error, &buffer->data.asNumber[pos]); + default: + break; + } + break; + case DPI_NATIVE_TYPE_FLOAT: + data->value.asFloat = buffer->data.asFloat[pos]; + break; + case DPI_NATIVE_TYPE_TIMESTAMP: + if (oracleTypeNum == DPI_ORACLE_TYPE_DATE) + return dpiDataBuffer__fromOracleDate(&data->value, + &buffer->data.asDate[pos]); + return dpiDataBuffer__fromOracleTimestamp(&data->value, var->env, + error, buffer->data.asTimestamp[pos], + oracleTypeNum != DPI_ORACLE_TYPE_TIMESTAMP); + break; + case DPI_NATIVE_TYPE_INTERVAL_DS: + return dpiDataBuffer__fromOracleIntervalDS(&data->value, var->env, + error, buffer->data.asInterval[pos]); + case DPI_NATIVE_TYPE_INTERVAL_YM: + return dpiDataBuffer__fromOracleIntervalYM(&data->value, var->env, + error, buffer->data.asInterval[pos]); + case DPI_NATIVE_TYPE_OBJECT: + data->value.asObject = NULL; + if (!buffer->references[pos].asObject) { + if (dpiObject__allocate(var->objectType, + buffer->data.asObject[pos], + buffer->objectIndicator[pos], NULL, + &buffer->references[pos].asObject, error) < 0) + return DPI_FAILURE; + if (inFetch && var->objectType->isCollection) + buffer->references[pos].asObject->freeIndicator = 1; + } + data->value.asObject = buffer->references[pos].asObject; + break; + case DPI_NATIVE_TYPE_STMT: + data->value.asStmt = buffer->references[pos].asStmt; + break; + case DPI_NATIVE_TYPE_BOOLEAN: + data->value.asBoolean = buffer->data.asBoolean[pos]; + break; + default: + break; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__inBindCallback() [INTERNAL] +// Callback which runs during OCI statement execution and provides buffers to +// OCI for binding data IN. This is not used with DML returning so this method +// does nothing useful except satisfy OCI requirements. +//----------------------------------------------------------------------------- +int32_t dpiVar__inBindCallback(dpiVar *var, UNUSED void *bindp, + UNUSED uint32_t iter, UNUSED uint32_t index, void **bufpp, + uint32_t *alenp, uint8_t *piecep, void **indpp) +{ + dpiDynamicBytes *dynBytes; + + if (var->isDynamic) { + dynBytes = &var->buffer.dynamicBytes[iter]; + if (dynBytes->allocatedChunks == 0) { + *bufpp = NULL; + *alenp = 0; + } else { + *bufpp = dynBytes->chunks->ptr; + *alenp = dynBytes->chunks->length; + } + } else { + dpiVar__assignCallbackBuffer(var, &var->buffer, iter, bufpp); + if (var->buffer.actualLength16) + *alenp = var->buffer.actualLength16[iter]; + else if (var->buffer.actualLength32) + *alenp = var->buffer.actualLength32[iter]; + else *alenp = var->type->sizeInBytes; + } + *piecep = DPI_OCI_ONE_PIECE; + if (var->buffer.objectIndicator) + *indpp = var->buffer.objectIndicator[iter]; + else *indpp = &var->buffer.indicator[iter]; + return DPI_OCI_CONTINUE; +} + + +//----------------------------------------------------------------------------- +// dpiVar__initBuffer() [INTERNAL] +// Initialize buffers necessary for passing data to/from Oracle. +//----------------------------------------------------------------------------- +static int dpiVar__initBuffer(dpiVar *var, dpiVarBuffer *buffer, + dpiError *error) +{ + uint32_t i, tempBufferSize = 0; + unsigned long long dataLength; + dpiBytes *bytes; + + // initialize dynamic buffers for dynamic variables + if (var->isDynamic) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, + sizeof(dpiDynamicBytes), 1, "allocate dynamic bytes", + (void**) &buffer->dynamicBytes, error) < 0) + return DPI_FAILURE; + + // for all other variables, validate length and allocate buffers + } else { + dataLength = (unsigned long long) buffer->maxArraySize * + (unsigned long long) var->sizeInBytes; + if (dataLength > INT_MAX) + return dpiError__set(error, "check max array size", + DPI_ERR_ARRAY_SIZE_TOO_BIG, buffer->maxArraySize); + if (dpiUtils__allocateMemory(1, (size_t) dataLength, 0, + "allocate buffer", (void**) &buffer->data.asRaw, error) < 0) + return DPI_FAILURE; + } + + // allocate the indicator for the variable + // ensure all values start out as null + if (!buffer->indicator) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(int16_t), 0, + "allocate indicator", (void**) &buffer->indicator, error) < 0) + return DPI_FAILURE; + for (i = 0; i < buffer->maxArraySize; i++) + buffer->indicator[i] = DPI_OCI_IND_NULL; + } + + // allocate the actual length buffers for all but dynamic bytes which are + // handled differently; ensure actual length starts out as maximum value + if (!var->isDynamic && !buffer->actualLength16 && + !buffer->actualLength32) { + if (var->env->versionInfo->versionNum < 12 && buffer == &var->buffer) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, + sizeof(uint16_t), 0, "allocate actual length", + (void**) &buffer->actualLength16, error) < 0) + return DPI_FAILURE; + for (i = 0; i < buffer->maxArraySize; i++) + buffer->actualLength16[i] = (uint16_t) var->sizeInBytes; + } else { + if (dpiUtils__allocateMemory(buffer->maxArraySize, + sizeof(uint32_t), 0, "allocate actual length", + (void**) &buffer->actualLength32, error) < 0) + return DPI_FAILURE; + for (i = 0; i < buffer->maxArraySize; i++) + buffer->actualLength32[i] = var->sizeInBytes; + } + } + + // for variable length data, also allocate the return code array + if (var->type->defaultNativeTypeNum == DPI_NATIVE_TYPE_BYTES && + !var->isDynamic && !buffer->returnCode) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(uint16_t), 0, + "allocate return code", (void**) &buffer->returnCode, + error) < 0) + return DPI_FAILURE; + } + + // for numbers transferred to/from Oracle as bytes, allocate an additional + // set of buffers + if (var->type->oracleTypeNum == DPI_ORACLE_TYPE_NUMBER && + var->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + tempBufferSize = DPI_NUMBER_AS_TEXT_CHARS; + if (var->env->charsetId == DPI_CHARSET_ID_UTF16) + tempBufferSize *= 2; + if (!buffer->tempBuffer) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, tempBufferSize, + 0, "allocate temp buffer", (void**) &buffer->tempBuffer, + error) < 0) + return DPI_FAILURE; + } + } + + // allocate the external data array, if needed + if (!buffer->externalData) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(dpiData), 1, + "allocate external data", (void**) &buffer->externalData, + error) < 0) + return DPI_FAILURE; + for (i = 0; i < buffer->maxArraySize; i++) + buffer->externalData[i].isNull = 1; + } + + // for bytes transfers, set encoding and pointers for small strings + if (var->nativeTypeNum == DPI_NATIVE_TYPE_BYTES) { + for (i = 0; i < buffer->maxArraySize; i++) { + bytes = &buffer->externalData[i].value.asBytes; + if (var->type->charsetForm == DPI_SQLCS_IMPLICIT) + bytes->encoding = var->env->encoding; + else bytes->encoding = var->env->nencoding; + if (buffer->tempBuffer) + bytes->ptr = buffer->tempBuffer + i * tempBufferSize; + else if (!var->isDynamic && !buffer->dynamicBytes) + bytes->ptr = buffer->data.asBytes + i * var->sizeInBytes; + } + } + + // create array of references, if applicable + if (var->type->requiresPreFetch && !var->isDynamic) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, + sizeof(dpiReferenceBuffer), 1, "allocate references", + (void**) &buffer->references, error) < 0) + return DPI_FAILURE; + } + + // perform variable specific initialization + switch (var->type->oracleTypeNum) { + case DPI_ORACLE_TYPE_TIMESTAMP: + return dpiOci__arrayDescriptorAlloc(var->env->handle, + &buffer->data.asTimestamp[0], DPI_OCI_DTYPE_TIMESTAMP, + buffer->maxArraySize, error); + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + return dpiOci__arrayDescriptorAlloc(var->env->handle, + &buffer->data.asTimestamp[0], DPI_OCI_DTYPE_TIMESTAMP_TZ, + buffer->maxArraySize, error); + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + return dpiOci__arrayDescriptorAlloc(var->env->handle, + &buffer->data.asTimestamp[0], DPI_OCI_DTYPE_TIMESTAMP_LTZ, + buffer->maxArraySize, error); + case DPI_ORACLE_TYPE_INTERVAL_DS: + return dpiOci__arrayDescriptorAlloc(var->env->handle, + &buffer->data.asInterval[0], DPI_OCI_DTYPE_INTERVAL_DS, + buffer->maxArraySize, error); + case DPI_ORACLE_TYPE_INTERVAL_YM: + return dpiOci__arrayDescriptorAlloc(var->env->handle, + &buffer->data.asInterval[0], DPI_OCI_DTYPE_INTERVAL_YM, + buffer->maxArraySize, error); + break; + case DPI_ORACLE_TYPE_CLOB: + case DPI_ORACLE_TYPE_BLOB: + case DPI_ORACLE_TYPE_NCLOB: + case DPI_ORACLE_TYPE_BFILE: + case DPI_ORACLE_TYPE_STMT: + case DPI_ORACLE_TYPE_ROWID: + return dpiVar__extendedPreFetch(var, buffer, error); + case DPI_ORACLE_TYPE_OBJECT: + if (!var->objectType) + return dpiError__set(error, "check object type", + DPI_ERR_NO_OBJECT_TYPE); + if (dpiUtils__allocateMemory(buffer->maxArraySize, sizeof(void*), + 0, "allocate object indicator", + (void**) &buffer->objectIndicator, error) < 0) + return DPI_FAILURE; + return dpiVar__extendedPreFetch(var, buffer, error); + default: + break; + } + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__outBindCallback() [INTERNAL] +// Callback which runs during OCI statement execution and allocates the +// buffers required as well as provides that information to the OCI. This is +// intended for use with DML returning only. +//----------------------------------------------------------------------------- +int32_t dpiVar__outBindCallback(dpiVar *var, void *bindp, UNUSED uint32_t iter, + uint32_t index, void **bufpp, uint32_t **alenpp, uint8_t *piecep, + void **indpp, uint16_t **rcodepp) +{ + dpiDynamicBytesChunk *chunk; + uint32_t numRowsReturned; + dpiDynamicBytes *bytes; + dpiVarBuffer *buffer; + + // determine which variable buffer to use + if (!var->dynBindBuffers) { + if (dpiUtils__allocateMemory(var->buffer.maxArraySize, + sizeof(dpiVarBuffer), 1, "allocate DML returning buffers", + (void**) &var->dynBindBuffers, var->error) < 0) + return DPI_FAILURE; + } + buffer = &var->dynBindBuffers[iter]; + + // special processing during first value returned for each iteration + if (index == 0) { + + // determine number of rows returned + if (dpiOci__attrGet(bindp, DPI_OCI_HTYPE_BIND, &numRowsReturned, 0, + DPI_OCI_ATTR_ROWS_RETURNED, "get rows returned", + var->error) < 0) + return DPI_OCI_ERROR; + + // reallocate buffers, if needed + if (numRowsReturned > buffer->maxArraySize) { + dpiVar__finalizeBuffer(var, buffer, var->error); + buffer->maxArraySize = numRowsReturned; + if (dpiVar__initBuffer(var, buffer, var->error) < 0) + return DPI_OCI_ERROR; + } + + // set actual array size to number of rows returned + buffer->actualArraySize = numRowsReturned; + + } + + // handle dynamically allocated strings (multiple piece) + // index is the current index into the chunks + if (var->isDynamic) { + + // allocate more chunks, if necessary + bytes = &buffer->dynamicBytes[index]; + if (*piecep == DPI_OCI_ONE_PIECE) + bytes->numChunks = 0; + if (bytes->numChunks == bytes->allocatedChunks && + dpiVar__allocateChunks(bytes, var->error) < 0) + return DPI_OCI_ERROR; + + // allocate memory for the chunk, if needed + chunk = &bytes->chunks[bytes->numChunks]; + if (!chunk->ptr) { + chunk->allocatedLength = DPI_DYNAMIC_BYTES_CHUNK_SIZE; + if (dpiUtils__allocateMemory(1, chunk->allocatedLength, 0, + "allocate chunk", (void**) &chunk->ptr, var->error) < 0) + return DPI_OCI_ERROR; + } + + // return chunk to OCI + bytes->numChunks++; + chunk->length = chunk->allocatedLength; + *bufpp = chunk->ptr; + *alenpp = &chunk->length; + *indpp = &(buffer->indicator[index]); + *rcodepp = NULL; + + // handle normally allocated variables (one piece) + } else { + + *piecep = DPI_OCI_ONE_PIECE; + if (dpiVar__setValue(var, buffer, index, &buffer->externalData[index], + var->error) < 0) + return DPI_OCI_ERROR; + dpiVar__assignCallbackBuffer(var, buffer, index, bufpp); + if (buffer->actualLength32 || buffer->actualLength16) { + if (!buffer->actualLength32) { + if (dpiUtils__allocateMemory(buffer->maxArraySize, + sizeof(uint32_t), 1, "allocate 11g lengths", + (void**) &buffer->actualLength32, var->error) < 0) + return DPI_OCI_ERROR; + } + buffer->actualLength32[index] = var->sizeInBytes; + *alenpp = &(buffer->actualLength32[index]); + } else if (*alenpp && var->type->sizeInBytes) + **alenpp = var->type->sizeInBytes; + if (buffer->objectIndicator) + *indpp = buffer->objectIndicator[index]; + else *indpp = &(buffer->indicator[index]); + if (buffer->returnCode) + *rcodepp = &buffer->returnCode[index]; + + } + + return DPI_OCI_CONTINUE; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setBytesFromDynamicBytes() [PRIVATE] +// Set the pointer and length in the dpiBytes structure to the values +// retrieved from the database. At this point, if multiple chunks exist, they +// are combined into one. +//----------------------------------------------------------------------------- +static int dpiVar__setBytesFromDynamicBytes(dpiBytes *bytes, + dpiDynamicBytes *dynBytes, dpiError *error) +{ + uint32_t i, totalAllocatedLength; + + // if only one chunk is available, make use of it + if (dynBytes->numChunks == 1) { + bytes->ptr = dynBytes->chunks->ptr; + bytes->length = dynBytes->chunks->length; + return DPI_SUCCESS; + } + + // determine total allocated size of all chunks + totalAllocatedLength = 0; + for (i = 0; i < dynBytes->numChunks; i++) + totalAllocatedLength += dynBytes->chunks[i].allocatedLength; + + // allocate new memory consolidating all of the chunks + if (dpiUtils__allocateMemory(1, totalAllocatedLength, 0, + "allocate consolidated chunk", (void**) &bytes->ptr, error) < 0) + return DPI_FAILURE; + + // copy memory from chunks to consolidated chunk + bytes->length = 0; + for (i = 0; i < dynBytes->numChunks; i++) { + memcpy(bytes->ptr + bytes->length, dynBytes->chunks[i].ptr, + dynBytes->chunks[i].length); + bytes->length += dynBytes->chunks[i].length; + dpiUtils__freeMemory(dynBytes->chunks[i].ptr); + dynBytes->chunks[i].ptr = NULL; + dynBytes->chunks[i].length = 0; + dynBytes->chunks[i].allocatedLength = 0; + } + + // populate first chunk with consolidated information + dynBytes->numChunks = 1; + dynBytes->chunks->ptr = bytes->ptr; + dynBytes->chunks->length = bytes->length; + dynBytes->chunks->allocatedLength = totalAllocatedLength; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setBytesFromLob() [PRIVATE] +// Populate the dynamic bytes structure with the data from the LOB and then +// populate the bytes structure. +//----------------------------------------------------------------------------- +static int dpiVar__setBytesFromLob(dpiBytes *bytes, dpiDynamicBytes *dynBytes, + dpiLob *lob, dpiError *error) +{ + uint64_t length, lengthInBytes, lengthReadInBytes; + + // determine length of LOB in bytes + if (dpiOci__lobGetLength2(lob, &length, error) < 0) + return DPI_FAILURE; + if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_CLOB) + lengthInBytes = length * lob->env->maxBytesPerCharacter; + else if (lob->type->oracleTypeNum == DPI_ORACLE_TYPE_NCLOB) + lengthInBytes = length * lob->env->nmaxBytesPerCharacter; + else lengthInBytes = length; + + // ensure there is enough space to store the entire LOB value + if (lengthInBytes > UINT_MAX) + return dpiError__set(error, "check max length", DPI_ERR_NOT_SUPPORTED); + if (dpiVar__allocateDynamicBytes(dynBytes, (uint32_t) lengthInBytes, + error) < 0) + return DPI_FAILURE; + + // read data from the LOB + lengthReadInBytes = lengthInBytes; + if (length > 0 && dpiLob__readBytes(lob, 1, length, dynBytes->chunks->ptr, + &lengthReadInBytes, error) < 0) + return DPI_FAILURE; + + dynBytes->chunks->length = (uint32_t) lengthReadInBytes; + bytes->ptr = dynBytes->chunks->ptr; + bytes->length = dynBytes->chunks->length; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setFromBytes() [PRIVATE] +// Set the value of the variable at the given array position from a byte +// string. The byte string is not retained in any way. A copy will be made into +// buffers allocated by ODPI-C. +//----------------------------------------------------------------------------- +static int dpiVar__setFromBytes(dpiVar *var, uint32_t pos, const char *value, + uint32_t valueLength, dpiError *error) +{ + dpiData *data = &var->buffer.externalData[pos]; + dpiDynamicBytes *dynBytes; + dpiBytes *bytes; + + // for internally used LOBs, write the data directly + if (var->buffer.references) { + data->isNull = 0; + return dpiLob__setFromBytes(var->buffer.references[pos].asLOB, value, + valueLength, error); + } + + // validate the target can accept the input + if ((var->buffer.tempBuffer && + var->env->charsetId == DPI_CHARSET_ID_UTF16 && + valueLength > DPI_NUMBER_AS_TEXT_CHARS * 2) || + (var->buffer.tempBuffer && + var->env->charsetId != DPI_CHARSET_ID_UTF16 && + valueLength > DPI_NUMBER_AS_TEXT_CHARS) || + (!var->buffer.dynamicBytes && !var->buffer.tempBuffer && + valueLength > var->sizeInBytes)) + return dpiError__set(error, "check source length", + DPI_ERR_BUFFER_SIZE_TOO_SMALL, var->sizeInBytes); + + // for dynamic bytes, allocate space as needed + bytes = &data->value.asBytes; + if (var->buffer.dynamicBytes) { + dynBytes = &var->buffer.dynamicBytes[pos]; + if (dpiVar__allocateDynamicBytes(dynBytes, valueLength, error) < 0) + return DPI_FAILURE; + if (valueLength > 0) + memcpy(dynBytes->chunks->ptr, value, valueLength); + dynBytes->numChunks = 1; + dynBytes->chunks->length = valueLength; + bytes->ptr = dynBytes->chunks->ptr; + bytes->length = valueLength; + + // for everything else, space has already been allocated + } else { + bytes->length = valueLength; + if (valueLength > 0) + memcpy(bytes->ptr, value, valueLength); + if (var->type->sizeInBytes == 0) { + if (var->buffer.actualLength32) + var->buffer.actualLength32[pos] = valueLength; + else if (var->buffer.actualLength16) + var->buffer.actualLength16[pos] = (uint16_t) valueLength; + } + if (var->buffer.returnCode) + var->buffer.returnCode[pos] = 0; + } + data->isNull = 0; + + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setFromLob() [PRIVATE] +// Set the value of the variable at the given array position from a LOB. +// A reference to the LOB is retained by the variable. +//----------------------------------------------------------------------------- +static int dpiVar__setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob, + dpiError *error) +{ + dpiData *data; + + // validate the LOB object + if (dpiGen__checkHandle(lob, DPI_HTYPE_LOB, "check LOB", error) < 0) + return DPI_FAILURE; + + // mark the value as not null + data = &var->buffer.externalData[pos]; + data->isNull = 0; + + // if values are the same, nothing to do + if (var->buffer.references[pos].asLOB == lob) + return DPI_SUCCESS; + + // clear original value, if needed + if (var->buffer.references[pos].asLOB) { + dpiGen__setRefCount(var->buffer.references[pos].asLOB, error, -1); + var->buffer.references[pos].asLOB = NULL; + } + + // add reference to passed object + dpiGen__setRefCount(lob, error, 1); + var->buffer.references[pos].asLOB = lob; + var->buffer.data.asLobLocator[pos] = lob->locator; + data->value.asLOB = lob; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setFromObject() [PRIVATE] +// Set the value of the variable at the given array position from an object. +// The variable and position are assumed to be valid at this point. A reference +// to the object is retained by the variable. +//----------------------------------------------------------------------------- +static int dpiVar__setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj, + dpiError *error) +{ + dpiData *data; + + // validate the object + if (dpiGen__checkHandle(obj, DPI_HTYPE_OBJECT, "check obj", error) < 0) + return DPI_FAILURE; + if (obj->type->tdo != var->objectType->tdo) + return dpiError__set(error, "check type", DPI_ERR_WRONG_TYPE, + obj->type->schemaLength, obj->type->schema, + obj->type->nameLength, obj->type->name, + var->objectType->schemaLength, var->objectType->schema, + var->objectType->nameLength, var->objectType->name); + + // mark the value as not null + data = &var->buffer.externalData[pos]; + data->isNull = 0; + + // if values are the same, nothing to do + if (var->buffer.references[pos].asObject == obj) + return DPI_SUCCESS; + + // clear original value, if needed + if (var->buffer.references[pos].asObject) { + dpiGen__setRefCount(var->buffer.references[pos].asObject, error, -1); + var->buffer.references[pos].asObject = NULL; + } + + // add reference to passed object + dpiGen__setRefCount(obj, error, 1); + var->buffer.references[pos].asObject = obj; + var->buffer.data.asObject[pos] = obj->instance; + var->buffer.objectIndicator[pos] = obj->indicator; + data->value.asObject = obj; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setFromRowid() [PRIVATE] +// Set the value of the variable at the given array position from a rowid. +// A reference to the rowid is retained by the variable. +//----------------------------------------------------------------------------- +static int dpiVar__setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid, + dpiError *error) +{ + dpiData *data; + + // validate the rowid + if (dpiGen__checkHandle(rowid, DPI_HTYPE_ROWID, "check rowid", error) < 0) + return DPI_FAILURE; + + // mark the value as not null + data = &var->buffer.externalData[pos]; + data->isNull = 0; + + // if values are the same, nothing to do + if (var->buffer.references[pos].asRowid == rowid) + return DPI_SUCCESS; + + // clear original value, if needed + if (var->buffer.references[pos].asRowid) { + dpiGen__setRefCount(var->buffer.references[pos].asRowid, error, -1); + var->buffer.references[pos].asRowid = NULL; + } + + // add reference to passed object + dpiGen__setRefCount(rowid, error, 1); + var->buffer.references[pos].asRowid = rowid; + var->buffer.data.asRowid[pos] = rowid->handle; + data->value.asRowid = rowid; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setFromStmt() [PRIVATE] +// Set the value of the variable at the given array position from a +// statement. A reference to the statement is retained by the variable. +//----------------------------------------------------------------------------- +static int dpiVar__setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt, + dpiError *error) +{ + dpiData *data; + uint32_t i; + + // validate the statement + if (dpiGen__checkHandle(stmt, DPI_HTYPE_STMT, "check stmt", error) < 0) + return DPI_FAILURE; + + // prevent attempts to bind a statement to itself + for (i = 0; i < stmt->numBindVars; i++) { + if (stmt->bindVars[i].var == var) + return dpiError__set(error, "bind to self", DPI_ERR_NOT_SUPPORTED); + } + + // mark the value as not null + data = &var->buffer.externalData[pos]; + data->isNull = 0; + + // if values are the same, nothing to do + if (var->buffer.references[pos].asStmt == stmt) + return DPI_SUCCESS; + + // clear original value, if needed + if (var->buffer.references[pos].asStmt) { + dpiGen__setRefCount(var->buffer.references[pos].asStmt, error, -1); + var->buffer.references[pos].asStmt = NULL; + } + + // add reference to passed object + dpiGen__setRefCount(stmt, error, 1); + var->buffer.references[pos].asStmt = stmt; + var->buffer.data.asStmt[pos] = stmt->handle; + data->value.asStmt = stmt; + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__setValue() [PRIVATE] +// Sets the contents of the variable using the type specified, if possible. +//----------------------------------------------------------------------------- +int dpiVar__setValue(dpiVar *var, dpiVarBuffer *buffer, uint32_t pos, + dpiData *data, dpiError *error) +{ + dpiOracleTypeNum oracleTypeNum; + dpiObject *obj; + + // if value is null, no need to proceed further + // however, when binding objects a value MUST be present or OCI will + // segfault! + if (data->isNull) { + buffer->indicator[pos] = DPI_OCI_IND_NULL; + if (buffer->objectIndicator && !buffer->data.asObject[pos]) { + if (dpiObject__allocate(var->objectType, NULL, NULL, NULL, &obj, + error) < 0) + return DPI_FAILURE; + buffer->references[pos].asObject = obj; + data->value.asObject = obj; + buffer->data.asObject[pos] = obj->instance; + buffer->objectIndicator[pos] = obj->indicator; + if (buffer->objectIndicator[pos]) + *((int16_t*) buffer->objectIndicator[pos]) = DPI_OCI_IND_NULL; + } + return DPI_SUCCESS; + } + + // transform the various types + buffer->indicator[pos] = DPI_OCI_IND_NOTNULL; + oracleTypeNum = var->type->oracleTypeNum; + switch (var->nativeTypeNum) { + case DPI_NATIVE_TYPE_INT64: + case DPI_NATIVE_TYPE_UINT64: + switch (oracleTypeNum) { + case DPI_ORACLE_TYPE_NATIVE_INT: + buffer->data.asInt64[pos] = data->value.asInt64; + return DPI_SUCCESS; + case DPI_ORACLE_TYPE_NATIVE_UINT: + buffer->data.asUint64[pos] = data->value.asUint64; + return DPI_SUCCESS; + case DPI_ORACLE_TYPE_NUMBER: + if (var->nativeTypeNum == DPI_NATIVE_TYPE_INT64) + return dpiDataBuffer__toOracleNumberFromInteger( + &data->value, error, + &buffer->data.asNumber[pos]); + return dpiDataBuffer__toOracleNumberFromUnsignedInteger( + &data->value, error, &buffer->data.asNumber[pos]); + default: + break; + } + break; + case DPI_NATIVE_TYPE_FLOAT: + buffer->data.asFloat[pos] = data->value.asFloat; + return DPI_SUCCESS; + case DPI_NATIVE_TYPE_DOUBLE: + switch (oracleTypeNum) { + case DPI_ORACLE_TYPE_NATIVE_DOUBLE: + buffer->data.asDouble[pos] = data->value.asDouble; + return DPI_SUCCESS; + case DPI_ORACLE_TYPE_NUMBER: + return dpiDataBuffer__toOracleNumberFromDouble( + &data->value, error, &buffer->data.asNumber[pos]); + case DPI_ORACLE_TYPE_DATE: + return dpiDataBuffer__toOracleDateFromDouble( + &data->value, var->env, error, + &buffer->data.asDate[pos]); + case DPI_ORACLE_TYPE_TIMESTAMP: + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + return dpiDataBuffer__toOracleTimestampFromDouble( + &data->value, var->env, error, + buffer->data.asTimestamp[pos]); + default: + break; + } + break; + case DPI_NATIVE_TYPE_BYTES: + if (oracleTypeNum == DPI_ORACLE_TYPE_NUMBER) + return dpiDataBuffer__toOracleNumberFromText(&data->value, + var->env, error, &buffer->data.asNumber[pos]); + if (buffer->actualLength32) + buffer->actualLength32[pos] = data->value.asBytes.length; + else if (buffer->actualLength16) + buffer->actualLength16[pos] = + (uint16_t) data->value.asBytes.length; + if (buffer->returnCode) + buffer->returnCode[pos] = 0; + break; + case DPI_NATIVE_TYPE_TIMESTAMP: + if (oracleTypeNum == DPI_ORACLE_TYPE_DATE) + return dpiDataBuffer__toOracleDate(&data->value, + &buffer->data.asDate[pos]); + else if (oracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP) + return dpiDataBuffer__toOracleTimestamp(&data->value, + var->env, error, buffer->data.asTimestamp[pos], 0); + else if (oracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP_TZ || + oracleTypeNum == DPI_ORACLE_TYPE_TIMESTAMP_LTZ) + return dpiDataBuffer__toOracleTimestamp(&data->value, + var->env, error, buffer->data.asTimestamp[pos], 1); + break; + case DPI_NATIVE_TYPE_INTERVAL_DS: + return dpiDataBuffer__toOracleIntervalDS(&data->value, var->env, + error, buffer->data.asInterval[pos]); + case DPI_NATIVE_TYPE_INTERVAL_YM: + return dpiDataBuffer__toOracleIntervalYM(&data->value, var->env, + error, buffer->data.asInterval[pos]); + case DPI_NATIVE_TYPE_BOOLEAN: + buffer->data.asBoolean[pos] = data->value.asBoolean; + return DPI_SUCCESS; + default: + break; + } + return DPI_SUCCESS; +} + + +//----------------------------------------------------------------------------- +// dpiVar__validateTypes() [PRIVATE] +// Validate that the Oracle type and the native type are compatible with +// each other when the native type is not already the default native type. +//----------------------------------------------------------------------------- +static int dpiVar__validateTypes(const dpiOracleType *oracleType, + dpiNativeTypeNum nativeTypeNum, dpiError *error) +{ + switch (oracleType->oracleTypeNum) { + case DPI_ORACLE_TYPE_DATE: + case DPI_ORACLE_TYPE_TIMESTAMP: + case DPI_ORACLE_TYPE_TIMESTAMP_TZ: + case DPI_ORACLE_TYPE_TIMESTAMP_LTZ: + if (nativeTypeNum == DPI_NATIVE_TYPE_DOUBLE) + return DPI_SUCCESS; + break; + case DPI_ORACLE_TYPE_NUMBER: + if (nativeTypeNum == DPI_NATIVE_TYPE_INT64 || + nativeTypeNum == DPI_NATIVE_TYPE_UINT64 || + nativeTypeNum == DPI_NATIVE_TYPE_BYTES) + return DPI_SUCCESS; + break; + default: + break; + } + return dpiError__set(error, "validate types", DPI_ERR_UNHANDLED_CONVERSION, + oracleType->oracleTypeNum, nativeTypeNum); +} + + +//----------------------------------------------------------------------------- +// dpiVar_addRef() [PUBLIC] +// Add a reference to the variable. +//----------------------------------------------------------------------------- +int dpiVar_addRef(dpiVar *var) +{ + return dpiGen__addRef(var, DPI_HTYPE_VAR, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiVar_copyData() [PUBLIC] +// Copy the data from the source variable to the target variable at the given +// array position. The variables must use the same native type. If the +// variables contain variable length data, the source length must not exceed +// the target allocated memory. +//----------------------------------------------------------------------------- +int dpiVar_copyData(dpiVar *var, uint32_t pos, dpiVar *sourceVar, + uint32_t sourcePos) +{ + dpiData *sourceData; + dpiError error; + int status; + + if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + if (dpiGen__checkHandle(sourceVar, DPI_HTYPE_VAR, "check source var", + &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + if (sourcePos >= sourceVar->buffer.maxArraySize) { + dpiError__set(&error, "check source size", + DPI_ERR_INVALID_ARRAY_POSITION, sourcePos, + sourceVar->buffer.maxArraySize); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + if (var->nativeTypeNum != sourceVar->nativeTypeNum) { + dpiError__set(&error, "check types match", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + sourceData = &sourceVar->buffer.externalData[sourcePos]; + status = dpiVar__copyData(var, pos, sourceData, &error); + return dpiGen__endPublicFn(var, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiVar_getNumElementsInArray() [PUBLIC] +// Return the actual number of elements in the array. This value is only +// relevant if the variable is bound as an array. +//----------------------------------------------------------------------------- +int dpiVar_getNumElementsInArray(dpiVar *var, uint32_t *numElements) +{ + dpiError error; + + if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(var, numElements) + if (var->dynBindBuffers) + *numElements = var->dynBindBuffers->actualArraySize; + else *numElements = var->buffer.actualArraySize; + return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); +} + +//----------------------------------------------------------------------------- +// dpiVar_getReturnedData() [PUBLIC] +// Return a pointer to the array of dpiData structures allocated for the +// given row that have been returned by a DML returning statement. The number +// of returned rows is also provided. If the bind variable had no data +// returned, the number of rows returned will be 0 and the pointer to the array +// of dpiData structures will be NULL. This will also be the case if the +// variable was only bound IN or was not bound to a DML returning statement. +// There is no way to differentiate between the two. +//----------------------------------------------------------------------------- +int dpiVar_getReturnedData(dpiVar *var, uint32_t pos, uint32_t *numElements, + dpiData **data) +{ + dpiError error; + + if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(var, numElements) + DPI_CHECK_PTR_NOT_NULL(var, data) + if (var->dynBindBuffers) { + *numElements = var->dynBindBuffers[pos].actualArraySize; + *data = var->dynBindBuffers[pos].externalData; + } else { + *numElements = 0; + *data = NULL; + } + return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); +} + + + +//----------------------------------------------------------------------------- +// dpiVar_getSizeInBytes() [PUBLIC] +// Returns the size in bytes of the buffer allocated for the variable. +//----------------------------------------------------------------------------- +int dpiVar_getSizeInBytes(dpiVar *var, uint32_t *sizeInBytes) +{ + dpiError error; + + if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + DPI_CHECK_PTR_NOT_NULL(var, sizeInBytes) + *sizeInBytes = var->sizeInBytes; + return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); +} + + +//----------------------------------------------------------------------------- +// dpiVar_release() [PUBLIC] +// Release a reference to the variable. +//----------------------------------------------------------------------------- +int dpiVar_release(dpiVar *var) +{ + return dpiGen__release(var, DPI_HTYPE_VAR, __func__); +} + + +//----------------------------------------------------------------------------- +// dpiVar_setFromBytes() [PUBLIC] +// Set the value of the variable at the given array position from a byte +// string. Checks on the array position, the size of the string and the type of +// variable will be made. The byte string is not retained in any way. A copy +// will be made into buffers allocated by ODPI-C. +//----------------------------------------------------------------------------- +int dpiVar_setFromBytes(dpiVar *var, uint32_t pos, const char *value, + uint32_t valueLength) +{ + dpiError error; + int status; + + if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + DPI_CHECK_PTR_AND_LENGTH(var, value) + if (var->nativeTypeNum != DPI_NATIVE_TYPE_BYTES && + var->nativeTypeNum != DPI_NATIVE_TYPE_LOB) { + dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + if (valueLength > DPI_MAX_VAR_BUFFER_SIZE) { + dpiError__set(&error, "check buffer", DPI_ERR_BUFFER_SIZE_TOO_LARGE, + valueLength, DPI_MAX_VAR_BUFFER_SIZE); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + status = dpiVar__setFromBytes(var, pos, value, valueLength, &error); + return dpiGen__endPublicFn(var, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiVar_setFromLob() [PUBLIC] +// Set the value of the variable at the given array position from a LOB. +// Checks on the array position and the validity of the passed handle. A +// reference to the LOB is retained by the variable. +//----------------------------------------------------------------------------- +int dpiVar_setFromLob(dpiVar *var, uint32_t pos, dpiLob *lob) +{ + dpiError error; + int status; + + if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + if (var->nativeTypeNum != DPI_NATIVE_TYPE_LOB) { + dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + status = dpiVar__setFromLob(var, pos, lob, &error); + return dpiGen__endPublicFn(var, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiVar_setFromObject() [PUBLIC] +// Set the value of the variable at the given array position from an object. +// Checks on the array position and the validity of the passed handle. A +// reference to the object is retained by the variable. +//----------------------------------------------------------------------------- +int dpiVar_setFromObject(dpiVar *var, uint32_t pos, dpiObject *obj) +{ + dpiError error; + int status; + + if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + if (var->nativeTypeNum != DPI_NATIVE_TYPE_OBJECT) { + dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + status = dpiVar__setFromObject(var, pos, obj, &error); + return dpiGen__endPublicFn(var, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiVar_setFromRowid() [PUBLIC] +// Set the value of the variable at the given array position from a rowid. +// Checks on the array position and the validity of the passed handle. A +// reference to the rowid is retained by the variable. +//----------------------------------------------------------------------------- +int dpiVar_setFromRowid(dpiVar *var, uint32_t pos, dpiRowid *rowid) +{ + dpiError error; + int status; + + if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + if (var->nativeTypeNum != DPI_NATIVE_TYPE_ROWID) { + dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + status = dpiVar__setFromRowid(var, pos, rowid, &error); + return dpiGen__endPublicFn(var, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiVar_setFromStmt() [PUBLIC] +// Set the value of the variable at the given array position from a +// statement. Checks on the array position and the validity of the passed +// handle. A reference to the statement is retained by the variable. +//----------------------------------------------------------------------------- +int dpiVar_setFromStmt(dpiVar *var, uint32_t pos, dpiStmt *stmt) +{ + dpiError error; + int status; + + if (dpiVar__checkArraySize(var, pos, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + if (var->nativeTypeNum != DPI_NATIVE_TYPE_STMT) { + dpiError__set(&error, "native type", DPI_ERR_NOT_SUPPORTED); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + status = dpiVar__setFromStmt(var, pos, stmt, &error); + return dpiGen__endPublicFn(var, status, &error); +} + + +//----------------------------------------------------------------------------- +// dpiVar_setNumElementsInArray() [PUBLIC] +// Set the number of elements in the array (different from the number of +// allocated elements). +//----------------------------------------------------------------------------- +int dpiVar_setNumElementsInArray(dpiVar *var, uint32_t numElements) +{ + dpiError error; + + if (dpiGen__startPublicFn(var, DPI_HTYPE_VAR, __func__, &error) < 0) + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + if (numElements > var->buffer.maxArraySize) { + dpiError__set(&error, "check num elements", + DPI_ERR_ARRAY_SIZE_TOO_SMALL, var->buffer.maxArraySize); + return dpiGen__endPublicFn(var, DPI_FAILURE, &error); + } + var->buffer.actualArraySize = numElements; + return dpiGen__endPublicFn(var, DPI_SUCCESS, &error); +} diff --git a/vendor/github.com/tsg/go-daemon/src/god.c b/vendor/github.com/tsg/go-daemon/src/god.c new file mode 100644 index 00000000000..7f63e081efd --- /dev/null +++ b/vendor/github.com/tsg/go-daemon/src/god.c @@ -0,0 +1,313 @@ +// Copyright 2013-2014 Alexandre Fiori +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +void usage() { + printf( + "Use: god [options] [--] program [arguments]\n" + "Options:\n" + "-h --help show this help and exit\n" + "-v --version show version and exit\n" + "-f --foreground run in foreground\n" + "-n --nohup make the program immune to SIGHUP\n" + "-l --logfile FILE write the program's stdout and stderr to FILE\n" + "-p --pidfile FILE write pid to FILE\n" + "-r --rundir DIR switch to DIR before executing the program\n" + "-u --user USER switch to USER before executing the program\n" + "-g --group GROUP switch to GROUP before executing the program\n" + "\nThe program's output go to a blackhole if no logfile is set.\n" + "Log files are recycled on SIGHUP.\n" + ); + exit(1); +} + +static int nohup = 0; +static int logfd[2]; // pipe +static pid_t childpid = 0; +static FILE *logfp = NULL; +static FILE *pidfp = NULL; +static char logfile[PATH_MAX]; +static char pidfile[PATH_MAX]; +static char linebuf[1024]; +static struct passwd *pwd = NULL; +static struct group *grp = NULL; +static pthread_mutex_t logger_mutex; + +void daemon_main(int optind, char **argv); +void *logger_thread(void *cmdname); +void sighup(int signum); +void sigfwd(int signum); + +int main(int argc, char **argv) { + char rundir[PATH_MAX]; + char user[64]; + char group[64]; + int foreground = 0; + struct stat exec_stat; + + memset(logfile, 0, sizeof logfile); + memset(pidfile, 0, sizeof pidfile); + memset(rundir, 0, sizeof rundir); + memset(user, 0, sizeof user); + memset(group, 0, sizeof group); + + static struct option opts[] = { + { "help", no_argument, NULL, 'h' }, + { "version", no_argument, NULL, 'v' }, + { "foreground", no_argument, NULL, 'f' }, + { "nohup", no_argument, NULL, 'n' }, + { "logfile", required_argument, NULL, 'l' }, + { "pidfile", required_argument, NULL, 'p' }, + { "rundir", required_argument, NULL, 'r' }, + { "user", required_argument, NULL, 'u' }, + { "group", required_argument, NULL, 'g' }, + { NULL, 0, NULL, 0 }, + }; + + int ch; + while (1) { + ch = getopt_long(argc, argv, "l:p:r:u:g:hvfns", opts, NULL); + if (ch == -1) + break; + + switch (ch) { + case 'v': + printf("Go daemon v1.2\n"); + printf("http://github.com/fiorix/go-daemon\n"); + return 0; + case 'f': + foreground = 1; + break; + case 'n': + nohup = 1; + break; + case 'l': + strncpy(logfile, optarg, sizeof logfile - 1); + break; + case 'p': + strncpy(pidfile, optarg, sizeof pidfile - 1); + break; + case 'r': + strncpy(rundir, optarg, sizeof rundir - 1); + break; + case 'u': + strncpy(user, optarg, sizeof user - 1); + break; + case 'g': + strncpy(group, optarg, sizeof group - 1); + break; + default: + usage(); + } + } + + // utility is expected to be argv's leftovers. + if (optind >= argc) + usage(); + + if (*rundir != 0 && chdir(rundir) == -1) { + perror("failed to switch to rundir"); + return 1; + } + + if (*user != 0 && (pwd = getpwnam(user)) == NULL) { + fprintf(stderr, "failed to switch to user %s: %s\n", + user, strerror(errno)); + return 1; + } + + if (*group != 0 && (grp = getgrnam(group)) == NULL) { + fprintf(stderr, "failed to switch to group %s: %s\n", + group, strerror(errno)); + return 1; + } + + if (*logfile != 0 && (logfp = fopen(logfile, "a")) == NULL) { + perror("failed to open logfile"); + return 1; + } + if (logfp) + setvbuf(logfp, linebuf, _IOLBF, sizeof linebuf); + + if (*pidfile != 0 && (pidfp = fopen(pidfile, "w+")) == NULL) { + perror("failed to open pidfile"); + return 1; + } + + if (grp != NULL && setegid(grp->gr_gid) == -1) { + fprintf(stderr, "failed to switch to group %s: %s\n", + group, strerror(errno)); + return 1; + } + + if (pwd != NULL && seteuid(pwd->pw_uid) == -1) { + fprintf(stderr, "failed to switch to user %s: %s\n", + user, strerror(errno)); + return 1; + } + + if (stat(argv[optind], &exec_stat) < 0) { + fprintf(stderr, "failed to stat %s: %s\n", + argv[optind], strerror(errno)); + return 1; + } + if (!(exec_stat.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) { + fprintf(stderr, "permission denied: %s\n", + argv[optind]); + return 1; + } + + if (foreground) { + daemon_main(optind, argv); + } else { + // Daemonize. + pid_t pid = fork(); + if (pid) { + waitpid(pid, NULL, 0); + } else if (!pid) { + if ((pid = fork())) { + exit(0); + } else if (!pid) { + close(0); + close(1); + close(2); + daemon_main(optind, argv); + } else { + perror("fork"); + exit(1); + } + } else { + perror("fork"); + exit(1); + } + } + + return 0; +} + +void daemon_main(int optind, char **argv) { + if (pidfp) { + fprintf(pidfp, "%d\n", getpid()); + fclose(pidfp); + } + // Fwd all signals to the child, except SIGHUP. + int signum; + for (signum = 1; signum < 33; signum++) { + if (signal(signum, sigfwd) == SIG_IGN) + signal(signum, SIG_IGN); + } + signal(SIGHUP, sighup); + pipe(logfd); + if ((childpid = fork())) { + close(logfd[1]); + pthread_t logth; + pthread_create(&logth, NULL, logger_thread, argv[optind]); + waitpid(childpid, NULL, 0); + pthread_join(logth, NULL); + } else if (!childpid) { + close(logfd[0]); + close(0); + close(1); + close(2); + dup2(logfd[1], 1); + dup2(logfd[1], 2); + execvp(argv[optind], argv + optind); + printf("\x1b%s", strerror(errno)); + fflush(stdout); + close(logfd[1]); + close(1); + close(2); + } else { + perror("fork"); + exit(1); + } + if (pidfp) + unlink(pidfile); +} + +void *logger_thread(void *cmdname) { + int n; + char buf[4096]; + int has_read = 0; + + while(1) { + // read() will fail when the child process fails + // to execute or dies, and closes its terminal. + // This is what terminates this thread and therefore + // the main thread can move along. + n = read(logfd[0], buf, sizeof buf); + if (n <= 0) + break; + + buf[n] = 0; + if (!has_read) { + has_read = 1; + if (*buf == '\x1b') { + char *p = buf; + printf("%s: %s\n", (char *) cmdname, ++p); + close(logfd[0]); + break; + } + } + + pthread_mutex_lock(&logger_mutex); + if (logfp) { + fwrite(buf, 1, n, logfp); + //fflush(logfp); + } + pthread_mutex_unlock(&logger_mutex); + } + + return NULL; +} + +void sighup(int signum) { + if (pwd != NULL) { + seteuid(getuid()); + } + if (grp != NULL) { + setegid(getgid()); + } + pthread_mutex_lock(&logger_mutex); + if (logfp) { + FILE *fp = fopen(logfile, "a"); + if (fp != NULL) { + fclose(logfp); + logfp = fp; + setvbuf(logfp, linebuf, _IOLBF, sizeof linebuf); + } + } + if (grp != NULL) { + setegid(grp->gr_gid); + } + if (pwd != NULL) { + seteuid(pwd->pw_uid); + } + pthread_mutex_unlock(&logger_mutex); + if (!nohup && childpid) // nonohup :~ + kill(childpid, signum); +} + +void sigfwd(int signum) { + if (childpid) + kill(childpid, signum); +} diff --git a/vendor/github.com/yuin/gopher-lua/parse/Makefile b/vendor/github.com/yuin/gopher-lua/parse/Makefile deleted file mode 100644 index b5b69096086..00000000000 --- a/vendor/github.com/yuin/gopher-lua/parse/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -all : parser.go - -parser.go : parser.go.y - go tool yacc -o $@ parser.go.y; [ -f y.output ] && ( rm -f y.output ) From 54f489aca635a76ff014415648decfeb27e4e8dd Mon Sep 17 00:00:00 2001 From: Mariana Date: Mon, 23 Mar 2020 11:18:33 +0100 Subject: [PATCH 16/16] notice --- NOTICE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE.txt b/NOTICE.txt index 19fd97b1fdf..208cf82f637 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -518,7 +518,7 @@ License type (autodetected): MIT -------------------------------------------------------------------- Dependency: github.com/Azure/azure-event-hubs-go/v3 -Version: v3.1.0 +Version: v3.1.2 License type (autodetected): MIT ./vendor/github.com/Azure/azure-event-hubs-go/v3/LICENSE: --------------------------------------------------------------------