本文整理汇总了Golang中github.com/MediaMath/keryxlib/pg.LUint函数的典型用法代码示例。如果您正苦于以下问题:Golang LUint函数的具体用法?Golang LUint怎么用?Golang LUint使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LUint函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Location
// Location is the Location this page starts at
func (p Page) Location() Location {
if p.Is91() {
return LocationFromUint32s(uint32(pg.LUint(p.bs[8:12])), uint32(pg.LUint(p.bs[12:16])))
}
return LocationFromUint32s(uint32(pg.LUint(p.bs[12:16])), uint32(pg.LUint(p.bs[8:12])))
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:8,代码来源:page.go
示例2: Previous
// Previous is the location of the record that preceeds this one
func (r RecordHeader) Previous() Location {
switch r.version {
case 0xD066:
return LocationFromUint32s(uint32(pg.LUint(r.bs[4:8])), uint32(pg.LUint(r.bs[8:12])))
case 0xD07E:
return LocationFromUint32s(uint32(pg.LUint(r.bs[20:24])), uint32(pg.LUint(r.bs[16:20])))
}
return Location{}
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:recordheader.go
示例3: Crc
// Crc is the crc of the record
func (r RecordHeader) Crc() uint32 {
switch r.version {
case 0xD066:
return uint32(pg.LUint(r.bs[0:4]))
case 0xD07E:
return uint32(pg.LUint(r.bs[24:28]))
}
return 0
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:recordheader.go
示例4: ResourceManagerID
// ResourceManagerID is the ID of the resource manager that created this record
func (r RecordHeader) ResourceManagerID() uint8 {
switch r.version {
case 0xD066:
return uint8(pg.LUint(r.bs[25:26]))
case 0xD07E:
return uint8(pg.LUint(r.bs[13:14]))
}
return 0
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:recordheader.go
示例5: Info
// Info contains resource manager specific data
func (r RecordHeader) Info() uint8 {
switch r.version {
case 0xD066:
return uint8(pg.LUint(r.bs[24:25]))
case 0xD07E:
return uint8(pg.LUint(r.bs[12:13]))
}
return 0
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:recordheader.go
示例6: Length
// Length is the length of resource manager specific data after the header
func (r RecordHeader) Length() uint32 {
switch r.version {
case 0xD066:
return uint32(pg.LUint(r.bs[20:24]))
case 0xD07E:
return uint32(pg.LUint(r.bs[8:12]))
}
return 0
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:recordheader.go
示例7: TotalLength
// TotalLength is the length of the body after the header but before the next record
func (r RecordHeader) TotalLength() uint32 {
switch r.version {
case 0xD066:
return uint32(pg.LUint(r.bs[16:20]))
case 0xD07E:
return uint32(pg.LUint(r.bs[0:4]))
}
return 0
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:recordheader.go
示例8: TransactionID
// TransactionID is the transaction that this record is apart of
func (r RecordHeader) TransactionID() uint32 {
switch r.version {
case 0xD066:
return uint32(pg.LUint(r.bs[12:16]))
case 0xD07E:
return uint32(pg.LUint(r.bs[4:8]))
}
return 0
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:recordheader.go
示例9: ToOffset
// ToOffset is item number of the new version of this tuple
func (d UpdateData) ToOffset() uint16 {
switch d.version {
case 0xD066:
return uint16(pg.LUint(d.bs[24:26]))
case 0xD07E:
return uint16(pg.LUint(d.bs[32:34]))
}
return 0
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:11,代码来源:heapdata.go
示例10: BlockSize
// BlockSize is the size of a page in a WAL file
func (p Page) BlockSize() uint32 {
if p.IsLong() {
return uint32(pg.LUint(p.bs[28:32]))
}
return 0
}
开发者ID:simplyianm,项目名称:keryxlib,代码行数:8,代码来源:page.go
示例11: SegmentSize
// SegmentSize is the size in bytes of a single WAL file
func (p Page) SegmentSize() uint32 {
if p.IsLong() {
return uint32(pg.LUint(p.bs[24:28]))
}
return 0
}
开发者ID:simplyianm,项目名称:keryxlib,代码行数:8,代码来源:page.go
示例12: SystemID
// SystemID can be used to determine if a page was written by a particular server
func (p Page) SystemID() uint64 {
if p.IsLong() {
return uint64(pg.LUint(p.bs[16:24]))
}
return 0
}
开发者ID:simplyianm,项目名称:keryxlib,代码行数:8,代码来源:page.go
示例13: parseMultiInsertData
func parseMultiInsertData(isInit bool, d []byte) (multiInserts []HeapData) {
const XlogHeapInitPage = 128
var (
tablespaceID = uint32(pg.LUint(d[0:4]))
databaseID = uint32(pg.LUint(d[4:8]))
relationID = uint32(pg.LUint(d[8:12]))
toBlock = uint32(pg.LUint(d[12:16]))
flags = d[16]
ntuples = uint16(pg.LUint(d[18:20]))
)
isInit = isInit || flags&XlogHeapInitPage > 0
for i := uint16(0); i < ntuples; i++ {
if isInit {
multiInserts = append(multiInserts, MultiInsertData{tablespaceID, databaseID, relationID, toBlock, i + 1})
} else {
var (
start = i*2 + 20
end = start + 2
toOffset = uint16(pg.LUint(d[start:end]))
)
multiInserts = append(multiInserts, MultiInsertData{tablespaceID, databaseID, relationID, toBlock, toOffset})
}
}
return
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:30,代码来源:heapdata.go
示例14: Continuation
// Continuation will return the bytes of a continuation of the previous record's body if present on the page
func (p Page) Continuation() []byte {
if p.IsCont() {
var contStart, contEnd uint64
if p.Is94() {
contStart = p.HeaderLength()
contEnd = contStart + pg.LUint(p.bs[16:20])
} else {
sizeOffset := p.HeaderLength()
contStart = sizeOffset + 4
contEnd = contStart + pg.LUint(p.bs[sizeOffset:contStart])
}
maxContEnd := uint64(len(p.bs))
if contEnd > maxContEnd {
contEnd = maxContEnd
}
return p.bs[contStart:contEnd]
}
return nil
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:24,代码来源:page.go
示例15: Continuation
// Continuation will return the bytes of a continuation of the previous record's body if present on the page
func (p Page) Continuation() []byte {
if p.IsCont() {
sizeOffset := p.HeaderLength()
contStart := sizeOffset + 4
contEnd := contStart + uint64(pg.LUint(p.bs[sizeOffset:contStart]))
maxContEnd := uint64(len(p.bs))
if contEnd > maxContEnd {
contEnd = maxContEnd
}
return p.bs[contStart:contEnd]
}
return nil
}
开发者ID:simplyianm,项目名称:keryxlib,代码行数:17,代码来源:page.go
示例16: DatabaseID
// DatabaseID is the id of the database this tuple is found in
func (d InsertData) DatabaseID() uint32 { return uint32(pg.LUint(d[4:8])) }
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:2,代码来源:heapdata.go
示例17: TablespaceID
// TablespaceID is the id of the tablespace this tuple is found in
func (d InsertData) TablespaceID() uint32 { return uint32(pg.LUint(d[0:4])) }
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:2,代码来源:heapdata.go
示例18: readBlockID
func readBlockID(bs []byte) uint32 {
return (uint32(pg.LUint(bs[0:2])) << 16) + uint32(pg.LUint(bs[2:4]))
}
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:3,代码来源:heapdata.go
示例19: TimelineID
// TimelineID is the timeline this page is found on
func (p Page) TimelineID() uint32 {
return uint32(pg.LUint(p.bs[4:8]))
}
开发者ID:simplyianm,项目名称:keryxlib,代码行数:4,代码来源:page.go
示例20: RelationID
// RelationID is the id of the relation this tuple is found in
func (d UpdateData) RelationID() uint32 { return uint32(pg.LUint(d.bs[8:12])) }
开发者ID:bhand-mm,项目名称:keryxlib,代码行数:2,代码来源:heapdata.go
注:本文中的github.com/MediaMath/keryxlib/pg.LUint函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论