Module backend

Source
Expand description

Contains the structure and implementation of the Language Server Protocol.

Structs§

Backend
The Backend struct implements the LanguageServer trait, and thus must provide implementations for its methods. Most imporant methods includes:
Completions
Represents the completion items that will be returned to the client when requested.
ExecuteCommandParseResponse
Represents the response from the parse command.
ExecuteCommandParseStatement
Represents the structure a client uses to understand statement’s kind and sql content.
InitializeOptions
Contains customizable options send by the client.
ParseResult
This is a re-implementation of mz_sql_parser::parser::StatementParseResult but replacing the sql code with a rope.
Schema
Represents the current schema, database and all its objects the client is using.
SchemaObject
Represents a Materialize object present in the schema, and its columns.
SchemaObjectColumn
Represents a column from an [ObjectType
TextDocumentItem 🔒

Enums§

ObjectType
Represents each possible object type admissible by the LSP.

Constants§

DEFAULT_FORMATTING_WIDTH
Default formatting width to use in the LanguageServer::formatting implementation.

Functions§

build_error 🔒
Builds a tower_lsp::jsonrpc::Error
offset_to_position 🔒
This function is a helper function that converts an offset in the file to a (line, column).
position_to_offset 🔒
This function converts a (line, column) position in the text to an offset in the file.