demetrixbio / FSharp.Data.Npgsql

F# type providers to support statically typed access to input parameters and result set of sql statement in idiomatic F# way. Data modifications via statically typed tables.
Apache License 2.0
128 stars 15 forks source link

New dvdrental backup #61

Closed kerams closed 4 years ago

kerams commented 4 years ago

Adds the following along with a couple of rows of sample data:

CREATE TABLE public.logs (
    id uuid NOT NULL,
    log_time timestamp without time zone NOT NULL,
    some_data integer[] NOT NULL
)
PARTITION BY RANGE (log_time);

CREATE TABLE public.logs_2019 (
    id uuid NOT NULL,
    log_time timestamp without time zone NOT NULL,
    some_data integer[] NOT NULL
);
ALTER TABLE ONLY public.logs ATTACH PARTITION public.logs_2019 FOR VALUES FROM ('2019-01-01 00:00:00') TO ('2019-12-31 00:00:00');

CREATE TABLE public.logs_2020 (
    id uuid NOT NULL,
    log_time timestamp without time zone NOT NULL,
    some_data integer[] NOT NULL
);
ALTER TABLE ONLY public.logs ATTACH PARTITION public.logs_2020 FOR VALUES FROM ('2020-01-01 00:00:00') TO ('2020-12-31 00:00:00');

CREATE MATERIALIZED VIEW public.long_films AS
 SELECT film.title,
    film.rating,
    ARRAY[1, 2, 3] AS some_data
   FROM public.film
  WHERE (film.length > 180)
  WITH NO DATA;

CREATE TYPE public.simple_type AS (
    some_array integer[],
    some_text text,
    some_number bigint
);

CREATE TYPE public.complex_type AS (
    ratings public.mpaa_rating[],
    nested_composite public.simple_type
);

CREATE TABLE public.table_with_composites (
    simple public.simple_type NOT NULL,
    id integer NOT NULL,
    complex public.complex_type
);
kerams commented 4 years ago

@daz10000, is there anything I can do to move these PRs along unless you're just busy?

daz10000 commented 4 years ago

Just a little busy - we loved our labs and offices over last few weeks. Will see what we can do this week.

Von meinem iPhone gesendet

Am 17.02.2020 um 11:29 PM schrieb kerams notifications@github.com:

 @daz10000, is there anything I can do to move these PRs along unless you're just busy?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.