Exemplo n.º 1
0
        /// <inheritdoc cref="GXDBSettings.GetColumnConstraints"/>
        public override string GetColumnConstraints(object[] values, out ForeignKeyDelete onDelete, out ForeignKeyUpdate onUpdate)
        {
            string str = (string)values[1];

            if (str == "NO_ACTION")
            {
                onDelete = ForeignKeyDelete.None;
            }
            else
            {
                onDelete = (ForeignKeyDelete)Enum.Parse(typeof(ForeignKeyDelete), str, true);
            }
            str = (string)values[2];
            if (str == "NO_ACTION")
            {
                onUpdate = ForeignKeyUpdate.None;
            }
            else
            {
                onUpdate = (ForeignKeyUpdate)Enum.Parse(typeof(ForeignKeyUpdate), str, true);
            }
            return((string)values[0]);
        }
Exemplo n.º 2
0
 /// <summary>
 /// All DB's do not support ON DELETE by default.
 /// </summary>
 public virtual string OnDelete(string primaryTable, string primaryColumn, string foreignTable, string foreignColumn, ForeignKeyDelete deleteType)
 {
     return(null);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Get column constraints.
 /// </summary>
 /// <param name="values">Received values.</param>
 /// <param name="onDelete">Foreign key delete action.</param>
 /// <param name="onUpdate">Foreign key update action</param>
 /// <returns>reference class</returns>
 public abstract string GetColumnConstraints(object[] values, out ForeignKeyDelete onDelete, out ForeignKeyUpdate onUpdate);
Exemplo n.º 4
0
 /// <inheritdoc cref="GXDBSettings.GetColumnConstraints"/>
 public override string GetColumnConstraints(object[] values, out ForeignKeyDelete onDelete, out ForeignKeyUpdate onUpdate)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 5
0
 /// <inheritdoc cref="GXDBSettings.GetColumnConstraints"/>
 public override string GetColumnConstraints(object[] values, out ForeignKeyDelete onDelete, out ForeignKeyUpdate onUpdate)
 {
     onDelete = (ForeignKeyDelete)Enum.Parse(typeof(ForeignKeyDelete), (string)values[2], true);
     onUpdate = (ForeignKeyUpdate)Enum.Parse(typeof(ForeignKeyUpdate), (string)values[1], true);
     return((string)values[0]);
 }