Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 9 additions & 9 deletions docs/API_REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1891,7 +1891,7 @@ Returns `next` unchanged when `cfg.AuthEnabled()` is false. When enabled, enforc
| `lint_sql` | Style rule enforcement (L001–L010) |
| `analyze_sql` | Concurrent composite of all 6 above |

See [MCP Server Guide](MCP_GUIDE.md) for complete tool schemas and JSON response formats.
See [MCP Server Guide](/docs/mcp-guide) for complete tool schemas and JSON response formats.

---

Expand Down Expand Up @@ -2317,14 +2317,14 @@ GoSQLX achieves **~80-85% SQL-99 compliance** with comprehensive support for:

- **GitHub Repository**: https://github.com/ajitpratap0/GoSQLX
- **Documentation**: See `/docs` directory
- `GETTING_STARTED.md` - Quick start guide
- `MCP_GUIDE.md` - MCP server and AI assistant integration
- `USAGE_GUIDE.md` - Comprehensive usage guide
- `LSP_GUIDE.md` - LSP server and IDE integration
- `LINTING_RULES.md` - All 10 linting rules reference
- `CONFIGURATION.md` - Configuration file guide
- `SQL_COMPATIBILITY.md` - SQL dialect compatibility matrix
- `ERROR_CODES.md` - Complete error code reference
- [Getting Started](/docs/getting-started) - Quick start guide
- [MCP Server Guide](/docs/mcp-guide) - MCP server and AI assistant integration
- [Usage Guide](/docs/usage-guide) - Comprehensive usage guide
- [LSP Guide](/docs/lsp-guide) - LSP server and IDE integration
- [Linting Rules](/docs/linting-rules) - All 10 linting rules reference
- [Configuration](/docs/configuration) - Configuration file guide
- [SQL Compatibility](/docs/sql-compatibility) - SQL dialect compatibility matrix
- [Error Codes](/docs/error-codes) - Complete error code reference
- **Examples**: See `/examples` directory
- **Issue Tracker**: GitHub Issues
- **License**: Apache-2.0
Expand Down
22 changes: 11 additions & 11 deletions docs/CLI_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ gosqlx lint [file...] [flags]
| L009 | Aliasing Consistency | No | Detects mixed table aliasing |
| L010 | Redundant Whitespace | Yes | Finds multiple consecutive spaces |

See [LINTING_RULES.md](LINTING_RULES.md) for complete rule documentation.
See [Linting Rules](/docs/linting-rules) for complete rule documentation.

#### Examples

Expand Down Expand Up @@ -617,7 +617,7 @@ require('lspconfig').gosqlx.setup{}
:server-id 'gosqlx))
```

See [LSP_GUIDE.md](LSP_GUIDE.md) for complete LSP documentation.
See [LSP Guide](/docs/lsp-guide) for complete LSP documentation.

---

Expand Down Expand Up @@ -715,7 +715,7 @@ linter:
L010: enabled # Redundant whitespace
```

See [CONFIGURATION.md](CONFIGURATION.md) for complete configuration guide.
See [Configuration](/docs/configuration) for complete configuration guide.

---

Expand Down Expand Up @@ -1005,7 +1005,7 @@ $ gosqlx validate /dev/null
Error: not a regular file: /dev/null
```

For more details, see the [Security Validation Package](../cmd/gosqlx/internal/validate/README.md).
For more details, see the [Security Validation Package](https://github.com/ajitpratap0/GoSQLX/tree/main/cmd/gosqlx/internal/validate).

---

Expand Down Expand Up @@ -1388,18 +1388,18 @@ To contribute to the GoSQLX CLI:
3. Add tests for new CLI features
4. Submit a pull request

See [CONTRIBUTING.md](../CONTRIBUTING.md) for detailed guidelines.
See [CONTRIBUTING.md](https://github.com/ajitpratap0/GoSQLX/blob/main/CONTRIBUTING.md) for detailed guidelines.

---

## Related Documentation

- [LSP Guide](LSP_GUIDE.md) - Complete LSP server documentation and IDE integration
- [Linting Rules](LINTING_RULES.md) - All 10 linting rules (L001-L010) reference
- [Configuration Guide](CONFIGURATION.md) - Configuration file (.gosqlx.yml) guide
- [Getting Started](GETTING_STARTED.md) - Quick start guide for new users
- [Usage Guide](USAGE_GUIDE.md) - Comprehensive usage guide
- [SQL Compatibility](SQL_COMPATIBILITY.md) - SQL dialect compatibility matrix
- [LSP Guide](/docs/lsp-guide) - Complete LSP server documentation and IDE integration
- [Linting Rules](/docs/linting-rules) - All 10 linting rules (L001-L010) reference
- [Configuration Guide](/docs/configuration) - Configuration file (.gosqlx.yml) guide
- [Getting Started](/docs/getting-started) - Quick start guide for new users
- [Usage Guide](/docs/usage-guide) - Comprehensive usage guide
- [SQL Compatibility](/docs/sql-compatibility) - SQL dialect compatibility matrix

---

Expand Down
8 changes: 4 additions & 4 deletions docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,9 @@ git commit -m "config: update GoSQLX settings"

## Related Documentation

- [CLI Guide](CLI_GUIDE.md) - Complete CLI reference
- [Linting Rules](LINTING_RULES.md) - Linting rules reference
- [API Reference](API_REFERENCE.md) - Full API documentation
- [CLI Guide](/docs/cli-guide) - Complete CLI reference
- [Linting Rules](/docs/linting-rules) - Linting rules reference
- [API Reference](/docs/api-reference) - Full API documentation

---

Expand Down Expand Up @@ -524,7 +524,7 @@ GOSQLX_MCP_HOST=0.0.0.0 GOSQLX_MCP_PORT=8080 GOSQLX_MCP_AUTH_TOKEN=my-secret gos
- `GOSQLX_MCP_PORT` rejects out-of-range or non-integer values at startup with a descriptive error.
- MCP server configuration is independent of `.gosqlx.yml` - the YAML config file is not read by `gosqlx-mcp`.

See [MCP Server Guide](MCP_GUIDE.md) for the full startup and auth reference.
See [MCP Server Guide](/docs/mcp-guide) for the full startup and auth reference.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ gosqlx lsp --log /tmp/lsp.log
- **[Linting Rules](/docs/linting-rules)** - All 10 linting rules (L001-L010) reference
- **[Configuration](/docs/configuration)** - Configuration file (.gosqlx.yml) guide
- **[API Reference](/docs/api-reference)** - Complete API documentation
- **[Examples](../examples/)** - Real-world code examples
- **[Examples](https://github.com/ajitpratap0/GoSQLX/tree/main/examples)** - Real-world code examples

### v1.12.0 Feature Guides:
- **PostgreSQL Extensions:**
Expand Down
6 changes: 3 additions & 3 deletions docs/LINTING_RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,9 @@ jobs:

## Related Documentation

- [CLI Guide](CLI_GUIDE.md) - Complete CLI reference
- [Configuration Guide](CONFIGURATION.md) - Configuration options
- [API Reference](API_REFERENCE.md) - Full API documentation
- [CLI Guide](/docs/cli-guide) - Complete CLI reference
- [Configuration Guide](/docs/configuration) - Configuration options
- [API Reference](/docs/api-reference) - Full API documentation

---

Expand Down
2 changes: 1 addition & 1 deletion docs/SQL_COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,6 @@ gosqlx format --dialect mysql query.sql

### Migration Notes
- **From v1.7.0**: High-level API (`gosqlx.Parse()`, `gosqlx.Validate()`) is fully backward compatible
- **Breaking**: `token.Token.ModelType` renamed to `Type`; string-based `token.Type` removed. See [MIGRATION.md](MIGRATION.md)
- **Breaking**: `token.Token.ModelType` renamed to `Type`; string-based `token.Type` removed. See [MIGRATION.md](https://github.com/ajitpratap0/GoSQLX/blob/main/docs/MIGRATION.md)
- **MySQL Users**: Use `parser.ParseWithDialect(sql, "mysql")` for MySQL-specific syntax
- **Performance**: ~50% faster parsing from token type overhaul
4 changes: 2 additions & 2 deletions docs/USAGE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,7 @@ The LSP server provides:
- Helpful error messages
- Suggested fixes

For complete LSP documentation, see [LSP_GUIDE.md](./LSP_GUIDE.md).
For complete LSP documentation, see [LSP Guide](/docs/lsp-guide).

## CLI Tool Usage (v1.6.0)

Expand Down Expand Up @@ -1519,7 +1519,7 @@ lsp:
hover_enabled: true
```

For complete configuration documentation, see [CONFIGURATION.md](./CONFIGURATION.md).
For complete configuration documentation, see [Configuration](/docs/configuration).

### CLI Examples

Expand Down
32 changes: 19 additions & 13 deletions website/public/wasm-sw.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
const WASM_CACHE = 'gosqlx-wasm-7fe84bbe';
const CACHE_VERSION = 'v2'; // Bump this when deploying new WASM binary
const CACHE_NAME = `gosqlx-wasm-${CACHE_VERSION}`;
const WASM_URL = '/wasm/gosqlx.wasm';

self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(WASM_CACHE).then((cache) => cache.add(WASM_URL))
caches.open(CACHE_NAME).then((cache) => cache.add(WASM_URL))
);
self.skipWaiting();
});

self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((keys) =>
Promise.all(keys.filter((k) => k !== WASM_CACHE).map((k) => caches.delete(k)))
caches.keys().then((cacheNames) =>
Promise.all(
cacheNames
.filter((name) => name.startsWith('gosqlx-wasm-') && name !== CACHE_NAME)
.map((name) => caches.delete(name))
)
)
);
self.clients.claim();
});

self.addEventListener('fetch', (event) => {
if (event.request.url.endsWith('gosqlx.wasm')) {
if (event.request.url.includes('/wasm/gosqlx.wasm')) {
event.respondWith(
caches.match(event.request).then((cached) => {
if (cached) return cached;
return fetch(event.request).then((response) => {
const clone = response.clone();
caches.open(WASM_CACHE).then((cache) => cache.put(event.request, clone));
return response;
});
})
caches.open(CACHE_NAME).then((cache) =>
cache.match(event.request).then(
(cached) => cached || fetch(event.request).then((response) => {
if (response.ok) cache.put(event.request, response.clone());
return response;
})
)
)
);
}
});
Loading