Merge branch 'main' into feat/better-sql-visualiser

This commit is contained in:
Kacper Kula 2025-08-10 10:14:49 +01:00
commit ba6a068d09
6 changed files with 10 additions and 9 deletions

View file

@ -0,0 +1,5 @@
---
"sqlseal": minor
---
adding global tables support - you can now define table that will be available in all your files

View file

@ -184,10 +184,11 @@ export class CodeblockProcessor extends MarkdownRenderChild {
const canvasViews = this.app.workspace.getLeavesOfType("canvas");
for (const leaf of canvasViews) {
const nodes = JSON.parse(leaf.view.data).nodes
const node = nodes.filter(n => n.text).find(n => n.text.contains(this.source))
const canvasView = leaf.view as any; // Canvas view has data and file properties not exposed in base View type
const nodes = JSON.parse(canvasView.data).nodes
const node = nodes.filter((n: any) => n.text).find((n: any) => n.text.contains(this.source))
if (node) {
this.cachedName = leaf.view.file.path
this.cachedName = canvasView.file.path
return this.cachedName as string
}
}

View file

@ -47,7 +47,6 @@ export class Editor {
this.createCodeblockProcessor(this.codeblockElement, this.query);
if (this.db) {
// Use enhanced schema visualizer with memory database
const vis = new SchemaVisualiser(this.db)
vis.show(structure)
} else {

View file

@ -2,8 +2,6 @@ export interface ColumnInfo {
name: string
type: string
}
// Legacy interface - kept for backward compatibility
export interface TableInfo {
name: string
columns: ColumnInfo[]

View file

@ -16,7 +16,7 @@ export class StatsRenderer implements ICellRendererComp {
this.sync()
}
public async init(params: ICellRendererParams<TableConfiguration, string, GlobalTablesView>) {
public init(params: ICellRendererParams<TableConfiguration, string, GlobalTablesView>) {
const { value, data, context } = params;
this.context = context
this.data = data!

File diff suppressed because one or more lines are too long