~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.cc

  • Committer: Mark Atwood
  • Date: 2011-06-03 17:57:03 UTC
  • mfrom: (2313.3.6 void)
  • Revision ID: me@mark.atwood.name-20110603175703-idsui337bghio245
mergeĀ lp:~olafvdspek/drizzle/void2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1368
1368
  case DRIZZLE_TYPE_UUID:
1369
1369
  case DRIZZLE_TYPE_DECIMAL:
1370
1370
    {
1371
 
      String *res;
1372
 
      if ((res=val_str(buffer)))
1373
 
        result= client->store(res->ptr(),res->length());
 
1371
      if (String* res=val_str(buffer))
 
1372
        client->store(res->ptr(), res->length());
1374
1373
      break;
1375
1374
    }
1376
1375
  case DRIZZLE_TYPE_LONG:
1377
1376
    {
1378
 
      int64_t nr;
1379
 
      nr= val_int();
 
1377
      int64_t nr= val_int();
1380
1378
      if (!null_value)
1381
 
        result= client->store((int32_t)nr);
 
1379
        client->store((int32_t)nr);
1382
1380
      break;
1383
1381
    }
1384
1382
  case DRIZZLE_TYPE_LONGLONG:
1385
1383
    {
1386
 
      int64_t nr;
1387
 
      nr= val_int();
 
1384
      int64_t nr= val_int();
1388
1385
      if (!null_value)
1389
1386
      {
1390
1387
        if (unsigned_flag)
1391
 
          result= client->store((uint64_t)nr);
 
1388
          client->store((uint64_t)nr);
1392
1389
        else
1393
 
          result= client->store((int64_t)nr);
 
1390
          client->store((int64_t)nr);
1394
1391
      }
1395
1392
      break;
1396
1393
    }
1398
1395
    {
1399
1396
      double nr= val_real();
1400
1397
      if (!null_value)
1401
 
        result= client->store(nr, decimals, buffer);
 
1398
        client->store(nr, decimals, buffer);
1402
1399
      break;
1403
1400
    }
1404
1401
  case DRIZZLE_TYPE_TIME:
1406
1403
      type::Time tm;
1407
1404
      get_time(tm);
1408
1405
      if (not null_value)
1409
 
        result= client->store(&tm);
 
1406
        client->store(&tm);
1410
1407
      break;
1411
1408
    }
1412
1409
  case DRIZZLE_TYPE_DATETIME:
1416
1413
      type::Time tm;
1417
1414
      get_date(tm, TIME_FUZZY_DATE);
1418
1415
      if (!null_value)
1419
 
        result= client->store(&tm);
 
1416
        client->store(&tm);
1420
1417
      break;
1421
1418
    }
1422
1419
  }
1423
1420
  if (null_value)
1424
 
    result= client->store();
1425
 
 
1426
 
  return result;
 
1421
    client->store();
 
1422
  return result; // return void
1427
1423
}
1428
1424
 
1429
1425
uint32_t Item::max_char_length() const