err:=d.db.QueryRowContext(ctx,"SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE TABLE_NAME = 'memo' AND TABLE_TYPE = 'BASE TABLE')").Scan(&exists)
err:=d.db.QueryRowContext(ctx,"SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'memo' AND TABLE_TYPE = 'BASE TABLE')").Scan(&exists)
iferr!=nil{
iferr!=nil{
returnfalse,errors.Wrap(err,"failed to check if database is initialized")
returnfalse,errors.Wrap(err,"failed to check if database is initialized")
err:=d.db.QueryRowContext(ctx,"SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'memo' AND table_type = 'BASE TABLE')").Scan(&exists)
err:=d.db.QueryRowContext(ctx,"SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_catalog = current_database() AND table_name = 'memo' AND table_type = 'BASE TABLE')").Scan(&exists)
iferr!=nil{
iferr!=nil{
returnfalse,errors.Wrap(err,"failed to check if database is initialized")
returnfalse,errors.Wrap(err,"failed to check if database is initialized")