示例#1
0
 /// <summary>
 /// All DB's do not support ON UPDATE by default.
 /// </summary>
 public virtual string OnUpdate(string primaryTable, string primaryColumn, string foreignTable, string foreignColumn, ForeignKeyUpdate updateType)
 {
     return(null);
 }
示例#2
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);
示例#3
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]);
 }
示例#4
0
 /// <inheritdoc cref="GXDBSettings.GetColumnConstraints"/>
 public override string GetColumnConstraints(object[] values, out ForeignKeyDelete onDelete, out ForeignKeyUpdate onUpdate)
 {
     throw new System.NotImplementedException();
 }
示例#5
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]);
        }