@@ -2180,8 +2180,12 @@ def create_database(database: str, *, user: str=None, password: str=None, role:
21802180 raise ValueError (f"Configuration for server '{ db_config .server .value } ' not found" )
21812181 if user is None :
21822182 user = db_config .user .value
2183+ if user is None :
2184+ user = srv_config .user .value
21832185 if password is None :
21842186 password = db_config .password .value
2187+ if password is None :
2188+ password = srv_config .password .value
21852189 if role is None :
21862190 role = db_config .role .value
21872191 if charset is None :
@@ -4239,8 +4243,9 @@ def backup(self, *, database: FILESPEC, backup: Union[FILESPEC, Sequence[FILESPE
42394243 backup_file_sizes : Sequence [int ]= (),
42404244 flags : SrvBackupFlag = SrvBackupFlag .NONE , role : str = None ,
42414245 callback : CB_OUTPUT_LINE = None , stats : str = None ,
4242- verbose : bool = False , skip_data : str = None , include_data : str = None ,
4243- keyhoder : str = None , keyname : str = None , crypt : str = None ) -> None :
4246+ verbose : bool = False , verbint : int = None , skip_data : str = None ,
4247+ include_data : str = None , keyhoder : str = None , keyname : str = None ,
4248+ crypt : str = None ) -> None :
42444249 """Request logical (GBAK) database backup. **(ASYNC service)**
42454250
42464251 Arguments:
@@ -4252,6 +4257,7 @@ def backup(self, *, database: FILESPEC, backup: Union[FILESPEC, Sequence[FILESPE
42524257 callback: Function to call back with each output line.
42534258 stats: Backup statistic options (TDWR).
42544259 verbose: Whether output should be verbose or not.
4260+ verbint: Verbose information with explicit interval (number of records)
42554261 skip_data: String with table names whose data should be excluded from backup.
42564262 include_data: String with table names whose data should be included into backup [Firebird 4].
42574263 keyholder: Keyholder name [Firebird 4]
@@ -4287,6 +4293,8 @@ def backup(self, *, database: FILESPEC, backup: Union[FILESPEC, Sequence[FILESPE
42874293 spb .insert_int (SPBItem .OPTIONS , flags )
42884294 if verbose :
42894295 spb .insert_tag (SPBItem .VERBOSE )
4296+ if verbint is not None :
4297+ spb .insert_int (SPBItem .VERBINT , verbint )
42904298 if stats :
42914299 spb .insert_string (SrvBackupOption .STAT , stats )
42924300 self ._srv ()._svc .start (spb .get_buffer ())
@@ -4298,10 +4306,11 @@ def restore(self, *, backup: Union[FILESPEC, Sequence[FILESPEC]],
42984306 db_file_pages : Sequence [int ]= (),
42994307 flags : SrvRestoreFlag = SrvRestoreFlag .CREATE , role : str = None ,
43004308 callback : CB_OUTPUT_LINE = None , stats : str = None ,
4301- verbose : bool = True , skip_data : str = None , page_size : int = None ,
4302- buffers : int = None , access_mode : DbAccessMode = DbAccessMode .READ_WRITE ,
4303- include_data : str = None , keyhoder : str = None , keyname : str = None ,
4304- crypt : str = None , replica_mode : ReplicaMode = None ) -> None :
4309+ verbose : bool = False , verbint : int = None , skip_data : str = None ,
4310+ page_size : int = None , buffers : int = None ,
4311+ access_mode : DbAccessMode = DbAccessMode .READ_WRITE , include_data : str = None ,
4312+ keyhoder : str = None , keyname : str = None , crypt : str = None ,
4313+ replica_mode : ReplicaMode = None ) -> None :
43054314 """Request database restore from logical (GBAK) backup. **(ASYNC service)**
43064315
43074316 Arguments:
@@ -4313,6 +4322,7 @@ def restore(self, *, backup: Union[FILESPEC, Sequence[FILESPEC]],
43134322 callback: Function to call back with each output line.
43144323 stats: Restore statistic options (TDWR).
43154324 verbose: Whether output should be verbose or not.
4325+ verbint: Verbose information with explicit interval (number of records)
43164326 skip_data: String with table names whose data should be excluded from restore.
43174327 page_size: Page size for restored database.
43184328 buffers: Cache size for restored database.
@@ -4362,6 +4372,8 @@ def restore(self, *, backup: Union[FILESPEC, Sequence[FILESPEC]],
43624372 spb .insert_int (SPBItem .OPTIONS , flags )
43634373 if verbose :
43644374 spb .insert_tag (SPBItem .VERBOSE )
4375+ if verbint is not None :
4376+ spb .insert_int (SPBItem .VERBINT , verbint )
43654377 if stats :
43664378 spb .insert_string (SrvRestoreOption .STAT , stats )
43674379 self ._srv ()._svc .start (spb .get_buffer ())
@@ -5325,9 +5337,9 @@ def _read_output(self, *, init: str='', timeout: int=-1) -> None:
53255337 self ._eof = self .response .get_tag () == isc_info_end
53265338 else : # LINE mode
53275339 self ._eof = not data
5328- while self .response .get_tag () == isc_info_truncated :
5340+ while ( tag := self .response .get_tag () ) == isc_info_truncated :
53295341 data += self ._query_output (timeout )
5330- if self . response . get_tag () != isc_info_end : # pragma: no cover
5342+ if tag != isc_info_end : # pragma: no cover
53315343 raise InterfaceError ("Malformed result buffer (missing isc_info_end item)" )
53325344 init += data
53335345 if data and self .mode is SrvInfoCode .LINE :
0 commit comments