Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.6
    • Fix Version/s: 2.5
    • Component/s: Platforms
    • Labels:
      None

      Description

      Hi community,

      Today I tried to generate Oracle's sequences with "NOCACHE", but I checked that method "getCreateSequenceSQL" don't accept. Can we improvement this method to allow? Below an example of the sintaxe:

      CREATE SEQUENCE seq_test START WITH 1 INCREMENT BY 1 NOCACHE

        Activity

        Hide
        Ramon Henrique Ornelas added a comment -

        Duplicate issue http://www.doctrine-project.org/jira/browse/DBAL-348

        Greetings
        Ramon Ornelas

        Show
        Ramon Henrique Ornelas added a comment - Duplicate issue http://www.doctrine-project.org/jira/browse/DBAL-348 Greetings Ramon Ornelas
        Hide
        Ivan Andric added a comment - - edited

        Hi,

        If cache value is specified then syntax should contain CACHE keyword that follows the value and if value is not specified then it should go without CACHE keyword.
        In this case sequence will be created with CACHE value 20 by default.
        Min cache value is 2 and for determine max value we should have sequence max value defined which is by default 10^27 for an ascending sequence and -1 for a descending sequence.
        Now the max cache value is calculated by the formula (CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT).

        My Idea is to add cache attribute to Sequence object and then under the previous story, set cache to given value if value is greater than 1 and less than calculation by the given formula.

        For nocache,
        I would use value of 0 so we will have values in domain (0,1<x<=(CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT)).

        Some public function will return NOCACHE or CACHE n and that function could be called in getCreateSequenceSQL method from Sequence input parameter.

        Anyone have a better idea or I can code this and request pull from my fork?

        Show
        Ivan Andric added a comment - - edited Hi, If cache value is specified then syntax should contain CACHE keyword that follows the value and if value is not specified then it should go without CACHE keyword. In this case sequence will be created with CACHE value 20 by default. Min cache value is 2 and for determine max value we should have sequence max value defined which is by default 10^27 for an ascending sequence and -1 for a descending sequence. Now the max cache value is calculated by the formula (CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT). My Idea is to add cache attribute to Sequence object and then under the previous story, set cache to given value if value is greater than 1 and less than calculation by the given formula. For nocache, I would use value of 0 so we will have values in domain (0,1<x<=(CEIL (MAXVALUE - MINVALUE)) / ABS (INCREMENT)). Some public function will return NOCACHE or CACHE n and that function could be called in getCreateSequenceSQL method from Sequence input parameter. Anyone have a better idea or I can code this and request pull from my fork?

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Augusto Ximenes de Souza
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: