From 37acd305bf1e10bc40300e18dd348bc9e5f6c75d Mon Sep 17 00:00:00 2001 From: Jim Lambert Date: Sat, 15 Feb 2020 16:10:54 -0500 Subject: [PATCH] declare OraDialect interface so different Ora drivers can properly implement this behaviour --- dialect.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dialect.go b/dialect.go index 749587f4..1e3d46ea 100644 --- a/dialect.go +++ b/dialect.go @@ -145,3 +145,11 @@ func currentDatabaseAndTable(dialect Dialect, tableName string) (string, string) } return dialect.CurrentDatabase(), tableName } + +// OraDialect interface contains behaviors that differ that other databases and allows for each Ora driver to +// implement custom behaviours +type OraDialect interface { + // CreateWithReturningInto is called by gorm.createCallback(*Scope) and will create new entity while populating the identity ID into the primary key + // different drivers will have different ways of handling this behaviour for Ora + CreateWithReturningInto(*Scope) +}