Database Nodes

Estimated reading time: 8 minutes

Database nodes are storage nodes that connect to databases and perform different operations on them, such as update, insert, delete, and select. Each type of Database requires different configuration information. Once you configure the database connection information on one node, it will be available on every database node that you create from that point onward.

OT Link Platform flows currently supports the following Database nodes:


MySQL Node

This node connects to a MySQL Database. Enter queries into connected Template or Function Nodes through msg.topic to query the database.



[
  {
   
    "id":"12019404.39f31c",
   
    "type":"mysql",
   
    "z":"b1349921.43fef",
   
    "name":"",
   
    "x":180,
   
    "y":400,
   
    "wires": [[]]
 
  }
]


MSSQL Node

This node connects to a MSSQL Database. Enter queries into the Node itself or into connected Template and Function Nodes through msg.payload to query the database.



[
  {
    "id":"747a1c04.5c783c",
    "type":"MSSQL",
    "z":"b1349921.43fef",
    "name":"",
    "query":"",
    "outField":"payload",
    "x":860,
    "y":240,
    "wires":[[]]
  }
]


MongoDB In Node

This node connects to a MongoDB database. It allows find, count, and aggregate operations. Select the operation from the node and run the operation with Inject nodes. You can make adjustments to the operation with connected Function nodes through msg.payload and msg.query.


[
  {
    "id":"f6ee896.11af1f8",
    "type":"mongodbin",
    "z":"b1349921.43fef",
    "mongodb":"10c975fc.83fdea",
    "name":"",
    "collection":"",
    "operation":"find",
    "x":160,
    "y":220,
    "wires":[[]]
  },
  {
    "id":"10c975fc.83fdea",
    "type":"mongodb",
    "z":"",
    "hostname":"127.0.0.1",
    "port":"27017",
    "db":"test",
    "name":""
  }
]

MongoDB Out Node

This node connects to a MongoDB database. It allows save, insert, update, and remove operations on the database. Select the operation from the node and run the operation with Inject nodes. You can make adjustments to the operation with connected Function nodes through msg.payload and msg.query.


[
  {
    "id":"434f1f29.8a6cc8",
    "type":"mongodbout",
    "z":"b1349921.43fef",
    "mongodb":"",
    "name":"",
    "collection":"",
    "payonly":false,
    "upsert":false,
    "multi":false,
    "operation":"store",
    "x":380,
    "y":220,
    "wires":[]
  }
]

MongoDB2 In Node

This node connects to a MongoDB service. It allows operations based on the MongoDB 2.0 API. Select the operation from the node and run the operation with Inject nodes. You can make adjustments to the operation with connected Function nodes through msg.payload and msg.query.



[
  {
    "id":"4b3c4c8a.13b634",
    "type":"mongodb2in",
    "z":"b1349921.43fef",
    "service":"",
    "name":"",
    "collection":"",
    "operation":"",
    "x":340,
    "y":60,
    "wires":[[]]
  }
]

MongoDB3 In Node

This node connects to a MongoDB service. It allows operations based on the MongoDB 3.0 API. Select the operation from the node and run the operation with Inject nodes. You can make adjustments to the operation with connected Function nodes through msg.payload and msg.query.



[
  {
    "id":"55f6c8b0.795a88",
    "type":"mongodb3in",
    "z":"b1349921.43fef",
    "service":"_ext_",
    "configNode":"19952a5d.2d68b6",
    "name":"",
    "collection":"",
    "operation":"",
    "x":100,
    "y":60,
    "wires":[[]]
  },
  {
    "id":"19952a5d.2d68b6",
    "type":"mongodb3",
    "z":"",
    "uri":"",
    "name":"",
    "options":"",
    "parallelism":"-1"
  }
]

Sqlite Node

This node connects to a Sqlite instance. Send queries to the node through msg.topic with Template or Function nodes. You can also enter queries into the node itself.


[
  {
    "id":"689c580a.4cc5b8",
    "type":"sqlite",
    "z":"b1349921.43fef",
    "sqlquery":"msg.topic",
    "sql":"",
    "name":"",
    "x":560,
    "y":360,
    "wires":[[]]
  }
]

Crate In Node

This node connects to a Crate IO service. This node receives data from the database for output. Send queries through msg.query and msg.args with Template or Function nodes.



[
  {
    "id":"851e9fba.9b7a38",
    "type":"crate in",
    "z":"b1349921.43fef",
    "name":"",
    "database":"",
    "x":580,"y":60,
    "wires":[[]]
  }
]

Crate Out Node

This node connects to a Crate IO service. This node can write new data to the database. Send queries through msg.table, msg.data, and msg.where with Template or Function nodes.


[
  {
    "id":"f1dadf40.bde12",
    "type":"crate out",
    "z":"b1349921.43fef",
    "name":"",
    "database":"",
    "table":"",
    "x":820,
    "y":60,
    "wires":[]
  }
]