~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/drizzle.cc

  • Committer: Brian Aker
  • Date: 2011-11-24 03:44:17 UTC
  • mto: This revision was merged to the branch mainline in revision 2465.
  • Revision ID: brian@tangent.org-20111124034417-aafezwidyzjhg6a3
Redo the way options are handled.

Show diffs side-by-side

added added

removed removed

Lines of Context:
196
196
  return drizzle->last_error;
197
197
}
198
198
 
 
199
drizzle_return_t drizzle_set_option(drizzle_st *drizzle, drizzle_options_t arg, bool set)
 
200
{
 
201
  switch (arg)
 
202
  {
 
203
  case DRIZZLE_NON_BLOCKING:
 
204
    drizzle->options.is_non_blocking= set;
 
205
    return DRIZZLE_RETURN_OK;
 
206
 
 
207
  case DRIZZLE_FREE_OBJECTS:
 
208
    return DRIZZLE_RETURN_OK;
 
209
 
 
210
  case DRIZZLE_ASSERT_DANGLING:
 
211
    return DRIZZLE_RETURN_OK;
 
212
 
 
213
  default:
 
214
    break;
 
215
  }
 
216
 
 
217
  return DRIZZLE_RETURN_INVALID_ARGUMENT;
 
218
}
 
219
 
199
220
int drizzle_errno(const drizzle_st *drizzle)
200
221
{
201
222
  return drizzle->last_errno;
211
232
  return drizzle->sqlstate;
212
233
}
213
234
 
214
 
int drizzle_options(const drizzle_st *)
215
 
{
216
 
  return 0;
217
 
}
218
 
 
219
 
void drizzle_set_options(drizzle_st *, int)
220
 
{
221
 
}
222
 
 
223
 
void drizzle_add_options(drizzle_st *, int)
224
 
{
225
 
}
226
 
 
227
235
void *drizzle_context(const drizzle_st *drizzle)
228
236
{
229
237
  return drizzle->context;