Understanding the .changes Command in SQLite

The .changes dot command in SQLite is a helpful utility for developers working with databases, especially when tracking the number of rows affected by SQL statements like INSERT, UPDATE or DELETE.

When used in the SQLite command-line interface, .changes toggles an option that shows the count of modified rows after executing a command.

This article looks at how the .changes command works, how it can be enabled or disabled, and provides an example to illustrate how it works.

Continue reading

An Overview of Dot Commands in SQLite

SQLite is a lightweight, self-contained, and highly reliable SQL database engine used widely for developing and testing small-scale applications. One unique feature of SQLite is the set of “dot commands” used in the SQLite command-line interface (CLI) to execute various actions related to database management, navigation, and configuration.

These dot commands are not part of SQL syntax itself but provide a convenient way to manage and interact with SQLite databases.

Continue reading

Redis ZREVRANGEBYLEX Replacement

Starting with Redis 6.2.0, the ZRANGE command added the REV, BYSCORE, BYLEX and LIMIT options. The addition of the first three options means that the ZRANGE command can now do what the ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZRANGEBYLEX and ZREVRANGEBYLEX commands can do.

As a result, those commands are now deprecated (as of Redis 6.2.0).

Therefore, we should no longer use the ZREVRANGEBYLEX command. Instead, we should use the ZRANGE command with the BYLEX and REV arguments.

Continue reading

Redis ZRANGEBYLEX Replacement

Starting with Redis 6.2.0, the ZRANGE command added the REV, BYSCORE, BYLEX and LIMIT options. The addition of the first three options means that the ZRANGE command can now do what the ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZRANGEBYLEX and ZREVRANGEBYLEX commands can do.

As a result, those commands are now deprecated (as of Redis 6.2.0).

Therefore, we should no longer use the ZRANGEBYLEX command. Instead, we should use the ZRANGE command with the BYLEX argument.

Continue reading