Add indexed_fields method on Model
For postgres indexes we want to know the indexed field names upfront without an actual instance of Model Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
		@@ -58,6 +58,11 @@ pub trait Model:
 | 
			
		||||
        Vec::new()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Return a list of field names which have an index applied.
 | 
			
		||||
    fn indexed_fields() -> Vec<&'static str> {
 | 
			
		||||
        Vec::new()
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /// Get the unique ID for this model
 | 
			
		||||
    fn get_id(&self) -> u32;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user