From 221f553e7d60b9966e55613364a64ae8009ffa26 Mon Sep 17 00:00:00 2001 From: "binodnp@outlook.com" Date: Tue, 10 Jan 2017 01:49:54 +0545 Subject: [PATCH] -Updated core postgresql schema -Update SQL Bundling script. --- builds-sql/all-paused.bat | 2 +- .../db/PostgreSQL/1.x/1.0/core-blank.sql | 16 ++++++++++++++++ .../core.get_hstore_field.sql | 13 +++++++++++++ .../Frapid.Core/db/PostgreSQL/core-blank.sql | 16 ++++++++++++++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_hstore_field.sql diff --git a/builds-sql/all-paused.bat b/builds-sql/all-paused.bat index 923ba6cc..499b1522 100644 --- a/builds-sql/all-paused.bat +++ b/builds-sql/all-paused.bat @@ -1,3 +1,3 @@ @echo off -all.bat +call all.bat pause \ No newline at end of file diff --git a/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/core-blank.sql b/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/core-blank.sql index d315836f..7f530571 100644 --- a/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/core-blank.sql +++ b/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/core-blank.sql @@ -1035,6 +1035,22 @@ END $$ LANGUAGE plpgsql; +-->-->-- src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_hstore_field.sql --<--<-- +DROP FUNCTION IF EXISTS core.get_hstore_field(this public.hstore, _column_name text); + +CREATE FUNCTION core.get_hstore_field(_hstore public.hstore, _column_name text) +RETURNS text +AS +$$ + DECLARE _field_value text; +BEGIN + _field_value := _hstore->_column_name; + RETURN _field_value; +END +$$ +LANGUAGE plpgsql; + + -->-->-- src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_my_notifications.sql --<--<-- DROP FUNCTION IF EXISTS core.get_my_notifications(_login_id bigint); diff --git a/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_hstore_field.sql b/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_hstore_field.sql new file mode 100644 index 00000000..d0e71dad --- /dev/null +++ b/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_hstore_field.sql @@ -0,0 +1,13 @@ +DROP FUNCTION IF EXISTS core.get_hstore_field(this public.hstore, _column_name text); + +CREATE FUNCTION core.get_hstore_field(_hstore public.hstore, _column_name text) +RETURNS text +AS +$$ + DECLARE _field_value text; +BEGIN + _field_value := _hstore->_column_name; + RETURN _field_value; +END +$$ +LANGUAGE plpgsql; diff --git a/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/core-blank.sql b/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/core-blank.sql index d315836f..7f530571 100644 --- a/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/core-blank.sql +++ b/src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/core-blank.sql @@ -1035,6 +1035,22 @@ END $$ LANGUAGE plpgsql; +-->-->-- src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_hstore_field.sql --<--<-- +DROP FUNCTION IF EXISTS core.get_hstore_field(this public.hstore, _column_name text); + +CREATE FUNCTION core.get_hstore_field(_hstore public.hstore, _column_name text) +RETURNS text +AS +$$ + DECLARE _field_value text; +BEGIN + _field_value := _hstore->_column_name; + RETURN _field_value; +END +$$ +LANGUAGE plpgsql; + + -->-->-- src/Frapid.Web/Areas/Frapid.Core/db/PostgreSQL/1.x/1.0/src/06.functions-and-logic/core.get_my_notifications.sql --<--<-- DROP FUNCTION IF EXISTS core.get_my_notifications(_login_id bigint);