mirror of
https://github.com/h-sphere/sql-seal.git
synced 2026-07-22 10:10:28 +00:00
Merge branch 'main' into feat/better-sql-visualiser
This commit is contained in:
commit
ba6a068d09
6 changed files with 10 additions and 9 deletions
5
.changeset/cool-knives-drop.md
Normal file
5
.changeset/cool-knives-drop.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"sqlseal": minor
|
||||
---
|
||||
|
||||
adding global tables support - you can now define table that will be available in all your files
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ export interface ColumnInfo {
|
|||
name: string
|
||||
type: string
|
||||
}
|
||||
|
||||
// Legacy interface - kept for backward compatibility
|
||||
export interface TableInfo {
|
||||
name: string
|
||||
columns: ColumnInfo[]
|
||||
|
|
|
|||
|
|
@ -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
Loading…
Reference in a new issue