mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
New module postgresql_sequence (#55027)
* postgresql_sequence: initial commit with new module and tests * change return variables and adjust tests * fix sanity checks * fix linter errors * change formatting functions and put params alphabetically * add new examples and remove restrict option * remove restrict option * remove `required: false` * add links to documentation * change some minor parts in documentation * add new integration tests for ** drop cascade ** change owner * change usage of owner and created a test case for set owner during creation * remove some documents and use docsfragments * add aliases for minvalue and maxvalue * change to warn if sequence not exists but should be removed * use connect_to_db from module_utils/postgres.py * add checkmode for several tests * fix psycopg2 import and connect_to_db * add a test for drop nonexistent sequence * change get_info funcrtion to use only one SQL statement * rewrite the module for cleaner code * remove psycopg2 * change check_mode behavior * add docstrings for class and methods * add test for create sequence with owner in check_mode * fix typo in set_schema() * fix docu and cleanup the code * adjust documentation for state, schema and newschema * remove mutually_exclusive for 'absent' * remove unused code comments * remove warning for drop non-exicsting sequence * change autocommit condition * adjust state documentation
This commit is contained in:
parent
03d64cd9ea
commit
07d446825a
4 changed files with 1322 additions and 1 deletions
|
@ -38,7 +38,7 @@ class UnclosedQuoteError(SQLParseError):
|
|||
# maps a type of identifier to the maximum number of dot levels that are
|
||||
# allowed to specify that identifier. For example, a database column can be
|
||||
# specified by up to 4 levels: database.schema.table.column
|
||||
_PG_IDENTIFIER_TO_DOT_LEVEL = dict(database=1, schema=2, table=3, column=4, role=1, tablespace=1)
|
||||
_PG_IDENTIFIER_TO_DOT_LEVEL = dict(database=1, schema=2, table=3, column=4, role=1, tablespace=1, sequence=3)
|
||||
_MYSQL_IDENTIFIER_TO_DOT_LEVEL = dict(database=1, table=2, column=3, role=1, vars=1)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue