Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DocumentsDAO ¶
type DocumentsDAO struct {
// contains filtered or unexported fields
}
func NewDocumentsDAO ¶
func NewDocumentsDAO(db *sqlx.DB) *DocumentsDAO
func (*DocumentsDAO) Insert ¶
func (dao *DocumentsDAO) Insert(do *dataobject.DocumentsDO) int64
insert into documents(document_id, access_hash, dc_id, file_path, file_size, uploaded_file_name, ext, mime_type, thumb_id, attributes) values (:document_id, :access_hash, :dc_id, :file_path, :file_size, :uploaded_file_name, :ext, :mime_type, :thumb_id, :attributes) TODO(@benqi): sqlmap
func (*DocumentsDAO) SelectByFileLocation ¶
func (dao *DocumentsDAO) SelectByFileLocation(document_id int64, access_hash int64, version int32) *dataobject.DocumentsDO
select id, document_id, access_hash, dc_id, file_path, file_size, uploaded_file_name, ext, mime_type, thumb_id, attributes, version from documents where dc_id = 2 and document_id = :document_id and access_hash = :access_hash and version = :version TODO(@benqi): sqlmap
func (*DocumentsDAO) SelectByIdList ¶
func (dao *DocumentsDAO) SelectByIdList(idList []int64) []dataobject.DocumentsDO
select id, document_id, access_hash, dc_id, file_path, file_size, uploaded_file_name, ext, mime_type, thumb_id, attributes, version from documents where document_id in (:idList) TODO(@benqi): sqlmap
type PhotoDatasDAO ¶
type PhotoDatasDAO struct {
// contains filtered or unexported fields
}
func NewPhotoDatasDAO ¶
func NewPhotoDatasDAO(db *sqlx.DB) *PhotoDatasDAO
func (*PhotoDatasDAO) Insert ¶
func (dao *PhotoDatasDAO) Insert(do *dataobject.PhotoDatasDO) int64
insert into photo_datas(photo_id, photo_type, dc_id, volume_id, local_id, access_hash, width, height, file_size, file_path, ext) values (:photo_id, :photo_type, :dc_id, :volume_id, :local_id, :access_hash, :width, :height, :file_size, :file_path, :ext) TODO(@benqi): sqlmap
func (*PhotoDatasDAO) SelectByFileLocation ¶
func (dao *PhotoDatasDAO) SelectByFileLocation(volume_id int64, local_id int32, access_hash int64) *dataobject.PhotoDatasDO
select id, photo_id, photo_type, dc_id, volume_id, local_id, access_hash, width, height, file_size, file_path, ext from photo_datas where dc_id = 2 and volume_id = :volume_id and local_id = :local_id and access_hash = :access_hash TODO(@benqi): sqlmap
func (*PhotoDatasDAO) SelectListByPhotoId ¶
func (dao *PhotoDatasDAO) SelectListByPhotoId(photo_id int64) []dataobject.PhotoDatasDO
select id, photo_id, photo_type, dc_id, volume_id, local_id, access_hash, width, height, file_size, file_path, ext from photo_datas where photo_id = :photo_id and local_id != 0 TODO(@benqi): sqlmap