# D1

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#D1">D1</a>

## Database

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#QueryResult">QueryResult</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseListResponse">DatabaseListResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseDeleteResponse">DatabaseDeleteResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseExportResponse">DatabaseExportResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseImportResponse">DatabaseImportResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseRawResponse">DatabaseRawResponse</a>

Methods:

- <code title="post /accounts/{account_id}/d1/database">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.New">New</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseNewParams">DatabaseNewParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#D1">D1</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="put /accounts/{account_id}/d1/database/{database_id}">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Update">Update</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseUpdateParams">DatabaseUpdateParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#D1">D1</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_id}/d1/database">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.List">List</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseListParams">DatabaseListParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination#V4PagePaginationArray">V4PagePaginationArray</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseListResponse">DatabaseListResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="delete /accounts/{account_id}/d1/database/{database_id}">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Delete">Delete</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, body <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseDeleteParams">DatabaseDeleteParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseDeleteResponse">DatabaseDeleteResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="patch /accounts/{account_id}/d1/database/{database_id}">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Edit">Edit</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseEditParams">DatabaseEditParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#D1">D1</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /accounts/{account_id}/d1/database/{database_id}/export">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Export">Export</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseExportParams">DatabaseExportParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseExportResponse">DatabaseExportResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="get /accounts/{account_id}/d1/database/{database_id}">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Get">Get</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, query <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseGetParams">DatabaseGetParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#D1">D1</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /accounts/{account_id}/d1/database/{database_id}/import">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Import">Import</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseImportParams">DatabaseImportParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseImportResponse">DatabaseImportResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /accounts/{account_id}/d1/database/{database_id}/query">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Query">Query</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseQueryParams">DatabaseQueryParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#QueryResult">QueryResult</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /accounts/{account_id}/d1/database/{database_id}/raw">client.D1.Database.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseService.Raw">Raw</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseRawParams">DatabaseRawParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination">pagination</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/packages/pagination#SinglePage">SinglePage</a>[<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseRawResponse">DatabaseRawResponse</a>], <a href="https://pkg.go.dev/builtin#error">error</a>)</code>

### TimeTravel

Response Types:

- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelGetBookmarkResponse">DatabaseTimeTravelGetBookmarkResponse</a>
- <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelRestoreResponse">DatabaseTimeTravelRestoreResponse</a>

Methods:

- <code title="get /accounts/{account_id}/d1/database/{database_id}/time_travel/bookmark">client.D1.Database.TimeTravel.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelService.GetBookmark">GetBookmark</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelGetBookmarkParams">DatabaseTimeTravelGetBookmarkParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelGetBookmarkResponse">DatabaseTimeTravelGetBookmarkResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
- <code title="post /accounts/{account_id}/d1/database/{database_id}/time_travel/restore">client.D1.Database.TimeTravel.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelService.Restore">Restore</a>(ctx <a href="https://pkg.go.dev/context">context</a>.<a href="https://pkg.go.dev/context#Context">Context</a>, databaseID <a href="https://pkg.go.dev/builtin#string">string</a>, params <a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelRestoreParams">DatabaseTimeTravelRestoreParams</a>) (\*<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1">d1</a>.<a href="https://pkg.go.dev/github.com/cloudflare/cloudflare-go/v6/d1#DatabaseTimeTravelRestoreResponse">DatabaseTimeTravelRestoreResponse</a>, <a href="https://pkg.go.dev/builtin#error">error</a>)</code>
