-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into katie.hockman/128-bit-bug
- Loading branch information
Showing
7 changed files
with
119 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Close stale PRs' | ||
# Docs: https://github.com/marketplace/actions/close-stale-issues | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
stale-pr-message: 'This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.' | ||
close-pr-message: 'This PR was closed because it has been open for 30 days with no activity.' | ||
start-date: '2023-08-20T00:00:00Z' #PRs before stale bot introduced should be ignored | ||
days-before-pr-close: 30 | ||
days-before-pr-stale: 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed | ||
// under the Apache License Version 2.0. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2016 Datadog, Inc. | ||
|
||
package sql | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/mattn/go-sqlite3" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestUseStatementContext(t *testing.T) { | ||
Register("sqlite3", &sqlite3.SQLiteDriver{}) | ||
db, err := Open("sqlite3", "file::memory:?cache=shared") | ||
require.NoError(t, err) | ||
defer db.Close() | ||
|
||
// Prepare using ctx1 | ||
ctx1, cancel := context.WithCancel(context.Background()) | ||
stmt, err := db.PrepareContext(ctx1, "SELECT 1") | ||
require.NoError(t, err) | ||
defer stmt.Close() | ||
cancel() | ||
|
||
// Query stmt using ctx2 | ||
ctx2 := context.Background() | ||
var result int | ||
require.NoError(t, stmt.QueryRowContext(ctx2).Scan(&result)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters