/sqlite3cc

To get this branch, use:
bzr branch http://bzr.ed.am/sqlite3cc

« back to all changes in this revision

Viewing changes to include/sqlite3cc/row.h

  • Committer: Tim Marston
  • Date: 2014-01-03 12:45:17 UTC
  • Revision ID: tim@ed.am-20140103124517-04ybfipvkk518l0c
fixed linking against boost threading library

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
        {
128
128
                assert( index <
129
129
                        static_cast< unsigned int >( sqlite3_column_count( _handle ) ) );
130
 
 
131
 
                switch( column_type( index ) ) {
132
 
                case SQLITE_NULL:
 
130
                const char *text = reinterpret_cast< const char * >(
 
131
                        sqlite3_column_text( _handle, index ) );
 
132
                if( text )
 
133
                        value = boost::lexical_cast< T >( text );
 
134
                else
133
135
                        value = boost::get( boost::value_initialized< T >() );
134
 
                        break;
135
 
                case SQLITE_BLOB: {
136
 
                        int length = sqlite3_column_bytes( _handle, index );
137
 
                        std::string string_value( static_cast< const char * >(
138
 
                                        sqlite3_column_blob( _handle, index ) ), length );
139
 
                        value = boost::lexical_cast< T >( string_value );
140
 
                        break;
141
 
                }
142
 
                default:
143
 
                        const char *text = reinterpret_cast< const char * >(
144
 
                                sqlite3_column_text( _handle, index ) );
145
 
                        value = boost::lexical_cast< T >( text );
146
 
                }
147
136
        }
148
137
 
149
138
        /**