1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/bigpigeon-toyorm

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
preload.go 1.4 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
bigpigeon Отправлено 19.03.2018 05:57 7f9f3a4
/*
* Copyright 2018. bigpigeon. All rights reserved.
* Use of this source code is governed by a MIT style
* license that can be found in the LICENSE file.
*/
package toyorm
// this is describe one to one relationship with table and its sub table
// e.g select * from sub_table where id = (table.RelationField).value
type BelongToPreload struct {
Model *Model
SubModel *Model
RelationField Field
// used to save other table value
ContainerField Field
}
// this is describe one to one relationship with table and its sub table
// e.g select * from sub_table where sub_table.RelationField = table.id;
type OneToOnePreload struct {
Model *Model
SubModel *Model
RelationField Field
// used to save other table value
ContainerField Field
}
// this is describe one to many relationship with table and its sub table
//e.g select * from sub_table where sub_table.RelationField = table.id
type OneToManyPreload struct {
Model *Model
SubModel *Model
RelationField Field
ContainerField Field
}
// this is describe many to many relationship with table and its sub table
// e.g select * from middle_table where table.id = table.id and sub_table.id = (table.RelationField).value
type ManyToManyPreload struct {
MiddleModel *Model
Model *Model
SubModel *Model
ContainerField Field
RelationField Field
SubRelationField Field
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/bigpigeon-toyorm.git
git@api.gitlife.ru:oschina-mirror/bigpigeon-toyorm.git
oschina-mirror
bigpigeon-toyorm
bigpigeon-toyorm
master