Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Sugu Sougoumarane 007fa05534 sqltypes.Value: few more fixes
Created to different Proto3ToResult functions, one for the
normal case, and the other for streaming.
Also changed vtcombo to use the new Result.Copy method. Those
proto3 conversion functions are now too loaded with semantics.
So, they can't be used in this situation.
2015-11-17 15:15:10 -08:00
Sugu Sougoumarane a822e5d7f3 sqltypes: new Value
The new Value implementation is now based on the vitess types.
* The inner interface has now been replaced by typ and val.
* All Values are expected to be consistent with their types.
  For example, an Int64 type must contain a number.
* The functions that build values generally ensure consistency.
* There is a set of 'Trusted' functions that can bypass this
  consistency check. They should be used with care.
* The proto3 conversion functions build the correct Value types
  based on the field types.
* The bson conversion function provides a Repair function that
  allows you to fix up the types after the fact. This should be
  deleted after bson is deprecated.
* The building of Values from a QueryResult is non-trivial because
  the field info is not part of the QueryResult for streaming
  queries. So, the API requires fields to be explicitly passed in.
* Fuctions that encode or convert to native types expect Value
  to be consistent. If not, they panic.
* proto3.QueryResult is considered to be trusted. If it contains
  inconsistent data, it will cause panics.
* The EventStreamer has been fixed to ensure that the fields and
  rows it publishes are trustable: They can used as parameters
  to the Trusted API.
* The Raw() function usage has been minimized. We should see if
  it can be deprecated. This way, we can make Result truly read-only.

There are a few more tweaks that need to be done:
* The Proto3ToResult call plumbing was hacked in to make everything
  work. That part needs cleaning.
* The bind vars don't need to be converted to their native types
  any more.
2015-11-17 12:59:45 -08:00
Sugu Sougoumarane 274cf0c29d proto/query -> querypb
I was bored.
2015-11-12 00:13:54 -08:00
Sugu Sougoumarane 71469f54c5 sqltypes: all code changed to use Result 2015-11-10 00:50:46 -08:00
Sugu Sougoumarane d6fd8d9f20 sqltypes: Result created 2015-11-09 23:11:15 -08:00