<commit_before>/**
 * Model class
 * Módulo de Modelos
 * @package sitp-api
 * @author <NAME> <<EMAIL>>
 * @module model
 */

// Module dependencies
var orm = require('orm'),
    Q = require('q'),
    qOrm = require('q-orm');

var q = Q.defer();

qOrm.qConnect(process.env.DATABASE_URL)
  .then(function(db){
    var Person = db.qDefine('person', 
      {
        name      : String,
        surname   : String,
        age       : Number, // FLOAT
        male      : Boolean,
        //continent : [ "Europe", "America", "Asia", "Africa", "Australia", "Antartica" ], // ENUM type
        //photo     : Buffer, // BLOB/BINARY
        //data      : Object // JSON encoded
      }, 
      {
        methods: {
          fullName: function () {
            return this.continent;
          }
        }, 
        validations: {}
      }
    );

    q.resolve(Person);
    
  }, function(err){
    console.log('ORM Connection error', err); // LOG
    return false;
  });

module.exports = q.promise;

<commit_msg>Agregando return<commit_after>/**
 * Model class
 * Módulo de Modelos
 * @package sitp-api
 * @author <NAME> <<EMAIL>>
 * @module model
 */

// Module dependencies
var orm = require('orm'),
    Q = require('q'),
    qOrm = require('q-orm');

var q = Q.defer();

qOrm.qConnect(process.env.DATABASE_URL)
  .then(function(db){
    var Person = db.qDefine('person', 
      {
        name      : String,
        surname   : String,
        age       : Number, // FLOAT
        male      : Boolean,
        //continent : [ "Europe", "America", "Asia", "Africa", "Australia", "Antartica" ], // ENUM type
        //photo     : Buffer, // BLOB/BINARY
        //data      : Object // JSON encoded
      }, 
      {
        methods: {
          fullName: function () {
            return this.continent;
          }
        }, 
        validations: {}
      }
    );

    return q.resolve(Person);
    
  }, function(err){
    console.log('ORM Connection error', err); // LOG
    return false;
  });

module.exports = q.promise;


{'fraction_non_alphanumeric': 0.15680473372781065, 'fraction_numerical': 0.0, 'mean_word_length': 1.7832647462277091, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3988564', 'n_tokens_mistral': 659, 'n_tokens_neox': 647, 'n_words': 146}