~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/query_id.h

  • Committer: Brian Aker
  • Date: 2011-03-27 07:03:49 UTC
  • mfrom: (2252.2.3 drizzle-ga)
  • Revision ID: brian@tangent.org-20110327070349-ihqsw1cl19lu8j65
MergeĀ inĀ staging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_QUERY_ID_H
21
 
#define DRIZZLED_QUERY_ID_H
 
20
#pragma once
22
21
 
23
 
#include <pthread.h>
24
22
#include <drizzled/atomics.h>
25
23
 
26
 
namespace drizzled
27
 
{
 
24
namespace drizzled {
28
25
 
29
26
typedef uint64_t query_id_t;
30
27
 
31
28
class Query_id
32
29
{
33
30
public:
34
 
  static Query_id& get_query_id() {
 
31
  static Query_id& get_query_id() 
 
32
  {
35
33
    static Query_id the_id;
36
34
    return the_id;
37
35
  }
38
 
  ~Query_id();
39
36
 
40
37
  /* return current query_id value */
41
38
  query_id_t value() const;
53
50
 
54
51
} /* namespace drizzled */
55
52
 
56
 
#endif /* DRIZZLED_QUERY_ID_H */