~2591kuldeep/libdrizzle/libdrizzle-binlogapi

« back to all changes in this revision

Viewing changes to libdrizzle-5.1/column_value.h

  • Committer: kuldeep
  • Date: 2013-09-19 22:27:25 UTC
  • Revision ID: kuldeep@kuldeep-laptop-20130919222725-xsb4tlxp0tp3mm2t
Adding Tested code on local environment, now we can access the new api functions within library

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Copyright (C) 2013 Drizzle Developer Group
 
3
 * Copyright (C) 2013 Kuldeep Porwal
 
4
 * All rights reserved.
 
5
 *
 
6
 * Use and distribution licensed under the BSD license.  See
 
7
 * the COPYING file in the parent directory for full text.
 
8
 *
 
9
 * summary: column value info
 
10
 *
 
11
 */
 
12
#include<iostream>
 
13
#include<string>
 
14
 
 
15
#ifndef COLUMN_VALUE
 
16
#define COLUMN_VALUE
 
17
namespace binlogevent
 
18
{
 
19
        class ColumnValue
 
20
        {
 
21
                public:
 
22
                        ColumnValue(std::string st,bool _bool,int col_n)
 
23
                        {
 
24
                                value=st;
 
25
                                is_null = _bool;
 
26
                                col_num = col_n;
 
27
                        }
 
28
                                
 
29
                        std::string getValue() {return value;  } // Check: str.empty() is true so int value otherwise string value.
 
30
                        bool isNull() { return is_null;}
 
31
                        int getColumnNum() {return col_num;}
 
32
 
 
33
                private:
 
34
                        std::string value;
 
35
                        bool is_null;
 
36
                        int col_num;
 
37
        };
 
38
}
 
39
#endif