Bruce Perens

Results 34 comments of Bruce Perens

It's something like this: ```crystal class HierarchicalDeleteOperation(T) < Avram::DeleteOperation(T) end class DeleteCompany < HierarchicalDeleteOperation(Company) end DeleteCompany.new(Company.new).delete! ``` If you change HierarchicalDeleteOperation(T) to be abstract, there is no message.

The problem is that there are two uses of COLLATE, as a modifier to string comparison operators, and as a modifier for ordering the resulting records. The very best way...

So, I am coding these with where() today. I suggest implementing `MyClassQuery.new.field.trigram(String)` and `MyClassQuery.new.field.regex(String)`, as there are many ways of searching but those two cover the bases of efficiency and...

Sorry to be unclear. I inherited `DeleteOperation()` in my custom `DeleteOperation` class. I should have inherited `::DeleteOperation`.

I did have a need for table or column locking today. I am creating records with a unique key constraint. I check for existence of the key with a query,...

The table in question is for my url_path object, which is the fast resolution from a URL path to one of my other records. If I use upsert to create...

Michael's method is interesting, but I think I need to lock the table at *transaction* begin, not the beginning of the save. The usual operation would be to read from...

I don't know if this actually works, but here is my table locker: ```crystal class AppDatabase # Lock one or more tables. Creates a transaction, executes the block within the...

Here is how you select with row locking FOR UPDATE in avram: ```crystal sql =

Under the law of most US states, only an attorney who is admitted to the state bar association and is directly contracted to you may render you legal advice. Thus...