equal
deleted
inserted
replaced
52 |
52 |
53 # User metadata or edge relationship |
53 # User metadata or edge relationship |
54 # |
54 # |
55 else |
55 else |
56 if field.to_sym == :relationship |
56 if field.to_sym == :relationship |
57 ds = self.join_edges.filter( Sequel.pg_jsonb( :edges__prop ).get_text( field.to_s ) => value ) |
57 ds = ds.join_edges unless ds.joined_dataset? |
|
58 ds = ds.filter( Sequel.pg_jsonb( :edges__prop ).get_text( field.to_s ) => value ) |
58 |
59 |
59 elsif field.to_sym == :relation |
60 elsif field.to_sym == :relation |
|
61 ds = ds.join_edges unless ds.joined_dataset? |
60 ds = self.join_edges.filter( :edges__id_p => value ) |
62 ds = self.join_edges.filter( :edges__id_p => value ) |
61 |
63 |
62 else |
64 else |
63 ds = ds.where( self.user_metadata_expr(field) => value ) |
65 ds = ds.where( self.user_metadata_expr(field) => value ) |
64 end |
66 end |