mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Deprecate DB.mapping
(#196)
This commit is contained in:
parent
340b6e4b9a
commit
76d8bb6a6e
1 changed files with 3 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
module DB
|
||||
# Empty module used for marking a class as supporting DB:Mapping
|
||||
@[Deprecated("Use `DB::Serializable` instead")]
|
||||
module Mappable; end
|
||||
|
||||
# The `DB.mapping` macro defines how an object is built from a `ResultSet`.
|
||||
|
@ -57,6 +58,7 @@ module DB
|
|||
# it and initializes this type's instance variables.
|
||||
#
|
||||
# This macro also declares instance variables of the types given in the mapping.
|
||||
@[Deprecated("Use `DB::Serializable` instead")]
|
||||
macro mapping(properties, strict = true)
|
||||
include ::DB::Mappable
|
||||
|
||||
|
@ -148,6 +150,7 @@ module DB
|
|||
end
|
||||
end
|
||||
|
||||
@[Deprecated("Use `DB::Serializable` instead")]
|
||||
macro mapping(**properties)
|
||||
::DB.mapping({{properties}})
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue