Code:Ext.SQLite.Libraries.SQLite sqlite = Interface.GetMod().GetLibrary<Ext.SQLite.Libraries.SQLite>();But it is exists!Code:error CS0234: The type or namespace name `SQLite' does not exist in the namespace `Oxide.Ext'. Are you missing an assembly reference?
P.S. Also can't i use System.Reflection?
Solved Oxide.Ext.SQLite not exists?
Discussion in 'Rust Development' started by deer_SWAG, Jul 9, 2016.
-
Wulf Community Admin
You should be using Oxide.Core.Database to access most of it, it changed a while back. The examples are a bit outdated.
-
If someone interested:
Code:using Oxide; using Oxide.Ext.SQLite;Ext.SQLite.Libraries.SQLite sqlite = Interface.GetMod().GetLibrary<Ext.SQLite.Libraries.SQLite>(); Core.Database.Connection sqlConnection;public void OpenConnection(string dbName, Core.Plugins.Plugin plugin) { sqlConnection = sqlite.OpenDb(dbName + ".db", plugin); var sql = Core.Database.Sql.Builder.Append(@"CREATE TABLE IF NOT EXISTS example ( id INTEGER PRIMARY KEY AUTOINCREMENT, data TEXT, data_other INTEGER );"); sqlite.Insert(sql, sqlConnection); }
