query: Add db_name column.
This commit is contained in:
		
							parent
							
								
									0d01be68b3
								
							
						
					
					
						commit
						ca94ecafb0
					
				
					 2 changed files with 9 additions and 1 deletions
				
			
		|  | @ -224,6 +224,12 @@ class DBId(DBColumn): | |||
|     _dtype = int | ||||
| 
 | ||||
| 
 | ||||
| class DBName(DBColumn): | ||||
|     """Look up an entity's display name from the database""" | ||||
|     _db_query = "SELECT display_name FROM donor WHERE ledger_entity_id = ?" | ||||
|     _dtype = str | ||||
| 
 | ||||
| 
 | ||||
| class DBPostal(DBColumn): | ||||
|     """Look up an entity's postal addresses from the database""" | ||||
|     _db_query = """ | ||||
|  | @ -444,10 +450,12 @@ class _EnvironmentMixin: | |||
|         except (OSError, sqlite3.Error): | ||||
|             columns['db_email'] = DBEmail | ||||
|             columns['db_id'] = DBId | ||||
|             columns['db_name'] = DBName | ||||
|             columns['db_postal'] = DBPostal | ||||
|         else: | ||||
|             columns['db_email'] = DBEmail.with_db(db_conn) | ||||
|             columns['db_id'] = DBId.with_db(db_conn) | ||||
|             columns['db_name'] = DBName.with_db(db_conn) | ||||
|             columns['db_postal'] = DBPostal.with_db(db_conn) | ||||
| 
 | ||||
|         rt_credentials = config.rt_credentials() | ||||
|  |  | |||
							
								
								
									
										2
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
										
									
									
									
								
							|  | @ -5,7 +5,7 @@ from setuptools import setup | |||
| setup( | ||||
|     name='conservancy_beancount', | ||||
|     description="Plugin, library, and reports for reading Conservancy's books", | ||||
|     version='1.19.5', | ||||
|     version='1.19.6', | ||||
|     author='Software Freedom Conservancy', | ||||
|     author_email='info@sfconservancy.org', | ||||
|     license='GNU AGPLv3+', | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Brett Smith
						Brett Smith