Esempio n. 1
0
        public static string BytesToLiteral(object value)
        {
            Util.CheckParam(value, nameof(value));
            var str = "0x" + HexUtil.ByteArrayToHex(DbDriverUtil.GetBytes(value));

            return(str);
        }
Esempio n. 2
0
 public static string BytesToLiteral(object value)
 {
     Util.CheckParam(value, nameof(value));
     byte[] bytes = DbDriverUtil.GetBytes(value);
     Util.Check(bytes != null, "Bytes to literal: invalid input value type {0}", value.GetType());
     return("x'" + HexUtil.ByteArrayToHex(bytes) + "'");
 }
Esempio n. 3
0
 public static string BytesToLiteral(object value)
 {
     if (value == null || value == DBNull.Value)
     {
         return(SqlTerms.Null.Text);
     }
     byte[] bytes = DbDriverUtil.GetBytes(value);
     Util.Check(bytes != null, "Bytes to literal: invalid input value type {0}", value.GetType());
     return("hextoraw('" + HexUtil.ByteArrayToHex(bytes) + "')");
 }
Esempio n. 4
0
        private static string BytesToLiteral(object value)
        {
            if (value == null || value == DBNull.Value)
            {
                return("NULL");
            }
            var bytes = DbDriverUtil.GetBytes(value);

            return(@"E'\\x" + HexUtil.ByteArrayToHex(bytes) + "'");
        }