- Server: PostgreSQL
216.158.72.53:5432, version13.7 (Debian 13.7-0+deb11u1) - Local time stamp:
2022-07-20T12:41:43.0051958+02:00 - Schema: public
- Table
public.addresses - Table
public.alarm_alarm_contacts
| // @ts-check | |
| // @description A numeric column named *size or *bytes reads as KB, MB, GB | |
| // @color green | |
| // A NUMBER column whose name ends in size or bytes reads as a human size | |
| // (KB, MB, GB ...), right aligned. The match ANDs the name and a numeric | |
| // type, so a text column is left alone. Edit the pattern to your columns. | |
| /** @type {PlumeExtension} */ | |
| export default [ | |
| { | |
| match: { name: /(size|bytes)$/i, type: /^(smallint|integer|bigint|numeric|real|double)/ }, |
216.158.72.53:5432, version 13.7 (Debian 13.7-0+deb11u1)2022-07-20T12:41:43.0051958+02:00public.addressespublic.alarm_alarm_contacts| do | |
| $$ | |
| declare | |
| _table_name text = 'md_temp'; | |
| _md text = ' | |
| | Command | Description | | |
| | --- | --- | | |
| | `git status` | List all *new or modified* files | | |
| | `git diff` | Show file differences that **havent been** staged | | |
| '; |
| /* | |
| Task: get a set of movies where Zendaya played a role, | |
| and for every such movie calculate the average review score, | |
| and also retrieve the list of top 5 actors in the order of credits. | |
| Here’s how such query can be written in EdgeQL: | |
| select | |
| Movie { | |
| title, |
| select | |
| title, | |
| name, | |
| avg(score) | |
| from movies m | |
| join movies_actors using(movie_id) | |
| join actors a using(actor_id) | |
| join ( | |
| select movie_id | |
| from actors join movies_actors using(actor_id) |
| -- | |
| -- Detect all duplicate foreign keys from public schema and generates a script that drops all duplicates but first. | |
| -- | |
| with fkeys as ( | |
| select | |
| tc.constraint_name, | |
| tc.table_name, | |
| kcu.column_name, | |
| ccu.table_name as foreign_table_name, |
| using Newtonsoft.Json.Linq; | |
| using Newtonsoft.Json.Serialization; | |
| namespace MyNamespace; | |
| public static class JsonValidator | |
| { | |
| public static bool IsJsonValidType(this string json, Type modelType, out string? message) | |
| { | |
| try |
| /* | |
| Creates TypeScript models from CSharp models | |
| - TypeScript model is set by config key TsModelsPath | |
| - CSharp models namespace is set by config key ModelNamespace | |
| 1) Add to your Program.cs: | |
| if (ModelBuilder.Build(args)) | |
| { | |
| return; | |
| } |
| create or replace function companies.search_companies( | |
| _search varchar, | |
| _skip integer, | |
| _take integer | |
| ) | |
| returns json | |
| language plpgsql | |
| as $$ | |
| declare | |
| _count bigint; |