protocol library
Wire protocol shared by the Flutter DB Inspector runtime and its clients (DevTools, VS Code, Android Studio).
Everything in this library is pure Dart and free of any database or UI dependency.
Classes
- ColumnInfo
- DatabaseDescriptor
- A registered database as seen by clients.
- DatabaseMetadata
-
Engine metadata for
database.info. - DatabaseStats
-
Result of
database.stats. - DbValueCodec
- Encodes raw Dart values into protocol JSON values and back.
- EntitySummary
-
A table/view/collection listed by
schema.list. - ErrorCodes
- Standard error codes. Clients must tolerate codes they do not know.
- ForeignKeyInfo
- IndexInfo
- InspectorError
- A structured protocol error. Raw exceptions are never sent over the wire.
- InspectorEvents
-
Events posted on the VM service
Extensionstream. - InspectorFailure
- InspectorLimits
- Safety limits protecting the running application.
- InspectorRequest
- A protocol request.
- InspectorResponse
- A protocol response: either InspectorSuccess or InspectorFailure.
- InspectorStatus
-
Result of
inspector.status. - InspectorSuccess
- MaskedValue
- Sentinel the runtime substitutes for sensitive values.
- Methods
- Protocol method names.
- MutationResult
- ResultColumn
- A column in a result set.
- RowFilter
- RowRecord
- One row: raw values in column order plus the key used for edits.
- RowSort
- RowsPage
-
Result of
rows.query. - RowsQuery
-
Parameters of
rows.query(and, without paging,rows.count). - SchemaOverview
-
Result of
schema.list. - SqlRequest
-
Parameters of
query.execute. - SqlResult
-
Result of
query.execute. - TableSchema
-
Result of
schema.table. - TriggerInfo
- TruncatedValue
-
A value an adapter could only partially read (e.g. a large text or blob
column). preview is a
StringorUint8List; totalBytes is the size of the full value. - ValueChunk
- A slice of a large value. Text is returned as UTF-8 bytes so slices can be concatenated byte-exactly by the client.
- ValueEncodingOptions
- Limits applied when encoding values for a response.
- ValueRef
-
Addresses one value for chunked reads (
value.read).
Enums
- DbCapability
- Operations a database adapter may support. Clients hide everything an adapter does not advertise.
- DbDataModel
- How an engine organises data. Clients use it for terminology and layout (Tables/Rows vs Collections/Objects vs Boxes/Entries); behaviour is driven by DbCapability, never by the engine name.
- DbValueType
- Normalized value types so every engine renders through the same UI.
- EntityKind
- Kinds of browsable entities. Non-SQL engines use collection, box or store instead of being forced into a table model.
- FilterOperator
- InspectorMode
- Inspector modes. disabled never registers the service extension.
- RowKeyKind
- How rows of an entity are identified for edits.
- SortDirection
- SqlStatementKind
Constants
- protocolVersion → const int
- Protocol version spoken by this package.
- serviceExtensionName → const String
- The single VM service extension through which every request flows.
- serviceExtensionRequestParam → const String
- Name of the service extension parameter carrying the JSON request.
-
supportedProtocolVersions
→ const List<
int> - Every protocol major version this package can still answer.
Functions
Typedefs
Exceptions / Errors
- InspectorException
- Thrown inside the runtime and adapters; converted to an error response by the router.