EditorSyncRoot

class EditorSyncRoot<U : AbstractUnit?, P : AbstractUnit?>(unitParent: P, unit: U?, edited: U?, val dropEditedUnit: Boolean, mapping: SchemaMapping?) : SyncPair<U?, P?>

Use this in editors

Parameters

unitParent

of one of the unit or edited

unit

in project

edited

is the target to get

dropEditedUnit

if true the edited will be marked for deletion

mapping

to map the model schema to a different schema in the database

Constructors

Link copied to clipboard
constructor(unitParent: P, unit: U?, edited: U?, dropEditedUnit: Boolean, mapping: SchemaMapping?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var action: SyncAction
Link copied to clipboard
val childrenPairs: List<SyncPair<*, *>>
Link copied to clipboard
Link copied to clipboard
val diffCount: Int
Link copied to clipboard
val dropEditedUnit: Boolean
Link copied to clipboard
val left: U?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val nodeDiff: AbstractDiff<*, *>?
Link copied to clipboard
val parent: SyncPair<*, *>?
Link copied to clipboard
val right: U?
Link copied to clipboard
Link copied to clipboard
val unit: U?

Functions

Link copied to clipboard
fun actionWillDrop(action: SyncAction, into: SyncSide, onlyTablesColumns: Boolean): Int

Get the count of dropped items if this action is applied.

Link copied to clipboard
fun commitIntoDatabase(envoy: ERROR CLASS: Symbol not found for Envoy, into: SyncSide, onlyAction: SyncAction?)

fun commitIntoDatabase(connector: Connector?, into: SyncSide, onlyAction: SyncAction?)

Apply the selected actions in to the database. This requires to do first syncPair.setAction(SyncSide.toRight)

Link copied to clipboard
fun generateCommitScript(dbId: String, onlyAction: SyncAction?, into: SyncSide): AlterScript

Generate the commit script

fun generateCommitScript(dbId: String, onlyAction: SyncAction?, into: SyncSide, includeForeignKeysInCreateTable: Boolean): AlterScript
Link copied to clipboard
fun getDifferences(): List<AbstractDiff<*, *>>

Get a list of differences for this node. A node can be a pair of tables, or columns, and differences can be rename, exists diff, data type diff, mandatory diff, etc.

Link copied to clipboard
fun getParent(side: SyncSide): P?
Link copied to clipboard
open override fun getUnit(side: SyncSide): U?
Link copied to clipboard
fun hasDifferences(): Boolean
Link copied to clipboard
fun hasNodesWithAction(action: SyncAction?): Boolean
Link copied to clipboard
fun implementCommit(envoy: ERROR CLASS: Symbol not found for Envoy)
Link copied to clipboard
fun implementMerge(layoutPane: ERROR CLASS: Symbol not found for GenericLayoutPane??)
Link copied to clipboard
open override fun matches(filter: SyncDiffFilter): Boolean
Link copied to clipboard
@JvmOverloads
fun mergeInto(into: SyncSide, onlyAction: SyncAction?, layoutPane: ERROR CLASS: Symbol not found for GenericLayoutPane?? = null)

Merge differences into the local model

Link copied to clipboard
Link copied to clipboard
fun removeIf(filter: ERROR CLASS: Symbol not found for SyncFilter)

Filter all tree using a given filter. The rejected differences will be removed

Link copied to clipboard
open override fun setAction(action: SyncAction, recursive: Boolean)

Set an action for this and all sub-nodes. This is similar with the Synchronization dialog, like clicking an action for each element. SyncAction.toLeft would mean to modify the model, toRight to modify the database.

Link copied to clipboard
fun setAlwaysIncludeFks(alwaysIncludeFks: Boolean)
Link copied to clipboard
fun setIgnorable(ignorable: Boolean)
Link copied to clipboard
Link copied to clipboard
fun toSql(dbId: String, onlyAction: SyncAction?, into: SyncSide, writer: PrintWriter)

Generate the script for a Synchronization operation.

Link copied to clipboard
open override fun toString(): String
fun toString(level: Int): String