[tarantool-patches] Re: [PATCH v2 2/2] sql: use 'view' opts from space

n.pettik korablev at tarantool.org
Tue Mar 27 14:05:02 MSK 2018


> On 27 Mar 2018, at 09:04, Konstantin Osipov <kostja at tarantool.org> wrote:
> 
> * Nikita Pettik <korablev at tarantool.org> [18/03/27 02:06]:
>> 
>> +/**
>> + * Return true if space which corresponds to
>> + * given table has view option.
>> + */
>> +bool
>> +space_is_view(Table *table)
>> +{
>> +	assert(table != NULL);
>> +	uint32_t space_id = SQLITE_PAGENO_TO_SPACEID(table->tnum);
>> +	struct space *space = space_by_id(space_id);
>> +	assert(space != NULL);
>> +	return space->def->opts.view;
>> +}
> 
> I assume this implementation will change in a few weeks.

It’s true. Added FIXME clarification:

@@ -1163,6 +1163,10 @@ index_collation_name(Index *idx, uint32_t column)
 /**
  * Return true if space which corresponds to
  * given table has view option.
+ *
+ * FIXME: this is temporary wrapper around SQL specific struct.
+ * It will be removed after data dictionary integration
+ * into SQL is finished.





More information about the Tarantool-patches mailing list