SQLiteInteractiveEngine

io.github.nicheapplab.tcodeengine.SQLiteInteractiveEngine
class SQLiteInteractiveEngine(jdbc_prefix: String, tcode_tbl_path: String, mazegaki_path: String, bushu_path: String) extends InteractiveEngine, SQLiteStrokes

To use SQLite databases as dictionaries, it must be provided with file path for the database files. If any of the database files don't exist, the missing database file will be created from zip archived dictionary.

scala> import io.github.nicheapplab.tcodeengine._

scala> val tcode_tbl_path = System.getProperty("java.io.tempdir") ++ "/.t-code-engine/tcode_tbl.db"
scala> val mazegaki_path = System.getProperty("java.io.tempdir") ++ "/.t-code-engine/mazegaki.db"
scala> val bushu_path = System.getProperty("java.io.tempdir") ++ "/.t-code-engine/bushu.db"
scala> val jdbc_prefix = "jdbc:sqlite"
scala> val ie = new SQLiteInteractiveEngine(jdbc_prefix, tcode_tbl_path, mazegaki_path, bushu_path) with QwertyLayout
scala> "fjyijstt".foreach(ie.put(_))
scala> ie.inflexRight()
scala> ie.convert()
scala> ie.selectCandidate(0)
scala> ie.commit()
val res0: String = "記者"

Attributes

Graph
Supertypes
trait Strokes
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Inherited methods

def backspace(): Boolean

Attributes

Inherited from:
InteractiveEngine
def buffer: ListBuffer[Char]

Attributes

Inherited from:
InteractiveEngine
def candidates: ListBuffer[String]

Attributes

Inherited from:
InteractiveEngine
def commit(): String

Attributes

Inherited from:
InteractiveEngine
def convert(): ListBuffer[_ >: Char & String <: Char | String]

Attributes

Inherited from:
InteractiveEngine
def getChar(first: Int, second: Int): Char

Attributes

Inherited from:
SQLiteStrokes
def inflexLeft(): Unit

Attributes

Inherited from:
InteractiveEngine
def inflexRight(): Unit

Attributes

Inherited from:
InteractiveEngine
def lastChar: Option[Int]

Attributes

Inherited from:
InteractiveEngine
def lastCharAsKey: Option[Char]

Attributes

Inherited from:
InteractiveEngine
def outputBuffer: ListBuffer[Char]

Attributes

Inherited from:
InteractiveEngine
def put(c: Char): Unit

Attributes

Inherited from:
InteractiveEngine
def reset(): Unit

Attributes

Inherited from:
InteractiveEngine
def selectCandidate(n: Int): Boolean

Attributes

Inherited from:
InteractiveEngine

Concrete fields