Skip to main content

impl_supports_fn

Macro impl_supports_fn 

Source
impl_supports_fn!() { /* proc-macro */ }
Expand description

Implement a built-in SQL function support marker for specific argument counts.

This macro is intended for custom drivers to opt into the built-in SQL functions that query!/query_lazy! validate at compile time (e.g. COUNT, SUBSTRING, DATE). See supported for which functions are available.

§Syntax

impl_supports_fn!(DriverType, SupportsTrait, arg_count0, arg_count1, ...);

§Example

impl_supports_fn!(DocDriver, SupportsCount, 0, 1);
impl_supports_fn!(DocDriver, SupportsCurrentTimestamp, -1);