Bugzilla – Attachment 62967 Details for
Bug 18285
Koha::Database schema cache accessors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18285: Koha::Database schema cache accessors
Bug-18285-KohaDatabase-schema-cache-accessors.patch (text/plain), 1.07 KB, created by
Marcel de Rooy
on 2017-05-02 14:43:17 UTC
(
hide
)
Description:
Bug 18285: Koha::Database schema cache accessors
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-05-02 14:43:17 UTC
Size:
1.07 KB
patch
obsolete
>From 9b82c7c5715fcc976cf22ab35465e12782cb47ae Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Thu, 16 Mar 2017 20:59:35 +0200 >Subject: [PATCH] Bug 18285: Koha::Database schema cache accessors >Content-Type: text/plain; charset=utf-8 > >Safe way of getting and flushing the $database->{schema} -cache. > >This is needed by Test::DBIx::Class to overcome pre-initialization connection >caching from C4::Context and others. > >See Bug 18286. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > Koha/Database.pm | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > >diff --git a/Koha/Database.pm b/Koha/Database.pm >index df259c5..7daf5f0 100644 >--- a/Koha/Database.pm >+++ b/Koha/Database.pm >@@ -215,6 +215,23 @@ sub restore_schema { > # return something, then this function should, too. > } > >+=head2 get_schema_cached >+ >+=cut >+ >+sub get_schema_cached { >+ return $database->{schema}; >+} >+ >+=head2 flush_schema_cache >+ >+=cut >+ >+sub flush_schema_cache { >+ delete $database->{schema}; >+ return 1; >+} >+ > =head2 EXPORT > > None by default. >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18285
:
61185
|
62967
|
63886
|
64003