Azure テーブルにデータを挿入しようとしていますが、すべてが文字列に変換されます。
たとえば、数値/ブール値を挿入しています
var test={ PartitionKey : '4', RowKey : '2', foo: 4, bar: true };
tableService.insertEntity('mytable', test, ...);
しかし
tableService.queryEntity('mytable', '4', '2', ...);
戻り値
{ id: 'http://127.0.0.1:10002/devstoreaccount1/identid(PartitionKey=\'4\',RowKey=\'2\')',
link: 'identid(PartitionKey=\'4\',RowKey=\'2\')',
updated: '2012-12-12T10:26:44Z',
etag: 'W/"datetime\'2012-12-12T10%3A26%3A44.547Z\'"',
PartitionKey: '4',
RowKey: '2',
Timestamp: '2012-12-12T10:20:44.897Z',
foo: '4',
bar: 'true' }
データ型を指定するにはどうすればよいですか?
OK、SDK でデータ型を指定できることがわかりました
var test={ PartitionKey : '4', RowKey : '2',
foo: { '@': { type: 'Edm.Int32' }, '#': 4 } };
ただし、タイプを自動的に追加するヘルパー関数はありますか?