Documentation
¶
Overview ¶
Created at 2026-06-28
Index ¶
- type Address
- type AutoEmbedded
- type DeepNested
- type EmbeddedFields
- type EmbeddedPK
- type FullRoomMapping
- type MappingRoomID
- type OrgUser
- type PKWithAuto
- type PersonWithAddress
- type RoomID
- type RoomMapping
- type Rooms
- type RowWithAutoEmbed
- type RowWithDeepEmbed
- type RowWithEmbeddedPK
- type RowWithPKAuto
- type SomeID
- type SomeTable
- type TeacherID
- type TeacherKey
- type User
- type UserWithAge
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoEmbedded ¶
type AutoEmbedded struct {
CreatedAt string `qqm:"col=created_at;auto"`
UpdatedAt string `qqm:"col=updated_at;readonly"`
}
AutoEmbedded — структура с auto и readonly полями
type DeepNested ¶
type DeepNested struct {
EmbeddedFields `qqm:"prefix=deep_"`
Extra int `qqm:"col=extra"`
}
DeepNested — структура для тестов глубокой вложенности
type EmbeddedFields ¶
EmbeddedFields — структура с полями для тестов prefix
type EmbeddedPK ¶
type EmbeddedPK struct {
ID int64 `qqm:"pk;col=id"`
}
EmbeddedPK — структура с PK для тестов anonymous struct
type FullRoomMapping ¶
type FullRoomMapping struct {
RoomMapping
Author string `qqm:"col=author_name"`
}
FullRoomMapping — полная связь с автором
type MappingRoomID ¶
type MappingRoomID struct {
ID int64 `qqm:"pk"`
}
MappingRoomID — ключ комнаты для составного ключа (без auto)
type PKWithAuto ¶
type PKWithAuto struct {
ID int64 `qqm:"pk;auto"`
}
PKWithAuto — структура с auto PK
type PersonWithAddress ¶
type PersonWithAddress struct {
ID int64 `qqm:"pk"`
Name string
HomeAddress Address `qqm:"prefix=home_"`
WorkAddress Address `qqm:"prefix=work_"`
}
PersonWithAddress — структура с двумя именованными полями-структурами с префиксами
type RoomID ¶
type RoomID struct {
ID int64 `qqm:"pk;auto"`
}
RoomID — простой ключ с автогенерацией
type RoomMapping ¶
type RoomMapping struct {
MappingRoomID `qqm:"prefix=room_;ref=rooms.id"`
TeacherKey `qqm:"prefix=teacher_"`
From int64 `qqm:"col=time_from"`
To int64 `qqm:"col=time_to"`
CreatedAt int64 `qqm:"auto"`
}
RoomMapping — таблица связей комнат и преподавателей
type RowWithAutoEmbed ¶
type RowWithAutoEmbed struct {
ID int64 `qqm:"pk"`
AutoEmbedded
Value string `qqm:"col=value"`
}
RowWithAutoEmbed — структура с embedded auto/readonly полями
type RowWithDeepEmbed ¶
type RowWithDeepEmbed struct {
DeepNested `qqm:"prefix=nested_"`
TopField string `qqm:"col=top_field"`
}
RowWithDeepEmbed — структура с глубокой вложенностью
type RowWithEmbeddedPK ¶
type RowWithEmbeddedPK struct {
EmbeddedPK
EmbeddedFields `qqm:"prefix=usr_"`
Status string `qqm:"col=status"`
}
RowWithEmbeddedPK — структура с embedded PK и prefix
type RowWithPKAuto ¶
type RowWithPKAuto struct {
PKWithAuto
Name string `qqm:"col=name"`
}
RowWithPKAuto — структура с embedded auto PK
type TeacherKey ¶
type TeacherKey struct {
Key TeacherID `qqm:"pk;col=ID"`
}
TeacherKey — ключ преподавателя