module sql.database_function

Short summary

module pyensae.sql.database_function

generic class to access a SQL database

source on GitHub

Functions

function

truncated documentation

create_database

create a database

drop_database

remove a database

get_list_database

get_list_instance

get_list_server

Documentation

generic class to access a SQL database

source on GitHub

pyensae.sql.database_function.create_database(instance, database, exc=True)[source]

create a database

Parameters
  • instance – instance name

  • database – database name

  • exc – if True and if the database exists, raise an Exception

Example:

fLOG (OutputPrint = True)
fLOG (get_list_database ('PCXAVIER\SQLEXPRESS'))
create_database ('PCXAVIER\SQLEXPRESS', "essai_database")
drop_database ('PCXAVIER\SQLEXPRESS', "essai_database")

source on GitHub

pyensae.sql.database_function.drop_database(instance, database, exc=True)[source]

remove a database

Parameters
  • instance – instance name

  • database – database name

  • exc – if True and if the database does not exist, raise an Exception

source on GitHub

pyensae.sql.database_function.get_list_database(instance)[source]
Parameters

instance – instance name

Returns

a list of the available database

source on GitHub

pyensae.sql.database_function.get_list_instance(server)[source]
Parameters

server – server name

Returns

a list of the available instance on a server

source on GitHub

pyensae.sql.database_function.get_list_server()[source]
Returns

a list of the available servers from this machine

source on GitHub