示例#1
0
        /// <summary>
        /// Set a statement attribute.
        /// </summary>
        /// <param name="attribute">The attribute.</param>
        /// <param name="value">The value.</param>
        /// <returns>Returns TRUE on success or FALSE on failure</returns>
        public virtual bool setAttribute(int attribute, PhpValue value)
        {
            switch ((PDO_ATTR)attribute)
            {
            case PDO_ATTR.ATTR_CURSOR_NAME:
            // TODO: Driver.StatementAttribute ...

            default:
                HandleError(ErrorInfo.Create(string.Empty, nameof(ErrorCodes.IM001), ErrorCodes.IM001));
                return(false);
            }
        }
示例#2
0
 /// <summary></summary>
 internal protected void HandleError(string sqlstate, string code, string message)
 {
     HandleError(ErrorInfo.Create(sqlstate, code, message));
 }
示例#3
0
 /// <summary>
 /// Raises simple "HY000" error.
 /// </summary>
 internal protected void HandleError(string message) => HandleError(ErrorInfo.Create(message));