/* Ċ Ġ* ĠCopyright Ġ 2 0 1 8 - 2 0 2 1 Ġthe Ġoriginal Ġauthor Ġor Ġauthors . Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠĠ Ġhttps :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ package Ġorg . springframework . data . r 2 dbc . core Ċ Ċ import Ġkotlinx . coroutines . reactive . await First OrNull Ċ import Ġorg . springframework . data . r 2 dbc . mapping . Set table Value Ċ Ċ /** Ċ Ġ* ĠCor outines Ġvariant Ġof Ġ[ Database Client . Generic Execute Spec . then ]. Ċ Ġ* Ċ Ġ* Ġ@ author ĠSeb ast ien ĠDe le u ze Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ suspend Ġfun ĠDatabase Client . Generic Execute Spec . await () Ġ{ Ċ ĉ then (). await First OrNull () Ċ } Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Bind Spec . bind ] Ġproviding Ġa Ġvariant Ġlever aging Ġre ified Ġtype Ġparameters Ċ Ġ* Ċ Ġ* Ġ@ author ĠMark ĠPal uch Ċ Ġ* Ġ@ author ĠI b anga ĠEn oob ong ĠI me Ċ Ġ*/ Ċ @ Suppress (" EXTENSION _ SH ADOW ED _ BY _ MEMBER ") Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Typed Execute Spec <* >. bind ( index : ĠInt , Ġvalue : ĠT ?) Ġ= Ġbind ( index , ĠSet table Value . from OrEmpty ( value , ĠT :: class . java )) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Bind Spec . bind ] Ġproviding Ġa Ġvariant Ġlever aging Ġre ified Ġtype Ġparameters Ċ Ġ* Ċ Ġ* Ġ@ author ĠMark ĠPal uch Ċ Ġ* Ġ@ author ĠI b anga ĠEn oob ong ĠI me Ċ Ġ*/ Ċ @ Suppress (" EXTENSION _ SH ADOW ED _ BY _ MEMBER ") Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Generic Execute Spec . bind ( index : ĠInt , Ġvalue : ĠT ?) Ġ= Ġbind ( index , ĠSet table Value . from OrEmpty ( value , ĠT :: class . java )) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Bind Spec . bind ] Ġproviding Ġa Ġvariant Ġlever aging Ġre ified Ġtype Ġparameters Ċ Ġ* Ċ Ġ* Ġ@ author ĠMark ĠPal uch Ċ Ġ* Ġ@ author ĠI b anga ĠEn oob ong ĠI me Ċ Ġ*/ Ċ @ Suppress (" EXTENSION _ SH ADOW ED _ BY _ MEMBER ") Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Typed Execute Spec <* >. bind ( name : ĠString , Ġvalue : ĠT ?) Ġ= Ġbind ( name , ĠSet table Value . from OrEmpty ( value , ĠT :: class . java )) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Bind Spec . bind ] Ġproviding Ġa Ġvariant Ġlever aging Ġre ified Ġtype Ġparameters Ċ Ġ* Ċ Ġ* Ġ@ author ĠMark ĠPal uch Ċ Ġ* Ġ@ author ĠI b anga ĠEn oob ong ĠI me Ċ Ġ*/ Ċ @ Suppress (" EXTENSION _ SH ADOW ED _ BY _ MEMBER ") Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Generic Execute Spec . bind ( name : ĠString , Ġvalue : ĠT ?) Ġ= Ġbind ( name , ĠSet table Value . from OrEmpty ( value , ĠT :: class . java )) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Generic Execute Spec . Ġas ] Ġproviding Ġa Ċ Ġ* Ġ` as Type < Foo > ()` Ġvariant . Ċ Ġ* Ċ Ġ* Ġ@ author ĠSeb ast ien ĠDe le u ze Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Generic Execute Spec . as Type (): ĠDatabase Client . Typed Execute Spec < T > Ġ= Ċĉ ĉ ` as `( T :: class . java ) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Generic Select Spec . as ] Ġproviding Ġa Ċ Ġ* Ġ` as Type < Foo > ()` Ġvariant . Ċ Ġ* Ċ Ġ* Ġ@ author ĠSeb ast ien ĠDe le u ze Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Generic Select Spec . as Type (): ĠDatabase Client . Typed Select Spec < T > Ġ= Ċĉ ĉ ` as `( T :: class . java ) Ċ Ċ /** Ċ Ġ* ĠCor outines Ġvariant Ġof Ġ[ Database Client . Typed Execute Spec . then ]. Ċ Ġ* Ċ Ġ* Ġ@ author ĠSeb ast ien ĠDe le u ze Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ suspend Ġfun Ġ< T > ĠDatabase Client . Typed Execute Spec < T >. await () Ġ{ Ċ ĉ then (). await First OrNull () Ċ } Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Typed Execute Spec . Ġas ] Ġproviding Ġa Ċ Ġ* Ġ` as Type < Foo > ()` Ġvariant . Ċ Ġ* Ċ Ġ* Ġ@ author ĠSeb ast ien ĠDe le u ze Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Typed Execute Spec < T >. as Type (): ĠDatabase Client . Typed Execute Spec < T > Ġ= Ċĉ ĉ ` as `( T :: class . java ) Ċ Ċ /** Ċ Ġ* ĠCor outines Ġvariant Ġof Ġ[ Database Client . Insert Spec . then ]. Ċ Ġ* Ċ Ġ* Ġ@ author ĠSeb ast ien ĠDe le u ze Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ suspend Ġfun Ġ< T > ĠDatabase Client . Insert Spec < T >. await () Ġ{ Ċ ĉ then (). await First OrNull () Ċ } Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Insert Into Spec . into ] Ġproviding Ġa Ċ Ġ* Ġ` into < Foo > ()` Ġvariant . Ċ Ġ* Ċ Ġ* Ġ@ author ĠSeb ast ien ĠDe le u ze Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Insert Into Spec . into (): ĠDatabase Client . Typed Insert Spec < T > Ġ= Ċĉ ĉ into ( T :: class . java ) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Generic Insert Spec . value ] Ġproviding Ġa Ġvariant Ġlever aging Ġre ified Ġtype Ġparameters Ċ Ġ* Ċ Ġ* Ġ@ author ĠMark ĠPal uch Ċ Ġ*/ Ċ @ Suppress (" EXTENSION _ SH ADOW ED _ BY _ MEMBER ") Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Generic Insert Spec <* >. value ( name : ĠString , Ġvalue : ĠT ?) Ġ= Ġvalue ( name , ĠSet table Value . from OrEmpty ( value , ĠT :: class . java )) ĊĊ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Select From Spec . from ] Ġproviding Ġa Ċ Ġ* Ġ` from < Foo > ()` Ġvariant . Ċ Ġ* Ċ Ġ* Ġ@ author ĠJon as ĠB ark Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Select From Spec . from (): ĠDatabase Client . Typed Select Spec < T > Ġ= Ċĉ ĉ from ( T :: class . java ) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Update Table Spec . table ] Ġproviding Ġa Ċ Ġ* Ġ` table < Foo > ()` Ġvariant . Ċ Ġ* Ċ Ġ* Ġ@ author ĠMark ĠPal uch Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Update Table Spec . table (): ĠDatabase Client . Typed Update Spec < T > Ġ= Ċĉ ĉ table ( T :: class . java ) Ċ Ċ /** Ċ Ġ* ĠExtension Ġfor Ġ[ Database Client . Select From Spec . from ] Ġproviding Ġa Ċ Ġ* Ġ` from < Foo > ()` Ġvariant . Ċ Ġ* Ċ Ġ* Ġ@ author ĠJon as ĠB ark Ċ Ġ*/ Ċ @ Deprecated (" Deprecated Ġin Ġfavor Ġof ĠSpring ĠR 2 DBC 's ĠDatabase Client ") Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠAny > ĠDatabase Client . Delete From Spec . from (): ĠDatabase Client . Typed Delete Spec < T > Ġ= Ċĉ ĉ from ( T :: class . java ) Ċ