Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swoole/ext-postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: swoole/ext-postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.4.x
Choose a head ref
  • 12 commits
  • 2 files changed
  • 4 contributors

Commits on Jan 15, 2020

  1. Configuration menu
    Copy the full SHA
    050b11a View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2020

  1. Configuration menu
    Copy the full SHA
    ddc650b View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2020

  1. Bugfix in getMetaData

    Content of all rows is equals to the content of last row.
    
    Table schema is:
    ![image](https://user-images.githubusercontent.com/4526911/78420732-7b8a0b00-765a-11ea-9f7b-f0a282641564.png)
    
    ```php
    \Swoole\Coroutine\run(function () {
        $pg = new \Swoole\Coroutine\PostgreSQL();
        $conn = $pg->connect('host=127.0.0.1 port=5433 dbname=test user=test password=secret');
    
        dump($pg->metaData('companies'))
    }
    ```
    
    Output is:
    <details>
    <summary>Click to expand</summary>
    ```
    ^ array:15 [
      "id" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "original_name" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "name_rus" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "name_rus_short" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "inn" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "kpp" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "is_foreign" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "is_manufacturer" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "is_holder" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "is_distributor" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "is_pharmacy" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "note" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "created_at" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "updated_at" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "deleted_at" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
    ]
    ```
    </details>
    
    After fix output is:
    <details>
    <summary>Click to expand</summary>
    ```
    ^ array:15 [
      "id" => array:7 [
        "num" => 1
        "type" => "uuid"
        "len" => 16
        "not null" => true
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "original_name" => array:7 [
        "num" => 2
        "type" => "text"
        "len" => -1
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "name_rus" => array:7 [
        "num" => 3
        "type" => "text"
        "len" => -1
        "not null" => true
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "name_rus_short" => array:7 [
        "num" => 4
        "type" => "text"
        "len" => -1
        "not null" => true
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "inn" => array:7 [
        "num" => 5
        "type" => "varchar"
        "len" => -1
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "kpp" => array:7 [
        "num" => 6
        "type" => "varchar"
        "len" => -1
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "is_foreign" => array:7 [
        "num" => 7
        "type" => "bool"
        "len" => 1
        "not null" => true
        "has default" => true
        "array dims" => 0
        "is enum" => false
      ]
      "is_manufacturer" => array:7 [
        "num" => 8
        "type" => "bool"
        "len" => 1
        "not null" => true
        "has default" => true
        "array dims" => 0
        "is enum" => false
      ]
      "is_holder" => array:7 [
        "num" => 9
        "type" => "bool"
        "len" => 1
        "not null" => true
        "has default" => true
        "array dims" => 0
        "is enum" => false
      ]
      "is_distributor" => array:7 [
        "num" => 10
        "type" => "bool"
        "len" => 1
        "not null" => true
        "has default" => true
        "array dims" => 0
        "is enum" => false
      ]
      "is_pharmacy" => array:7 [
        "num" => 11
        "type" => "bool"
        "len" => 1
        "not null" => true
        "has default" => true
        "array dims" => 0
        "is enum" => false
      ]
      "note" => array:7 [
        "num" => 12
        "type" => "text"
        "len" => -1
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "created_at" => array:7 [
        "num" => 13
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "updated_at" => array:7 [
        "num" => 14
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
      "deleted_at" => array:7 [
        "num" => 15
        "type" => "timestamp"
        "len" => 8
        "not null" => false
        "has default" => false
        "array dims" => 0
        "is enum" => false
      ]
    ]
    ```
    </details>
    codercms authored Apr 4, 2020
    Configuration menu
    Copy the full SHA
    d9406dd View commit details
    Browse the repository at this point in the history
  2. Native type casting

    According to this PR - php/php-src#4939
    codercms committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    183b951 View commit details
    Browse the repository at this point in the history
  3. errorInfo attribute added (PDO-like)

    Examples:
    ```
    ^ Swoole\Coroutine\PostgreSQL {#4
      +error: """
        ERROR:  relation "test" does not exist\n
        LINE 1: SELECT 323r FROM test\n
                                 ^\n
        """
      +errorInfo: array:3 [
        0 => "42P01"
        1 => 7
        2 => """
          ERROR:  relation "test" does not exist\n
          LINE 1: SELECT 323r FROM test\n
                                   ^\n
          """
      ]
    }
    ```
    
    ```
    ^ Swoole\Coroutine\PostgreSQL {#4
      +error: """
        ERROR:  relation "test" does not exist\n
        LINE 1: SELECT 323r FROM test\n
                                 ^\n
        """
      +errorInfo: array:3 [
        0 => "42P01"
        1 => 7
        2 => """
          ERROR:  relation "test" does not exist\n
          LINE 1: SELECT 323r FROM test\n
                                   ^\n
          """
      ]
    }
    ^ false
    ^ Swoole\Coroutine\PostgreSQL {#4
      +error: "ERROR:  prepared statement "some_1" does not exist\n"
      +errorInfo: array:3 [
        0 => "26000"
        1 => 7
        2 => "ERROR:  prepared statement "some_1" does not exist\n"
      ]
    }
    ```
    codercms committed Apr 4, 2020
    Configuration menu
    Copy the full SHA
    f701e6e View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2020

  1. Merge pull request #17 from codercms/patch-1

    Bugfix in getMetaData
    yunnian authored Apr 7, 2020
    Configuration menu
    Copy the full SHA
    a1c7090 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #19 from codercms/feature/error-info

    errorInfo attribute added (PDO-like)
    yunnian authored Apr 7, 2020
    Configuration menu
    Copy the full SHA
    19816ae View commit details
    Browse the repository at this point in the history

Commits on May 7, 2020

  1. Timeout feature added

    codercms committed May 7, 2020
    Configuration menu
    Copy the full SHA
    2912023 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2020

  1. Merge pull request #23 from codercms/feature/timeout-only

    Timeout feature added
    yunnian authored May 8, 2020
    Configuration menu
    Copy the full SHA
    a3e2f96 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2020

  1. Merge pull request #18 from codercms/feature/native-type-casting

    Casting resultset to native PHP types
    yunnian authored May 13, 2020
    Configuration menu
    Copy the full SHA
    ee209e0 View commit details
    Browse the repository at this point in the history
  2. update version

    matyhtf committed May 13, 2020
    Configuration menu
    Copy the full SHA
    70288b9 View commit details
    Browse the repository at this point in the history
  3. code format

    matyhtf committed May 13, 2020
    Configuration menu
    Copy the full SHA
    d4a0cb2 View commit details
    Browse the repository at this point in the history
Loading