Skip to content

Commit

Permalink
Merge pull request #2258 from dolthub/gitbook-dev
Browse files Browse the repository at this point in the history
update doltlab docs, pickup other changes
  • Loading branch information
coffeegoddd committed Jun 12, 2024
2 parents 65adb02 + 4b59257 commit d85b252
Show file tree
Hide file tree
Showing 7 changed files with 399 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ title: Dolt SQL Functions
- [dolt_merge_base()](#dolt_merge_base)
- [dolt_hashof()](#dolt_hashof)
- [dolt_hashof_table()](#dolt_hashof_table)
- [dolt_hashof_db()](#dolt_hashof_db)
- [dolt_version()](#dolt_version)
- [has_ancestor()](#has_ancestor)
- [last_insert_uuid()](#last_insert_uuid)
Expand Down Expand Up @@ -77,6 +78,33 @@ mysql> SELECT dolt_hashof_table('color');
1 row in set (0.01 sec)
```

## `DOLT_HASHOF_DB()`

The `DOLT_HASHOF_DB()` function returns the value hash of the entire versioned database. The hash is the hash of all tables
(schema and data) in the database, and includes additional versioned items such as stored procedures and triggers. The hash
does not include unversioned items such as tables which have been [ignored](dolt-system-tables.md#dolt_ignore). The function
takes an optional argument to specify a branch or one of the values of 'STAGED', 'WORKING', or 'HEAD' (default no argument call
is equivalent to 'WORKING').

This function can be used to watch for changes in the database by storing previous hashes in your application and comparing them
to the current hash. For example, you can use this function to get the hash of the entire database like so:

```sql
mysql> SELECT dolt_hashof_db();
+----------------------------------+
| dolt_hashof_db() |
+----------------------------------+
| 1q8t28sb3h5g2lnhiojacpi7s09p4csj |
+----------------------------------+
```

It should be noted that if you are connected to branch 'main' and you call `dolt_hashof_db('feature')`, the hash may be different
than if you were connected to branch 'feature' and called `dolt_hashof_db()`. This happens if there exist changes to the working set on
branch 'feature' that have not been committed. Calling `dolt_hashof_db('feature')` while on 'main' is equivalent to calling
`dolt_hashof_db('HEAD')` while on branch 'feature'.

The general recommendation when trying to look for changes to the database is to connect to the branch you want to use, then
call `dolt_hashof_db()` without any arguments. Any change in the hash means that the database has changed.

## `DOLT_VERSION()`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ title: Dolt SQL Functions
- [dolt_merge_base()](#dolt_merge_base)
- [dolt_hashof()](#dolt_hashof)
- [dolt_hashof_table()](#dolt_hashof_table)
- [dolt_hashof_db()](#dolt_hashof_table)
- [dolt_version()](#dolt_version)
- [has_ancestor()](#has_ancestor)

Expand Down Expand Up @@ -76,6 +77,34 @@ SELECT dolt_hashof_table('color');
1 row in set (0.01 sec)
```

## `DOLT_HASHOF_DB()`

The `DOLT_HASHOF_DB()` function returns the value hash of the entire versioned database. The hash is the hash of all tables
(schema and data) in the database, and includes additional versioned items such as stored procedures and triggers. The hash
does not include unversioned items such as tables which have been [ignored](dolt-system-tables.md#dolt_ignore). The function
takes an optional argument to specify a branch or one of the values of 'STAGED', 'WORKING', or 'HEAD' (default no argument call
is equivalent to 'WORKING').

This function can be used to watch for changes in the database by storing previous hashes in your application and comparing them
to the current hash. For example, you can use this function to get the hash of the entire database like so:

```sql
mysql> SELECT dolt_hashof_db();
+----------------------------------+
| dolt_hashof_db() |
+----------------------------------+
| 1q8t28sb3h5g2lnhiojacpi7s09p4csj |
+----------------------------------+
```

It should be noted that if you are connected to branch 'main' and you call `dolt_hashof_db('feature')`, the hash may be different
than if you were connected to branch 'feature' and called `dolt_hashof_db()`. This happens if there exist changes to the working set on
branch 'feature' that have not been committed. Calling `dolt_hashof_db('feature')` while on 'main' is equivalent to calling
`dolt_hashof_db('HEAD')` while on branch 'feature'.

The general recommendation when trying to look for changes to the database is to connect to the branch you want to use, then
call `dolt_hashof_db()` without any arguments. Any change in the hash means that the database has changed.

## `DOLT_VERSION()`

The `DOLT_VERSION()` function returns the version string for the Dolt
Expand Down
1 change: 1 addition & 0 deletions packages/doltlab/content/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- [Configuration file reference](reference/installer/configuration-file.md)
- [Command line reference](reference/installer/cli.md)
- [Release Notes](reference/release-notes/README.md)
- [v2.1.6](reference/release-notes/v2.1.6.md)
- [v2.1.5](reference/release-notes/v2.1.5.md)
- [v2.1.4](reference/release-notes/v2.1.4.md)
- [v2.1.3](reference/release-notes/v2.1.3.md)
Expand Down
82 changes: 80 additions & 2 deletions packages/doltlab/content/reference/installer/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@ _String_. The docker network to run DoltLab in, (default "doltlab").

Configuration file equivalent [docker_network](./configuration-file.md#docker_network).

## doltlabapi-asyncworker-aws-sqs-queue

_String_. The name of the SQS queue used for processing asynchronous tasks, DoltLab Enterprise only.

Configuration file equivalent [asyncworker_aws_sqs_queue](./configuration-file.md#asyncworker_aws_sqs_queue).

## doltlabapi-aws-region

_String_. The AWS region for 'doltlabapi' cloud storage AWS resources, DoltLab Enterprise only.

Configuration file equivalent [aws_region](./configuration-file.md#doltlabapi-aws-region).

## doltlabapi-csv-port

_Number_. The port for `doltlabapi`'s CSV service.
Expand All @@ -180,12 +192,36 @@ _Number_. The port for `doltlabapi`.

Configuration file equivalent [port](./configuration-file.md#doltlabapi-port).

## -doltlabdb-admin-password
## doltlabapi-query-job-aws-s3-bucket

_String_. The name of the S3 bucket used to store the results of SQL query Jobs, DoltLab Enterprise only.

Configuration file equivalent [query_job_aws_bucket](./configuration-file.md#query_job_aws_bucket).

## doltlabdb-admin-password

_String_. The `dolthubadmin` SQL user password of the `doltlabdb` instance.

Configuration file equivalent [admin_password](./configuration-file.md#admin_password).

## doltlabdb-backups-volume-host-path

_String_. The path to an existing directory on the DoltLab host used for persisting the 'doltlabdb-dolt-backups' Docker volume.

Configuration file equivalent [backups_volume_path](./configuration-file.md#backups_volume_path).

## doltlabdb-config-volume-host-path

_String_. The path to an existing directory on the DoltLab host used for persisting the 'doltlabdb-dolt-configs' Docker volume.

Configuration file equivalent [configs_volume_path](./configuration-file.md#configs_volume_path).

## doltlabdb-data-volume-host-path

_String_. The path to an existing directory on the DoltLab host used for persisting the 'doltlabdb-dolt-data' Docker volume.

Configuration file equivalent [data_volume_path](./configuration-file.md#doltlabdb-data-volume-path).

## doltlabdb-dolthubapi-password

_String_. The `dolthubapi` SQL user password of the `doltlabdb` instance.
Expand All @@ -210,6 +246,12 @@ _Number_. The port of `doltlabdb`.

Configuration file equivalent [port](./configuration-file.md#doltlabdb-port).

## doltlabdb-root-volume-host-path

_String_. The path to an existing directory on the DoltLab host used for persisting the 'doltlabdb-dolt-root' Docker volume.

Configuration file equivalent [root_volume_path](./configuration-file.md#root_volume_path).

## doltlabdb-tls-skip-verify

_Boolean_. If true, will disable TLS verification for connection to `doltlabdb`.
Expand All @@ -234,6 +276,12 @@ _Number_. The port for `doltlabfileserviceapi`.

Configuration file equivalent [port](./configuration-file.md#doltlabfileserviceapi-port).

## doltlabfileserviceapi-uploads-volume-host-path

_String_. The path to an existing directory on the DoltLab host for persisting the 'doltlab-user-uploads' Docker volume.

Configuration file equivalent [uploads_volume_path](./configuration-file.md#uploads_volume_path).

## doltlabgraphql-host

_String_. The hostname or IP address for `doltlabgraphql`.
Expand All @@ -252,6 +300,12 @@ _Number_. The port for `doltlabgraphql`.

Configuration file equivalent [port](./configuration-file.md#doltlabgrapqhl-port).

## doltlabremoteapi-data-volume-host-path

_String_. The path to an existing directory on the DoltLab host used for persisting the 'doltlab-remote-storage' Docker volume.

Configuration file equivalent [data_volume_path](./configuration-file.md#doltlabremoteapi-data-volume-path).

## doltlabremoteapi-file-server-port

_Number_. The port for `doltlabremoteapi`'s file server.
Expand All @@ -274,7 +328,25 @@ Configuration file equivalent [doltlabremoteapi_only](./configuration-file.md#do

_Number_. The port for `doltlabremoteapi`.

Configuration file equivalent [port](#doltlabremoteapi-port).
Configuration file equivalent [port](./configuration-file.md#doltlabremoteapi-port).

## doltlabremoteapi-storage-aws-bucket

_String_. The AWS S3 bucket used for storing remote data files. DoltLab Enterprise only.

Configuration file equivalent [aws_bucket](./configuration-file.md#doltlabremoteapi-aws-bucket).

## doltlabremoteapi-storage-aws-dynamodb-table

_String_. The AWS DynamoDb table name used for storing the manifest of remote databases. DoltLab Enterprise only.

Configuration file equivalent [aws_dynamodb_table](./configuration-file.md#aws_dynamodb_table).

## doltlabremoteapi-storage-aws-region

_String_. The AWS region where the DynamoDb table is located. DoltLab Enterprise only.

Configuration file equivalent [aws_region](./configuration-file.md#doltlabremoteapi-aws-region).

## doltlabui-host

Expand Down Expand Up @@ -476,6 +548,12 @@ Configuration file equivalent [private_key](./configuration-file.md#private_key)

_Boolean_. If true will generate a script to install DoltLab's dependencies on Ubuntu.

## use-env

_Boolean_. If true, sensitive values will not be written to generated assets and environment variables will be expected instead.

Configuration file equivalent [use_env](./configuration-file.md#use_env).

## whitelist-all-users

_Boolean_. If true, allows all users create accounts on a DoltLab instance, (default true).
Expand Down
Loading

0 comments on commit d85b252

Please sign in to comment.