Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALL operator, UNION, EXCEPT, Renamed Columns and Empty Array problem, CREATE SCHEMA, CREATE CAST for deparsing #136

Closed
wants to merge 18 commits into from

Conversation

emin100
Copy link
Contributor

@emin100 emin100 commented Jun 7, 2019

Added ALL operator for deparse and unit tests.

SELECT id FROM kodsis WHERE id > ALL(SELECT id FROM kodsis_sub);
OR
SELECT id FROM kodsis WHERE id > ALL(ARRAY[1,2,3,4,5]);

in addition to:
Solution for #132

UNION or UNION ALL deparse problem.(use with ORDER,WITH like)

SELECT 1 UNION select 2 ORDER BY 1 DESC;
OR
WITH kodsis AS (SELECT * FROM application), kodsis2 AS (SELECT * FROM application) SELECT * FROM kodsis UNION SELECT * FROM kodsis ORDER BY id DESC;

in addition to:
Solution for #129

EXCEPT deparse problem.

SELECT "a" FROM "kodsis" EXCEPT SELECT "a" FROM "application"

in addition to:
Solution for #125

Problem when deparsing query with renamend Columns

SELECT "Test"."id" as "new Test Id" from "student" "Test"

in addition to:
Solution for #128

Problem when deparsing empty array query

select array[]::text[] from x

in addition to:
Solution for #124

Deparse CREATE SCHEMA

CREATE SCHEMA myschema;
OR
CREATE SCHEMA AUTHORIZATION joe;
OR
CREATE SCHEMA IF NOT EXISTS test AUTHORIZATION joe;
OR
CREATE SCHEMA hollywood
CREATE TABLE films (title text, release date, awards text[])
CREATE VIEW winners AS
SELECT title, release FROM films WHERE awards IS NOT NULL;

in addition to:
Solution for #122

Deparse CREATE CAST

CREATE CAST (bigint AS int4) WITH FUNCTION int4(bigint) AS ASSIGNMENT;

CREATE CAST (bigint AS int4) WITHOUT FUNCTION AS IMPLICIT;

CREATE CAST (bigint AS int4) WITH INOUT AS ASSIGNMENT;

mehmet emin karakas added 11 commits April 2, 2019 12:25
SELECT 'foo' COLLATE "tr_TR";
SELECT * FROM test1 ORDER BY name COLLATE "tr_TR" DESC;
SELECT 'foo' COLLATE "tr_TR";
SELECT * FROM test1 ORDER BY name COLLATE "tr_TR" DESC;
SELECT id FROM kodsis WHERE id > ALL(SELECT id FROM kodsis_sub);
OR
SELECT id FROM kodsis WHERE id > ALL(ARRAY[1,2,3,4,5]);

in addition to:
Solution for #132
SELECT id FROM kodsis WHERE id > ALL(SELECT id FROM kodsis_sub);
OR
SELECT id FROM kodsis WHERE id > ALL(ARRAY[1,2,3,4,5]);

in addition to:
Solution for #132
SELECT 1 UNION select 2 ORDER BY 1 DESC;
OR
WITH kodsis AS (SELECT * FROM application), kodsis2 AS (SELECT * FROM application) SELECT * FROM kodsis UNION SELECT * FROM kodsis ORDER BY id DESC;

in addition to:
Solution for #129
SELECT 1 UNION select 2 ORDER BY 1 DESC;
OR
WITH kodsis AS (SELECT * FROM application), kodsis2 AS (SELECT * FROM application) SELECT * FROM kodsis UNION SELECT * FROM kodsis ORDER BY id DESC;

in addition to:
Solution for #129
@emin100 emin100 changed the title ALL operator for deparse ALL operator and UNION problem for deparse Jun 7, 2019
SELECT "a" FROM "kodsis" EXCEPT SELECT "a" FROM "application"

in addition to:
Solution for #125
@emin100 emin100 changed the title ALL operator and UNION problem for deparse ALL operator, UNION and EXCEPT problem for deparse Jun 10, 2019
SELECT "Test"."id" as "new Test Id" from "student" "Test"

in addition to:
Solution for #128
@emin100 emin100 changed the title ALL operator, UNION and EXCEPT problem for deparse ALL operator, UNION, EXCEPT and renamend Columns problem for deparse Jun 10, 2019
mehmet emin karakas added 3 commits June 10, 2019 15:58
SELECT "Test"."id" as "new Test Id" from "student" "Test"

in addition to:
Solution for #128
select array[]::text[] from x

in addition to:
Solution for #124
@emin100 emin100 changed the title ALL operator, UNION, EXCEPT and renamend Columns problem for deparse ALL operator, UNION, EXCEPT, Renamed Columns and Empty Array problem for deparsing Jun 10, 2019
CREATE SCHEMA myschema;

CREATE SCHEMA AUTHORIZATION joe;

CREATE SCHEMA IF NOT EXISTS test AUTHORIZATION joe;

CREATE SCHEMA hollywood
    CREATE TABLE films (title text, release date, awards text[])
    CREATE VIEW winners AS
        SELECT title, release FROM films WHERE awards IS NOT NULL;

in addition to:
Solution for #122
@emin100 emin100 changed the title ALL operator, UNION, EXCEPT, Renamed Columns and Empty Array problem for deparsing ALL operator, UNION, EXCEPT, Renamed Columns and Empty Array problem, CREATE SCHEMA for deparsing Jun 13, 2019
CREATE CAST (bigint AS int4) WITH FUNCTION int4(bigint) AS ASSIGNMENT;

CREATE CAST (bigint AS int4) WITHOUT FUNCTION AS IMPLICIT;

CREATE CAST (bigint AS int4) WITH INOUT AS ASSIGNMENT;
@emin100 emin100 changed the title ALL operator, UNION, EXCEPT, Renamed Columns and Empty Array problem, CREATE SCHEMA for deparsing ALL operator, UNION, EXCEPT, Renamed Columns and Empty Array problem, CREATE SCHEMA, CREATE CAST for deparsing Jun 28, 2019
lfittl added a commit that referenced this pull request Jul 1, 2019
lfittl added a commit that referenced this pull request Jul 1, 2019
Author: Mehmet Emin KARAKAŞ (#136)
lfittl added a commit that referenced this pull request Jul 1, 2019
Author: Mehmet Emin KARAKAŞ (#136)
lfittl added a commit that referenced this pull request Jul 1, 2019
@lfittl
Copy link
Member

lfittl commented Jul 1, 2019

@emin100 Thanks for your contribution!

I've applied this with a few modifications, and credited your work in the commit message. Thanks again!

@lfittl lfittl closed this Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants