-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,173 additions
and
55 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
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 |
---|---|---|
@@ -1,5 +1,10 @@ | ||
package sqlite | ||
|
||
import "time" | ||
|
||
// Config holds sqlite configuration data. | ||
type Config struct { | ||
TablePrefix string `long:"table_prefix" description:"Prefix that will be added to each database table."` | ||
Filename string `long:"filename" description:"Full path to sqlite database file."` | ||
Timeout time.Duration `long:"timeout" description:"Database connection timeout. Set to zero to disable."` | ||
} |
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,26 @@ | ||
//go:build kvdb_sqlite | ||
// +build kvdb_sqlite | ||
|
||
package sqlite | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/btcsuite/btcwallet/walletdb/walletdbtest" | ||
"github.com/stretchr/testify/require" | ||
"golang.org/x/net/context" | ||
) | ||
|
||
// TestInterface performs all interfaces tests for this database driver. | ||
func TestInterface(t *testing.T) { | ||
fixture, err := NewSqliteTestFixture("test") | ||
require.NoError(t, err) | ||
defer fixture.Cleanup() | ||
|
||
// dbType is the database type name for this driver. | ||
const dbType = "sqlite" | ||
|
||
ctx := context.Background() | ||
|
||
walletdbtest.TestInterface(t, dbType, ctx, fixture.Config) | ||
} |
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
Oops, something went wrong.