Documentation ¶
Index ¶
- Constants
- Variables
- func CreateBlock(ctx context.Context, tabId string, blockDef *waveobj.BlockDef, ...) (*waveobj.Block, error)
- func CreateSubBlock(ctx context.Context, parentBlockId string, blockDef *waveobj.BlockDef) (*waveobj.Block, error)
- func CreateTab(ctx context.Context, workspaceId string, name string) (*waveobj.Tab, error)
- func CreateWorkspace(ctx context.Context) (*waveobj.Workspace, error)
- 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 DBFindWindowForTabId(ctx context.Context, tabId 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 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 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 DeleteBlock(ctx context.Context, blockId string) error
- func DeleteTab(ctx context.Context, workspaceId string, tabId string) 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 SetActiveTab(ctx context.Context, windowId string, tabId string) 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 UpdateWorkspaceTabIds(ctx context.Context, workspaceId string, tabIds []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 CreateBlock ¶
func CreateSubBlock ¶ added in v0.9.0
func DBFindTabForBlockId ¶
func DBFindWindowForTabId ¶
func DBFindWorkspaceForTabId ¶ added in v0.9.0
func DBGetSingletonByType ¶
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 ¶
func UpdateWorkspaceTabIds ¶
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.