#[non_exhaustive]pub enum BackendCapability {
Show 33 variants
CheckedIdentifiers,
Select,
Aggregate,
Join,
Insert,
BatchInsert,
Update,
BatchUpdate,
Delete,
Upsert,
BatchUpsert,
Returning,
ExplicitConflictTarget,
Savepoint,
SkipLocked,
Copy,
ListenNotify,
Cte,
Window,
Arrays,
Range,
Multirange,
JsonPath,
FullText,
Merge,
Diagnostics,
TwoPhaseCommit,
TableLock,
TransactionLocalConfig,
TransactionCrud,
RedisPipeline,
RedisOptimisticTransaction,
RedisLua,
}Expand description
可被调用方查询的后端能力。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CheckedIdentifiers
checked identifier QueryBuilder API。
Select
SELECT/find/value 查询。
Aggregate
count/sum/avg/min/max 聚合。
Join
INNER/LEFT/RIGHT JOIN。
Insert
单行插入。
BatchInsert
批量插入及显式 batch size。
Update
条件更新。
BatchUpdate
批量更新。
Delete
条件删除。
Upsert
方言原生 UPSERT。
BatchUpsert
批量 UPSERT。MySQL 是 INSERT ... ON DUPLICATE KEY UPDATE;
PostgreSQL 是 INSERT ... ON CONFLICT (...) DO UPDATE SET ...(形状不同)。
Returning
PostgreSQL RETURNING。
ExplicitConflictTarget
PostgreSQL 显式冲突列 ON CONFLICT (...)。
Savepoint
事务保存点(SAVEPOINT / ROLLBACK TO SAVEPOINT)。
SkipLocked
行锁跳过已锁定行(FOR UPDATE SKIP LOCKED)。
Copy
批量 COPY 导入(PostgreSQL COPY ... FROM STDIN)。
ListenNotify
LISTEN / NOTIFY 通知通道。
Cte
WITH / WITH RECURSIVE 公共表表达式。
Window
窗口函数(OVER (...))。
Arrays
PostgreSQL 数组类型与 = ANY(...) / = ALL(...) 谓词。
Range
PostgreSQL 范围类型(int4range 等)。
Multirange
PostgreSQL 多范围类型(int4multirange 等)。
JsonPath
jsonpath 查询(jsonb_path_exists / jsonb_path_match)。
FullText
全文检索(to_tsvector / to_tsquery)。
Merge
MERGE(PostgreSQL 15+,执行前按 server_version_num 门控)。
Diagnostics
查询计划与锁等待诊断(EXPLAIN、pg_stat_activity / pg_locks)。
TwoPhaseCommit
两阶段提交(PREPARE TRANSACTION / COMMIT PREPARED / ROLLBACK PREPARED)。
TableLock
表级锁(LOCK TABLE)。
TransactionLocalConfig
事务级会话配置(SET LOCAL)。
TransactionCrud
SQL 事务内的 insert/update/delete 构建器。
RedisPipeline
Redis Pipeline。
RedisOptimisticTransaction
Redis WATCH/MULTI/EXEC 乐观锁事务。
RedisLua
Redis Lua 脚本执行。
Trait Implementations§
Source§impl Clone for BackendCapability
impl Clone for BackendCapability
impl Copy for BackendCapability
Source§impl Debug for BackendCapability
impl Debug for BackendCapability
impl Eq for BackendCapability
Source§impl Hash for BackendCapability
impl Hash for BackendCapability
Source§impl PartialEq for BackendCapability
impl PartialEq for BackendCapability
impl StructuralPartialEq for BackendCapability
Auto Trait Implementations§
impl Forget for BackendCapability
impl Freeze for BackendCapability
impl Move for BackendCapability
impl RefUnwindSafe for BackendCapability
impl Send for BackendCapability
impl Sync for BackendCapability
impl Unpin for BackendCapability
impl UnsafeUnpin for BackendCapability
impl UnwindSafe for BackendCapability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more