ScalarDB SQL API Guide
This guide describes how to use ScalarDB SQL API.
SqlSessionFactory
In ScalarDB SQL API, you execute all operations through a SqlSession
instance, which is instantiated with SqlSessionFactory
.
This section explains how to use them.
Before explaining SqlSessionFactory
, we start with the explanation for Connection mode and Transaction mode.
Connection mode
ScalarDB SQL offers two connection modes: Direct and Server modes. With Direct mode, ScalarDB SQL client-side library directly uses ScalarDB API. On the other hand, with Server mode, ScalarDB SQL client-side library uses ScalarDB API indirectly through ScalarDB SQL Server.
You can specify a connection mode in your configuration file or when you build SqlSessionFactory
.
And if you don't specify it, Direct mode is used by default.