Beispiel #1
0
        public string ScriptAddFilterColumn(DmColumn filterColumn)
        {
            var quotedColumnName = new ObjectNameParser(filterColumn.ColumnName, "[", "]");

            string str = string.Concat("Add new filter column, ", quotedColumnName.UnquotedString, ", to Tracking Table ", trackingName.QuotedString);

            return(SQLiteBuilder.WrapScriptTextWithComments(this.AddFilterColumnCommandText(filterColumn), str));
        }
Beispiel #2
0
        public string CreateTableScriptText()
        {
            StringBuilder stringBuilder   = new StringBuilder();
            var           tableNameScript = $"Create Table {tableName.QuotedString}";
            var           tableScript     = BuildTableCommand().CommandText;

            stringBuilder.Append(SQLiteBuilder.WrapScriptTextWithComments(tableScript, tableNameScript));
            stringBuilder.AppendLine();
            return(stringBuilder.ToString());
        }
        public string CreateUpdateTriggerScriptText()
        {
            var           updTriggerName = string.Format(this.sqliteObjectNames.GetCommandName(DbCommandType.UpdateTrigger), tableName.UnquotedStringWithUnderScore);
            StringBuilder createTrigger  = new StringBuilder($"CREATE TRIGGER IF NOT EXISTS {updTriggerName} AFTER UPDATE ON {tableName.QuotedString} ");

            createTrigger.AppendLine();
            createTrigger.AppendLine(this.UpdateTriggerBodyText());

            string str = $"Update Trigger for table {tableName.QuotedString}";

            return(SQLiteBuilder.WrapScriptTextWithComments(createTrigger.ToString(), str));
        }
Beispiel #4
0
        public string CreatePopulateFromBaseTableScriptText()
        {
            string str = string.Concat("Populate tracking table ", trackingName.QuotedString, " for existing data in table ", tableName.QuotedString);

            return(SQLiteBuilder.WrapScriptTextWithComments(this.CreatePopulateFromBaseTableCommandText(), str));
        }
Beispiel #5
0
        public string CreateTableScriptText()
        {
            string str = string.Concat("Create Tracking Table ", trackingName.QuotedString);

            return(SQLiteBuilder.WrapScriptTextWithComments(this.CreateTableCommandText(), str));
        }