ALTER TABLE foo ADD COLUMN new_column INTEGER;
mysql> CREATE TABLE foo (
... id integer primary key,
... name varchar(255),
... date datetime,
... fruits set('apple', 'pear', 'banana')
... ) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
cr> COPY foo_imported FROM '/tmp/dump.csv' WITH (bulk_size=1000);
cr> CREATE TABLE metrics1 (
... weight REAL CONSTRAINT weight_is_positive CHECK (weight >= 0),
... );
CREATE OK, 1 row affected (... sec)
cr> drop table metrics1;
DROP OK, 1 row affected (... sec)
cr> select array(select height from sys.summits order by height desc limit 5)
... as top5_mountains_array;
+--------------------------------+
| top5_mountains_array |
+--------------------------------+
| [4808, 4634, 4545, 4527, 4506] |
+--------------------------------+
SELECT 1 row in set (... sec)
[client]
default-character-set=utf8
[mysqld]
character-set-server=utf8
sh$ csvsql --db crate://localhost:4200 --insert /tmp/dump.csv
$ sh iss-position.sh
CONNECT OK
INSERT OK, 1 row affected (0.029 sec)
Sleeping for 10 seconds...
sh$ crash --hosts localhost:4200 \
--command "INSERT INTO iss (position) VALUES ('$(wkt_position)')"
CONNECT OK
INSERT OK, 1 row affected (0.037 sec)
This snippet can be used to verify that sphinx-copybutton
works
appropriately by also honoring empty lines.
>>> from sqlalchemy.ext import declarative
>>> from crate.client.sqlalchemy import types
>>> from uuid import uuid4
>>> def gen_key():
... return str(uuid4())