C# Class MySql.Data.VisualStudio.TriggerNode

Inheritance: DocumentNode, IVsTextBufferProvider
Mostrar archivo Open project: elevate/mysqlconnector-.net Class Usage Examples

Public Properties

Property Type Description
ParentTable TableNode

Public Methods

Method Description
CreateNew ( DataViewHierarchyAccessor HierarchyAccessor, TableNode parent ) : void
GetDropSQL ( ) : string
GetEditor ( ) : object
GetSaveSql ( ) : string
TriggerNode ( DataViewHierarchyAccessor hierarchyAccessor, int id ) : System

Protected Methods

Method Description
GetCurrentName ( ) : string
Load ( ) : void
Save ( ) : bool

We override save here so we can change the sql from create to alter on first save

Private Methods

Method Description
ChangeSqlTypeTo ( string sql, string type ) : string
CheckSyntax ( ) : void
GetDropSQL ( string triggerName ) : string
GetNewTriggerText ( ) : string
GetTargetedTable ( string sql ) : string
IVsTextBufferProvider ( IVsTextLines &ppTextBuffer ) : int
IVsTextBufferProvider ( int fLock ) : int
MakeSureWeAreNotChangingTables ( string sql ) : void

This method will attempt to extract the table this trigger script is targeting and make sure it matches the table the trigger was originally created for. We do this because we don't want the user using an 'ALTER' script to move a trigger to a different table

Method Details

CreateNew() public static method

public static CreateNew ( DataViewHierarchyAccessor HierarchyAccessor, TableNode parent ) : void
HierarchyAccessor DataViewHierarchyAccessor
parent TableNode
return void

GetCurrentName() protected method

protected GetCurrentName ( ) : string
return string

GetDropSQL() public method

public GetDropSQL ( ) : string
return string

GetEditor() public method

public GetEditor ( ) : object
return object

GetSaveSql() public method

public GetSaveSql ( ) : string
return string

Load() protected method

protected Load ( ) : void
return void

Save() protected method

We override save here so we can change the sql from create to alter on first save
protected Save ( ) : bool
return bool

TriggerNode() public method

public TriggerNode ( DataViewHierarchyAccessor hierarchyAccessor, int id ) : System
hierarchyAccessor DataViewHierarchyAccessor
id int
return System

Property Details

ParentTable public_oe property

public TableNode,MySql.Data.VisualStudio ParentTable
return TableNode