const sequences = [
{
externalId: 'sequence_name',
columns: [
{
externalId: 'one',
valueType: SequenceValueType.LONG,
},
{
externalId: 'two',
},
{
externalId: 'three',
valueType: SequenceValueType.STRING,
}
]
}
];
const [sequence] = await client.sequences.create(sequences);
await client.sequences.deleteRows([{ id: 32423849, rows: [1,2,3] }]);
const rows = [
{ rowNumber: 0, values: [1, 2.2, 'three'] },
{ rowNumber: 1, values: [4, 5, 'six'] }
];
await client.sequences.insertRows([{ id: 123, rows, columns: ['one', 'two', 'three'] }]);
const sequences = await client.sequences.list({ filter: { name: 'sequence_name' } });
const [sequence1, sequence2] = await client.sequences.retrieve([{id: 123}, {externalId: 'abc'}]);
const rows = await client.sequences.retrieveRows({ externalId: 'sequence1' }).autoPagingToArray({ limit: 100 });
const sequences = await client.sequences.search({
filter: {
assetIds: [1, 2]
},
search: {
query: 'n*m* desc*ion'
}
});
const [updatedSequence] = await client.sequences.update([{id: 123, update: {name: {set: 'New name'}}}]);
Aggregate sequences
const aggregates = await client.sequences.aggregate({ filter: { name: "Well" } }); console.log('Number of sequences named Well: ', aggregates[0].count)