SQL
Reading
Using the default branch
The SQL query to execute.
SHOW TABLESThe name of the database owner.
dolthubThe name of the database.
ip-to-countrySuccess
Query execution status
SuccessAdditional information about the query execution
Owner of the database
dolthubDatabase name
ip-to-countryCommit ref that the query is executed against
mainSQL query that was executed.
SHOW TABLESBad request. The request was invalid or could not be processed.
Specifying a ref
The SQL query to execute.
SELECT * FROM IPv4ToCountry WHERE CountryCode2Letter = 'AU'The name of the database owner.
dolthubThe name of the database.
ip-to-countryThe database ref to execute the query against.
newbranchSuccess
Query execution status
SuccessAdditional information about the query execution
Owner of the database
dolthubDatabase name
ip-to-countryCommit ref that the query is executed against
newbranchSQL query that was executed.
SELECT * FROM IPv4ToCountry WHERE CountryCode2Letter = 'AU'Bad request. The request was invalid or could not be processed.

Writing
1. Run query
Executes SQL write against to_branch (will be created from from_branch if it doesn't exist). If no query is provided, will merge to_branch into from_branch.
The name of the database owner.
dolthubThe name of the database.
SHAQThe base branch.
mainThe branch to write to. Will be created from the from_branch if it doesn't exist.
featureThe SQL query to execute. Use the request body instead for larger queries.
UPDATE player_season_stat_totals SET player_id=714287 WHERE player_id=15404617SQL write query to execute. Can be used in place of the query parameter for larger queries.
UPDATE player_season_stat_totals SET player_id=714287 WHERE player_id=15404617Success
Query execution status
SuccessAdditional information about the query execution
Operation created. Poll the operation endpoint to see the execution status of this query.Owner of the database
dolthubDatabase name
SHAQBase branch
mainBranch the query is executed on
mainSQL query that was executed.
UPDATE player_season_stat_totals SET player_id=714287 WHERE player_id=15404617Operation name that can be used to poll for the query result.
operations/72abb56b-d478-43ae-9a2d-c9602184c7abBad request. The request was invalid or could not be processed.
2. Poll operation
Poll the operation to check if the SQL write operation is done
The name of the database owner.
dolthubThe name of the database.
SHAQThe name of the operation
operations/72abb56b-d478-43ae-9a2d-c9602184c7abSuccess
The operation name
operations/72abb56b-d478-43ae-9a2d-c9602184c7abWhether or not the operation has completed
trueBad request. The request was invalid or could not be processed.
3. View changes
4. Merge changes
Last updated
Was this helpful?