Documentation ¶
Index ¶
- Constants
- Variables
- func DBDelete(ctx context.Context, otype string, id string) error
- func DBExistsORef(ctx context.Context, oref waveobj.ORef) (bool, error)
- func DBFindTabForBlockId(ctx context.Context, blockId string) (string, error)
- func DBFindWindowForWorkspaceId(ctx context.Context, workspaceId string) (string, error)
- func DBFindWorkspaceForTabId(ctx context.Context, tabId string) (string, error)
- func DBGet[T waveobj.WaveObj](ctx context.Context, id string) (T, error)
- func DBGetAllOIDsByType(ctx context.Context, otype string) ([]string, error)
- func DBGetAllObjsByType[T waveobj.WaveObj](ctx context.Context, otype string) ([]T, error)
- func DBGetBlockViewCounts(ctx context.Context) (map[string]int, error)
- func DBGetCount[T waveobj.WaveObj](ctx context.Context) (int, error)
- func DBGetORef(ctx context.Context, oref waveobj.ORef) (waveobj.WaveObj, error)
- func DBGetSingleton[T waveobj.WaveObj](ctx context.Context) (T, error)
- func DBGetSingletonByType(ctx context.Context, otype string) (waveobj.WaveObj, error)
- func DBGetWSCounts(ctx context.Context) (int, int, error)
- func DBInsert(ctx context.Context, val waveobj.WaveObj) error
- func DBMustGet[T waveobj.WaveObj](ctx context.Context, id string) (T, error)
- func DBResolveEasyOID(ctx context.Context, oid string) (*waveobj.ORef, error)
- func DBSelectMap[T waveobj.WaveObj](ctx context.Context, ids []string) (map[string]T, error)
- func DBSelectORefs(ctx context.Context, orefs []waveobj.ORef) ([]waveobj.WaveObj, error)
- func DBUpdate(ctx context.Context, val waveobj.WaveObj) error
- func GetDBName() string
- func GetOldDBName() string
- func InitWStore() error
- func MakeDB(ctx context.Context) (*sqlx.DB, error)
- func MakeOldDB(ctx context.Context) (*sqlx.DB, error)
- func MoveBlockToTab(ctx context.Context, currentTabId string, newTabId string, blockId string) error
- func ReplaceOldHistory(ctx context.Context, hist []*OldHistoryType) error
- func TryMigrateOldHistory() error
- func UpdateObjectMeta(ctx context.Context, oref waveobj.ORef, meta waveobj.MetaMapType, ...) error
- func UpdateTabName(ctx context.Context, tabId, name string) error
- func WithTx(ctx context.Context, fn func(tx *TxWrap) error) (rtnErr error)
- func WithTxRtn[RT any](ctx context.Context, fn func(tx *TxWrap) (RT, error)) (rtnVal RT, rtnErr error)
- type OldHistoryType
- type TxWrap
Constants ¶
View Source
const OldDBName = "~/.waveterm/waveterm.db"
View Source
const WStoreDBName = "waveterm.db"
Variables ¶
View Source
var ErrNotFound = fmt.Errorf("not found")
Functions ¶
func DBFindTabForBlockId ¶
func DBFindWindowForWorkspaceId ¶ added in v0.10.0
func DBFindWorkspaceForTabId ¶ added in v0.9.0
func DBGetAllOIDsByType ¶ added in v0.10.0
func DBGetAllObjsByType ¶ added in v0.10.0
func DBGetBlockViewCounts ¶ added in v0.10.0
func DBGetSingletonByType ¶
func DBGetWSCounts ¶ added in v0.10.0
returns (num named workespaces, num total workspaces, error)
func DBResolveEasyOID ¶
func DBSelectMap ¶
func DBSelectORefs ¶
func GetOldDBName ¶
func GetOldDBName() string
func InitWStore ¶
func InitWStore() error
func MoveBlockToTab ¶
func ReplaceOldHistory ¶
func ReplaceOldHistory(ctx context.Context, hist []*OldHistoryType) error
func TryMigrateOldHistory ¶
func TryMigrateOldHistory() error
func UpdateObjectMeta ¶
Types ¶
type OldHistoryType ¶
type OldHistoryType struct { HistoryId string Ts int64 RemoteName string HadError bool CmdStr string ExitCode int DurationMs int64 }
func GetAllOldHistory ¶
func GetAllOldHistory() ([]*OldHistoryType, error)
Click to show internal directories.
Click to hide internal directories.