--- a/lib/thingfish/metastore/pggraph/node.rb Thu Nov 05 10:40:01 2015 -0800
+++ b/lib/thingfish/metastore/pggraph/node.rb Mon Dec 14 15:42:13 2015 -0800
@@ -69,6 +69,24 @@
end
+ ### Dataset method: Order results by the specified +columns+.
+ ###
+ def order_metadata( *columns )
+ columns.flatten!
+ ds = self
+ columns.each do |column|
+ if Thingfish::Metastore::PG::Metadata.metadata_columns.include?( column.to_sym )
+ ds = ds.order_append( column.to_sym )
+ else
+ ds = ds.order_append( self.user_metadata_expr(column) )
+ end
+ end
+
+ return ds
+ end
+
+
+
#########
protected
#########