mirror of
				https://github.com/fabianonline/telegram_backup.git
				synced 2025-10-31 15:49:22 +00:00 
			
		
		
		
	Merge 96b7371b40 into 78031b0ff2
				
					
				
			This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -13,4 +13,4 @@ dev/ | ||||
| todo | ||||
| deploy.secret.sh | ||||
| release_notes.txt | ||||
| out | ||||
| out/ | ||||
|   | ||||
| @@ -279,11 +279,11 @@ class Database private constructor(var client: TelegramClient) { | ||||
| 			rs.next() | ||||
| 			val result = rs.getInt(1) | ||||
| 			rs.close() | ||||
|  | ||||
| 			return result | ||||
| 		} catch (e: SQLException) { | ||||
| 			throw RuntimeException("Could not get count of messages.") | ||||
| 		} | ||||
|  | ||||
| 	} | ||||
|  | ||||
| 	@Synchronized | ||||
|   | ||||
| @@ -109,10 +109,10 @@ class DatabaseUpdates(protected var conn: Connection, protected var db: Database | ||||
| 				logger.debug("No update necessary.") | ||||
| 			} | ||||
|  | ||||
| 			stmt.close() | ||||
| 		} catch (e: SQLException) { | ||||
| 			throw RuntimeException(e) | ||||
| 		} | ||||
|  | ||||
| 	} | ||||
|  | ||||
| 	private fun getUpdateToVersion(i: Int): DatabaseUpdate { | ||||
| @@ -143,7 +143,6 @@ internal abstract class DatabaseUpdate(protected var conn: Connection, protected | ||||
| 		} catch (e: SQLException) { | ||||
| 			throw RuntimeException(e) | ||||
| 		} | ||||
|  | ||||
| 	} | ||||
|  | ||||
| 	@Throws(SQLException::class) | ||||
| @@ -153,6 +152,8 @@ internal abstract class DatabaseUpdate(protected var conn: Connection, protected | ||||
| 		_doUpdate() | ||||
| 		logger.debug("Saving current database version to the db") | ||||
| 		stmt.executeUpdate("INSERT INTO database_versions (version) VALUES ($version)") | ||||
|  | ||||
| 		stmt.close() | ||||
| 	} | ||||
|  | ||||
| 	@Throws(SQLException::class) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user