znone
2021-02-26 a2b2faa6019572388248617d0ac740bde95feb74
README.md
@@ -413,6 +413,8 @@
| real | float |
| DOUBLE | double |
| text | const char*<br>std::string |
| bytea | qtl::const_blob_data<br>std::vector<uint8_t> |
| oid | qtl::postgres::large_object |
| date | qtl::postgres::date |
| timestamp | qtl::postgres::timestamp |
| interval | qtl::postgres::interval |
@@ -428,6 +430,8 @@
| real | float |
| DOUBLE | double |
| text | char[N]<br>std::array&lt;char, N&gt;<br>std::string |
| bytea | qtl::const_blob_data<br>qtl::blob_data<br>std::vector<uint8_t> |
| oid | qtl::postgres::large_object |
| date | qtl::postgres::date |
| timestamp | qtl::postgres::timestamp |
| interval | qtl::postgres::interval |
@@ -448,7 +452,9 @@
Third-party libraries for compiling test cases need to be downloaded separately. In addition to database-related libraries, test cases use a test framework[CppTest](https://sourceforge.net/projects/cpptest/ "CppTest")。
The MySQL database used in the test case is as follows:
The database used in the test case is as follows:
### MySQL
```SQL
CREATE TABLE test (
  ID int NOT NULL AUTO_INCREMENT,
@@ -465,3 +471,37 @@
  PRIMARY KEY (ID)
);
```
### PostgreSQL
```SQL
DROP TABLE IF EXISTS test;
CREATE TABLE test (
  id int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 2147483647
START 1
),
  name varchar(255) COLLATE default,
  createtime timestamp(6)
)
;
ALTER TABLE test ADD CONSTRAINT test_pkey PRIMARY KEY ("id");
DROP TABLE IF EXISTS test_blob;
CREATE TABLE test_blob (
  id int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE  1
MAXVALUE 2147483647
START 1
),
  filename varchar(255) COLLATE default NOT NULL,
  md5 bytea,
  content oid
)
;
ALTER TABLE test_blob ADD CONSTRAINT test_blob_pkey PRIMARY KEY ("id");
```