cosmos-sdk/schema
2024-08-30 17:01:48 +00:00
..
addressutil feat(schema/indexer): add address codec param (#21361) 2024-08-20 15:01:29 +00:00
appdata refactor: use errors.New to replace fmt.Errorf with no parameters (#21394) 2024-08-25 11:41:31 +00:00
decoding refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
diff refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
indexer feat(schema/indexer): add address codec param (#21361) 2024-08-20 15:01:29 +00:00
logutil feat(schema): indexing API (#20647) 2024-07-09 11:20:31 +00:00
testing refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
view refactor(schema)!: move view interfaces from testing to schema (#21204) 2024-08-12 21:04:23 +00:00
CHANGELOG.md refactor(indexer/base): move to cosmossdk.io/schema (#20744) 2024-06-26 15:46:08 +00:00
decoder.go feat: make schema and core kv-pair updates compatible (#21223) 2024-08-08 20:24:29 +00:00
enum_test.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
enum.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
field_test.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
field.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
fields_test.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
fields.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
go.mod refactor(indexer/base): move to cosmossdk.io/schema (#20744) 2024-06-26 15:46:08 +00:00
kind_test.go feat(schema): add JSON marshaling for ModuleSchema (#21371) 2024-08-28 18:42:40 +00:00
kind.go feat(schema): add JSON marshaling for ModuleSchema (#21371) 2024-08-28 18:42:40 +00:00
module_schema_test.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
module_schema.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
name_test.go refactor(indexer/base): move to cosmossdk.io/schema (#20744) 2024-06-26 15:46:08 +00:00
name.go refactor(indexer/base): move to cosmossdk.io/schema (#20744) 2024-06-26 15:46:08 +00:00
object_type_test.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
object_type.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00
object_update_test.go refactor(indexer/base): move to cosmossdk.io/schema (#20744) 2024-06-26 15:46:08 +00:00
object_update.go refactor(indexer/base): move to cosmossdk.io/schema (#20744) 2024-06-26 15:46:08 +00:00
README.md refactor(indexer/base): move to cosmossdk.io/schema (#20744) 2024-06-26 15:46:08 +00:00
sonar-project.properties ci: enable ci for schema (#20888) 2024-07-05 10:52:49 +00:00
type.go refactor(schema)!: rename Schema -> TypeSet and other small renamings (#21446) 2024-08-30 17:01:48 +00:00

Logical State Schema Framework

The cosmossdk.io/schema base module is designed to provide a stable, zero-dependency base layer for specifying the logical representation of module state schemas and implementing state indexing. This is intended to be used primarily for indexing modules in external databases and providing a standard human-readable state representation for genesis import and export.

The schema defined in this library does not aim to be general purpose and cover all types of schemas, such as those used for defining transactions. For instance, this schema does not include many types of composite objects such as nested objects and arrays. Rather, the schema defined here aims to cover state schemas only which are implemented as key-value pairs and usually have direct mappings to relational database tables or objects in a document store.

Also, this schema does not cover physical state layout and byte-level encoding, but simply describes a common logical format.

HasModuleCodec Interface

Any module which supports logical decoding and/or encoding should implement the HasModuleCodec interface. This interface provides a way to get the codec for the module, which can be used to decode the module's state and/or apply logical updates.

State frameworks such as collections or orm should directly provide ModuleCodec implementations so that this functionality basically comes for free if a compatible framework is used. Modules that do not use one of these frameworks can choose to manually implement logical decoding and/or encoding.