Sha256: 659f677557a02df2a7d188d0b14a7dd8fd93003bf71fac21dec8c1707ee5d118

Contents?: true

Size: 828 Bytes

Versions: 30

Compression:

Stored size: 828 Bytes

Contents

require "date"
require "time"
require "bigdecimal"

module Foobara
  # TODO: I think we should have a configuration that indicates if created records can have primary keys past to them
  # or not. That is, do primary keys get issued by the database upon insertion? Or are they generated externally
  # and passed in? Would be nice to have programmatic clarification via explicit configuration.
  class Entity < Model
    abstract

    class << self
      def install!
        TypeDeclarations.register_type_declaration(TypeDeclarations::Handlers::ExtendEntityTypeDeclaration.new)

        model = Namespace.global.foobara_lookup_type!(:model)
        BuiltinTypes.build_and_register!(:entity, model, nil)
      end

      def reset_all
        Entity::Concerns::Callbacks.reset_all

        install!
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
foobara-0.0.30 projects/entity/lib/foobara/entity.rb
foobara-0.0.29 projects/entity/lib/foobara/entity.rb
foobara-0.0.28 projects/entity/lib/foobara/entity.rb
foobara-0.0.27 projects/entity/lib/foobara/entity.rb
foobara-0.0.26 projects/entity/lib/foobara/entity.rb
foobara-0.0.25 projects/entity/lib/foobara/entity.rb
foobara-0.0.24 projects/entity/lib/foobara/entity.rb
foobara-0.0.23 projects/entity/lib/foobara/entity.rb
foobara-0.0.22 projects/entity/lib/foobara/entity.rb
foobara-0.0.21 projects/entity/lib/foobara/entity.rb
foobara-0.0.20 projects/entity/lib/foobara/entity.rb
foobara-0.0.19 projects/entity/lib/foobara/entity.rb
foobara-0.0.18 projects/entity/lib/foobara/entity.rb
foobara-0.0.17 projects/entity/lib/foobara/entity.rb
foobara-0.0.16 projects/entity/lib/foobara/entity.rb
foobara-0.0.15 projects/entity/lib/foobara/entity.rb
foobara-0.0.14 projects/entity/lib/foobara/entity.rb
foobara-0.0.13 projects/entity/lib/foobara/entity.rb
foobara-0.0.12 projects/entity/lib/foobara/entity.rb
foobara-0.0.11 projects/entity/lib/foobara/entity.rb