adding quickfix library
This commit is contained in:
6
quickfix/_sql/embed.go
Normal file
6
quickfix/_sql/embed.go
Normal file
@ -0,0 +1,6 @@
|
||||
package sql
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed mssql mysql oracle postgresql sqlite3
|
||||
var FS embed.FS
|
||||
1
quickfix/_sql/mssql/create.bat
Normal file
1
quickfix/_sql/mssql/create.bat
Normal file
@ -0,0 +1 @@
|
||||
osql -U sa -P -i quickfix_database.sql
|
||||
65
quickfix/_sql/mssql/quickfix_database.sql
Normal file
65
quickfix/_sql/mssql/quickfix_database.sql
Normal file
@ -0,0 +1,65 @@
|
||||
DROP DATABASE quickfix;
|
||||
CREATE DATABASE quickfix;
|
||||
|
||||
USE quickfix;
|
||||
CREATE TABLE sessions (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
creation_time DATETIME NOT NULL,
|
||||
incoming_seqnum INT NOT NULL,
|
||||
outgoing_seqnum INT NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier)
|
||||
);
|
||||
|
||||
CREATE TABLE messages (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
msgseqnum INT NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier,
|
||||
msgseqnum)
|
||||
);
|
||||
|
||||
CREATE TABLE event_log (
|
||||
id INT NOT NULL IDENTITY,
|
||||
time DATETIME NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
text TEXT NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE messages_log (
|
||||
id INT NOT NULL IDENTITY,
|
||||
time DATETIME NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
text TEXT NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
1
quickfix/_sql/mysql/create.bat
Normal file
1
quickfix/_sql/mysql/create.bat
Normal file
@ -0,0 +1 @@
|
||||
mysql -u root --execute="source mysql.sql";
|
||||
1
quickfix/_sql/mysql/create.sh
Normal file
1
quickfix/_sql/mysql/create.sh
Normal file
@ -0,0 +1 @@
|
||||
mysql -u root --execute="source mysql.sql";
|
||||
18
quickfix/_sql/mysql/event_log_table.sql
Normal file
18
quickfix/_sql/mysql/event_log_table.sql
Normal file
@ -0,0 +1,18 @@
|
||||
USE quickfix;
|
||||
|
||||
DROP TABLE IF EXISTS event_log;
|
||||
|
||||
CREATE TABLE event_log (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
time DATETIME NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64),
|
||||
text TEXT NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
18
quickfix/_sql/mysql/messages_log_table.sql
Normal file
18
quickfix/_sql/mysql/messages_log_table.sql
Normal file
@ -0,0 +1,18 @@
|
||||
USE quickfix;
|
||||
|
||||
DROP TABLE IF EXISTS messages_log;
|
||||
|
||||
CREATE TABLE messages_log (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
time DATETIME NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
text TEXT NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
19
quickfix/_sql/mysql/messages_table.sql
Normal file
19
quickfix/_sql/mysql/messages_table.sql
Normal file
@ -0,0 +1,19 @@
|
||||
USE quickfix;
|
||||
|
||||
DROP TABLE IF EXISTS messages;
|
||||
|
||||
CREATE TABLE messages (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
msgseqnum INT NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier,
|
||||
msgseqnum)
|
||||
);
|
||||
5
quickfix/_sql/mysql/mysql.sql
Normal file
5
quickfix/_sql/mysql/mysql.sql
Normal file
@ -0,0 +1,5 @@
|
||||
source quickfix_database.sql;
|
||||
source sessions_table.sql;
|
||||
source messages_table.sql;
|
||||
source messages_log_table.sql;
|
||||
source event_log_table.sql;
|
||||
2
quickfix/_sql/mysql/quickfix_database.sql
Normal file
2
quickfix/_sql/mysql/quickfix_database.sql
Normal file
@ -0,0 +1,2 @@
|
||||
DROP DATABASE IF EXISTS quickfix;
|
||||
CREATE DATABASE quickfix;
|
||||
19
quickfix/_sql/mysql/sessions_table.sql
Normal file
19
quickfix/_sql/mysql/sessions_table.sql
Normal file
@ -0,0 +1,19 @@
|
||||
USE quickfix;
|
||||
|
||||
DROP TABLE IF EXISTS sessions;
|
||||
|
||||
CREATE TABLE sessions (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
creation_time DATETIME NOT NULL,
|
||||
incoming_seqnum INT NOT NULL,
|
||||
outgoing_seqnum INT NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier)
|
||||
);
|
||||
14
quickfix/_sql/oracle/messages_table.sql
Normal file
14
quickfix/_sql/oracle/messages_table.sql
Normal file
@ -0,0 +1,14 @@
|
||||
CREATE TABLE messages (
|
||||
beginstring VARCHAR2(8) NOT NULL,
|
||||
sendercompid VARCHAR2(64) NOT NULL,
|
||||
sendersubid VARCHAR2(64) NOT NULL,
|
||||
senderlocid VARCHAR2(64) NOT NULL,
|
||||
targetcompid VARCHAR2(64) NOT NULL,
|
||||
targetsubid VARCHAR2(64) NOT NULL,
|
||||
targetlocid VARCHAR2(64) NOT NULL,
|
||||
session_qualifier VARCHAR2(64) NOT NULL,
|
||||
msgseqnum INTEGER NOT NULL,
|
||||
message VARCHAR2(4000) NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier, msgseqnum)
|
||||
);
|
||||
15
quickfix/_sql/oracle/sessions_table.sql
Normal file
15
quickfix/_sql/oracle/sessions_table.sql
Normal file
@ -0,0 +1,15 @@
|
||||
CREATE TABLE sessions (
|
||||
beginstring VARCHAR2(8) NOT NULL,
|
||||
sendercompid VARCHAR2(64) NOT NULL,
|
||||
sendersubid VARCHAR2(64) NOT NULL,
|
||||
senderlocid VARCHAR2(64) NOT NULL,
|
||||
targetcompid VARCHAR2(64) NOT NULL,
|
||||
targetsubid VARCHAR2(64) NOT NULL,
|
||||
targetlocid VARCHAR2(64) NOT NULL,
|
||||
session_qualifier VARCHAR2(64) NOT NULL,
|
||||
creation_time TIMESTAMP NOT NULL,
|
||||
incoming_seqnum INTEGER NOT NULL,
|
||||
outgoing_seqnum INTEGER NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier)
|
||||
);
|
||||
3
quickfix/_sql/postgresql/create.bat
Normal file
3
quickfix/_sql/postgresql/create.bat
Normal file
@ -0,0 +1,3 @@
|
||||
dropdb -U postgres --if-exists quickfix
|
||||
createdb -U postgres quickfix
|
||||
psql -U postgres -d quickfix -f postgresql.sql
|
||||
3
quickfix/_sql/postgresql/create.sh
Normal file
3
quickfix/_sql/postgresql/create.sh
Normal file
@ -0,0 +1,3 @@
|
||||
dropdb -U postgres --if-exists quickfix
|
||||
createdb -U postgres quickfix
|
||||
psql -U postgres -d quickfix -f postgresql.sql
|
||||
16
quickfix/_sql/postgresql/event_log_table.sql
Normal file
16
quickfix/_sql/postgresql/event_log_table.sql
Normal file
@ -0,0 +1,16 @@
|
||||
CREATE SEQUENCE event_log_sequence;
|
||||
|
||||
CREATE TABLE event_log (
|
||||
id INTEGER DEFAULT NEXTVAL('event_log_sequence'),
|
||||
time TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64),
|
||||
text TEXT NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
16
quickfix/_sql/postgresql/messages_log_table.sql
Normal file
16
quickfix/_sql/postgresql/messages_log_table.sql
Normal file
@ -0,0 +1,16 @@
|
||||
CREATE SEQUENCE messages_log_sequence;
|
||||
|
||||
CREATE TABLE messages_log (
|
||||
id INTEGER DEFAULT NEXTVAL('messages_log_sequence'),
|
||||
time TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64),
|
||||
text TEXT NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
15
quickfix/_sql/postgresql/messages_table.sql
Normal file
15
quickfix/_sql/postgresql/messages_table.sql
Normal file
@ -0,0 +1,15 @@
|
||||
CREATE TABLE messages (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
msgseqnum INTEGER NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier,
|
||||
msgseqnum)
|
||||
);
|
||||
4
quickfix/_sql/postgresql/postgresql.sql
Normal file
4
quickfix/_sql/postgresql/postgresql.sql
Normal file
@ -0,0 +1,4 @@
|
||||
\i sessions_table.sql;
|
||||
\i messages_table.sql;
|
||||
\i messages_log_table.sql;
|
||||
\i event_log_table.sql;
|
||||
15
quickfix/_sql/postgresql/sessions_table.sql
Normal file
15
quickfix/_sql/postgresql/sessions_table.sql
Normal file
@ -0,0 +1,15 @@
|
||||
CREATE TABLE sessions (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
creation_time TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||
incoming_seqnum INTEGER NOT NULL,
|
||||
outgoing_seqnum INTEGER NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier)
|
||||
);
|
||||
15
quickfix/_sql/sqlite3/event_log_table.sql
Normal file
15
quickfix/_sql/sqlite3/event_log_table.sql
Normal file
@ -0,0 +1,15 @@
|
||||
DROP TABLE IF EXISTS event_log;
|
||||
|
||||
CREATE TABLE event_log (
|
||||
id INTEGER PRIMARY KEY NOT NULL,
|
||||
time DATETIME NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64),
|
||||
text TEXT NOT NULL
|
||||
);
|
||||
15
quickfix/_sql/sqlite3/messages_log_table.sql
Normal file
15
quickfix/_sql/sqlite3/messages_log_table.sql
Normal file
@ -0,0 +1,15 @@
|
||||
DROP TABLE IF EXISTS messages_log;
|
||||
|
||||
CREATE TABLE messages_log (
|
||||
id INTEGER PRIMARY KEY NOT NULL,
|
||||
time DATETIME NOT NULL,
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
text TEXT NOT NULL
|
||||
);
|
||||
17
quickfix/_sql/sqlite3/messages_table.sql
Normal file
17
quickfix/_sql/sqlite3/messages_table.sql
Normal file
@ -0,0 +1,17 @@
|
||||
DROP TABLE IF EXISTS messages;
|
||||
|
||||
CREATE TABLE messages (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
msgseqnum INT NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier,
|
||||
msgseqnum)
|
||||
);
|
||||
17
quickfix/_sql/sqlite3/sessions_table.sql
Normal file
17
quickfix/_sql/sqlite3/sessions_table.sql
Normal file
@ -0,0 +1,17 @@
|
||||
DROP TABLE IF EXISTS sessions;
|
||||
|
||||
CREATE TABLE sessions (
|
||||
beginstring CHAR(8) NOT NULL,
|
||||
sendercompid VARCHAR(64) NOT NULL,
|
||||
sendersubid VARCHAR(64) NOT NULL,
|
||||
senderlocid VARCHAR(64) NOT NULL,
|
||||
targetcompid VARCHAR(64) NOT NULL,
|
||||
targetsubid VARCHAR(64) NOT NULL,
|
||||
targetlocid VARCHAR(64) NOT NULL,
|
||||
session_qualifier VARCHAR(64) NOT NULL,
|
||||
creation_time DATETIME NOT NULL,
|
||||
incoming_seqnum INT NOT NULL,
|
||||
outgoing_seqnum INT NOT NULL,
|
||||
PRIMARY KEY (beginstring, sendercompid, sendersubid, senderlocid,
|
||||
targetcompid, targetsubid, targetlocid, session_qualifier)
|
||||
);
|
||||
Reference in New Issue
Block a user