flounder 0.16.0 → 0.16.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1df582c917b24ed0beb74e4fdd6b15d0f7792ba
4
- data.tar.gz: f5ef57ba73986e7ebb89e475289f177baf0c1602
3
+ metadata.gz: 2b60917805be8336d2b31cff15058cc30ac29ad3
4
+ data.tar.gz: 36632561d92982f5f0f8389c74fa4ed967f8d728
5
5
  SHA512:
6
- metadata.gz: 964433279a3fcd0bb1035dc5062fb075560518ccf411462ad79af281264b1abc41f22b02019d753620cb39caf53583d2e3a56d67be3be39a5560c7f8056bdc1f
7
- data.tar.gz: 08eded169bd82e3468af1e673fb199f14a0e59352707f068b76f7ed96d5d3af5ac5af7ccd673070bc3124eaf96e75c8713e0c48fcc42cbe02b6e4054beb4f982
6
+ metadata.gz: 16452e66031909b6d768c6b74dc4e84418b8eefaf87c202922f5c5c8dd77c88008bddd0d57000f72787e4923b70563e2412bb633930ecee9591e3eb7f24ac722
7
+ data.tar.gz: 1b877efe3d7243f416ad09dd1d57b2037c6ac235f4882a8cc4ddd0a535e916bb7bc364d86c3a3c35c1aea34dad66f02a86ca6cfd05d10d83e9d37d1a223167c7
data/flounder.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "flounder"
5
- s.version = '0.16.0'
5
+ s.version = '0.16.1'
6
6
  s.summary = "Flounder is a way to write SQL simply in Ruby. It deals with everything BUT object relational mapping. "
7
7
  s.email = "kaspar.schiess@technologyastronauts.ch"
8
8
  s.homepage = "https://bitbucket.org/technologyastronauts/oss_flounder"
@@ -32,6 +32,16 @@ module Flounder
32
32
  entity.column_names
33
33
  end
34
34
 
35
+ def relations *a
36
+ entity.relations *a
37
+ end
38
+
39
+ def inspect
40
+ "<Flounder/Entity/Alias #{entity.name}(#{entity.table_name}) as (#{plural}, #{singular}))>"
41
+ end
42
+ alias to_s inspect
43
+
44
+
35
45
  def [] name
36
46
  Field.new(self, name, table[name])
37
47
  end
@@ -174,6 +174,7 @@ module Flounder::Query
174
174
  case spec
175
175
  when Symbol
176
176
  relation = entity.relations[spec]
177
+ raise "No such relation #{spec.inspect} on entity #{entity}." unless relation
177
178
  relation.apply(self)
178
179
  when Hash
179
180
  spec.each do |k, v|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flounder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kaspar Schiess
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-26 00:00:00.000000000 Z
12
+ date: 2014-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: arel