No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sqlsettings.py 907B

123456789101112131415161718192021222324252627282930313233343536
  1. # -*- coding: utf-8 -*-
  2. class SQLSettings(object):
  3. DEFAULT_HOSTNAME = 'localhost'
  4. dbms_list = {
  5. 'postgresql': {
  6. 'driver': 'psycopg2',
  7. 'encoding': 'utf8',
  8. },
  9. 'mysql': {
  10. # TODO à définir
  11. 'driver': '',
  12. 'encoding': '',
  13. }
  14. }
  15. DB_READ_CONNECTION_NAME = 'default' # TODO A configurer
  16. DB_WRITE_CONNECTION_NAME = 'default' # TODO A configurer
  17. querystrings = {
  18. 'add_column': {
  19. 'default': 'ALTER TABLE %s ADD COLUMN %s %s'
  20. },
  21. 'alter_column': {
  22. 'postgresql': 'ALTER TABLE %s ALTER COLUMN %s TYPE %s',
  23. 'mysql': 'ALTER TABLE %s ALTER COLUMN %s %s'
  24. },
  25. 'drop_column': {
  26. 'default': 'ALTER TABLE %s DROP COLUMN %s'
  27. }
  28. }
  29. ACTION_TYPE_WRITE = 'write'
  30. ACTION_TYPE_READ = 'read'