renames
This commit is contained in:
parent
48ebd1330c
commit
3212a23741
@ -28,9 +28,6 @@ func withSetup(t *testing.T, f func(*kit.TestMiner)) {
|
|||||||
kit.LatestActorsAt(-1),
|
kit.LatestActorsAt(-1),
|
||||||
kit.MockProofs(),
|
kit.MockProofs(),
|
||||||
kit.ConstructorOpts(
|
kit.ConstructorOpts(
|
||||||
node.Override(new(config.ClusterDB), func() config.ClusterDB {
|
|
||||||
return staticConfig()
|
|
||||||
}),
|
|
||||||
node.Override(new(*clusterdb.DB), clusterdb.NewFromConfig), //Why does this not work?
|
node.Override(new(*clusterdb.DB), clusterdb.NewFromConfig), //Why does this not work?
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -35,12 +35,12 @@ type DB struct {
|
|||||||
log func(string)
|
log func(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
var logger = logging.Logger("sturdydb")
|
var logger = logging.Logger("clusterdb")
|
||||||
|
|
||||||
// NewFromConfig is a convenience function.
|
// NewFromConfig is a convenience function.
|
||||||
// In usage:
|
// In usage:
|
||||||
//
|
//
|
||||||
// db, err := NewFromConfig(config.SturdyDB) // in binary init
|
// db, err := NewFromConfig(config.ClusterDB) // in binary init
|
||||||
func NewFromConfig(cfg config.ClusterDB) (*DB, error) {
|
func NewFromConfig(cfg config.ClusterDB) (*DB, error) {
|
||||||
return New(
|
return New(
|
||||||
cfg.Hosts,
|
cfg.Hosts,
|
||||||
|
@ -19,7 +19,7 @@ type Intf interface {
|
|||||||
// rawStringOnly is _intentionally_private_ to force only basic strings in SQL queries.
|
// rawStringOnly is _intentionally_private_ to force only basic strings in SQL queries.
|
||||||
// In any package, raw strings will satisfy compilation. Ex:
|
// In any package, raw strings will satisfy compilation. Ex:
|
||||||
//
|
//
|
||||||
// sturdydb.Exec("INSERT INTO version (number) VALUES (1)")
|
// clusterDB.Exec("INSERT INTO version (number) VALUES (1)")
|
||||||
//
|
//
|
||||||
// This prevents SQL injection attacks where the input contains query fragments.
|
// This prevents SQL injection attacks where the input contains query fragments.
|
||||||
type rawStringOnly string
|
type rawStringOnly string
|
||||||
|
Loading…
Reference in New Issue
Block a user