<Feat>: Prefill new UDS reader and writer components with generic SQL templates, increase revision to 3.9.3147.132

Cause:

- New UniDataStorageReader and UniDataStorageWriter components required manual entry of connection strings and query templates without an initial format example.

Solution:

1. Initialize new component configurations
   - Prefill database storage type and a generic Microsoft SQL connection string with Windows authentication, encryption, certificate validation and a connection timeout.
   - Provide a reader SELECT template with QUERYPARAM and explicit placeholder names.
   - Provide writer INSERT, UPDATE and stored procedure templates, selecting Microsoft SQL for new writers.
   - Apply defaults through factory DefaultConfig so persisted component configurations retain their existing values.

2. Validation
   - Standalone compilation of both changed factories passed against existing application dependencies.
   - Reviewed writer template placeholders against the database writer implementation; git diff --check passed.
   - Full application build and interactive UI validation were not performed for this commit. The earlier full build was blocked by missing iPerl/NFC project dependencies.

3. Increased revision
   - Updated AssemblyVersion and AssemblyFileVersion from 3.9.3147.131 to 3.9.3147.132.
This commit is contained in:
2026-11-02 20:58:42 +01:00
parent b4fac428fd
commit 84740a2a8b
4 changed files with 27 additions and 9 deletions
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.9.3147.131")]
[assembly: AssemblyFileVersion("3.9.3147.131")]
[assembly: AssemblyVersion("3.9.3147.132")]
[assembly: AssemblyFileVersion("3.9.3147.132")]
@@ -28,7 +28,15 @@ namespace TBF.Rig.Input.DataStorage.UniDataStorageReader
return new Reader(readerCfg);
}
public IComponentCfg DefaultConfig() { return new ReaderCfg("UniDataStorageReader", this); }
public IComponentCfg DefaultConfig()
{
return new ReaderCfg("UniDataStorageReader", this)
{
DataStorageType = ReaderCfg.StorageTypes.LocalDatabase,
DataSource = "Server=YOUR_SERVER;Database=YOUR_DATABASE;Integrated Security=True;Encrypt=True;TrustServerCertificate=False;Connect Timeout=15;",
QueryTemplate = "SELECT [YOUR_VALUE_COLUMN] FROM [dbo].[YOUR_TABLE] WHERE [YOUR_KEY_COLUMN] = QUERYPARAM"
};
}
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
@@ -116,9 +116,19 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter
/// </returns>
public IComponentCfg DefaultConfig()
{
return new WriterCfg(
"UniDataStorageWriter",
this);
return new WriterCfg("UniDataStorageWriter", this)
{
DataStorageType = Types.StorageTypes.LocalDatabase,
TechnologyType = Types.TechnologyTypes.MicrosoftSql,
DataSource = "Server=YOUR_SERVER;Database=YOUR_DATABASE;Integrated Security=True;Encrypt=True;TrustServerCertificate=False;Connect Timeout=15;",
QueryTemplate = "INSERT INTO [dbo].[YOUR_TABLE] ({0}) VALUES ({1})",
WriteTemplates = new List<string>
{
"Insert|INSERT INTO [dbo].[YOUR_TABLE] ({0}) VALUES ({1})",
"Update|UPDATE [dbo].[YOUR_TABLE] SET {2} = {3} WHERE {0} = {1}",
"StoredProcedure|dbo.YOUR_PROCEDURE"
}
};
}
/// <summary>
@@ -62,13 +62,13 @@ namespace TBF.Rig.Output.DataStorage.UniDataStorageWriter.UI
"Write template is not used.";
private const string DefaultDatabaseInsertTemplate =
"Insert|INSERT INTO dbo.table ({0}) VALUES ({1})";
"Insert|INSERT INTO [dbo].[YOUR_TABLE] ({0}) VALUES ({1})";
private const string DefaultDatabaseUpdateTemplate =
"Update|UPDATE dbo.table SET {2} = {3} WHERE {0} = {1}";
"Update|UPDATE [dbo].[YOUR_TABLE] SET {2} = {3} WHERE {0} = {1}";
private const string DefaultDatabaseStoredProcedureTemplate =
"StoredProcedure|dbo.StoredProcedureName";
"StoredProcedure|dbo.YOUR_PROCEDURE";
private const string DefaultXlsxInsertTemplate =
"Insert|INSERT INTO Sheet1 ({0}) VALUES ({1})";