//public override int CatalogObjectID { get { return FTableVar == null ? -1 : FTableVar.ID; } } //public override int ParentObjectID { get { return FTableVar == null ? -1 : FTableVar.ID; } } public override Statement EmitStatement(EmitMode mode) { if (mode == EmitMode.ForStorage) { SaveObjectID(); } else { RemoveObjectID(); } try { AttachStatement statement = new AttachStatement(); statement.OperatorName = Schema.Object.EnsureRooted(_operator.OperatorName); statement.EventSourceSpecifier = new ObjectEventSourceSpecifier(Schema.Object.EnsureRooted(_tableVar.Name)); statement.EventSpecifier = new EventSpecifier(); statement.EventSpecifier.EventType = _eventType; statement.MetaData = MetaData == null ? null : MetaData.Copy(); return(statement); } finally { if (mode == EmitMode.ForStorage) { RemoveObjectID(); } } }
public Statement EmitColumnHandler(TableVar tableVar, TableVarColumn column, EmitMode mode) { AttachStatement statement = new AttachStatement(); statement.MetaData = MetaData; statement.OperatorName = _operator.OperatorName; statement.EventSourceSpecifier = new ColumnEventSourceSpecifier(tableVar.Name, column.Name); statement.EventSpecifier = new EventSpecifier(); statement.EventSpecifier.EventType = _eventType; return(statement); }
public Statement EmitScalarTypeHandler(ScalarType scalarType, EmitMode mode) { AttachStatement statement = new AttachStatement(); statement.MetaData = MetaData; statement.OperatorName = _operator.OperatorName; statement.EventSourceSpecifier = new ObjectEventSourceSpecifier(scalarType.Name); statement.EventSpecifier = new EventSpecifier(); statement.EventSpecifier.EventType = _eventType; return(statement); }