Skip to content

feat: execute stmt under cursor #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Mar 30, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ran just ready thanks to the helpful comment in CI
  • Loading branch information
juleswritescode committed Mar 28, 2025
commit 437d9010d16bd08dd553958bc1198b80603d21e8
134 changes: 99 additions & 35 deletions docs/schemas/0.0.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"properties": {
"$schema": {
"description": "A field for the [JSON schema](https://json-schema.org/) specification",
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"db": {
"description": "The configuration of the database connection",
Expand Down Expand Up @@ -70,45 +73,61 @@
"description": "The configuration of the database connection.",
"type": "object",
"properties": {
"allowStatementExecutionsAgainst": {
"anyOf": [
{
"$ref": "#/definitions/StringSet"
},
{
"type": "null"
}
]
},
"connTimeoutSecs": {
"description": "The connection timeout in seconds.",
"type": ["integer", "null"],
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"database": {
"description": "The name of the database.",
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"host": {
"description": "The host of the database.",
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"password": {
"description": "The password to connect to the database.",
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"port": {
"description": "The port of the database.",
"type": ["integer", "null"],
"type": [
"integer",
"null"
],
"format": "uint16",
"minimum": 0.0
},
"username": {
"description": "The username to connect to the database.",
"type": ["string", "null"]
},
"allowStatementExecutionsAgainst": {
"description": "A list of <host-glob>/<database-glob> strings. The LSP will offer an 'Execute Statement Under Cursor' command if you're connected to matching hosts/databases. Useful for quickly iterating migrations, for example.",
"anyOf": [
{
"$ref": "#/definitions/StringSet"
},
{
"type": "null"
}
],
"examples": ["*.myapp.com/test-db", "localhost/*", "127.0.0.1/*"]
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
Expand Down Expand Up @@ -141,7 +160,10 @@
},
"maxSize": {
"description": "The maximum allowed size for source code files in bytes. Files above this limit will be ignored for performance reasons. Defaults to 1 MiB",
"type": ["integer", "null"],
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 1.0
}
Expand All @@ -153,7 +175,10 @@
"properties": {
"enabled": {
"description": "if `false`, it disables the feature and the linter won't be executed. `true` by default",
"type": ["boolean", "null"]
"type": [
"boolean",
"null"
]
},
"ignore": {
"description": "A list of Unix shell style patterns. The formatter will ignore files/folders that will match these patterns.",
Expand Down Expand Up @@ -197,13 +222,19 @@
"properties": {
"after": {
"description": "Ignore any migrations before this timestamp",
"type": ["integer", "null"],
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"migrationsDir": {
"description": "The directory where the migration files are stored",
"type": ["string", "null"]
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
Expand All @@ -220,11 +251,18 @@
},
"RulePlainConfiguration": {
"type": "string",
"enum": ["warn", "error", "info", "off"]
"enum": [
"warn",
"error",
"info",
"off"
]
},
"RuleWithNoOptions": {
"type": "object",
"required": ["level"],
"required": [
"level"
],
"properties": {
"level": {
"description": "The severity of the emitted diagnostics by the rule",
Expand All @@ -242,11 +280,17 @@
"properties": {
"all": {
"description": "It enables ALL rules. The rules that belong to `nursery` won't be enabled.",
"type": ["boolean", "null"]
"type": [
"boolean",
"null"
]
},
"recommended": {
"description": "It enables the lint rules recommended by Postgres Tools. `true` by default.",
"type": ["boolean", "null"]
"type": [
"boolean",
"null"
]
},
"safety": {
"anyOf": [
Expand Down Expand Up @@ -278,7 +322,10 @@
},
"all": {
"description": "It enables ALL rules for this group.",
"type": ["boolean", "null"]
"type": [
"boolean",
"null"
]
},
"banDropColumn": {
"description": "Dropping a column may break existing clients.",
Expand Down Expand Up @@ -315,7 +362,10 @@
},
"recommended": {
"description": "It enables the recommended rules for this group",
"type": ["boolean", "null"]
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false
Expand All @@ -332,7 +382,9 @@
{
"description": "Integration with the git client as VCS",
"type": "string",
"enum": ["git"]
"enum": [
"git"
]
}
]
},
Expand All @@ -353,22 +405,34 @@
},
"defaultBranch": {
"description": "The main branch of the project",
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"enabled": {
"description": "Whether we should integrate itself with the VCS client",
"type": ["boolean", "null"]
"type": [
"boolean",
"null"
]
},
"root": {
"description": "The folder where we should check for VCS files. By default, we will use the same folder where `postgrestools.jsonc` was found.\n\nIf we can't find the configuration, it will attempt to use the current working directory. If no current working directory can't be found, we won't use the VCS integration, and a diagnostic will be emitted",
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"useIgnoreFile": {
"description": "Whether we should use the VCS ignore file. When [true], we will ignore the files specified in the ignore file.",
"type": ["boolean", "null"]
"type": [
"boolean",
"null"
]
}
},
"additionalProperties": false
}
}
}
}
Loading
Loading