struct Marten::DB::Router::Hints

Overview

Hints passed to database routers when resolving connections or permissions.

Routers can use these hints to make more informed routing decisions. For example, the #instance hint allows a router to stick to the database already associated with a specific model record.

Defined in:

marten/db/router/hints.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(instance : Model | Nil = nil) #

[View source]

Instance Method Detail

def instance : Marten::DB::Model? #

Returns the model instance associated with the current operation, if any.


[View source]