-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbinary.html
142 lines (118 loc) · 5.7 KB
/
binary.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>6.9. Binary Functions — Presto 0.154 Documentation</title>
<link rel="stylesheet" href="../_static/presto.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.154',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="Presto 0.154 Documentation" href="../index.html" />
<link rel="up" title="6. Functions and Operators" href="../functions.html" />
<link rel="next" title="6.10. Date and Time Functions and Operators" href="datetime.html" />
<link rel="prev" title="6.8. String Functions and Operators" href="string.html" />
</head>
<body role="document">
<div class="header">
<h1 class="heading"><a href="../index.html">
<span>Presto 0.154 Documentation</span></a></h1>
<h2 class="heading"><span>6.9. Binary Functions</span></h2>
</div>
<div class="topnav">
<p class="nav">
<span class="left">
« <a href="string.html">6.8. String Functions and Operators</a>
</span>
<span class="right">
<a href="datetime.html">6.10. Date and Time Functions and Operators</a> »
</span>
</p>
</div>
<div class="content">
<div class="section" id="binary-functions">
<h1>6.9. Binary Functions</h1>
<div class="section" id="id1">
<h2>Binary Functions</h2>
<dl class="function">
<dt>
<code class="descname">length</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → bigint</dt>
<dd><p>Returns the length of <code class="docutils literal"><span class="pre">binary</span></code> in bytes.</p>
</dd></dl>
<dl class="function">
<dt id="to_base64">
<code class="descname">to_base64</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → varchar</dt>
<dd><p>Encodes <code class="docutils literal"><span class="pre">binary</span></code> into a base64 string representation.</p>
</dd></dl>
<dl class="function">
<dt id="from_base64">
<code class="descname">from_base64</code><span class="sig-paren">(</span><em>string</em><span class="sig-paren">)</span> → varbinary</dt>
<dd><p>Decodes binary data from the base64 encoded <code class="docutils literal"><span class="pre">string</span></code>.</p>
</dd></dl>
<dl class="function">
<dt id="to_base64url">
<code class="descname">to_base64url</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → varchar</dt>
<dd><p>Encodes <code class="docutils literal"><span class="pre">binary</span></code> into a base64 string representation using the URL safe alphabet.</p>
</dd></dl>
<dl class="function">
<dt id="from_base64url">
<code class="descname">from_base64url</code><span class="sig-paren">(</span><em>string</em><span class="sig-paren">)</span> → varbinary</dt>
<dd><p>Decodes binary data from the base64 encoded <code class="docutils literal"><span class="pre">string</span></code> using the URL safe alphabet.</p>
</dd></dl>
<dl class="function">
<dt id="to_hex">
<code class="descname">to_hex</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → varchar</dt>
<dd><p>Encodes <code class="docutils literal"><span class="pre">binary</span></code> into a hex string representation.</p>
</dd></dl>
<dl class="function">
<dt id="from_hex">
<code class="descname">from_hex</code><span class="sig-paren">(</span><em>string</em><span class="sig-paren">)</span> → varbinary</dt>
<dd><p>Decodes binary data from the hex encoded <code class="docutils literal"><span class="pre">string</span></code>.</p>
</dd></dl>
<dl class="function">
<dt id="md5">
<code class="descname">md5</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → varbinary</dt>
<dd><p>Computes the md5 hash of <code class="docutils literal"><span class="pre">binary</span></code>.</p>
</dd></dl>
<dl class="function">
<dt id="sha1">
<code class="descname">sha1</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → varbinary</dt>
<dd><p>Computes the sha1 hash of <code class="docutils literal"><span class="pre">binary</span></code>.</p>
</dd></dl>
<dl class="function">
<dt id="sha256">
<code class="descname">sha256</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → varbinary</dt>
<dd><p>Computes the sha256 hash of <code class="docutils literal"><span class="pre">binary</span></code>.</p>
</dd></dl>
<dl class="function">
<dt id="sha512">
<code class="descname">sha512</code><span class="sig-paren">(</span><em>binary</em><span class="sig-paren">)</span> → varbinary</dt>
<dd><p>Computes the sha512 hash of <code class="docutils literal"><span class="pre">binary</span></code>.</p>
</dd></dl>
</div>
</div>
</div>
<div class="bottomnav">
<p class="nav">
<span class="left">
« <a href="string.html">6.8. String Functions and Operators</a>
</span>
<span class="right">
<a href="datetime.html">6.10. Date and Time Functions and Operators</a> »
</span>
</p>
</div>
<div class="footer" role="contentinfo">
</div>
</body>
</html>