You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by jmesnil <gi...@git.apache.org> on 2018/01/08 14:29:19 UTC

[GitHub] activemq-artemis pull request #1756: [ARTEMIS-1590] Properties-based SQLProv...

GitHub user jmesnil opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1756

    [ARTEMIS-1590] Properties-based SQLProvider

    Replace GenericSQLProvider and other implementation by a single
    PropertySQLProvider that uses properties to define SQL queries.
    
    SQL queries are loaded from the journal-sql.properties file.
    Queries specific to a DB dialect can be specified by adding a suffix to
    the key of the generic property.
    For example, the generic property to create a file Table is:
    
    ```
    create-file-table = CREATE TABLE %s (ID BIGINT AUTO_INCREMENT, ...)
    ```
    
    This property can be customized for Derby by using the
    `create-file-table.derby`  property:
    
    ```
    create-file-table.derby=CREATE TABLE %s (ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),...
    ```
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1590

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jmesnil/activemq-artemis ARTEMIS-1590_JDBC_PropertySQLProvider

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/1756.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1756
    
----
commit 69e352015f5e33bc833976acea7e2edabafe1273
Author: Jeff Mesnil <jm...@...>
Date:   2018-01-05T10:54:48Z

    [ARTEMIS-1590] Properties-based SQLProvider
    
    Replace GenericSQLProvider and other implementation by a single
    PropertySQLProvider that uses properties to define SQL queries.
    
    SQL queries are loaded from the journal-sql.properties file.
    Queries specific to a DB dialect can be specified by adding a suffix to
    the key of the generic property.
    For example, the generic property to create a file Table is:
    
    create-file-table = CREATE TABLE %s (ID BIGINT AUTO_INCREMENT, ...)
    
    This property can be customized for Derby by using the
    create-file-table.derby  property:
    
    create-file-table.derby=CREATE TABLE %s (ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),...
    
    JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1590

----


---

[GitHub] activemq-artemis pull request #1756: [ARTEMIS-1590] Properties-based SQLProv...

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1756#discussion_r160451205
  
    --- Diff: artemis-jdbc-store/src/main/resources/journal-sql.properties ---
    @@ -0,0 +1,63 @@
    +# Generic SQL statements
    --- End diff --
    
    It is needed to add on top:
    ```
    # Licensed to the Apache Software Foundation (ASF) under one
    # or more contributor license agreements.  See the NOTICE file
    # distributed with this work for additional information
    # regarding copyright ownership.  The ASF licenses this file
    # to you under the Apache License, Version 2.0 (the
    # "License"); you may not use this file except in compliance
    # with the License.  You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing,
    # software distributed under the License is distributed on an
    # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    # KIND, either express or implied.  See the License for the
    # specific language governing permissions and limitations
    # under the License.
    
    ```


---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    @jmesnil Could you please squash the commits? :)


---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    @jmesnil 
    > Is there a way to trigger it again?
    Not sure but maybe just forcing another push it will restart a CI job?


---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    @jmesnil I'm looking into it :+1: 


---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by jmesnil <gi...@git.apache.org>.
Github user jmesnil commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    @franz1981 done :)



---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    @mtaylor @jmesnil 
    I've run the CI tests and it seems good enough to me, I'll merge it tomorrow (in few hours), probably would be good to squash some commits to make it more compact


---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by jmesnil <gi...@git.apache.org>.
Github user jmesnil commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    The CI is reporting an error but the build has already disappeared from its history.
    Is there a way to trigger it again?


---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    @jmesnil Perfect! Thanks for this PR, it is making JDBC customizations much simpler & cleaner :+1: 


---

[GitHub] activemq-artemis issue #1756: [ARTEMIS-1590] Properties-based SQLProvider

Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1756
  
    @mtaylor @jmesnil Before merging it I will re-run a CI round on it first: can't say but I couldn't check the current (seems ailed) Jenkins results


---

[GitHub] activemq-artemis pull request #1756: [ARTEMIS-1590] Properties-based SQLProv...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1756


---