Skip to content

Commit 71debb8

Browse files
committed
Sdb -> Database
1 parent 8152b3b commit 71debb8

File tree

7 files changed

+12
-15
lines changed

7 files changed

+12
-15
lines changed

src/db.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ enum tickers_table = "tickers";
8080
enum search_filters_table = "search_filters";
8181
enum search_query_table = "temp.search_query";
8282

83-
final class SdbException : Exception
83+
final class DatabaseException : Exception
8484
{
8585
this(string msg, string file = __FILE__, size_t line = __LINE__) {
8686
super(msg, file, line);
8787
}
8888
}
8989

90-
final class Sdb
90+
final class Database
9191
{
9292
private sqlite3* db;
9393
private string db_filename;
@@ -1088,7 +1088,7 @@ final class Sdb
10881088
if (res)
10891089
writeln("DB: Result code ", res, ".\n\n", error_msg, "\n");
10901090

1091-
throw new SdbException(
1091+
throw new DatabaseException(
10921092
text("SQLite error ", error_code, " (", error_string, ")")
10931093
);
10941094
}

src/server/cmdhandler.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
module soulfind.server.cmdhandler;
77
@safe:
88

9-
import soulfind.db : Sdb;
109
import soulfind.defines : blue, kick_duration, log_user, norm, RoomMemberType,
1110
RoomType, server_username;
1211
import soulfind.server.messages;

src/server/msghandler.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
module soulfind.server.msghandler;
77
@safe:
88

9-
import soulfind.db : Sdb;
109
import soulfind.defines : blue, bold, log_msg, norm, pbkdf2_iterations, red,
1110
RoomMemberType, RoomType, server_username;
1211
import soulfind.pwhash : create_salt, hash_password_async;

src/server/room.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module soulfind.server.room;
77
@safe:
88

9-
import soulfind.db : Sdb;
9+
import soulfind.db : Database;
1010
import soulfind.defines : blue, log_msg, max_chat_message_length,
1111
max_room_ticker_length, max_room_tickers, norm,
1212
RoomTicker, RoomType;
@@ -21,12 +21,12 @@ final class Room
2121
const string name;
2222
const RoomType type;
2323

24-
private Sdb db;
24+
private Database db;
2525
private GlobalRoom global_room;
2626
private User[string] users;
2727

2828

29-
this(string name, RoomType type, Sdb db, GlobalRoom global_room)
29+
this(string name, RoomType type, Database db, GlobalRoom global_room)
3030
{
3131
this.name = name;
3232
this.type = type < 0 ? RoomType._public : type;

src/server/server.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module soulfind.server.server;
77
@safe:
88

9-
import soulfind.db : Sdb;
9+
import soulfind.db : Database;
1010
import soulfind.defines : blue, kick_duration, log_msg, log_user,
1111
max_chat_message_length, max_global_recommendations,
1212
max_search_query_length, max_user_recommendations,
@@ -30,7 +30,7 @@ final class Server
3030
{
3131
const SysTime started_at;
3232
const MonoTime started_monotime;
33-
Sdb db;
33+
Database db;
3434

3535
private UserConnections conns;
3636
private CommandHandler cmd_handler;
@@ -49,7 +49,7 @@ final class Server
4949
{
5050
this.started_at = Clock.currTime!(ClockType.second)(UTC());
5151
this.started_monotime = MonoTime.currTime;
52-
this.db = new Sdb(db_filename);
52+
this.db = new Database(db_filename);
5353
this.conns = new UserConnections(this);
5454
this.cmd_handler = new CommandHandler(this);
5555
this.global_room = new GlobalRoom();

src/server/user.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
module soulfind.server.user;
77
@safe:
88

9-
import soulfind.db : Sdb;
109
import soulfind.defines : blue, bold, log_user, login_timeout,
1110
max_interest_length, max_room_name_length,
1211
max_user_interests, max_username_length, norm,

src/setup/setup.d

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
module soulfind.setup.setup;
77
@safe:
88

9-
import soulfind.db : Sdb;
9+
import soulfind.db : Database;
1010
import soulfind.defines : blue, bold, default_max_users, default_motd,
1111
default_port, norm, pbkdf2_iterations, red,
1212
RoomMemberType, RoomType, SearchFilterType, VERSION;
@@ -27,12 +27,12 @@ struct MenuItem
2727

2828
final class Setup
2929
{
30-
private Sdb db;
30+
private Database db;
3131

3232

3333
this(string db_filename)
3434
{
35-
this.db = new Sdb(db_filename);
35+
this.db = new Database(db_filename);
3636
}
3737

3838
void show()

0 commit comments

Comments
 (0)