forked from warrant-dev/warrant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build tag for sqlite + stubbed sqlite db (warrant-dev#76)
- Loading branch information
Showing
3 changed files
with
45 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//go:build !sqlite | ||
// +build !sqlite | ||
|
||
package database | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/warrant-dev/warrant/pkg/config" | ||
) | ||
|
||
type SQLite struct { | ||
SQL | ||
Config config.SQLiteConfig | ||
} | ||
|
||
func NewSQLite(config config.SQLiteConfig) *SQLite { | ||
return nil | ||
} | ||
|
||
func (ds SQLite) Type() string { | ||
return TypeSQLite | ||
} | ||
|
||
func (ds *SQLite) Connect(ctx context.Context) error { | ||
return fmt.Errorf("sqlite not supported") | ||
} | ||
|
||
func (ds SQLite) Migrate(ctx context.Context, toVersion uint) error { | ||
return fmt.Errorf("sqlite not supported") | ||
} | ||
|
||
func (ds SQLite) Ping(ctx context.Context) error { | ||
return fmt.Errorf("sqlite not supported") | ||
} |
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,3 +1,6 @@ | ||
//go:build sqlite | ||
// +build sqlite | ||
|
||
package database | ||
|
||
import ( | ||
|