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 DeleteRTInfo(oref waveobj.ORef)
- func GetDBName() string
- func GetOldDBName() string
- func GetRTInfo(oref waveobj.ORef) *waveobj.ObjRTInfo
- 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 SetRTInfo(oref waveobj.ORef, info map[string]any)
- 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 DeleteRTInfo ¶ added in v0.12.2
DeleteRTInfo removes the ObjRTInfo for the given ORef
func GetOldDBName ¶
func GetOldDBName() string
func GetRTInfo ¶ added in v0.12.2
GetRTInfo returns the ObjRTInfo for the given ORef, or nil if not found
func InitWStore ¶
func InitWStore() error
func MoveBlockToTab ¶
func ReplaceOldHistory ¶
func ReplaceOldHistory(ctx context.Context, hist []*OldHistoryType) error
func SetRTInfo ¶ added in v0.12.2
SetRTInfo merges the provided info map into the ObjRTInfo for the given ORef. Only updates fields that exist in the ObjRTInfo struct. Removes fields that have nil values.
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.