kopia lustrzana https://github.com/simonw/datasette
				
				
				
			Allow ?sql= argument against database
e.g. /database-234324?sql=select * from table limit 1pull/383/head
							rodzic
							
								
									255e2611e5
								
							
						
					
					
						commit
						0fa1772697
					
				
							
								
								
									
										3
									
								
								app.py
								
								
								
								
							
							
						
						
									
										3
									
								
								app.py
								
								
								
								
							|  | @ -137,7 +137,8 @@ class DatabaseView(BaseView): | |||
| 
 | ||||
|     def data(self, request, name, hash): | ||||
|         conn = get_conn(name) | ||||
|         rows = conn.execute('select * from sqlite_master') | ||||
|         sql = request.args.get('sql') or 'select * from sqlite_master' | ||||
|         rows = conn.execute(sql) | ||||
|         columns = [r[0] for r in rows.description] | ||||
|         return { | ||||
|             'database': name, | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Simon Willison
						Simon Willison