提交 28ed78eb authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #474 from inikolaev/master

Add alias for RANDOM_UUID
...@@ -2960,7 +2960,7 @@ RAND() ...@@ -2960,7 +2960,7 @@ RAND()
" "
"Functions (Numeric)","RANDOM_UUID"," "Functions (Numeric)","RANDOM_UUID","
RANDOM_UUID() { RANDOM_UUID | UUID } ()
"," ","
Returns a new UUID with 122 pseudo random bits. Returns a new UUID with 122 pseudo random bits.
......
...@@ -438,7 +438,7 @@ Example: To get the 2nd server in the connection list one uses <code>getClientIn ...@@ -438,7 +438,7 @@ Example: To get the 2nd server in the connection list one uses <code>getClientIn
Read-only queries are only executed against the first cluster node, but all other statements are Read-only queries are only executed against the first cluster node, but all other statements are
executed against all nodes. There is currently no load balancing made to avoid problems with executed against all nodes. There is currently no load balancing made to avoid problems with
transactions. The following functions may yield different results on different cluster nodes and must be transactions. The following functions may yield different results on different cluster nodes and must be
executed with care: <code>RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), executed with care: <code>UUID(), RANDOM_UUID(), SECURE_RAND(), SESSION_ID(),
MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed]. MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed].
Those functions should not be used directly in modifying statements Those functions should not be used directly in modifying statements
(for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used
...@@ -1397,7 +1397,7 @@ using the probability theory. See also 'Birthday Paradox'. ...@@ -1397,7 +1397,7 @@ using the probability theory. See also 'Birthday Paradox'.
Standardized randomly generated UUIDs have 122 random bits. Standardized randomly generated UUIDs have 122 random bits.
4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz).
This database supports generating such UUIDs using the built-in function This database supports generating such UUIDs using the built-in function
<code>RANDOM_UUID()</code>. <code>RANDOM_UUID()</code> or <code>UUID()</code>.
Here is a small program to estimate the probability of having two identical UUIDs Here is a small program to estimate the probability of having two identical UUIDs
after generating a number of values: after generating a number of values:
</p> </p>
......
...@@ -359,7 +359,7 @@ Detect Which Cluster Instances are Running ...@@ -359,7 +359,7 @@ Detect Which Cluster Instances are Running
Clustering Algorithm and Limitations Clustering Algorithm and Limitations
@advanced_1120_p @advanced_1120_p
Read-only queries are only executed against the first cluster node, but all other statements are executed against all nodes. There is currently no load balancing made to avoid problems with transactions. The following functions may yield different results on different cluster nodes and must be executed with care: <code>RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed]. Those functions should not be used directly in modifying statements (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used in read-only statements and the result can then be used for modifying statements. Using auto-increment and identity columns is currently not supported. Instead, sequence values need to be manually requested and then used to insert data (using two statements). Read-only queries are only executed against the first cluster node, but all other statements are executed against all nodes. There is currently no load balancing made to avoid problems with transactions. The following functions may yield different results on different cluster nodes and must be executed with care: <code>UUID(), RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed]. Those functions should not be used directly in modifying statements (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used in read-only statements and the result can then be used for modifying statements. Using auto-increment and identity columns is currently not supported. Instead, sequence values need to be manually requested and then used to insert data (using two statements).
@advanced_1121_p @advanced_1121_p
When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the server dies that executed the query. Result sets must fit in memory on the client side. When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the server dies that executed the query. Result sets must fit in memory on the client side.
...@@ -1028,7 +1028,7 @@ TLS Connections ...@@ -1028,7 +1028,7 @@ TLS Connections
Universally Unique Identifiers (UUID) Universally Unique Identifiers (UUID)
@advanced_1343_p @advanced_1343_p
This database supports UUIDs. Also supported is a function to create new UUIDs using a cryptographically strong pseudo random number generator. With random UUIDs, the chance of two having the same value can be calculated using the probability theory. See also 'Birthday Paradox'. Standardized randomly generated UUIDs have 122 random bits. 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). This database supports generating such UUIDs using the built-in function <code>RANDOM_UUID()</code>. Here is a small program to estimate the probability of having two identical UUIDs after generating a number of values: This database supports UUIDs. Also supported is a function to create new UUIDs using a cryptographically strong pseudo random number generator. With random UUIDs, the chance of two having the same value can be calculated using the probability theory. See also 'Birthday Paradox'. Standardized randomly generated UUIDs have 122 random bits. 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). This database supports generating such UUIDs using the built-in function <code>RANDOM_UUID()</code> or <code>UUID()</code>. Here is a small program to estimate the probability of having two identical UUIDs after generating a number of values:
@advanced_1344_p @advanced_1344_p
Some values are: Some values are:
......
...@@ -359,7 +359,7 @@ CreateClusterツールを使用�?�る ...@@ -359,7 +359,7 @@ CreateClusterツールを使用�?�る
クラスタリングアルゴリズム�?�制�? クラスタリングアルゴリズム�?�制�?
@advanced_1120_p @advanced_1120_p
# Read-only queries are only executed against the first cluster node, but all other statements are executed against all nodes. There is currently no load balancing made to avoid problems with transactions. The following functions may yield different results on different cluster nodes and must be executed with care: <code>RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed]. Those functions should not be used directly in modifying statements (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used in read-only statements and the result can then be used for modifying statements. Using auto-increment and identity columns is currently not supported. Instead, sequence values need to be manually requested and then used to insert data (using two statements). # Read-only queries are only executed against the first cluster node, but all other statements are executed against all nodes. There is currently no load balancing made to avoid problems with transactions. The following functions may yield different results on different cluster nodes and must be executed with care: <code>UUID(), RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed]. Those functions should not be used directly in modifying statements (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used in read-only statements and the result can then be used for modifying statements. Using auto-increment and identity columns is currently not supported. Instead, sequence values need to be manually requested and then used to insert data (using two statements).
@advanced_1121_p @advanced_1121_p
# When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the server dies that executed the query. Result sets must fit in memory on the client side. # When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the server dies that executed the query. Result sets must fit in memory on the client side.
...@@ -1028,7 +1028,7 @@ HTTPS 接続 ...@@ -1028,7 +1028,7 @@ HTTPS 接続
汎用一�?識別�? (UUID) 汎用一�?識別�? (UUID)
@advanced_1343_p @advanced_1343_p
# This database supports UUIDs. Also supported is a function to create new UUIDs using a cryptographically strong pseudo random number generator. With random UUIDs, the chance of two having the same value can be calculated using the probability theory. See also 'Birthday Paradox'. Standardized randomly generated UUIDs have 122 random bits. 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). This database supports generating such UUIDs using the built-in function <code>RANDOM_UUID()</code>. Here is a small program to estimate the probability of having two identical UUIDs after generating a number of values: # This database supports UUIDs. Also supported is a function to create new UUIDs using a cryptographically strong pseudo random number generator. With random UUIDs, the chance of two having the same value can be calculated using the probability theory. See also 'Birthday Paradox'. Standardized randomly generated UUIDs have 122 random bits. 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). This database supports generating such UUIDs using the built-in function <code>RANDOM_UUID()</code> or <code>UUID()</code>. Here is a small program to estimate the probability of having two identical UUIDs after generating a number of values:
@advanced_1344_p @advanced_1344_p
# Some values are: # Some values are:
......
...@@ -118,7 +118,7 @@ advanced_1116_p=\ It is also possible to get the list of servers by using Connec ...@@ -118,7 +118,7 @@ advanced_1116_p=\ It is also possible to get the list of servers by using Connec
advanced_1117_p=\ The property list returned from <code>getClientInfo()</code> contains a <code>numServers</code> property that returns the number of servers that are in the connection list. To get the actual servers, <code>getClientInfo()</code> also has properties <code>server0</code>..<code>serverX</code>, where serverX is the number of servers minus 1. advanced_1117_p=\ The property list returned from <code>getClientInfo()</code> contains a <code>numServers</code> property that returns the number of servers that are in the connection list. To get the actual servers, <code>getClientInfo()</code> also has properties <code>server0</code>..<code>serverX</code>, where serverX is the number of servers minus 1.
advanced_1118_p=\ Example\: To get the 2nd server in the connection list one uses <code>getClientInfo('server1')</code>. <b>Note\:</b> The <code>serverX</code> property only returns IP addresses and ports and not hostnames. advanced_1118_p=\ Example\: To get the 2nd server in the connection list one uses <code>getClientInfo('server1')</code>. <b>Note\:</b> The <code>serverX</code> property only returns IP addresses and ports and not hostnames.
advanced_1119_h3=Clustering Algorithm and Limitations advanced_1119_h3=Clustering Algorithm and Limitations
advanced_1120_p=\ Read-only queries are only executed against the first cluster node, but all other statements are executed against all nodes. There is currently no load balancing made to avoid problems with transactions. The following functions may yield different results on different cluster nodes and must be executed with care\: <code>RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed]. Those functions should not be used directly in modifying statements (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used in read-only statements and the result can then be used for modifying statements. Using auto-increment and identity columns is currently not supported. Instead, sequence values need to be manually requested and then used to insert data (using two statements). advanced_1120_p=\ Read-only queries are only executed against the first cluster node, but all other statements are executed against all nodes. There is currently no load balancing made to avoid problems with transactions. The following functions may yield different results on different cluster nodes and must be executed with care\: <code>UUID(), RANDOM_UUID(), SECURE_RAND(), SESSION_ID(), MEMORY_FREE(), MEMORY_USED(), CSVREAD(), CSVWRITE(), RAND()</code> [when not using a seed]. Those functions should not be used directly in modifying statements (for example <code>INSERT, UPDATE, MERGE</code>). However, they can be used in read-only statements and the result can then be used for modifying statements. Using auto-increment and identity columns is currently not supported. Instead, sequence values need to be manually requested and then used to insert data (using two statements).
advanced_1121_p=\ When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the server dies that executed the query. Result sets must fit in memory on the client side. advanced_1121_p=\ When using the cluster modes, result sets are read fully in memory by the client, so that there is no problem if the server dies that executed the query. Result sets must fit in memory on the client side.
advanced_1122_p=\ The SQL statement <code>SET AUTOCOMMIT FALSE</code> is not supported in the cluster mode. To disable autocommit, the method <code>Connection.setAutoCommit(false)</code> needs to be called. advanced_1122_p=\ The SQL statement <code>SET AUTOCOMMIT FALSE</code> is not supported in the cluster mode. To disable autocommit, the method <code>Connection.setAutoCommit(false)</code> needs to be called.
advanced_1123_p=\ It is possible that a transaction from one connection overtakes a transaction from a different connection. Depending on the operations, this might result in different results, for example when conditionally incrementing a value in a row. advanced_1123_p=\ It is possible that a transaction from one connection overtakes a transaction from a different connection. Depending on the operations, this might result in different results, for example when conditionally incrementing a value in a row.
...@@ -341,7 +341,7 @@ advanced_1339_p=\ Remote TLS connections are supported using the Java Secure Soc ...@@ -341,7 +341,7 @@ advanced_1339_p=\ Remote TLS connections are supported using the Java Secure Soc
advanced_1340_p=\ To use your own keystore, set the system properties <code>javax.net.ssl.keyStore</code> and <code>javax.net.ssl.keyStorePassword</code> before starting the H2 server and client. See also <a href\="http\://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html\#CustomizingStores"> Customizing the Default Key and Trust Stores, Store Types, and Store Passwords</a> for more information. advanced_1340_p=\ To use your own keystore, set the system properties <code>javax.net.ssl.keyStore</code> and <code>javax.net.ssl.keyStorePassword</code> before starting the H2 server and client. See also <a href\="http\://java.sun.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html\#CustomizingStores"> Customizing the Default Key and Trust Stores, Store Types, and Store Passwords</a> for more information.
advanced_1341_p=\ To disable anonymous TLS, set the system property <code>h2.enableAnonymousTLS</code> to false. advanced_1341_p=\ To disable anonymous TLS, set the system property <code>h2.enableAnonymousTLS</code> to false.
advanced_1342_h2=Universally Unique Identifiers (UUID) advanced_1342_h2=Universally Unique Identifiers (UUID)
advanced_1343_p=\ This database supports UUIDs. Also supported is a function to create new UUIDs using a cryptographically strong pseudo random number generator. With random UUIDs, the chance of two having the same value can be calculated using the probability theory. See also 'Birthday Paradox'. Standardized randomly generated UUIDs have 122 random bits. 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). This database supports generating such UUIDs using the built-in function <code>RANDOM_UUID()</code>. Here is a small program to estimate the probability of having two identical UUIDs after generating a number of values\: advanced_1343_p=\ This database supports UUIDs. Also supported is a function to create new UUIDs using a cryptographically strong pseudo random number generator. With random UUIDs, the chance of two having the same value can be calculated using the probability theory. See also 'Birthday Paradox'. Standardized randomly generated UUIDs have 122 random bits. 4 bits are used for the version (Randomly generated UUID), and 2 bits for the variant (Leach-Salz). This database supports generating such UUIDs using the built-in function <code>RANDOM_UUID()</code> or <code>UUID()</code>. Here is a small program to estimate the probability of having two identical UUIDs after generating a number of values\:
advanced_1344_p=\ Some values are\: advanced_1344_p=\ Some values are\:
advanced_1345_th=Number of UUIs advanced_1345_th=Number of UUIs
advanced_1346_th=Probability of Duplicates advanced_1346_th=Probability of Duplicates
......
...@@ -251,6 +251,7 @@ public class Function extends Expression implements FunctionCall { ...@@ -251,6 +251,7 @@ public class Function extends Expression implements FunctionCall {
addFunction("ZERO", ZERO, 0, Value.INT); addFunction("ZERO", ZERO, 0, Value.INT);
addFunctionNotDeterministic("RANDOM_UUID", RANDOM_UUID, 0, Value.UUID); addFunctionNotDeterministic("RANDOM_UUID", RANDOM_UUID, 0, Value.UUID);
addFunctionNotDeterministic("SYS_GUID", RANDOM_UUID, 0, Value.UUID); addFunctionNotDeterministic("SYS_GUID", RANDOM_UUID, 0, Value.UUID);
addFunctionNotDeterministic("UUID", RANDOM_UUID, 0, Value.UUID);
// string // string
addFunction("ASCII", ASCII, 1, Value.INT); addFunction("ASCII", ASCII, 1, Value.INT);
addFunction("BIT_LENGTH", BIT_LENGTH, 1, Value.LONG); addFunction("BIT_LENGTH", BIT_LENGTH, 1, Value.LONG);
......
...@@ -1014,7 +1014,7 @@ See also Java ""Math." ...@@ -1014,7 +1014,7 @@ See also Java ""Math."
"," ","
Calling the function without parameter returns the next a pseudo random number." Calling the function without parameter returns the next a pseudo random number."
"Functions (Numeric)","RANDOM_UUID"," "Functions (Numeric)","RANDOM_UUID","
RANDOM_UUID() { RANDOM_UUID | UUID } ()
"," ","
Returns a new UUID with 122 pseudo random bits." Returns a new UUID with 122 pseudo random bits."
"Functions (Numeric)","ROUND"," "Functions (Numeric)","ROUND","
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论