Top Level Namespace

Includes:
NumRu

Defined Under Namespace

Modules: API, ActiveRecord, AnalysisHelper, ApplicationHelper, BasicAuthorization, DescriptionHelper, ExecuteAnalysis, FunctionHelper, GroupHelper, LoginSystem, NumRu, SearchHelper, Tar, UserHelper, WorkFlowHelper Classes: ActualFile, Analysis, AnalysisColumn, AnalysisHistory, ApplicationController, CrossArray, CrossResult, DerivedSpatialAttribute, DiagramCache, DiagramCacheDatum, DiagramCacheSession, Directory, DrawMethod, DrawMethodAttribute, DrawMethodController, DrawParameter, ExplorerController, ExplorerResult, File, FinderController, Function, FunctionArgument, FunctionController, FunctionOutput, Group, GroupController, Image, KeywordAttribute, KeywordAttributesController, KnowledgeBackup, KnowledgeFigure, KnowledgeFigureBackup, NArray, Node, NodeEntityAbstract, NodeLineage, NodeRelation, PathNode, Query, QueryHistory, Results, SearchController, SignUpUser, SpatialAndTimeAttribute, String, UserMailer, ValueType, Variable, VirtualNode

Constant Summary collapse

Node_Remote =
Array.new

Instance Method Summary collapse

Instance Method Details

#add_conditions(conditions, new_condition, andor = "AND") ⇒ Object



1
2
3
4
5
6
7
8
9
10
11
12
# File 'lib/activerecord_gfdnavi.rb', line 1

def add_conditions(conditions, new_condition, andor="AND")
  if conditions.nil?
    conditions = ["(#{new_condition})"]
  elsif Array === conditions
    conditions[0] += " #{andor} (#{new_condition})"
  elsif String === conditions
    conditions += " #{andor} (#{new_condition})"
  else
    raise "bug"
  end
  conditions
end

#boolean_condition(name) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/activerecord_gfdnavi.rb', line 24

def boolean_condition(name)
  if ActiveRecord::Base.connection.adapter_name=="SQLite"
    "#{name}=='t'"
  else
    name
  end
end

#concat(*ary) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/activerecord_gfdnavi.rb', line 15

def concat(*ary)
  if ActiveRecord::Base.connection.adapter_name=="MySQL"
    "concat(#{ary.join(",")})"
  else
    "#{ary.join("||")}"
  end
end