This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Migration guide
Dmitriy Pleshevskiy edited this page Jul 18, 2022
·
1 revision
v0.x.x
// use sonic_channel::*;
channel.push(collection, bucket, object, text);
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.push(PushRequest::new(dest.obj(object), text));
v0.x.x
// use sonic_channel::*;
channel.push_with_locale(collection, bucket, object, text, "rus");
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.push(PushRequest::new(dest.obj(object), text).lang(Lang::Rus));
v0.x.x
// use sonic_channel::*;
channel.pop(collection, bucket, object, text);
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.pop(PopRequest::new(dest.obj(object), text));
v0.x.x
// use sonic_channel::*;
channel.flushc(collection);
v1.x.x
// use sonic_channel::*;
channel.flush(FlushRequest::collection(collection));
// or use Dest
let dest = Dest::col(collection);
channel.flush(dest.into());
v0.x.x
// use sonic_channel::*;
channel.flushb(collection, bucket);
v1.x.x
// use sonic_channel::*;
channel.flush(FlushRequest::bucket(collection, bucket));
// or use Dest
let dest = Dest::col_buc(collection, bucket);
channel.flush(dest.into());
v0.x.x
// use sonic_channel::*;
channel.flusho(collection, bucket, object);
v1.x.x
// use sonic_channel::*;
channel.flush(FlushRequest::object(collection, bucket, object));
// or use ObjDest
let dest = Dest::col_buc(collection, bucket).obj(object);
channel.flush(dest.into());
v0.x.x
// use sonic_channel::*;
channel.bucket_count(collection);
v1.x.x
// use sonic_channel::*;
channel.count(CountRequest::buckets(collection));
// or use Dest
let dest = Dest::col(collection);
channel.count(dest.into());
v0.x.x
// use sonic_channel::*;
channel.object_count(collection, bucket);
v1.x.x
// use sonic_channel::*;
channel.count(CountRequest::objects(collection, bucket));
// or use Dest
let dest = Dest::col_buc(collection, bucket);
channel.count(dest.into());
v0.x.x
// use sonic_channel::*;
channel.word_count(collection, bucket, object);
v1.x.x
// use sonic_channel::*;
channel.count(CountRequest::words(collection, bucket, object));
// or use ObjDest
let dest = Dest::col_buc(collection, bucket).obj(object);
channel.count(dest.into());
v0.x.x
// use sonic_channel::*;
channel.query(collection, bucket, text);
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.query(QueryRequest::new(dest, text));
v0.x.x
// use sonic_channel::*;
channel.query_with_limit(collection, bucket, text, limit);
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.query(QueryRequest::new(dest, text).limit(limit));
v0.x.x
// use sonic_channel::*;
channel.query_with_limit_and_offset(collection, bucket, text, limit, offset);
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.query(QueryRequest::new(dest, text).offset(offset).limit(limit));
// or use the `pag`. Note: the first parameter is a page.
channel.query(QueryRequest::new(dest, text).pag(offset / limit, limit));
v0.x.x
// use sonic_channel::*;
channel.suggest(collection, bucket, input);
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.suggest(SuggestRequest::new(dest, input));
v0.x.x
// use sonic_channel::*;
channel.suggest_with_limit(collection, bucket, input, limit);
v1.x.x
// use sonic_channel::*;
let dest = Dest::col_buc(collection, bucket);
channel.suggest(SuggestRequest::new(dest, text).limit(limit));