344853fde9
## Bulk Pre-Discovery e riduzione query SQLite/SOQL
### KeyAssociationService — FindAssociationsByKeyValuesBulkAsync (nuovo)
- Aggiunta query bulk 'WHERE KeyValue IN (...)' per recuperare N associazioni con 1 sola query SQLite
(chunking a 500 chiavi per rispettare il limite ~999 parametri di SQLite)
- Aggiunta interfaccia IKeyAssociationService e delegata in DataConnectionCredentialService / IDataConnectionCredentialService
### AssociationService — BatchFindOrCreateAssociationsAsync (nuovo)
- Nuovo metodo bulk che sostituisce i loop per-record durante l'analisi composite:
1) 1 query SQLite bulk per tutte le chiavi
2) Per le chiavi non trovate: SOQL 'IN (...)' su Salesforce in chunk da 200 via BatchExecuteQueriesAsync
(ceil(K/25) HTTP Composite call invece di K singole)
3) Salvataggio parallelo delle associazioni pre-discovery scoperte
- Fallback per-record automatico per client REST non Salesforce
- Aggiornata interfaccia IAssociationService con documentazione XML completa
### DataCoupler.razor.cs — STEP A/B nel flusso COMPOSITE
- Pre-Discovery spostata FUORI dal loop parallelo (STEP A, prima dell'analisi)
- associationsByKey pre-popolato con BatchFindOrCreateAssociationsAsync
- STEP B: il loop parallelo usa TryGetValue O(1) invece di query async per record
- Rimozione blocco ~40 righe di per-record lookup / fallback duplicati
## Salesforce Composite API — Batch Delete e Patch
### SalesforceServiceClient — metodi batch (nuovi)
- BatchDeleteEntitiesAsync: elimina N record con ceil(N/25) Composite call invece di N
- BatchPatchSingleFieldAsync: aggiorna un singolo campo su N record tramite BatchUpdateEntitiesAsync
### DeletionSyncService — refactoring batch
- ExecuteBatchedSalesforceDeletionsAsync: orchestrazione batch per Delete / Deactivate / Mark su Salesforce
- ExecuteSequentialDeletionsAsync: loop sequenziale esistente estratto in metodo riutilizzabile
- Dispatcher: Salesforce -> batch Composite, altri client REST -> sequenziale
## Supporto OLE DB (database)
### DatabaseSchemaProviderFactory
- Aggiunto case DatabaseType.OleDb -> new OleDbSchemaProvider() nel factory switch
### DatabaseMethod.cs
- Aggiunto metodo IsOleDbConnection() (parallelo a IsOdbcConnection())
- Query validation e manager temporaneo estesi a OLE DB oltre che ODBC
- GetLimitedQuery: aggiunto case OleDb -> 'SELECT TOP N FROM (subquery)'
## Salesforce OAuth2 — fix client_credentials
### CredentialService.cs
- Aggiunto 'GrantType' alla HashSet serviceSpecificKeys per preservarlo nella serializzazione AdditionalParameters
### DataConnectionCredentialService.cs
- Refactored BuildRestServiceOptions in helper statico riutilizzato da entrambi i metodi GetRestServiceOptions
- Mapping coerente ClientId/ClientSecret/GrantType per Salesforce (allineato a DataConnectionFactory)
- TestSalesforceOAuthLogin: branch esplicito per client_credentials (no username/password/token)
con validazione preventiva ClientId+ClientSecret obbligatori
- Log flow label (password|client_credentials) in tutti i messaggi di autenticazione
## VS Code tasks
### .vscode/tasks.json
- Rimosso task generico 'Publish Data_Coupler'
- Aggiunti due task separati: win-x64 e win-x86, entrambi SingleFile + Self-Contained + ReadyToRun
70 lines
1.7 KiB
JSON
70 lines
1.7 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Run Data_Coupler",
|
|
"type": "shell",
|
|
"command": "dotnet",
|
|
"args": [
|
|
"run",
|
|
"--project",
|
|
"Data_Coupler/Data_Coupler.csproj"
|
|
],
|
|
"group": "build",
|
|
"isBackground": true,
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "Test Database Initialization",
|
|
"type": "shell",
|
|
"command": "dotnet",
|
|
"args": [
|
|
"run"
|
|
],
|
|
"group": "build",
|
|
"isBackground": true,
|
|
"problemMatcher": [],
|
|
"options": {
|
|
"cwd": "${workspaceFolder}/Data_Coupler"
|
|
}
|
|
},
|
|
{
|
|
"label": "Publish Data_Coupler Temp SingleFile Self-Contained Ready-To-Run win-x64",
|
|
"detail": "Publish the Data Coupler 64-bit with a Single File, Self Contained, Ready-To-Run",
|
|
"type": "shell",
|
|
"command": "dotnet",
|
|
"args": [
|
|
"publish",
|
|
"Data_Coupler/Data_Coupler.csproj",
|
|
"-c", "Release",
|
|
"-r", "win-x64",
|
|
"--self-contained", "true",
|
|
"-p:PublishSingleFile=true",
|
|
"-p:PublishReadyToRun=true",
|
|
"-p:PublishTrimmed=false",
|
|
"-o", "C:\\Temp\\Publish\\Data_Coupler"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "Publish Data_Coupler Temp SingleFile Self-Contained Ready-To-Run win-x86",
|
|
"detail": "Publish the Data Coupler 32-bit with a Single File, Self Contained, Ready-To-Run",
|
|
"type": "shell",
|
|
"command": "dotnet",
|
|
"args": [
|
|
"publish",
|
|
"Data_Coupler/Data_Coupler.csproj",
|
|
"-c", "Release",
|
|
"-r", "win-x86",
|
|
"--self-contained", "true",
|
|
"-p:PublishSingleFile=true",
|
|
"-p:PublishReadyToRun=true",
|
|
"-p:PublishTrimmed=false",
|
|
"-o", "C:\\Temp\\Publish\\Data_Coupler_x86"
|
|
],
|
|
"group": "build",
|
|
"problemMatcher": []
|
|
}
|
|
]
|
|
} |