You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
219 lines
7.8 KiB
219 lines
7.8 KiB
{
|
|
"db": "SQLite",
|
|
"221a6283db798bacaba99e7e85130f9a8bbea1299d8cb99d272b1d478dc19775": {
|
|
"query": "\n select\n state\n from cfd_states\n where cfd_id = $1\n order by id desc\n limit 1;\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "state",
|
|
"ordinal": 0,
|
|
"type_info": "Text"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 1
|
|
},
|
|
"nullable": [
|
|
false
|
|
]
|
|
}
|
|
},
|
|
"368233f70eed9dff137d884994a4863063459d53be75ed97bbf5297df70ffdb1": {
|
|
"query": "\n with state as (\n select\n cfd_id,\n state\n from cfd_states\n inner join cfds on cfds.id = cfd_states.cfd_id\n where cfd_states.id in (\n select\n max(id) as id\n from cfd_states\n group by (cfd_id)\n )\n )\n\n select\n cfds.uuid as \"uuid: crate::model::cfd::OrderId\",\n cfds.trading_pair as \"trading_pair: crate::model::TradingPair\",\n cfds.position as \"position: crate::model::Position\",\n cfds.initial_price as \"initial_price: crate::model::Price\",\n cfds.leverage as \"leverage: crate::model::Leverage\",\n cfds.liquidation_price as \"liquidation_price: crate::model::Price\",\n cfds.creation_timestamp_seconds as \"creation_timestamp_seconds: crate::model::Timestamp\",\n cfds.settlement_time_interval_seconds as \"settlement_time_interval_secs: i64\",\n cfds.origin as \"origin: crate::model::cfd::Origin\",\n cfds.fee_rate as \"fee_rate: u32\",\n cfds.quantity_usd as \"quantity_usd: crate::model::Usd\",\n cfds.counterparty as \"counterparty: crate::model::Identity\",\n state.state\n\n from cfds\n inner join state on state.cfd_id = cfds.id\n\n where cfds.uuid = $1\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "uuid: crate::model::cfd::OrderId",
|
|
"ordinal": 0,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "trading_pair: crate::model::TradingPair",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "position: crate::model::Position",
|
|
"ordinal": 2,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "initial_price: crate::model::Price",
|
|
"ordinal": 3,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "leverage: crate::model::Leverage",
|
|
"ordinal": 4,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "liquidation_price: crate::model::Price",
|
|
"ordinal": 5,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "creation_timestamp_seconds: crate::model::Timestamp",
|
|
"ordinal": 6,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "settlement_time_interval_secs: i64",
|
|
"ordinal": 7,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "origin: crate::model::cfd::Origin",
|
|
"ordinal": 8,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "fee_rate: u32",
|
|
"ordinal": 9,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "quantity_usd: crate::model::Usd",
|
|
"ordinal": 10,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "counterparty: crate::model::Identity",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "state",
|
|
"ordinal": 12,
|
|
"type_info": "Text"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 1
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false
|
|
]
|
|
}
|
|
},
|
|
"9f31d4002a7328b199a24d50149f2724706e2d391a94b76d7894983f5eb71c4b": {
|
|
"query": "\n select\n id\n from cfds\n where cfds.uuid = $1;\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id",
|
|
"ordinal": 0,
|
|
"type_info": "Int64"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 1
|
|
},
|
|
"nullable": [
|
|
true
|
|
]
|
|
}
|
|
},
|
|
"e38578559a3a9bd5a082579cecc52c976f55f2ed25e3bedebab85bb8dcd69354": {
|
|
"query": "\n with state as (\n select\n cfd_id,\n state\n from cfd_states\n inner join cfds on cfds.id = cfd_states.cfd_id\n where cfd_states.id in (\n select\n max(id) as id\n from cfd_states\n group by (cfd_id)\n )\n )\n\n select\n cfds.uuid as \"uuid: crate::model::cfd::OrderId\",\n cfds.trading_pair as \"trading_pair: crate::model::TradingPair\",\n cfds.position as \"position: crate::model::Position\",\n cfds.initial_price as \"initial_price: crate::model::Price\",\n cfds.leverage as \"leverage: crate::model::Leverage\",\n cfds.liquidation_price as \"liquidation_price: crate::model::Price\",\n cfds.creation_timestamp_seconds as \"creation_timestamp_seconds: crate::model::Timestamp\",\n cfds.settlement_time_interval_seconds as \"settlement_time_interval_secs: i64\",\n cfds.origin as \"origin: crate::model::cfd::Origin\",\n cfds.fee_rate as \"fee_rate: u32\",\n cfds.quantity_usd as \"quantity_usd: crate::model::Usd\",\n cfds.counterparty as \"counterparty: crate::model::Identity\",\n state.state\n\n from cfds\n inner join state on state.cfd_id = cfds.id\n ",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "uuid: crate::model::cfd::OrderId",
|
|
"ordinal": 0,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "trading_pair: crate::model::TradingPair",
|
|
"ordinal": 1,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "position: crate::model::Position",
|
|
"ordinal": 2,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "initial_price: crate::model::Price",
|
|
"ordinal": 3,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "leverage: crate::model::Leverage",
|
|
"ordinal": 4,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "liquidation_price: crate::model::Price",
|
|
"ordinal": 5,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "creation_timestamp_seconds: crate::model::Timestamp",
|
|
"ordinal": 6,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "settlement_time_interval_secs: i64",
|
|
"ordinal": 7,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "origin: crate::model::cfd::Origin",
|
|
"ordinal": 8,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "fee_rate: u32",
|
|
"ordinal": 9,
|
|
"type_info": "Int64"
|
|
},
|
|
{
|
|
"name": "quantity_usd: crate::model::Usd",
|
|
"ordinal": 10,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "counterparty: crate::model::Identity",
|
|
"ordinal": 11,
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"name": "state",
|
|
"ordinal": 12,
|
|
"type_info": "Text"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 0
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false
|
|
]
|
|
}
|
|
}
|
|
}
|