persist

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Id   sql.NullInt32 `d3:"pk:auto"`
	Name string
}

d3_table:author_p

func (*Author) D3Token

func (a *Author) D3Token() entity.MetaToken

type Book

type Book struct {
	Id      sql.NullInt32      `d3:"pk:auto"`
	Authors *entity.Collection `d3:"many_to_many:<target_entity:Author,join_on:book_id,reference_on:author_id,join_table:book_author_p>,type:lazy"`
	Name    string
}

d3_table:book_p

func (*Book) D3Token

func (b *Book) D3Token() entity.MetaToken

type SellerCirc

type SellerCirc struct {
	Id   sql.NullInt32 `d3:"pk:auto"`
	Name string

	CurrentShop *entity.Cell       `d3:"one_to_one:<target_entity:ShopCirc,join_on:shop_id>,type:lazy"`
	KnownShops  *entity.Collection `d3:"many_to_many:<target_entity:ShopCirc,join_on:seller_id,reference_on:shop_id,join_table:known_shop_seller_c>,type:lazy"`
}

d3_table:seller_c

func (*SellerCirc) D3Token

func (s *SellerCirc) D3Token() entity.MetaToken

type Shop

type Shop struct {
	Id      sql.NullInt32      `d3:"pk:auto"`
	Books   *entity.Collection `d3:"one_to_many:<target_entity:Book,join_on:shop_id,delete:nullable>,type:lazy"`
	Profile *entity.Cell       `d3:"one_to_one:<target_entity:ShopProfile,join_on:profile_id,delete:cascade>,type:lazy"`
	Name    string
}

d3_table:shop_p

func (*Shop) D3Token

func (s *Shop) D3Token() entity.MetaToken

type ShopCirc

type ShopCirc struct {
	Id   sql.NullInt32 `d3:"pk:auto"`
	Name string

	Profile *entity.Cell `d3:"one_to_one:<target_entity:ShopProfileCirc,join_on:profile_id>,type:lazy"`

	FriendShop *entity.Cell `d3:"one_to_one:<target_entity:ShopCirc,join_on:friend_id>,type:lazy"`

	TopSeller    *entity.Cell       `d3:"one_to_one:<target_entity:SellerCirc,join_on:top_seller_id>,type:lazy"`
	Sellers      *entity.Collection `d3:"one_to_many:<target_entity:SellerCirc,join_on:shop_id>,type:lazy"`
	KnownSellers *entity.Collection `d3:"many_to_many:<target_entity:SellerCirc,join_on:shop_id,reference_on:seller_id,join_table:known_shop_seller_c>,type:lazy"`
}

d3_table:shop_c

func (*ShopCirc) D3Token

func (s *ShopCirc) D3Token() entity.MetaToken

type ShopProfile

type ShopProfile struct {
	Id          sql.NullInt32 `d3:"pk:auto"`
	Description string
}

d3_table:profile_p

func (*ShopProfile) D3Token

func (s *ShopProfile) D3Token() entity.MetaToken

type ShopProfileCirc

type ShopProfileCirc struct {
	Id          sql.NullInt32 `d3:"pk:auto"`
	Shop        *entity.Cell  `d3:"one_to_one:<target_entity:ShopCirc,join_on:shop_id>,type:lazy"`
	Description string
}

d3_table:profile_c

func (*ShopProfileCirc) D3Token

func (s *ShopProfileCirc) D3Token() entity.MetaToken

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL