Skip to content

Commit

Permalink
edits based on feedback, reorder side nav
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauren committed Feb 5, 2018
1 parent 6c69a10 commit 6cc13ba
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 51 deletions.
56 changes: 28 additions & 28 deletions _includes/sidebar-data-v2.0.json
Original file line number Diff line number Diff line change
Expand Up @@ -735,69 +735,69 @@
]
},
{
"title": "<code>INET</code>",
"title": "<code>ARRAY</code>",
"urls": [
"/${VERSION}/inet.html"
"/${VERSION}/array.html"
]
},
{
"title": "<code>INT</code>",
"title": "<code>BOOL</code>",
"urls": [
"/${VERSION}/int.html"
"/${VERSION}/bool.html"
]
},
{
"title": "<code>UUID</code>",
"title": "<code>BYTES</code>",
"urls": [
"/${VERSION}/uuid.html"
"/${VERSION}/bytes.html"
]
},
{
"title": "<code>SERIAL</code>",
"title": "<code>COLLATE</code>",
"urls": [
"/${VERSION}/serial.html"
"/${VERSION}/collate.html"
]
},
{
"title": "<code>DECIMAL</code>",
"title": "<code>DATE</code>",
"urls": [
"/${VERSION}/decimal.html"
"/${VERSION}/date.html"
]
},
{
"title": "<code>FLOAT</code>",
"title": "<code>DECIMAL</code>",
"urls": [
"/${VERSION}/float.html"
"/${VERSION}/decimal.html"
]
},
{
"title": "<code>BOOL</code>",
"title": "<code>FLOAT</code>",
"urls": [
"/${VERSION}/bool.html"
"/${VERSION}/float.html"
]
},
{
"title": "<code>DATE</code>",
"title": "<code>INET</code>",
"urls": [
"/${VERSION}/date.html"
"/${VERSION}/inet.html"
]
},
{
"title": "<code>TIME</code>",
"title": "<code>INT</code>",
"urls": [
"/${VERSION}/time.html"
"/${VERSION}/int.html"
]
},
{
"title": "<code>TIMESTAMP</code>",
"title": "<code>INTERVAL</code>",
"urls": [
"/${VERSION}/timestamp.html"
"/${VERSION}/interval.html"
]
},
{
"title": "<code>INTERVAL</code>",
"title": "<code>SERIAL</code>",
"urls": [
"/${VERSION}/interval.html"
"/${VERSION}/serial.html"
]
},
{
Expand All @@ -807,21 +807,21 @@
]
},
{
"title": "<code>COLLATE</code>",
"title": "<code>TIME</code>",
"urls": [
"/${VERSION}/collate.html"
"/${VERSION}/time.html"
]
},
{
"title": "<code>BYTES</code>",
"title": "<code>TIMESTAMP</code>",
"urls": [
"/${VERSION}/bytes.html"
"/${VERSION}/timestamp.html"
]
},
{
"title": "<code>ARRAY</code>",
"title": "<code>UUID</code>",
"urls": [
"/${VERSION}/array.html"
"/${VERSION}/uuid.html"
]
}
]
Expand Down
22 changes: 11 additions & 11 deletions v2.0/data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ CockroachDB supports the following data types. Click a type for more details.

Type | Description | Example
-----|-------------|--------
[`INET`](inet.html) | A IPv4 or IPv6 address. | `192.168.0.1`
[`INT`](int.html) | A signed integer, up to 64 bits. | `12345`
[`UUID`](uuid.html) | <span class="version-tag">New in v1.1:</span> A 128-bit hexadecimal value. | `7f9c24e8-3b12-4fef-91e0-56a2d5a246ec`
[`SERIAL`](serial.html) | A unique 64-bit signed integer. | `148591304110702593 `
[`DECIMAL`](decimal.html) | An exact, fixed-point number. | `1.2345`
[`FLOAT`](float.html) | A 64-bit, inexact, floating-point number. | `1.2345`
[`ARRAY`](array.html) | <span class="version-tag">New in v1.1:</span> A 1-dimensional, 1-indexed, homogenous array of any non-array data type. | `{"sky","road","car"}`
[`BOOL`](bool.html) | A Boolean value. | `true`
[`BYTES`](bytes.html) | A string of binary characters. | `b'\141\061\142\062\143\063'`
[`COLLATE`](collate.html) | The `COLLATE` feature lets you sort [`STRING`](string.html) values according to language- and country-specific rules, known as collations. | `'a1b2c3' COLLATE en`
[`DATE`](date.html) | A date. | `DATE '2016-01-25'`
[`TIME`](time.html) | A time of day with no time zone. | `TIME '01:23:45.123456'`
[`TIMESTAMP`](timestamp.html) | A date and time pairing. | `TIMESTAMP '2016-01-25 10:10:10'`
[`DECIMAL`](decimal.html) | An exact, fixed-point number. | `1.2345`
[`FLOAT`](float.html) | A 64-bit, inexact, floating-point number. | `1.2345`
[`INET`](inet.html) | <span class="version-tag">New in v2.0:</span> A IPv4 or IPv6 address. | `192.168.0.1`
[`INT`](int.html) | A signed integer, up to 64 bits. | `12345`
[`INTERVAL`](interval.html) | A span of time. | `INTERVAL '2h30m30s'`
[`SERIAL`](serial.html) | A unique 64-bit signed integer. | `148591304110702593 `
[`STRING`](string.html) | A string of Unicode characters. | `'a1b2c3'`
[`COLLATE`](collate.html) | The `COLLATE` feature lets you sort [`STRING`](string.html) values according to language- and country-specific rules, known as collations. | `'a1b2c3' COLLATE en`
[`BYTES`](bytes.html) | A string of binary characters. | `b'\141\061\142\062\143\063'`
[`ARRAY`](array.html) | <span class="version-tag">New in v1.1:</span> A 1-dimensional, 1-indexed, homogenous array of any non-array data type. | `{"sky","road","car"}`
[`TIME`](time.html) | <span class="version-tag">New in v2.0:</span> A time of day with no time zone. | `TIME '01:23:45.123456'`
[`TIMESTAMP`](timestamp.html) | A date and time pairing. | `TIMESTAMP '2016-01-25 10:10:10'`
[`UUID`](uuid.html) | <span class="version-tag">New in v1.1:</span> A 128-bit hexadecimal value. | `7f9c24e8-3b12-4fef-91e0-56a2d5a246ec`

## Data Type Conversions & Casts

Expand Down
18 changes: 12 additions & 6 deletions v2.0/inet.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,22 @@ toc: false

## Syntax

An `INET` value can be expressed using the following formats:
A constant value of type `INET` can be expressed using an
[interpreted literal](sql-constants.html#interpreted-literals), or a
string literal
[annotated with](sql-expressions.html#explicitly-typed-expressions)
type `INET` or
[coerced to](sql-expressions.html#explicit-type-coercions) type
`INET`.

`INET` constants can be expressed using the following formats:

Format | Description
-------|-------------
IPv4 | Standard [RFC791](https://tools.ietf.org/html/rfc791)-specified format of 4 octets expressed individually in decimal numbers and separated by periods. Optionally, the address can be followed by a subnet mask.<br><br> Examples: `'190.0.0.0'`, `'190.0.0.0/24'`
IPv4-mapped IPv6 | IPv6 address mapped to a IPv4 address. <br><br>Example: `'::ffff:192.168.0.1/24'`
IPv6 | Standard [RFC8200](https://tools.ietf.org/html/rfc8200)-specified format of 8 colon-separated groups of 4 hexadecimal digits. Optionally, the address can be followed by a subnet mask.<br><br> Example: `'2001:4f8:3:ba:2e0:81ff:fe22:d1f1'`, `'2001:4f8:3:ba:2e0:81ff:fe22:d1f1/120'`
IPv6 | Standard [RFC8200](https://tools.ietf.org/html/rfc8200)-specified format of 8 colon-separated groups of 4 hexadecimal digits. An IPv6 address can be mapped to an IPv4 address. Optionally, the address can be followed by a subnet mask.<br><br> Example: `'2001:4f8:3:ba:2e0:81ff:fe22:d1f1'`, `'2001:4f8:3:ba:2e0:81ff:fe22:d1f1/120'`, `'::ffff:192.168.0.1/24'`

{{site.data.alerts.callout_info}}IPv4 addresses will sort before IPv6 addresses, including IPv4 addresses mapped to IPv6 addresses.{{site.data.alerts.end}}
{{site.data.alerts.callout_info}}IPv4 addresses will sort before IPv6 addresses, including IPv4-mapped IPv6 addresses.{{site.data.alerts.end}}

## Size

Expand Down Expand Up @@ -77,8 +84,7 @@ An `INET` value is 32 bits for IPv4 or 128 bits for IPv6.

Type | Details
-----|--------
`BYTES` | Requires supported [`BYTES`](bytes.html) string format, e.g., `b'\141\061\142\062\143\063'`.
`STRING` | ––
`STRING` | Converts to format `'Address/subnet'`.

## See Also

Expand Down
2 changes: 1 addition & 1 deletion v2.0/sql-constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ interpreted literal. These are special cases of

For more information about the allowable format of interpreted
literals, refer to the "Syntax" section of the respective data types:
[`DATE`](date.html#syntax), [`INTERVAL`](interval.html#syntax), [`TIME`](time.html#syntax),
[`DATE`](date.html#syntax), [`INET`](inet.html#syntax), [`INTERVAL`](interval.html#syntax), [`TIME`](time.html#syntax),
[`TIMESTAMP`/`TIMESTAMPTZ`](timestamp.html#syntax).

## Named constants
Expand Down
11 changes: 6 additions & 5 deletions v2.0/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,16 @@ The size of a `STRING` value is variable, but it's recommended to keep values un

Type | Details
-----|--------
`INT` | Requires supported [`INT`](int.html) string format, e.g., `'10'`.
`DECIMAL` | Requires supported [`DECIMAL`](decimal.html) string format, e.g., `'1.1'`.
`FLOAT` | Requires supported [`FLOAT`](float.html) string format, e.g., `'1.1'`.
`BOOL` | Requires supported [`BOOL`](bool.html) string format, e.g., `'true'`.
`BYTES` | Requires supported [`BYTES`](bytes.html) string format, e.g., `b'\141\061\142\062\143\063'`.
`DATE` | Requires supported [`DATE`](date.html) string format, e.g., `'2016-01-25'`.
`DECIMAL` | Requires supported [`DECIMAL`](decimal.html) string format, e.g., `'1.1'`.
`FLOAT` | Requires supported [`FLOAT`](float.html) string format, e.g., `'1.1'`.
`INET` | Requires supported [`INET`](inet.html) string format, e.g, `'192.168.0.1'`.
`INT` | Requires supported [`INT`](int.html) string format, e.g., `'10'`.
`INTERVAL` | Requires supported [`INTERVAL`](interval.html) string format, e.g., `'1h2m3s4ms5us6ns'`.
`TIME` | <span class="version-tag">New in v2.0:</span> Requires supported [`TIME`](time.html) string format, e.g., `'01:22:12'` (microsecond precision).
`TIMESTAMP` | Requires supported [`TIMESTAMP`](timestamp.html) string format, e.g., `'2016-01-25 10:10:10.555555'`.
`INTERVAL` | Requires supported [`INTERVAL`](interval.html) string format, e.g., `'1h2m3s4ms5us6ns'`.
`BYTES` | Requires supported [`BYTES`](bytes.html) string format, e.g., `b'\141\061\142\062\143\063'`.

## See Also

Expand Down

0 comments on commit 6cc13ba

Please sign in to comment.