A MySql model structure for nodejs
Converts TS classes into JSON Schemas using TypeScript's reflection API
Convector Model base class
Convector Model base class
尝试第一个模块发布
[](https://travis-ci.org/jeromegn/Backbone.localStorage) [](
Code generator to generate angular-specific typescript (model/service/validator) from an openapi-specification.
ember addon. It adds validation support to your Ember-Data models.
Plugin for Objection.js to add softdelete functionality
Dependency injection for Backbone
An `AsyncStorage` storage backend, fully compatible with former version.
Validation and parsing for Crystallize rich text content
Simple Web API Framework
Perstore is a cross-platform JavaScript object store interface for mapping persistent objects to various different storage mediums using an interface based on W3C's [IndexedDB object store API](http://www.w3.org/TR/IndexedDB/#object-store-sync) and analogous to the HTTP REST interface. Perstore includes JavaScript object-relational mapping for SQL databases, JSON file storage, and hopefully support for many other object/document style storage systems that provide more direct object storage. Perstore provides model classes that wrap data stores, and supports JSON Schema integrity enforcement, link management, and prototype construction. Perstore also provides faceted access to models for an object-capability based security model.
Repository implementation for FuryStack
Redis Store implementation for FuryStack
Simple File System store implementation for FuryStack
Generate random sequelize model objects using faker
List and Model framework
`npm i` ### Tests `npm run test` ### Linting `npm run lint` ### Build `npm run build` ## Usage ### Class creation A base model can be created to add global functionnalities: ```javascript import { Model } from 'cbx-client-model';
Mongoose plugin to add pagination for aggregations
No description provided.
npm i @forzoom/models
Mongoose plugin providing experimental support for Node.js `async_hooks`
FMU export support for FMI 3.0
Modelica compiler written in RUST
A procedural macro companion to micrrou
An interface to nannou to reduce boilerplate code
Easy interprocess communication framework
Easy interprocess communication framework
Serialization and I/O utilities for the ferrolearn ML framework
FrankenTUI public facade and prelude.
Accessibility layer for FrankenTUI
Backend traits for FrankenTUI: platform abstraction for input, presentation, and time.
Terminal lifecycle, capabilities, and event parsing for FrankenTUI.
Feature-gated extras for FrankenTUI (markdown, charts, clipboard, themes).
Just use easy_form_for(MyModel) to generate a form for an object
= sql_valued_columns SqlValuedColumns is an ActiveRecord plugin that will let you have specific SQL statements executed on INSERT / UPDATE. It will call the SQL function you provide, passing the arguments specified in the call to sql_column. See the documentation for SqlValuedColumns::ClassMethods#sql_column for more information regarding usage, including passing Strings and Proc objects as arguments to your SQL function. Example: You have a model with two columns, one named "another_column" and the other named "size_of_another_column". Whenever you insert data into "another_column", you want to have size_of_another_column have the result of the SQL function LENGTH inserted into it. class MyModel < ActiveRecord::Base sql_column :size_of_another_column, "LENGTH", :another_column end Example 2: You have a model with three columns, position, latitude and longitude. Latitude and longitude are values expressed as angles, and position is a special datatype for your database that represents the X/Y/Z projection of that particular latitude and longitude (example: http://www.postgresql.org/docs/8.3/static/earthdistance.html ) When you insert data with latitude and longitude, you want to automatically call a function in your database to transform the latitude and longitude into the appropriate represenation. class MyModel < ActiveRecord::Base sql_column :position, "ll_to_earth", :latitude, :longitude end Example 3: You are an insane criminal who has somehow learned SQL. You would like to make anyone who runs your code to suffer database punishing queries and odd security and data formatting issues that will make them rue the day they ever learned of computers. class MyModel < ActiveRecord::Base sql_column :a_column, "(SELECT count(id) FROM large_list_of_things)", :raw => true sql_column :another_column, '(SELECT count(other_id) FROM other_large_list_of_things WHERE some_column = \'#{some_model_method}\')', :raw => true end == Notes No tests yet, am lazy. == Copyright Copyright (c) 2009 Chris Zelenak. See LICENSE for details.
# Soft Delete > In a production app, you should probably never really delete anything. [source](https://twitter.com/theebeastmaster/status/966870021099180034) A soft-delete marks a record as deleted, and keeps it in the database for historical reference. ## Installation Add this line to your application's Gemfile: ```ruby gem "soft_delete-workbar", require: "soft_delete" ``` And then execute: $ bundle Or install it yourself as: $ gem install soft_delete-workbar ## Usage Safely "delete" records from your database without losing them permanently. * Add SoftDelete to a model ``` class MyModel < ActiveRecord::Base include SoftDelete end ``` * Add a `deleted_at` column to the model's database table ``` rails g migration AddSoftDeleteToMyModels deleted_at:timestamp ``` * Safely call `MyModel#delete` without losing the record forever ## Methods Please see the `SoftDelete` module and the associated tests for a description of the methods that will be added to your model. * `.not_deleted` - records without a deleted_at timestamp * `.deleted` - records with a deleted_at timestamp * `#delete` - set the deleted_at timestamp * `#delete!` - delete the record from the database * `#destroy` - set the deleted_at timestamp, and run callbacks * `#destroy!` - delete the record from the database, and run callbacks * `#restore` - set the deleted_at timestamp to nil It will be necessary to exclude deleted records when querying the model. Use the `not_deleted` scope that now exists on the model. ```ruby class MyModelsController < ApplicationController def index @my_models = MyModel.not_deleted end end ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/workbar-dev/soft_delete. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
No description provided.
No description provided.