Skip to content

Instantly share code, notes, and snippets.

View PedersenThomas's full-sized avatar

Thomas Pedersen PedersenThomas

  • Bitstackers
  • Denmark
View GitHub Profile

Keybase proof

I hereby claim:

  • I am pedersenthomas on github.
  • I am pedersenthomas (https://keybase.io/pedersenthomas) on keybase.
  • I have a public key ASBbkPsBWbFVoosZi9fQshdUkqiXHB3y__jZ2VEiVN7Ibwo

To claim this, I am signing this object:

import 'dart:async';
import 'package:postgresql/postgresql.dart';
void main() {
var username = "TheRightMan";
var password = "WithTheRightSecret";
var DBname = "AtTheRightPlace";
var uri = 'postgres://$username:$password@localhost:5432/$DBname';
CREATE OR REPLACE FUNCTION
InsertPerson(text, text, timestamp, double precision)
RETURNS
INTEGER
AS
$delimiter$
INSERT INTO person(firstname, lastname, dateofbirth, height) VALUES
($1, $2, $3, $4)
RETURNING id
$delimiter$
import 'dart:async';
import 'package:postgresql/postgresql.dart';
void main() {
var username = "TheRightMan";
var password = "WithTheRightSecret";
var DBname = "AtTheRightPlace";
var uri = 'postgres://$username:$password@localhost:5432/$DBname';
INSERT INTO person
(firstname, lastname, dateofbirth, height)
VALUES
('John', 'Doe', TIMESTAMP '1980-05-17', 1.92),
('Jane', 'Doe', TIMESTAMP '1983-10-23', 1.87),
('Baby', 'Doe', TIMESTAMP '2013-09-21', 0.43);
CREATE TABLE person(
id SERIAL PRIMARY KEY,
firstname varchar(80),
lastname varchar(80),
dateofbirth timestamp,
height double precision
)