From 10c90b51a7a14b9b46ee972303d1b9247bce6fd3 Mon Sep 17 00:00:00 2001 From: Jim Lambert Date: Sun, 16 Feb 2020 11:33:44 -0500 Subject: [PATCH] refactored to its own file: it defines an interface for ora specific behaviours, especially when handling last insert id --- dialect_ora.go | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 dialect_ora.go diff --git a/dialect_ora.go b/dialect_ora.go new file mode 100644 index 00000000..3aa1e5cd --- /dev/null +++ b/dialect_ora.go @@ -0,0 +1,8 @@ +package gorm + +// OraDialect interface 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) +}