Documentation ¶
Index ¶
- type DocumentsDAO
- type FilePartsDAO
- func (dao *FilePartsDAO) Insert(do *dataobject.FilePartsDO) int64
- func (dao *FilePartsDAO) SelectFileParts(creator_id int64, file_part_id int64) *dataobject.FilePartsDO
- func (dao *FilePartsDAO) UpdateFilePart(file_part int32, id int64) int64
- func (dao *FilePartsDAO) UpdateFilePartAndTotal(file_part int32, file_total_parts int32, file_size int64, id int64) int64
- type FilesDAO
- type PhotoDatasDAO
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 FilePartsDAO ¶
type FilePartsDAO struct {
// contains filtered or unexported fields
}
func NewFilePartsDAO ¶
func NewFilePartsDAO(db *sqlx.DB) *FilePartsDAO
func (*FilePartsDAO) Insert ¶
func (dao *FilePartsDAO) Insert(do *dataobject.FilePartsDO) int64
insert into file_parts(creator_id, file_part_id, file_part, is_big_file, file_total_parts, file_path, file_size) values (:creator_id, :file_part_id, :file_part, :is_big_file, :file_total_parts, :file_path, :file_size) TODO(@benqi): sqlmap
func (*FilePartsDAO) SelectFileParts ¶
func (dao *FilePartsDAO) SelectFileParts(creator_id int64, file_part_id int64) *dataobject.FilePartsDO
select id, creator_id, file_part_id, file_part, is_big_file, file_total_parts, file_path, file_size from file_parts where creator_id = :creator_id and file_part_id = :file_part_id TODO(@benqi): sqlmap
func (*FilePartsDAO) UpdateFilePart ¶
func (dao *FilePartsDAO) UpdateFilePart(file_part int32, id int64) int64
update file_parts set file_part = :file_part where id = :id TODO(@benqi): sqlmap
func (*FilePartsDAO) UpdateFilePartAndTotal ¶
func (dao *FilePartsDAO) UpdateFilePartAndTotal(file_part int32, file_total_parts int32, file_size int64, id int64) int64
update file_parts set file_part = :file_part, file_total_parts = :file_total_parts, file_size = :file_size where id = :id TODO(@benqi): sqlmap
type FilesDAO ¶
type FilesDAO struct {
// contains filtered or unexported fields
}
func NewFilesDAO ¶
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