greenplumn CIdGenerator 源码
greenplumn CIdGenerator 代码
文件路径:/src/backend/gporca/libnaucrates/src/CIdGenerator.cpp
//---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2011 Greenplum, Inc.
//
// @filename:
// CIdGenerator.cpp
//
// @doc:
// Implementing the ULONG Counter
//---------------------------------------------------------------------------
#include "naucrates/dxl/CIdGenerator.h"
#include "gpos/base.h"
using namespace gpdxl;
using namespace gpos;
CIdGenerator::CIdGenerator(ULONG start_id) : id(start_id)
{
}
//---------------------------------------------------------------------------
// @function:
// CIdGenerator::next_id
//
// @doc:
// Returns the next unique id
//
//---------------------------------------------------------------------------
ULONG
CIdGenerator::next_id()
{
return id++;
}
//---------------------------------------------------------------------------
// @function:
// CIdGenerator::current_id
//
// @doc:
// Returns the current unique id used
//
//---------------------------------------------------------------------------
ULONG
CIdGenerator::current_id() const
{
return id;
}
// EOF
相关信息
相关文章
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦