MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / Drop

Function Drop

client/driver.go:304–321  ·  view source on GitHub ↗

Drop sends drop database operation to block producer.

(dsn string)

Source from the content-addressed store, hash-verified

302
303// Drop sends drop database operation to block producer.
304func Drop(dsn string) (txHash hash.Hash, err error) {
305 if atomic.LoadUint32(&driverInitialized) == 0 {
306 err = ErrNotInitialized
307 return
308 }
309
310 var cfg *Config
311 if cfg, err = ParseDSN(dsn); err != nil {
312 return
313 }
314
315 peerList.Delete(cfg.DatabaseID)
316
317 //TODO(laodouya) currently not supported
318 //err = errors.New("drop db current not support")
319
320 return
321}
322
323// GetTokenBalance get the token balance of current account.
324func GetTokenBalance(tt types.TokenType) (balance uint64, err error) {

Callers 7

DropMethod · 0.92
TestFullProcessFunction · 0.92
runDropFunction · 0.92
benchMinerFunction · 0.92
TestDropFunction · 0.85

Calls 2

ParseDSNFunction · 0.85
DeleteMethod · 0.80

Tested by 5

TestFullProcessFunction · 0.74
benchMinerFunction · 0.74
TestDropFunction · 0.68