LoginSignup
0
0

More than 3 years have passed since last update.

enebularでherokupostgres その3

Last updated at Posted at 2021-05-09

概要

enebularでherokupostgresに繋いでみた。

参考にしたページ。

写真

image.png

setup

msg.payload = "CREATE TABLE sensordata_tbl(id SERIAL PRIMARY KEY, temperature numeric NOT NULL, roomname text, ts bigint NOT NULL);";
return msg;

select

msg.payload = "select * from sensordata_tbl;";
return msg;

insert

msg.payload = "insert into sensordata_tbl(roomname, temperature, ts) values ('living', 22.5, " + Date.now() + ");";
return msg;

drop

msg.payload = "drop table sensordata_tbl;";
return msg;

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0